PDA

View Full Version : PhpAdsNew Integration Question


artwilliams
03-26-2006, 05:47 PM
I want to place ads using PHPAdsNews on my directory using the PHP method. What command or variable do I need to use to fill the >>> Top Category Title <<< below, with the the PHPLD top level category?

<?php include ("/home/domain/public_html/adserver/">>> Top Category Title <<<".php"); ?>

Thanks.

anon
03-26-2006, 06:07 PM
:shock:

artwilliams
03-26-2006, 06:18 PM
Guess what I am asking is, "what is the Top Level Category variable name'?

Neticus
03-26-2006, 08:39 PM
Im not entirely sure what you want to do. However I guess the basics is you want to put a code to call a phpadsnew banner somewhere on your website? and preferably the homepage only? (the top categories?)

See link below for how to show stuff on the homepage top categories only:

http://www.phplinkdirectory.com/kb/Making_Template_Changes_to_the_Front_Page_Only.htm l


Personally, what I did with adsnew code was create a file called top_banner.tpl then
placed the phpadnew code like so: (wrapped with {php} apparently so smarty templates can interpret php properly)

{php}
if (@include(getenv('DOCUMENT_ROOT').'/phpadsnew/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:1', 0, '', '', '0', $phpAds_context);
echo $phpAds_raw['html'];
}
{/php}

then in header.tpl called the code using
{include file="top_banner.tpl"}

Of course this shows on all categories. You have to wrap it in code found in the link above to confine banner to show in certain categories only.

Hope this helps give you ideas.

Net.

vegabond
03-27-2006, 05:32 AM
Content visible to registered users only.


:shock:

I am using PhpAdsNew for banner handling in my site. live demo: www.allthelink.com

If you still unable to serve banner just tell me :D. ur question is not clear.


Thanks
Shabu anower

artwilliams
03-27-2006, 05:30 PM
Thank you very much. I've added duplicated the above statement using the flow control statement:

{if $category.PARENT_ID == xx || $category.ID ==xx}

your PphAdsNews code tailored for category with Source=xx

{elseif $category.PARENT_ID == yy || $category.ID ==yy}

your PphAdsNews code tailored for category with Source=xx

....

and so on

....

{else}

your code for a catch all ad.

{/if}


This way I get specialized ads for each category. It works!