View Full Version : column on right of specific forum
hitmanuk2k
08-30-2004, 01:43 PM
i would like a column (for ads) adding to the right of forum display, but only in certain forums. firstly, can someone tell me how u would add a column (which template?) and secondly, what sort of if command would i need to put around it to specify which forum i wanted the column showing in.
Colin F
08-30-2004, 02:37 PM
i would like a column (for ads) adding to the right of forum display, but only in certain forums. firstly, can someone tell me how u would add a column (which template?) and secondly, what sort of if command would i need to put around it to specify which forum i wanted the column showing in.
See this thread on how to add a column to your forum: http://www.vbulletin.com/forum/showthread.php?t=101599
To have this show up on only I forum, add a conditional around all the inserted textparts.
Check for $forumid as well as $THIS_SCRIPT, if you only want it on certain pages in that forum.
hitmanuk2k
08-30-2004, 02:47 PM
im not exactly an expert with these if things... could you show me an example please.
Michael Morris
08-30-2004, 04:08 PM
Ok hitmanuk32, you'll need to modify three templates to accomplish what you seek.
In template $phpinclude_start add the following at either the very beginning or the very end.
$forums_with_ads = array(
'1',
'4'
);
/* Put the forums #'s of the forums that you
want the ads to appear in, seperated by comma's,
one at a time. You don't need to put a comma after
the last entry. The example above is forum #1 and
#4. */
if (in_array($foruminfo['forumid'], $forums_with_ads))
{
$show_ads = true;
$outertable = $stylevar['outertablewidth'];
$stylevar[outertablewidth] = X;
$stylevar[outerdivwidth] = 'Xpx';
// X is the width of your forum minus the width of your ad.
}
else
{
$show_ads = false;
}
In your header add the following immediately before "<!-- content table -->
"
<!-- /logo -->
<if condition="$show_ads">
<table width="$outertable" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="0" align="center">
<tr>
<td valign="top">
</if>
And in the footer add the following immediately after <!-- /content table -->
.
<if condition="$show_ads">
</td>
<td width="150" valign="top">
YOUR AD CODE GOES HERE
</td>
</tr>
</table>
</if>
trulylowcarb
02-14-2005, 03:43 PM
$stylevar[outertablewidth] = X;
$stylevar[outerdivwidth] = 'Xpx';
// X is the width of your forum minus the width of your ad.
This is just what I need to do on my free newsletter forums, and the conditionals I use to separate premium and free users in other forums don't help, since I have ad contracts that demand those particular ads be seen by all users in at least those areas.
This looks perfect, but I have a question. My forum width is set at 100%, which seems to the best option for my various users - how can I account for that here?
Thanks in advance.
I installed this but removed completely the references I was questioning, and it works fine without them.
concreteweb
02-21-2005, 01:08 AM
We installed this mod (right column) on our board and found that it really slowed down the site - up to 15 seconds for the page to draw. (With just the simple right column mod that is referenced in the link above.)
Has anyone else found this to be true?
Our conditionals work great and we only display ads to specific user groups. In addition, the right column disappears for our supporting members so they enjoy the full width of the page. It's a great setup if it weren't for the slow downs!
concreteweb
02-22-2005, 07:36 PM
We installed this mod (right column) on our board and found that it really slowed down the site - up to 15 seconds for the page to draw. (With just the simple right column mod that is referenced in the link above.)
Has anyone else found this to be true?
Our conditionals work great and we only display ads to specific user groups. In addition, the right column disappears for our supporting members so they enjoy the full width of the page. It's a great setup if it weren't for the slow downs!
Scratch that! I fixed this problem this morning by adding conditionals to both the header and footer. (Only had conditionals on the footer side.)
We are back to speedy again.!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.