Okay I give up, I've added the "Free PHP Directory Script" to start a mini directory targeted at my audience, however for two days now I can't seem to get the coop adds to display on the pages, I've tried everything I can think of, the whole Directory is written in PHP and just inserting the code doesn't do it, I've tried the method for HTMl pages using the .htaccess file, again no joy. Anyone been able to sucessfully get them to work with this package? The only link to it is from a DHTML menu that SE's shouldn't follow, but I'd like to get the ads working and start getting the Directory populated a bit and finish the cosmetics and get her ready to be crawled. the URL for the Directory is located here. BTW anyone with a related site is welcome to submit their site to the directory (commercial sites need not have a recip link just add Digital Point to the description). Thanks in advance!
Hi dakar As you say should be straightforward - the bizarre thing in this case is that the whole page is php yet if you view source the page the php for the ad network is clearly visible and unparsed. I don't see any </body></html> - is there anything else on the page that is also failing!
Just tried the "<? php" and "?>" again, and same results... prints out the ad code Everything else works perfectly as far as the directory is concerned... I'll admit it's written a bit unconventional from everything else I've seen, but it's quick and lightweight and works well.
If I remember rightly that script is now built from templates with petty much everything on the index page called via a template. As I recall it is also 100% php. Does it still have ending.php or footer.php? Have you tried placing the coop code there?
Patient, you are correct.. it's all 100% php, the each of the footer templates actually built into each php file, no external calls to get a footer template or any other.... $TEMPLATE["FOOTER"] = <<<EOF <br /> <br /> Powered by <A HREF="http://www.biz-directory.org/directory_script.php">Free PHP Directory Script</A> © <A HREF="http://www.biz-directory.org/">Biz Directory</A> <br /><br /> "<? php" ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../'); include ('ad_network.php'); echo $ad_network[0]; echo $ad_network[1]; echo $ad_network[2]; echo $ad_network[3]; echo $ad_network[4]; "?>" ?> Code (markup): I ommited the other stuff I'd added into it.
Try removing the php tags from the ad code i.e. try just: ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../'); include ('ad_network.php'); echo $ad_network[0]; echo $ad_network[1]; echo $ad_network[2]; echo $ad_network[3]; echo $ad_network[4];
Tried that again for grins.... Same results just displays the ad code in the page as text... it's like it will not recognize it as code to be parsed... BTW not that it really matters, nothing in the error_log either....
The code in your post has quotation marks: "<?php" "?>" Are they actually present? If so try removing them!
Tried it by removing the quotes around the <? ?>, and removing the <? ?>tags around the ad code all together as well (thats how the page is now), still no joy. This is getting frustrating. Must be overlooking something really simple here somewhere, I just can't figure out why it wont parse it. BTW your username really fits well... thanks for the assist on this one!
No problem, happy to help. You are right - this is something obvious and simple. Why not try adding the code at the very beginning of your index.php file i.e. so that it is the first thing the page processes. If that doesn't work try placing <? echo 'hello<br>'; ?> in the same position just for a laugh!
BINGO! I got it working! Added it to the end of the index.php instead of the tempalte_index.php and it now works just fine.... Odd that the footer wouldn't parse it, but I'm still just a PHP hacker, never claimed to understand all of this stuff yet. Thanks again! Perhaps in the future this little battle will help someone else from pounding their head on a desk for hours.