Ads after first post

Tutorials for <a href="http://www.phpbbstyles.com/viewtopic.php?t=356">eXtreme Styles mod</a> for phpBB 2.0.

Moderator: Moderators

Postby llj143 on Wed Jul 06, 2005 10:40 am

anyway we can use the [you] hack on this?
visit me forums www.ar3k.tk ;)
llj143
Registered User
Registered User
 
Posts: 288
Joined: Mon May 09, 2005 1:31 am

Postby Nicolas on Fri Jul 08, 2005 2:16 pm

I havent used the [you] hack, on my website, currently.

I will look into it, but I believe you can.
Nicolas
Registered User
Registered User
 
Posts: 95
Joined: Sun Jun 12, 2005 3:19 am

Postby llj143 on Fri Jul 08, 2005 2:45 pm

i try it already it doesnt show the username but only [you] :(

any other way? :)
visit me forums www.ar3k.tk ;)
llj143
Registered User
Registered User
 
Posts: 288
Joined: Mon May 09, 2005 1:31 am

Postby Isi on Wed Jul 27, 2005 5:08 pm

[quote user="Nicolas" post="39213"]When I put it in my forums, it didnt show the ad at all. I tried logged in and out.

I removed the user logout stuff, and then it showed. Ill show you.

Image

Image

Please help. To see a live preview, www.halomoddingsite.com/files/

And ys, I have xmod installed[/quote]

This is also the case with me. Does anybody know fix?

Thank you!
Isi
You are the one, [username]!
Isi
Registered User
Registered User
 
Posts: 87
Joined: Fri Jan 21, 2005 1:44 pm

Postby Melon on Wed Jul 27, 2005 6:17 pm

[quote user="llj143" post="42539"]anyway we can use the [you] hack on this?[/quote]
Is that the hack where you enter [you] and it displays the name of the user which reads it?

If so, where can I get it from?
Melon
Registered User
Registered User
 
Posts: 15
Joined: Wed Jun 22, 2005 10:28 am
Location: UK

Postby Nicolas on Sat Aug 06, 2005 1:23 pm

I cant get the tables correct, for the Morpheus style.

Can anyone help me?

I have tried dozen times.

Code: Select all
   <!-- BEGIN switch_ad -->
   <tr>
      <td width="150" align="left" valign="top" class="inlineadtitle"><span class="name"><b>{postrow.L_SPONSOR}</b></span><br /</td>
      <td class="inlinead" width="100%" height="28" valign="top">
         {postrow.INLINE_AD}
      </td>
   </tr>
   <tr>
      <td class="spaceRow" colspan="2" height="1"><img src="templates/subSilver/images/spacer.gif" alt="" width="1" height="1" /></td>
   </tr>
   <!-- END switch_ad -->
   <!-- BEGIN switch_ad_style2 -->
   <tr>
      <td colspan=2 class="inlinead">
         {postrow.INLINE_AD}
      </td>
   </tr>
   <!-- END switch_ad_style2 -->


Style

Code: Select all
<!-- BEGIN postrow -->
<a name="{postrow.U_POST_ID}"></a>
{TPL_HDR1_POST}{postrow.TPL_HDR1}{postrow.POST_SUBJECT}{TPL_HDR2}<table border="0" cellpadding="0"

cellspacing="0" width="100%" class="post">
<tr>
   <td width="150" class="row" align="center" valign="top" style="padding: 2px;" rowspan="2">
      <div style="padding: 3px;"><span class="name">{postrow.POSTER_NAME}</span><br /></div>
      <div style="padding: 2px;"><span class="postdetails">{postrow.POSTER_RANK}</span><br

/></div>
      {postrow.RANK_IMAGE}
      <div style="width: 140px; margin: auto; overflow: hidden">{postrow.POSTER_AVATAR}</div>
      <br />
      <table width="100%" cellspacing="5" cellpadding="0">
         <tr><td align="left"><span

class="postdetails">{postrow.POSTER_JOINED}</span></td></tr>
         <tr><td align="left"><span

class="postdetails">{postrow.POSTER_POSTS}</span></td></tr>
         <tr><td align="left"><span

class="postdetails">{postrow.POSTER_FROM}</span></td></tr>
         <tr><td align="left"><span class="postdetails"><br />{postrow.CASH}</span></td></tr>

      </table>
      <img src="{T_TEMPLATE_PATH}/images/spacer.gif" width="150" height="1" border="0" alt="" />
   </td>
   <td width="1" class="postborder" rowspan="2"><img src="{T_TEMPLATE_PATH}/images/spacer.gif"

width="1" height="100" alt="" /></td>
   <td width="100%" class="row" align="left" valign="top"><table width="100%" cellspacing="0"

cellpadding="0" border="0">
   <tr>
      <td width="50%" align="left" style="padding: 3px;"><span class="postdate"><a

href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" width="12" height="9"

alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a> {L_POSTED}:

{postrow.POST_DATE}</span></td>
      <td width="50%"></td>
      <td width="23" valign="top" class="posttop" align="left"><img

src="{T_TEMPLATE_PATH}/images/posttop_left.gif" width="23" height="9" border="0" alt="" /></td>
      <td class="posttop" nowrap="nowrap"

valign="top">{postrow.QUOTE_IMG}{postrow.EDIT_IMG}{postrow.DELETE_IMG}{postrow.IP_IMG}</td>
   </tr>
   <tr>
      <td width="50%" class="postline" height="1"><img src="{T_TEMPLATE_PATH}/images/spacer.gif"

width="100" height="1" alt="" /></td>
      <td colspan="3" height="1"><img src="{T_TEMPLATE_PATH}/images/spacer.gif" width="1"

height="1" alt="" /></td>
   </tr>
   </table>
   <div style="padding: 4px;" class="postbody">{postrow.MESSAGE}</div>
   </td>
</tr>
<tr>
   <td align="left" valign="bottom">
   <div style="padding: 5px;" class="postbody"><span class="signature"><span

class="gensmall">{postrow.EDITED_MESSAGE}</span>{postrow.SIGNATURE}</span></div>
   <table width="100%" height="9" border="0" cellspacing="0" cellpadding="0">
   <tr>
      <td class="postbottom" height="9"

nowrap="nowrap">{postrow.PROFILE_IMG}{postrow.SEARCH_IMG2}{postrow.PM_IMG}{postrow.EMAIL_IMG}{postrow.WWW_IM

G}{postrow.AIM_IMG}{postrow.YIM_IMG}{postrow.MSN_IMG}{postrow.ICQ_IMG}</td>
      <td width="100%" height="9" align="left"><img

src="{T_TEMPLATE_PATH}/images/postbottom_right.gif" width="22" height="9" alt="" /></td>
   </tr>
   </table></td>
</tr>
</table>{TPL_FTR}
<!-- END postrow -->


I only included the psotrow section, since everything else isnt needed.
Nicolas
Registered User
Registered User
 
Posts: 95
Joined: Sun Jun 12, 2005 3:19 am

Postby Politicsinfo on Sat Aug 13, 2005 4:40 pm

[quote user="Nicolas" post="39213"]When I put it in my forums, it didnt show the ad at all. I tried logged in and out.

I removed the user logout stuff, and then it showed.
[/quote]

Hi,

I've got the same problem. I'm trying to put some banners after the first post, for guests only.

So, I added the suggested code (which looks great and compact), including
Code: Select all
<!-- BEGIN switch_user_logged_out -->

and
Code: Select all
<!-- END switch_user_logged_out -->


However, nothing shows after the first post. When I remove both
Code: Select all
<!-- BEGIN switch_user_logged_out -->
and
Code: Select all
<!-- END switch_user_logged_out -->


the banners come up (both for guest and visitors that are logged in. I've tried it on the viewtopic_body.tpl and index_body.tpl.

Can someone give me a hint? Thanks in advance!
Politicsinfo
Registered User
Registered User
 
Posts: 3
Joined: Tue Aug 02, 2005 1:56 pm
Location: Brussels

Re: Ads after first post

Postby WinSrev on Wed Aug 24, 2005 4:50 pm

[quote user="Greg" post="34251"]Hey,

I have seen alot of people wanting to have adverts between posts so I will write this short tutorial on how to do it.

There is currently a mod that does it but if you want a quick and easy method just use this.

This idea was based upon CyberAliens idea from various posts.

[code highlight="15"]
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- END postrow -->
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<?php if($postrow_i == 0) { ?>
<tr>
<td colspan="2" align="center" class="row1">
put here your ad code
</td>
</tr>
<?php } ?>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
[/code]

That will put an advert after the first post on each page of the topic.

If you are wanting to put an advert after the first cat. Do this;

[code highlight="15"]
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- END catrow -->
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<?php if($catrow_i == 0) { ?>

<div align="center">
Ad code here
</div>

<?php } ?>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
[/code]

And there we go, it is really that simple. The thing the remember with adsense (tutorial mainly aimed at adsense users) is that you must experiment to find the best place for your ads.

As with all tutorials in the the extreme styles mod tutorials they need XS mod.

If you would like to show the ads in between posts/cat. for guests only use this.

For in between cat.
[code highlight="16"]
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- END catrow -->
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- BEGIN switch_user_logged_out -->
<?php if($catrow_i == 0) { ?>
<tr>
<td colspan="2" align="center" class="row1">
put here your ad code
<br />
<a href="{U_REGISTER}">Register to remove this advert.</a>
</td>
</tr>
<?php } ?>
<!-- END switch_user_logged_out -->

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
[/code]

Or for after the first post:

[code highlight="16"]
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- END postrow -->
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- BEGIN switch_user_logged_out -->
<?php if($postrow_i == 0) { ?>
<tr>
<td colspan="2" align="center" class="row1">
put here your ad code
<br />
<a href="{U_REGISTER}">Register to remove this advert.</a>
</td>
</tr>
<?php } ?>
<!-- END switch_user_logged_out -->

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
[/code]

Have fun,
Greg[/quote]

Sorry Greg but this just doesnt work. :(
User avatar
WinSrev
Registered User
Registered User
 
Posts: 691
Joined: Sat Nov 27, 2004 10:44 pm
Location: UK

Postby lotusitclubvn on Thu Sep 08, 2005 1:05 am

Oh my ghost, this code do not affect with MorpheusX.

Help me plz
lotusitclubvn
Registered User
Registered User
 
Posts: 93
Joined: Sun Sep 04, 2005 2:41 am

Postby Case on Wed Sep 14, 2005 7:38 pm

Tried this with Artemis and it didn't work.

Any ideas? Thanks.
[size="9"]The Dope Spot - Urban Music Forum[/size]
User avatar
Case
Registered User
Registered User
 
Posts: 751
Joined: Thu Apr 28, 2005 3:27 pm
Location: North West UK

Postby DooBDee on Wed Sep 14, 2005 7:52 pm

Greetings,

Have you declared $postrow_i global?
DooBDee
Website Ninja
DooBDee.net
User avatar
DooBDee
Moderator
Moderator
 
Posts: 3530
Joined: Tue Mar 01, 2005 6:28 pm
Location: DooBDee.net

Postby Case on Wed Sep 14, 2005 8:03 pm

Your gonna have to run the whole declaring $postrow_i global thing by me just 1 more time.

:D
[size="9"]The Dope Spot - Urban Music Forum[/size]
User avatar
Case
Registered User
Registered User
 
Posts: 751
Joined: Thu Apr 28, 2005 3:27 pm
Location: North West UK

Postby DooBDee on Wed Sep 14, 2005 8:08 pm

Before your code add
Code: Select all
global $postrow_i;


I dont know whether this will work, but give it a try...
DooBDee
Website Ninja
DooBDee.net
User avatar
DooBDee
Moderator
Moderator
 
Posts: 3530
Joined: Tue Mar 01, 2005 6:28 pm
Location: DooBDee.net

Postby Case on Wed Sep 14, 2005 8:14 pm

hmm... that makes global $postrow_i; appear between every post.
[size="9"]The Dope Spot - Urban Music Forum[/size]
User avatar
Case
Registered User
Registered User
 
Posts: 751
Joined: Thu Apr 28, 2005 3:27 pm
Location: North West UK

Postby DooBDee on Wed Sep 14, 2005 8:21 pm

Sorry Case, i am talking nonsense (as usual) :(

What code are you using?

PS: There seems to be an awful lot of these type of things happening...
DooBDee
Website Ninja
DooBDee.net
User avatar
DooBDee
Moderator
Moderator
 
Posts: 3530
Joined: Tue Mar 01, 2005 6:28 pm
Location: DooBDee.net

PreviousNext

Return to eXtreme Styles mod tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

cron