UzziSoft Forum Index UzziSoft
Provider of free downloads and services - www.uzzisoft.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

011 - Add Ads to Viewtopic in phpBB3

 
Post new topic   Reply to topic    UzziSoft Forum Index -> How Tos
View previous topic :: View next topic  
Author Message
alexi02
Site Admin


Joined: 17 Aug 2004
Posts: 230
Location: Brisbane, Australia

PostPosted: Mon Jun 09, 2008 12:40 am    Post subject: 011 - Add Ads to Viewtopic in phpBB3 Reply with quote

011 - Add Ads to Viewtopic in phpBB3

Download - http://www.uzzisoft.com/howto/download.php?id=11

phpBB3 - www.phpbb.com


Code Changes to make to phpBB3

In viewtopic.php

Find
Code:
if (!$first_unread && $post_unread)
        {
                $s_first_unread = $first_unread = true;
        }


After Add
Code:
if ($i == 1) {
            $postrow = array('MESSAGE' => '<center><script type="text/javascript"><!--
                                            google_ad_client = "pub-0059911325673521";
                                            google_ad_width = 468;
                                            google_ad_height = 60;
                                            google_ad_format = "468x60_as";
                                            google_ad_type = "text_image";
                                            google_ad_channel ="";
                                            google_color_border = "000000";
                                            google_color_bg = "F0F0F0";
                                            google_color_link = "0000FF";
                                            google_color_url = "008000";
                                            google_color_text = "000000";
                                            //--></script>
                                            <script type="text/javascript"
                                            src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
                                            </script></center>');

            // Dump vars into template
            $template->assign_block_vars('postrow', $postrow);

        }


Find
Code:
'U_POST_AUTHOR'                        => get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),


After Add
Code:
'NOT_AD' => 1,



In styles/prosilver/template/viewtopic_body.html

Find
Code:
{postrow.POST_SUBJECT}</a></h3>
                        <p class="author">


After Add
Code:
<!-- IF postrow.NOT_AD -->


Find
Code:
</p>


After Add
Code:
<!-- ENDIF -->

_________________

UzziSoft Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mike_en



Joined: 04 Jun 2008
Posts: 2

PostPosted: Tue Jun 10, 2008 10:09 pm    Post subject: Reply with quote

wow thanks!!! Razz Razz

btw i found 6 "</p>"

and i place "<!-- ENDIF -->" after "{postrow.POST_DATE} </p>"
and It works hehe

Thanks a lot!!! Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    UzziSoft Forum Index -> How Tos All times are GMT + 10 Hours
Page 1 of 1

 
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


Powered by phpBB © 2001, 2005 phpBB Group