PDA

View Full Version : Banner Rotation phpAdsNew


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

Bill
11-18-2005, 07:35 PM
Check out the link below on a great google adsense mod. I'm sure it can be worked to work with phpadsnew:

http://www.phplinkdirectory.com/forum/viewtopic.php?t=437

The Walrus
11-18-2005, 08:42 PM
Content visible to registered users only.
Thanks, but I'm not smart enough to even be able to turn that into something intelligent.

Basicly, I'm looking for the one line of code that would fit in the commented out section above.

I think it would look something like this but would like some confirmation as to not blow **censored****censored****censored****censored** up:

Content visible to registered users only.

and then in my header.tpl I would add Content visible to registered users only.

Bill
11-18-2005, 10:54 PM
Try this, should work.

In main.tpl just before "{* Links heading and sorting*}" add:

Content visible to registered users only.

Make a new file called phpadsnew.tpl with this code:

Content visible to registered users only.

Give it a try, dont know if it will work. [/code]

Ap0s7le
11-21-2005, 12:49 AM
The Walrus,

That there should work.

If it doesn't, yell and I'll take some time to check it out for you.

-Casey

springdot
11-21-2005, 09:12 AM
Hi Guys

I'm not sure if I'm misunderstanding

Content visible to registered users only.

I use phpAdsNew, but all I have done is created a zone for that domain, and then generated an invocation code for it.

This has been placed in the (for me) header template for my directory and everything works fine. Unless you want to start targetting ads to specific pages, this should work fine, and seems to me to be easier than the above.

Cheers
James

p.s. - You may or may not have to put the code in {literal} {/literal} tags for it to work

The Walrus
12-11-2005, 02:30 AM
Content visible to registered users only.

Sorry, I just got around to trying this but it didnt work. I copied it exactly as shown to no avail.

And for the record, yes, I will be targeting banners for just about everything and want to run probably 16 different banners on a page.

The Walrus

Funky Monk
01-27-2006, 12:12 PM
Hi. I've just downloaded the program and joined the forum. I would like to be able to use phpadsnew as well but cannot get it to work using the code shown in this topic. Can someone help me out please.

fworth
01-27-2006, 05:41 PM
Were can i get the download of the phpadsnews?

Please HElp?

fworth
01-29-2006, 12:29 AM
Were can i get the download of the phpadsnews?

Please HElp? :?: :lol:

H2O
01-29-2006, 02:07 AM
http://phpadsnew.com/two/

I think it is also in Fantastico on cpanel servers

francis_bay
02-02-2006, 10:37 PM
Just installed phplinkdirectory on sunday and installed phpadsnew last night wednesday.
I have no experience on tpl at all. a little on php.

You know the saying its looking at you, why do you choose to ignore me to make it work? or something to that sentence.... :-)

After looking at the codes in each tpl files i found the answer to get this phpadsnew to work.

Normaly you know that some helpers here would ask for cost to help you with your trouble.

If you wan't it PM me. No cost. If you want to donate that's fine.