How do you add the Google ad only after the first post

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   How do you add the Google ad only after the first post
waZDer
CZ Newbie
waZDer has been a member for over 17 year's 17 Year Member
Gender: Male
Status: Offline
Joined: Feb 13, 2007
0.00 posts per day
Posts: 4
Points: 0
   
Hy i search mod for of add publicity on it forum between post's ... how there is here. please help me



Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
You have to to make some modifications to your

modules/Forums/viewtopic.php
modules/Forums/templates/*ALL_TEMPLATES/viewtopic_body.tpl
themes/"ALL_THEMES"/forums/viewtopic_body.tpl

Open your modules/Forums/viewtopic.php and find this line:


//
// Okay, let's do the loop, yeah come on baby let's do the loop
// and it goes like this ...
//


After that those lines add:


$post_number = 1;


Locate this line:


$template->assign_block_vars('postrow', array(


BEFORE that line of code add this (replace GOOGLE_AD_CODE with your google ad code):


if ($post_number == 1) {
     $google_ad = 'YOUR_GOOGLE_ADD';
}


Then find this line:


                'POST_SUBJECT' => $post_subject,


On the next line add this code:


                'GOOGLE_AD' => $google_ad,


Then scroll down and fine this line:


        );


Which is the closing brace for the template variables right after that add:


$post_number++;


If you added the above correctly then it should look something like this:


      );
$post_number++;
}

Then open your viewtopic_body.tpl and find this line:


<!-- END postrow -->


BEFORE that line add this:


{postrow.GOOGLE_AD}


Now depending on how many modifications you have made the above might not look correct. I dont use the Forums ported for Nuke either so there could be some differences there too. If you have more questions please post them also include a link to your Forums.



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: How do you add the Google ad only after the first post
waZDer
CZ Newbie
waZDer has been a member for over 17 year's 17 Year Member
Gender: Male
Status: Offline
Joined: Feb 13, 2007
0.00 posts per day
Posts: 4
Points: 0
   
have made exactly how whouse hand you and to appearance above frist post, not after ... please help

me page is [ Register or login to view links on this board. ] link for see the forum [ Register or login to view links on this board. ]

of Where download mod Inline Banner Ad for php-nuke ? pls give me ...



Back to top Reply with quote
#4   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Attach your viewtopic_body.tpl please.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   re: How do you add the Google ad only after the first post
waZDer
CZ Newbie
waZDer has been a member for over 17 year's 17 Year Member
Gender: Male
Status: Offline
Joined: Feb 13, 2007
0.00 posts per day
Posts: 4
Points: 0
   
there at theme Aphrodite/forum/viewtopic_body.tpl



Attached Files
viewtopic_body.rar (1.31 KB, Downloaded: 5232 Time(s))


Back to top Reply with quote
#6   re: How do you add the Google ad only after the first post
waZDer
CZ Newbie
waZDer has been a member for over 17 year's 17 Year Member
Gender: Male
Status: Offline
Joined: Feb 13, 2007
0.00 posts per day
Posts: 4
Points: 0
   
this there is from forum subsilver " modules\Forums\templates\subSilver\viewtopic_body.tpl "

i want her other how there is here => [ Register or login to view links on this board. ]
please help icon_cry.gif



Attached Files
viewtopic_body.rar (1.63 KB, Downloaded: 5232 Time(s))


Back to top Reply with quote
#7   re: How do you add the Google ad only after the first post
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Try these...



Attached Files
waZDer.zip (3.3 KB, Downloaded: 5232 Time(s))



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum