![]() |
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 :D |
Try changing all occurences of $this->registry->db-> to $vbulletin->db-> , and use hook parse_templates.
|
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 |
Can you post again the exact code you're using?
|
Here u go
PHP Code:
|
Try this:
PHP Code:
|
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?? |
Try the above code again (I just fixed a couple things instead of posting it all again).
|
ur last edit works great
please explain to me what was the problem I really want to learn many thanks in advance |
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"); |
All times are GMT. The time now is 05:12 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|