![]() |
How to modify a function (PHP) between hooks
1 Attachment(s)
Ok hi
I'm trying to write my first product, and it would be a small extension to the thank you hack... Is a very small thing and can be achieve by just changing a line in the code, but I wanted to do it by using the product system... Things is I don't exactly know exactly how to begin with the thing I want to modify is PHP Code:
PHP Code:
PHP Code:
[See attachment for the whole modification] I', not sure if I'm being clear enough... I just can figure out what to put in the hooks to make the thing work... I hope someone can lend me just few mins to teach me how to do it ^^ Thank you mates |
If the function you posted doesn't have any extra code you can comment out the statement.
In the first hook add Code:
/* In the second hook add Code:
*/ |
Nice workaround, I wouldn't have ever though of that.
|
1 Attachment(s)
I had tried that idea /* */ problem is you get an error message at evaluation :( (see attachment) obviously those two lines are the ones related to the hooks ^^
Besides that I couldn't think of anything else. Any other solution? I really appreciate the help :) |
In the second hook add
PHP Code:
|
Why not just place this in the first hook location?
PHP Code:
2) usergroupid 6 is the admin group so there is no real reason to work around that code. Either way it's sitting there doing nothing (assuming usergroupid 6 is in $vbulletin->options['post_thanks_who_delete_all']) The work around is nice but it won't play well in an enviroment using multiple products. |
THANK YOU ALOT!!!!!!!!!!!!!!
Both solutions work perfectly ^^ Thank you guys ^^ |
well, you could always change the value of usergroup id to say 'a' in the first hook then change it back in the second.
1st hook PHP Code:
PHP Code:
|
All times are GMT. The time now is 09:34 AM. |
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:
|