The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
deleted plugin, but it won't go away...
Back story:
I was messing around with a plugin in my test forum - using the hook location: vBulletin General: init_startup. My plug-in sucked. It worked a few times, and then I started getting a test forum-wide error (including in the AdminCP) to the effect of "Unable to add cookies, headers have already been sent. " I went into the test forum database via phpMyAdmin, and deleted my plug-in record from the plugin table. Didn't help - still got the error. I then did a bit of searching here and learned the "simple" way to disable plugins that break the Admin CP is by adding the line "define('DISABLE_HOOKS',true);" to my config.php file. I did that, and it let me get back into the Admin CP, where I confirmed my plugin was no longer listed in the Plugin Manager. However, when I removed the line "define('DISABLE_HOOKS',true);" from config.php, I can still see the plug-in is active. How can I kill it? Is it somehow cached in memory because of the hook location I used? I'm stumped. Thanks for any advice. |
#2
|
|||
|
|||
First of all you should not do such things manually in the database.
Try to edit/save any other plugin to rebuild the cache. |
#3
|
|||
|
|||
Thanks, Marco. That fixed it.
To avoid the error in the future: can you suggest which hook location I should use? I was simply generating a random number when any page in the forum is loaded. When I echoed the number (to test it) from the hook location "vBulletin General: init_startup", that's what caused the cookies error in the first place. Which tells me that's not a good hook choice (or a good place to echo output for testing). |
#4
|
||||
|
||||
try global_start maybe?
|
#5
|
|||
|
|||
I'll give that a shot. Thanks.
|
#6
|
|||
|
|||
You can echo or use any other function that prints out text to the user. You must assign the data to a variable then put the variable in your template to use it. You will get a error message if you use echo in most hooks.
|
#7
|
|||
|
|||
That was the ultimate plan - feeding the data to a variable for use in a template.
It sounds like my problem was less the hook choice than not knowing about using echo in a hook for testing purposes. |
#8
|
|||
|
|||
init_startup should only really be used when you have things which need to be done when the script is just about to start (i.e. when you want to cache extra templates/fetch extra data from the datastore) otherwise your best to stick with global_start as thats when most things are loaded and ready to go. If you just testing however use one of the less used pages, personally I use one of the hooks in the FAQ for testing, when I have what I want working then I would move it over to the most suitable hook.
Good luck |
#9
|
|||
|
|||
It's all working fine now, using the global_start hook. Tested, and installed on the live forum. Everyone's help is much appreciated.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|