|
Geek Advertising Banner System GAB is a highly configurable banner management system for vBulletin. |
Advertisement | |
This is an HTML example. Isn't it just wonderful?!?!
|
|
Learn how to remove ads |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Using GAB on non-standard templates
hello,
GAB is working properly when i insert into standard templates (i.e. header, footer, navbar), but is not displaying when i insert them into custom templates. (i am displaying these custom templates via GARS). i have read the threads below regarding this problem, but cannot seem to solve it. any idea on what i need to do to have GAB run in custom templates? http://www.thevbgeek.com/showthread.php?t=693 http://www.thevbgeek.com/showthread.php?t=2518
__________________
KidMercuryBlog: Your Alternative to the Matrix |
#2
|
||||
|
||||
Those would be the correct threads, and it depends on where the custom templates are being fetched. PHP has this thing called scope, and that basically means that not all variables are available in all locations. The $GAB_ads variable is available after the global_start hook, but if you want it to be accessible in functions, scope comes into play, whereby you'd need to add the following line to the start of said functions:
Code:
global $GAB_ads;
__________________
Please use the forums for support, feature requests, and similar such things. Support does not include custom code, custom template edits, or third-party modifications. PMs and emails to me should be for private information only, such as login information. If you PM or email me a support question, chances are good that I'll ignore it. Thanks. While the work or play is on, it is a lot of fun if while you are doing one you don't constantly feel that you ought to be doing the other. -- Franklin Pierce Adams |
#3
|
|||
|
|||
so i need to add
global $GAB_ads; to the code? but where? plugins or templates? or somewhere else? thanks
__________________
KidMercuryBlog: Your Alternative to the Matrix |
#4
|
||||
|
||||
I cannot tell you where to add the line of code because I don't know where your custom templates are being fetched. If you search the GARS PHP files for fetch_template you will see that it appears in a number of files, plus there are possibly other places the line of code would need to go. You'd need to tell me more about the custom templates (where you set them, what they do, where they appear, possibly screenshots) for me to get a clue.
__________________
Please use the forums for support, feature requests, and similar such things. Support does not include custom code, custom template edits, or third-party modifications. PMs and emails to me should be for private information only, such as login information. If you PM or email me a support question, chances are good that I'll ignore it. Thanks. While the work or play is on, it is a lot of fun if while you are doing one you don't constantly feel that you ought to be doing the other. -- Franklin Pierce Adams |
#5
|
|||
|
|||
hi morgan,
here is some more information, perhaps you can point me in the right direction: 1. i am placing the GAB variables in a custom template 2. i am then putting this custom template in a GARS module the custom templates do not have anything but the GAB variable in them. thanks for your patience and help thus far.
__________________
KidMercuryBlog: Your Alternative to the Matrix |
#6
|
||||
|
||||
Did you create a new PHP file for the module? If so, add global $GAB_ads; to the top of the file. If not, try editing the run_mod function in the gars_class_core.php file, adding the part in bold red:
Code:
if ($stage == "display") { $values =& $this->data['custom1'][$itemid]; global $vbcollapse, $show, $post, $GAB_ads;
__________________
Please use the forums for support, feature requests, and similar such things. Support does not include custom code, custom template edits, or third-party modifications. PMs and emails to me should be for private information only, such as login information. If you PM or email me a support question, chances are good that I'll ignore it. Thanks. While the work or play is on, it is a lot of fun if while you are doing one you don't constantly feel that you ought to be doing the other. -- Franklin Pierce Adams |
#7
|
|||
|
|||
that worked! thanks a lot for your help morgan.
__________________
KidMercuryBlog: Your Alternative to the Matrix |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
No more standard polls in GARS forums? | pixie | Geek Article and Review System | 1 | 06-14-2007 08:56 PM |
Examples of non-standard GARS in use | henrikhansen | Geek Article and Review System | 0 | 01-27-2007 02:50 PM |
GAB ads in non-standard templates | inthezone | Geek Advertising Banner System | 6 | 12-03-2006 02:54 AM |
VB Templates Display instead GARS Templates | Michael-MI | Geek Article and Review System | 4 | 01-08-2006 04:51 PM |
How to remove standard wrapper? | carvster | Geek Advertising Banner System | 7 | 11-09-2005 06:24 AM |