Author |
Message |
foxyfemfem
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/Risque/fhfe256.jpg)
Joined: Dec 07, 2003
Posts: 22
Location: USA
|
Posted:
Sat Sep 10, 2005 8:49 am |
|
OPEN VIEWTOPIC.PHP
FIND:
Code:
//
// Start initial var setup
//
|
BEFORE ADD:
Code:
$adblocktext = <<<EOM
<tr><td colspan=2 align=center>
Insert your Google AdSense Code Here
</td></tr>
<tr><td class="spaceRow" colspan="2" height="1"><img
src="templates/subSilver/images/spacer.gif"
alt="" width="1" height="1" /></td>
</tr>
EOM;
|
FIND:
Code:
//
// Okay, let's do the loop, yeah come on baby let's do the loop
// and it goes like this ...
//
for($i = 0; $i < $total_posts; $i++)
{
|
AFTER ADD:
Code:
if ($i=="0") {
$adblock = $adblocktext;
} else {
$adblock = "";
}
|
FIND:
Code:
$template->assign_block_vars('postrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
|
AFTER ADD:
Code:
'AD_BLOCK' => $adblock,
|
SAVE FILE
OPEN VIEWTOPIC_BODY.TPL
FIND:
Code:
<!-- END postrow -->
|
BEFORE ADD:
SAVE FILE
Now your forums will insert whatever you wish after the first post. And yes, you can insert Javascript.
Enjoy! Remember too many google ads can be annoying to members. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
Site Admin/Owner
![](modules/Forums/images/avatars/45030c033f18773153cd2.gif)
Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Sat Sep 10, 2005 9:04 am |
|
FFF! It's been a very long time! Glad to know you're still alive and well ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
gstrategic
Hangin' Around
![](modules/Forums/images/avatars/blank.gif)
Joined: Aug 15, 2005
Posts: 46
|
Posted:
Sat Sep 10, 2005 1:59 pm |
|
that's a good trick, but I'm trying to do do this to the news articles and not forums posts. I hope you have a cure for that too. ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Sep 11, 2005 8:46 pm |
|
gstrategic wrote: | that's a good trick, but I'm trying to do do this to the news articles and not forums posts. I hope you have a cure for that too. | If you are referring to this article http://www.ravenphpscripts.com/postt6548.html we have demonstrated how to do it. The code works. If it is not working at your site then it's a problem either with how you coded it or something else is interferring with it, but the code does work. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
blarneystone
Client
![](modules/Forums/images/avatars/Charlie_Brown/Charlie_Brown_-_Snoopy.gif)
Joined: Sep 18, 2004
Posts: 62
|
Posted:
Sat Oct 22, 2005 5:32 am |
|
Raven,
How did you insert the google search and adsense up top of the forums? I'd like to do that too |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
blarneystone
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Oct 22, 2005 3:06 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
blarneystone
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Oct 22, 2005 3:08 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Oct 22, 2005 3:15 pm |
|
You insert that code in different files that display content. config.php does not so that is not a good one. For example, I add it to theme.php to get it to show on every page. Then, I inserted it into a couple of templates to show it elsewhere in the forums. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|