Author |
Message |
blith
Client

Joined: Jul 18, 2003
Posts: 977
|
Posted:
Thu Sep 16, 2004 1:34 pm |
|
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! |
|
|
|
 |
blith

|
Posted:
Thu Sep 30, 2004 8:03 am |
|
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
|
Posted:
Sun Oct 10, 2004 3:58 pm |
|
How did you set it so no blocks are to the left of your forum? I assumed you edited theme.php from 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 |
|
|
|
 |
blith

|
Posted:
Mon Oct 11, 2004 7:46 am |
|
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

|
Posted:
Tue Oct 12, 2004 3:51 am |
|
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
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

|
Posted:
Tue Oct 12, 2004 7:41 am |
|
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...  |
|
|
|
 |
ecvej

|
Posted:
Tue Oct 12, 2004 9:18 am |
|
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

|
Posted:
Tue Oct 12, 2004 9:20 am |
|
|
|
 |
ecvej

|
Posted:
Tue Oct 12, 2004 9:56 am |
|
Just checked out your site. Wow you've certainly had some traffic How much are you pulling in a month from google? |
|
|
|
 |
blith

|
Posted:
Tue Oct 12, 2004 10:44 am |
|
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
|
Posted:
Tue Oct 12, 2004 1:34 pm |
|
|
|
 |
ecvej

|
Posted:
Tue Oct 12, 2004 2:03 pm |
|
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

|
Posted:
Tue Oct 12, 2004 4:42 pm |
|
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
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> <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> <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> <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>
<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> <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> <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> </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> <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> <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> <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>
<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> <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> <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> </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

|
Posted:
Wed Oct 13, 2004 9:13 am |
|
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

|
Posted:
Wed Oct 13, 2004 5:19 pm |
|
okay, please let us know if you run into any trouble. You can see it functioning on my site.  |
|
|
|
 |
blith

|
Posted:
Thu Oct 14, 2004 7:43 am |
|
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! |
|
|
|
 |
|