| Author |
Message |
foxyfemfem New Member


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. |
|
|
|
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
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  |
|
|
|
 |
gstrategic Hangin' Around

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.  |
|
|
|
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
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 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. |
|
|
|
 |
blarneystone Client

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 |
|
|
|
 |
blarneystone Client

Joined: Sep 18, 2004 Posts: 62
|
Posted:
Sat Oct 22, 2005 3:06 pm |
|
|
|
 |
blarneystone Client

Joined: Sep 18, 2004 Posts: 62
|
Posted:
Sat Oct 22, 2005 3:08 pm |
|
whew...I posted some adsense section targeting code and it said I was banned. since I am not, I was going to ask what file and where do I edit to implement section targeting as described on this site?
I am guessing config.php? |
|
|
|
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
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. |
|
|
|
 |
|
|
|
|