PEAK XOOPS - Including Protector in ImpressCMS Preload feature in englishin japanese

Including Protector in ImpressCMS Preload feature

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2008/4/30 0:11
marcan  Private 1st Class   Posts: 13
Hi Gijoe,

We have recently implemented a Preload feature in ImpressCMS inspired by the awesome work on XCL. This now allows us to easily include Protector without requesting users to hack their mainfile.php.

However, we are encountering a small challenge and I would like to know if you could help us a little bit. What our Preload feature does, is to trigger some code when some events are called. Among others, we have 2 events which are used for Protector: startCoreBoot, which is triggered at the beginning of include/common.php, and finishCoreBoot which is triggered at the end of include/common.php.

Of course, we use these 2 events to include the precheck and postcheck of Protector. This works very well.

However, and of course you can see me coming, this cause a problem on a fresh install of ImpressCMS, when the preload features tries to include those scripts when Protector module is not yet installed.

Now, we could check if the module Protector is installed, but this is not possible as your precheck script makes sure the Database class is not yet included.

What would be the best solution we could head to to solve this ?

Thanks for your help!
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2008/4/30 20:45
marcan  Private 1st Class   Posts: 13
Hi,

I just tried your latest Protector and now it seems that the challenge I was referring too is no more existing I did not yet have time to look deeply in the code, but it seems that your precheck verifies do not need the Protector module to be installed. Perhaps it does nothing (or less) if the module is not installed ?

At least, it is no more causing an error, which is perfect !!
Votes:1 Average:10.00
Previous post - Next post | Parent - No child | Posted on 2008/5/2 5:06
GIJOE  Gunnery Sergeant   Posts: 4110
hi marcan.

First, congraturate adding a feature of "preload".
"No hack" means "good for maintenance".

Quote:

I just tried your latest Protector and now it seems that the challenge I was referring too is no more existing I did not yet have time to look deeply in the code, but it seems that your precheck verifies do not need the Protector module to be installed. Perhaps it does nothing (or less) if the module is not installed ?
Yes.
Because old Protector cause the same problem for XCL installer

Then, I've modified precheck/postcheck it never causes problems before installing Protector. (3.10beta)

Anyway, I have to remove the status of 'beta' from 3.1x lines.
(It will be numbered as 3.2x)
Votes:0 Average:0.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!