The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
Lil help? trying to change my code edit to a plugin
Hi, I need help getting my hack to work via a plugin instead of the hard coded edit I'm using now. I'm adding a THIS_SCRIPT criteria to the advertising manager. That way I can stick an ad in the 'Below Navbar' location but only have it appear in say forumdisplay or better yet, set the forum ID & limit it to forumdisplay. that way in a particular forum I can have different ads in the threads than on the forumdisplay listing.
I suppose I could have just added a template conditional to my ad code but I need to learn how to make vb4 plugins anyway & this seemed like it would be something I could handle. I was wrong. FYI: when I say my hack, to be fair I blatantly stole the NJAquaman - Notices THIS_SCRIPT Criteria mod & just changed it to work for Adverting instead of notices. All of the control panel stuff NJAquaman did in his mod works for this one w/ just minor edits. it's when I get to hook 'ad_check_criteria' that I couldn't get it to work which means the ad displays regardless of the THIS_SCRIPT setting. attached is a snippet of functions_ad.php and I've highlighted my added bit of code. this snippet of code makes the hack work & since it's directly above hook 'ad_check_criteria' my brain tells me I should be able to enter that same code into a plugin and call it at hook location 'ad_check_criteria' & I should be good to go. sadly it does not work. I guess I'm rustier than I thought. anyone have any idea what I'm doing wrong? thanks in advance |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|