The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
including external php file not working?
Hi,
I'm trying to get asrep working with vbulletin. Basically, under the first post in a thread I display a Google Adsense Ad. I want to be able to use the asrep fraud prevention feature. So I have done the following. Created an external php file called displayad1.php in the root of my forum with the following content: Quote:
Quote:
Quote:
|
#2
|
|||
|
|||
You can not use HTML style comment in PHP/Plugins.
Code:
<!-- AdSense Code --> |
#3
|
|||
|
|||
Ah, yes, thank you for that, I have removed that line and it works.. But I have come across another problem......
I've add the $displayad1 to the postbit template. If I hook the plugin to the showthread_start location, no ads are displayed, but it I change the location to postbit_display_start the ad is displayed as per normal. Is postbit_display_start called for all posts in a thread? if so how can I get the plugin to only run once when displaying posts in a trread? As stated above, i've tried adding it to the showthread_start location, but no ads are displayed? Cheers ... Gerald. |
#4
|
|||
|
|||
Try the showthread_complete hook location.
|
#5
|
|||
|
|||
Hi,
Changing it to the showthread_complete hook location doesn't work, no ads are displayed. Any other suggestions? |
#6
|
|||
|
|||
Use $GLOBALS[displayad1] in the template.
Marco forgot about his variable scopes. Rookie... |
#7
|
|||
|
|||
Hi,
I had to change the hook location to showthread_start and now $GLOBALS[displayad1] works perfectly. Thanks everyone for their help! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|