The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
creating plugin issue
Hi,
I would like to run this plugin PHP Code:
using this PHP Code:
PHP Code:
I'm having a problem with the plugin as internal error for whole website once I make it activated I tried to hook the plugin in parse_templates as well as process_templates_complete also loads of hooks but non of them works some hook places such as procces_templates_complete it does get rid of internal error yet is not doing what it suppose such as displaying data out in ad_global_below_navbar template any suggestions as I'm makin connection to the database retrieve elements contained within a table then construct out in template I will be more than happy if I can see any help or hint at least Many thanks in advance |
#2
|
|||
|
|||
Try changing all occurences of $this->registry->db-> to $vbulletin->db-> , and use hook parse_templates.
|
#3
|
|||
|
|||
Hi,
I changed variables names maybe conflict with something else but it still not working PHP Code:
--------------- Added [DATE]1371931663[/DATE] at [TIME]1371931663[/TIME] --------------- seconds I will try ur suggestion please dont leave i will update u in seconds --------------- Added [DATE]1371931850[/DATE] at [TIME]1371931850[/TIME] --------------- I changed any occurance of $this->registry->db-> to $vbulletin->db-> adn the hook place to parse_templates is not working unfurunately please what do you think? --------------- Added [DATE]1371931939[/DATE] at [TIME]1371931939[/TIME] --------------- Also this making a huge conflict as when I browse any registered user with us it tells me this user is not register once I disable the plugin I can browse users profile with no problem what do you think? note the internal error is gone now yet is not display the content that should be retrieved from db |
#4
|
|||
|
|||
Can you post again the exact code you're using?
|
#5
|
|||
|
|||
Here u go
PHP Code:
|
#6
|
|||
|
|||
Try this:
PHP Code:
|
#7
|
|||
|
|||
still not working???
--------------- Added [DATE]1371932856[/DATE] at [TIME]1371932856[/TIME] --------------- just to let you know when I delete this bit PHP Code:
as it makes problem in the whole forum if it existed?? |
#8
|
|||
|
|||
Try the above code again (I just fixed a couple things instead of posting it all again).
|
#9
|
|||
|
|||
ur last edit works great
please explain to me what was the problem I really want to learn many thanks in advance |
#10
|
|||
|
|||
Well, first I should have told you to replace $this->registry with $vbulletin, because there was one that didn't have a ->db on it. $this is used when inside an object method. I guess you copied the code from a class definition, so those had to be changed.
Also, these two lines had extra '(' characters (in red): Code:
$vbulletin->db->query_read_slave(("SET CHARACTER SET utf8"); $stream = $vbulletin->db->query_read_slave((" |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|