
04-23-2003, 09:12 AM
|
|
|
Join Date: Nov 2001
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
It is the same hack, only add on is for putting keywords of parent forum inside thread pages.
In global.php, find:
Quote:
// figure out the chosen style settings
|
Below that, add:
Quote:
// BSB - HACK - Need to populate foruminfo for targeted ads
if(isset($forumid)) {
$getforuminfo=$DB_site->query_first("SELECT title FROM forum WHERE forumid='$forumid'");
$forum_ad_keywords=strtolower($getforuminfo[title]);
// Replace generic words
$forum_ad_keywords = str_replace(" and ", " ", $forum_ad_keywords);
$forum_ad_keywords = str_replace(" the ", " ", $forum_ad_keywords);
$forum_ad_keywords = str_replace(" with ", " ", $forum_ad_keywords);
$forum_ad_keywords = str_replace(" or ", " ", $forum_ad_keywords);
$forum_ad_keywords = str_replace("/", " ", $forum_ad_keywords);
$forum_ad_keywords = str_replace(" & ", " ", $forum_ad_keywords);
$forum_ad_keywords = str_replace(" for ", " ", $forum_ad_keywords);
// Replace spaces with commas (for phpAdsNew OR keywords)
$forum_ad_keywords = str_replace(" ", ",", $forum_ad_keywords);
} else {
$forum_ad_keywords = 'home';
}
// Parent forum inside thread pages
if(isset($threadid)) {
$getforuminfo=$DB_site->query_first("SELECT forum.title FROM forum,thread WHERE threadid='$threadid' AND forum.forumid=thread.forumid");
$forum_ad_keywords=strtolower($getforuminfo[title]);
// Replace generic words
$forum_ad_keywords = str_replace(" and ", " ", $forum_ad_keywords);
$forum_ad_keywords = str_replace(" the ", " ", $forum_ad_keywords);
$forum_ad_keywords = str_replace(" with ", " ", $forum_ad_keywords);
$forum_ad_keywords = str_replace(" or ", " ", $forum_ad_keywords);
$forum_ad_keywords = str_replace("/", " ", $forum_ad_keywords);
$forum_ad_keywords = str_replace(" & ", " ", $forum_ad_keywords);
$forum_ad_keywords = str_replace(" for ", " ", $forum_ad_keywords);
$forum_ad_keywords = str_replace(" i ", " ", $forum_ad_keywords);
// Replace spaces with commas (for phpAdsNew OR keywords)
$forum_ad_keywords = str_replace(" ", ",", $forum_ad_keywords);
}
// END HACK
|
I am using old version of phpAdsNew and Remote Invocation with JavaScript. For that, in header template put:
Quote:
<script language="JavaScript" src="http://www.your.path.to.phpadsnew/adjs.php?what=$forum_ad_keywords,+468x60&target=_blank">
</script>
|
Change 468x60 for the banner size you are using.
|