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 vag-forum on Fri Mar 24, 2006 8:07 pm

[quote user="wouziap" post="71807"]Hello,

this mod really doesn't work with MorpheusX.

Can somebody tell, in witch line (viewtopic_body.tpl) i need to paste the code?[/quote]

[quote user="UseLess" post="63489"]Greetings,

The XS Mod is not a style and you should make the changes to the template 'viewtopic_body.tpl', however, if your using MorpheusX then as previously stated in another question you asked you have to edit;

- viewtopic_post_above.tpl
- viewtopic_post_left.tpl
- viewtopic_post_right.tpl
- viewtopic_post_none.tpl

which is where you'll find '<!-- END postrow -->'.[/quote]

:wink:
http://www.vag-forum.com (Morpheus eXtreme Style)
User avatar
vag-forum
Registered User
Registered User
 
Posts: 43
Joined: Sun Oct 16, 2005 1:37 pm
Location: Paris

Postby funnyman on Mon Apr 17, 2006 8:21 pm

When i put the code between the <!-- BEGIN switch_user_logged_out --><!-- END switch_user_logged_out --> it doesn't appear..

but it think it also have to work with something like this..

<?php if ( ( $userdata['session_logged_in'] ) && ($postrow_i == 0) ) { ?>

but it doesn't appear :(

any help?
funnyman
Registered User
Registered User
 
Posts: 4
Joined: Tue Apr 11, 2006 8:03 pm
Location: The Netherlands

Postby DooBDee on Tue Apr 18, 2006 9:26 am

When you tried PHP version, did you put
Code: Select all
global $userdata;
Before that line? ;)
DooBDee
Website Ninja
DooBDee.net
User avatar
DooBDee
Moderator
Moderator
 
Posts: 3530
Joined: Tue Mar 01, 2005 6:28 pm
Location: DooBDee.net

Postby johnkaboom on Tue Apr 18, 2006 12:55 pm

if you want to show the code for only guest under first post. Try this (You need to modify the code for other skin)

Code: Select all
    <?php
   global $userdata;
   if ((!$userdata['session_logged_in']) && ($postrow_i == 0)) { ?> 
YOUR ADS CODE
    <?php } ?>
johnkaboom
Registered User
Registered User
 
Posts: 379
Joined: Sat Jul 02, 2005 3:24 am

Postby funnyman on Tue Apr 18, 2006 3:53 pm

thanks (Y) now it works :)
funnyman
Registered User
Registered User
 
Posts: 4
Joined: Tue Apr 11, 2006 8:03 pm
Location: The Netherlands


Re: Ads after first post

Postby CipriaN0 on Thu Jun 22, 2006 12:13 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.


Greg[/quote]


Hi Greg, im using Apollo teme by HVMDesign, and i could not find the <!-- END postrow --> in viewtopic_body.tpl

can anyone help?
<-----------POLI ONLINE---------->
User avatar
CipriaN0
Registered User
Registered User
 
Posts: 191
Joined: Sat Jul 31, 2004 2:11 pm
Location: Romania

Postby btang on Mon Jul 17, 2006 2:10 pm

When update to phpBB 2.0.21, the code works wrong.
The ad will show after every post!

Anyone can help?
btang
Registered User
Registered User
 
Posts: 1
Joined: Tue Feb 21, 2006 2:48 am

Postby mimica on Fri Sep 22, 2006 9:36 am

after last post how to do it?

i've tried with

Code: Select all
   if($postrow_i == 14) {


but this only show the ad when the page is full... if it only have 5 posts the add is not showing [because of $the postrow_i :(
mimica
Registered User
Registered User
 
Posts: 2
Joined: Fri Sep 22, 2006 9:32 am

Postby kapengbarako on Fri Sep 22, 2006 11:38 am

[quote user="mimica" post="81895"]after last post how to do it?

i've tried with

Code: Select all
   if($postrow_i == 14) {


but this only show the ad when the page is full... if it only have 5 posts the add is not showing [because of $the postrow_i :([/quote]

Just put your code after this:

Code: Select all
<!-- END postrow -->
kapengbarako
Registered User
Registered User
 
Posts: 145
Joined: Tue Jun 14, 2005 11:32 am

Postby mimica on Wed Sep 27, 2006 7:32 am

thanks - it worked...

now i have another problem

i have ads after first and last, but when it it only one essage i see 2 ads one after the other...


how can i "block" the last post ad when it's only one post in the topic?
mimica
Registered User
Registered User
 
Posts: 2
Joined: Fri Sep 22, 2006 9:32 am

Postby egriz on Sat Dec 23, 2006 3:23 am

I am trying to use this mod but the ads are not showing up with the only for guests addon.

If I take the <!-- BEGIN switch_user_logged_out --> out of the code, it works fine. Any ideas?
egriz
Registered User
Registered User
 
Posts: 10
Joined: Sat Aug 20, 2005 2:09 am

Postby DooBDee on Sat Dec 23, 2006 11:26 am

Wot is the full code you are using?
DooBDee
Website Ninja
DooBDee.net
User avatar
DooBDee
Moderator
Moderator
 
Posts: 3530
Joined: Tue Mar 01, 2005 6:28 pm
Location: DooBDee.net

Postby egriz on Sat Dec 23, 2006 5:17 pm

Code: Select all
  <!-- BEGIN switch_user_logged_out --> 
  <div align="center"><br />
  <?php if($postrow_i == 0) { ?>           
  <script type="text/javascript"><!--
google_ad_client = "REMOVED";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "image";
//2006-12-22: GrizBoard
google_ad_channel = "3775306751";
google_color_border = "660033";
google_color_bg = "660033";
google_color_link = "FFFFFF";
google_color_text = "FFFFFF";
google_color_url = "3300FF";
//--></script>
  <script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  </script>
  <br /> 
  <span class="copyright"><a href="{U_REGISTER}">Register</a> or <a href="{U_LOGIN_LOGOUT}">Login</a> to remove this advert.</span>     
  <?php } ?> 

</div>
  <!-- END switch_user_logged_out -->
egriz
Registered User
Registered User
 
Posts: 10
Joined: Sat Aug 20, 2005 2:09 am

Postby GaDo on Wed Jan 24, 2007 5:12 am

Hi

Thanks for your code for Ads after first post.

Well, this code works for unregistred users, but i want this code for ALL users ONLY for forums id 9, 10, 42, 43, 56, 57.

You can help me Greg ??. Thank you :)
GaDo
Registered User
Registered User
 
Posts: 6
Joined: Wed Jan 24, 2007 5:08 am

PreviousNext

Return to eXtreme Styles mod tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

cron