vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   column on right of specific forum (https://vborg.vbsupport.ru/showthread.php?t=68871)

hitmanuk2k 08-30-2004 01:43 PM

column on right of specific forum
 
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

Quote:

Originally Posted by hitmanuk2k
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.

PHP Code:

$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 -->
"

HTML Code:

<!-- /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 -->
.

HTML Code:

<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

Quote:

Originally Posted by Michael Morris
$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

Quote:

Originally Posted by concreteweb
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.!


All times are GMT. The time now is 12:29 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00965 seconds
  • Memory Usage 1,742KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete