Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
blith
Client



Joined: Jul 18, 2003
Posts: 977

PostPosted: Thu Sep 16, 2004 1:34 pm Reply with quote

How can I make a block that is to the left of my forums. I have it set now so no blocks are in my forums but I would like to put some google ads there now. Can someone tell me how to set a block to be down the full left side of the forums? Thanks!
 
View user's profile Send private message Visit poster's website
blith







PostPosted: Thu Sep 30, 2004 8:03 am Reply with quote

So is it possible to have a googlead skyscraper down the left side of the forums when I have the left blocks turned off for them?
 
ecvej
Hangin' Around



Joined: Oct 10, 2004
Posts: 45
Location: Northampton, UK

PostPosted: Sun Oct 10, 2004 3:58 pm Reply with quote

How did you set it so no blocks are to the left of your forum? I assumed you edited theme.php from
Code:
blocks(left);
to
Code:
if ($name=='Forums') {

   //Show no left blocks
   }
else blocks(left);


Well if that's how you did change it then it's easy to put a particular block in the left just for one module. Here's how I have mine currenly set
Code:
if ($name=='Forums') {

   //Show no left blocks
   }
   else if ($name=='Beta') {
include("blocks/block-Beta.php");
    $tmpl_file = "themes/3D-Fantasy/blocks.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}
else {
blocks(left);
}


The code above has blocks left for all modules except the forum where no blocks are shown. The exception is my module called beta where no blocks are shown except block-Beta.php. All you need to do is change the above code to suit you. Just post if you can't work that out yourself
 
View user's profile Send private message
blith







PostPosted: Mon Oct 11, 2004 7:46 am Reply with quote

Thanks for the reply! I used the first code to turn off blocks in the forums. But now I would like only one block in the forums and the rest of the site get blocks that are not in the forums. Is that clear?
Rest of Site except forums: left blocks A, B, C, D
Forums: left block E
is this possible? Thanks again!
 
ecvej







PostPosted: Tue Oct 12, 2004 3:51 am Reply with quote

Yes as I said all you need to do is edit the code I posted above to suit you. Ok ok I'll show you how Wink

Code:
if ($name=='Forums') { 

include("blocks/XXXXX.php");
    $tmpl_file = "themes/3D-Fantasy/blocks.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}
else {
blocks(left);
}
Change XXXX to the name of your block file you want to be shown and make sure the line below that corresponds to the theme you use.
 
blith







PostPosted: Tue Oct 12, 2004 7:41 am Reply with quote

Thank you!! So what are all the lines below the theme line? IAm I supposed to put something in the places it says thefile? I am sorry I am slow at this... Embarassed
 
ecvej







PostPosted: Tue Oct 12, 2004 9:18 am Reply with quote

Leave those lines as they are, all you need to do is put the code in as it is above but change XXXX to the right block filename and use the right theme path on the line below.

The lines below take the block file you've made and print the code for it.
 
blith







PostPosted: Tue Oct 12, 2004 9:20 am Reply with quote

Thank you.
 
ecvej







PostPosted: Tue Oct 12, 2004 9:56 am Reply with quote

Just checked out your site. Wow you've certainly had some traffic Smile How much are you pulling in a month from google?
 
blith







PostPosted: Tue Oct 12, 2004 10:44 am Reply with quote

I get around 100U$ every three months. I am trying to increase revenue. Now that they allow more than one ad module I am going to put one down the left of the forums...
 
jaded
Theme Guru



Joined: Nov 01, 2003
Posts: 1006

PostPosted: Tue Oct 12, 2004 1:34 pm Reply with quote

there is a better way to add your google adds to your forum directly. It will allow your google adds to run on every page of your forum without the additon of a block. If you would like to know it please reply.

_________________
Themes BB Skins [ Only registered users can see links on this board! Get registered or login! ]
Graphic Tees [ Only registered users can see links on this board! Get registered or login! ]
Paranormal Tees [ Only registered users can see links on this board! Get registered or login! ]
Ghost Stories & More [ Only registered users can see links on this board! Get registered or login! ] 
View user's profile Send private message Visit poster's website
ecvej







PostPosted: Tue Oct 12, 2004 2:03 pm Reply with quote

Go ahead jaded, the more knowledge shared the better. I bet you're talking about editing the forum itself though. That does look better imo but he did ask for it as a block.
 
jaded







PostPosted: Tue Oct 12, 2004 4:42 pm Reply with quote

IN ALL THE PLACES THAT HAVE THE WORD SCR IPT I HAD TO MAKE A SPACE. YOU WILL HAVE TO FIX THIS IF YOU USE THIS CODE Wink
yes he did. I have added the google to my forums on many sites. It is simple enough to do and has not caused any errors as of now.
in your Forums/templates/***/overall_header.tpl you should find something similar to this code

Code:
<!-- BEGIN switch_enable_pm_popup -->


<scr  ipt language="Javascri  pt" type="text/javasc  ript">

<!--

   if ( {PRIVATE_MESSAGE_NEW_FLAG} )

   {

      window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;

   }

//-->


</head>

<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">



<a name="top"></a>



<table width="100%" cellspacing="0" cellpadding="10" border="0" align="center">

   <tr>

      <td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">

         <tr>

            <table cellspacing="0" cellpadding="2" border="0">

               <tr>

                  <td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"><center>&nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="modules/Forums/templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a>&nbsp; &nbsp;<a href="{U_SEARCH}" class="mainmenu"><img src="modules/Forums/templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a>&nbsp; &nbsp;<a href="{U_GROUP_CP}" class="mainmenu"><img src="modules/Forums/templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp;

                  &nbsp;<a href="{U_PROFILE}" class="mainmenu"><img src="modules/Forums/templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a>&nbsp; &nbsp;<a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="modules/Forums/templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a>&nbsp; &nbsp;<a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="modules/Forums/templates/subSilver/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a>&nbsp;</center></span></td>


now I have placed my google code in the file like so:

Code:
<!-- BEGIN switch_enable_pm_popup -->


<scri pt language="Javascri pt" type="text/javascr ipt">

<!--

   if ( {PRIVATE_MESSAGE_NEW_FLAG} )

   {

      window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;

   }

//-->

</scr ipt>

<!-- END switch_enable_pm_popup -->
<center><scri pt type="text/javascr ipt"><!--
google_ad_client = "pub-3726844823304540";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_channel ="";
google_ad_type = "text_image";
google_color_border = "660000";
google_color_bg = "7D2626";
google_color_link = "FFFFFF";
google_color_url = "DAA520";
google_color_text = "BDB76B";
//--></scri
pt>
<scri pt type="text/javascri pt"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</sc ript>
</head>

<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">



<a name="top"></a>



<table width="100%" cellspacing="0" cellpadding="10" border="0" align="center">

   <tr>

      <td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">

         <tr>

            <table cellspacing="0" cellpadding="2" border="0">

               <tr>

                  <td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"><center>&nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="modules/Forums/templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a>&nbsp; &nbsp;<a href="{U_SEARCH}" class="mainmenu"><img src="modules/Forums/templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a>&nbsp; &nbsp;<a href="{U_GROUP_CP}" class="mainmenu"><img src="modules/Forums/templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp;

                  &nbsp;<a href="{U_PROFILE}" class="mainmenu"><img src="modules/Forums/templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a>&nbsp; &nbsp;<a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="modules/Forums/templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a>&nbsp; &nbsp;<a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="modules/Forums/templates/subSilver/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a>&nbsp;</center></span></td>



it is very simple to do and will allow your google adds to show on each page which also means it will have a more fresh line of content as it will pull adds from the various articles written on each page.[/b]
 
blith







PostPosted: Wed Oct 13, 2004 9:13 am Reply with quote

Escellent! Thank you. The reason I asked for a block is because I did not know this was possible!! Wonderful. I am going to try it...
 
jaded







PostPosted: Wed Oct 13, 2004 5:19 pm Reply with quote

okay, please let us know if you run into any trouble. You can see it functioning on my site. Razz
 
blith







PostPosted: Thu Oct 14, 2004 7:43 am Reply with quote

It works great... the only thing is I already had googleads in my header so I kinda have two rows of ads up there. Google has recently allowed to blocks of ads on a page so that is no problem but does anyone know how to create an ad block say halfway down the forums page. I am not sure how it would look but I would like to see it. This would be where there are posts above it then the block of ads and then the post below it. Thanks for everyones help!
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
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 can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©