This may go into regex a little as well, but here is my problem first. I have to get this javascript sample ad to display on "about 100" content pages of this site- which has about 9000 pages in total. I need it to display under the left navigation. The left navigation code is currently in an xtpl file which apparantly wont even output a simple echo statement. (dont worry about that part, if I can get the php to make this work I'll find a way to get it into the xtpl page)
I was trying to originally write a script that generated a random number (say 1-10) and would only display the ad if the random number was equal to 1.
I would rather create the script to only show this code if the name of the page began with maybe the letter ''L". The thing is there is a URL rewrite rule in the .htaccess file, so I dont know if I tried to create a script that would recognize any url what was http://www.healthocrates.com/l% that the php script would even identify that as a match- since thats technically not the right URL (I think, I could be wrong there)
I am open to any other ideas on how to get this javascript sample ad to appear on only about 100 pages- I would ideally like them to be the same pages, that way I dont have to ask the client to sit there and refresh the page until the sample ad shows.
using PHP Version 4.4.3
thanks in advance.....
would like to display an ad or image on select pages only
Moderator: General Moderators