Log in

View Full Version : Fatal error: Cannot redeclare class vBulletinHook


lacalla
10-01-2007, 05:43 PM
vbexternal works fine but when I add deluxe login, I get this error....

Fatal error: Fatal error: Cannot redeclare class vBulletinHook in /home/*****/public_html/forum/includes/class_hook.php on line 29

I searched here for this problem and from what I can gather, the only solution was to comment out 'class vBulletinHook' or some part of it from includes/class_hook.php. Well, it didn't work.

Can vb external and deluxe login be used together?

--------------- Added at 04:11 ---------------

It would be great to have both these but apparently it can't be done. <sigh>

Dismounted
10-02-2007, 05:27 AM
You'll need to manually edit vBExternal.

lacalla
10-02-2007, 10:30 AM
Dismounted,

Thank you for your help. Is there anything I can read, articles maybe, to give me a better understanding of what I need to edit in vBExternal?

Dismounted
10-02-2007, 11:24 AM
There aren't any "direct" tutorials. If I had some time, I would've done it for you.

lacalla
10-02-2007, 11:57 AM
Dismounted,

That's very nice of you and is very much appreciated. <smiles>
I'll do some reading, get more familiar with how everything works together and go from there.

Thanks again for letting me know that it is possible for them to work together.

Analogpoint
10-02-2007, 02:44 PM
Look in deluxe login, find where the class is defined, and wrap it with a conditional:

if (!class_exists('vBulletinHook'))
{
// class definition here.
}

lacalla
10-02-2007, 07:25 PM
"Look in deluxe login, find where the class is defined, and wrap it with a conditional:"

Asking for help is not something I'm used to and
it's embarrassing to need more information but the only two files that come with Deluxe Login are the instructions and login_inc.php. I don't get it. Where in Deluxe Login do I insert the conditional?

I really appreciate the help. I already have vBExternal on my page and it's extremely useful and Deluxe Login works great by itself so getting it going as well will just be the bees knees!

Again I apologize and again I thank you for the help.

Analogpoint
10-02-2007, 11:31 PM
Here you go. Just remove this line from your vBexternal.php file, and then on your pages, make sure your deluxe login code at the top of the file comes before the vBexternal code.

line 119
class vBulletinHook { function fetch_hook() { return false; } }

lacalla
10-03-2007, 04:09 AM
Analogpoint,

I followed your instructions and it worked!......sorta. The page loaded and it looked like it would be fine but when I logged in, even though my name was visible on the same page where vBExternal shows forum users online, I wasn't being shown as logged in on that same page and the Pm's didn't show either.

So after reading what to do if that happens and what the cause might be, I went to the control panel and changed the cookies from /forum/ to .mydomain. It didn't solve the problem with being shown as logged in on the non-vb page and it is apparently preventing me from logging in to the control panel. When I log in to the admin cp, the successful message comes up and then I go right back to the admin cp log in. Also instead of it being remembered which template I prefer, when I log on I have to change from the default to my preference.

HELP! How do I get back in to the admin control panel?

Marco van Herwaarden
10-03-2007, 05:48 AM
Please upload tools.php from the 'do_not_upload' folder of your vBulletin distribution to your admincp directory. Now point your browser to admincp/tools.php.

Reset the cookie Domain and Path to the default values.

Once your problem is fixed please remove tools.php again from the server.

If this does not solve your problems, please clear your browser cookies and cache, restart your browser and try again.