The Walrus
11-18-2005, 03:29 PM
would like to add banner rotation capabilities to my link direcory and was looking at phpadsnew as a means of doing it. Even though they have great documentation, I've gotten stuck. Mostly cause I dont know **censored****censored****censored****censored**! Below is two paragraphs from the manual which seems to explain what I would need to do. Anyone think I can get this to work and have any idea's on what they are talking about below! Any help would be greatly appreciated!
On every page you want to have a banner, you have to include phpadsnew.inc.php. This file is in your phpAdsNew installation directory. Banners are displayed using the view() function. The view() function does not work well in template-based websites (for example phplib, smarty or fasttemplate), because the view() function prints the banner directly to
the screen. The banner would appear before the rest of the page is printed. In order to make phpAdsNew work in template based websites there is an option that returns both the html code and the banner id in an array. The function does not print anything to the screen.
Store the banner inside a variable so it can be used in a template If this option is enabled phpAdsNew will use the view_raw() function to fetch a banner. This will mean the invocation code won’t display a banner directly on screen, but store the HTML code needed to display the banner in a PHP variable instead. If you are using a template system this is very handy because you can easily assign the contents of the variable to the template you are using. For instruction on how to assign a variable to your template
please read the documentation of your template system.
phpadsnew generates the following code:
Content visible to registered users only.the question is, where would be the best place to put it and have it availabe in all areas of phplinkdirectory, is the path above correct consider that phplinkdirectory is not in my root
If I understand the Smarty documentation correctly, I should be able to then add {$phpAds_raw} into my template and be golden
On every page you want to have a banner, you have to include phpadsnew.inc.php. This file is in your phpAdsNew installation directory. Banners are displayed using the view() function. The view() function does not work well in template-based websites (for example phplib, smarty or fasttemplate), because the view() function prints the banner directly to
the screen. The banner would appear before the rest of the page is printed. In order to make phpAdsNew work in template based websites there is an option that returns both the html code and the banner id in an array. The function does not print anything to the screen.
Store the banner inside a variable so it can be used in a template If this option is enabled phpAdsNew will use the view_raw() function to fetch a banner. This will mean the invocation code won’t display a banner directly on screen, but store the HTML code needed to display the banner in a PHP variable instead. If you are using a template system this is very handy because you can easily assign the contents of the variable to the template you are using. For instruction on how to assign a variable to your template
please read the documentation of your template system.
phpadsnew generates the following code:
Content visible to registered users only.the question is, where would be the best place to put it and have it availabe in all areas of phplinkdirectory, is the path above correct consider that phplinkdirectory is not in my root
If I understand the Smarty documentation correctly, I should be able to then add {$phpAds_raw} into my template and be golden