Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-30-2004, 01:43 PM
hitmanuk2k hitmanuk2k is offline
 
Join Date: Dec 2002
Location: Durham, England
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 08-30-2004, 02:37 PM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 08-30-2004, 02:47 PM
hitmanuk2k hitmanuk2k is offline
 
Join Date: Dec 2002
Location: Durham, England
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

im not exactly an expert with these if things... could you show me an example please.
Reply With Quote
  #4  
Old 08-30-2004, 04:08 PM
Michael Morris's Avatar
Michael Morris Michael Morris is offline
 
Join Date: Nov 2003
Location: Knoxville TN
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #5  
Old 02-14-2005, 03:43 PM
trulylowcarb's Avatar
trulylowcarb trulylowcarb is offline
 
Join Date: Apr 2004
Location: Colorado
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 02-21-2005, 01:08 AM
concreteweb concreteweb is offline
 
Join Date: Apr 2004
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #7  
Old 02-22-2005, 07:36 PM
concreteweb concreteweb is offline
 
Join Date: Apr 2004
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:47 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04831 seconds
  • Memory Usage 2,234KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_html
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete