Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-25-2009, 06:28 PM
brave24 brave24 is offline
 
Join Date: Jun 2008
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Question Help plz

plz i wanna ask if i want to increase viewing to one section in forum what i should do

for ex :

vBulletin Announcements (18 Viewing)

if i wanna make this lie report and make it 100 viewing as default and begin increase auto after 100 as default . and if i want do this in some sections and some not what i should do to edit that ?

thx


Reply With Quote
  #2  
Old 04-25-2009, 06:49 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The template is probably "forumhome_forumbit_level2_post". You can either do what is in this article (with a condition around your line to increase the number), Perform simple calculations inside templates! , or you can write a plugin to increase the variable "$forum[browsers]" just for that forum.
Reply With Quote
  #3  
Old 04-25-2009, 08:13 PM
brave24 brave24 is offline
 
Join Date: Jun 2008
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

plz some eay tut

if i go to this template forumhome_forumbit_level2_post

then what i should search about in it ? then what i type if i want to increase viweing in section number 1 for example and where i put my code exactly ?

plz give easy steps i appricate ur help . or let me know about easy plugin coz i canot know how doing this

thx
Reply With Quote
  #4  
Old 04-25-2009, 08:36 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I told you the variable to look at. Just hook into forumbit_display with (change x to your forumid):

PHP Code:
if ($forum['forumid'] == 'x'
{
$forum['browsers'] += 100;
$show['browsers'] = ($vbulletin->options['displayloggedin'] AND !$forum['link'] AND $forum['browsers'] ? true false);

Not tested. You may have to play with it a bit.
Reply With Quote
  #5  
Old 04-25-2009, 11:57 PM
brave24 brave24 is offline
 
Join Date: Jun 2008
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

when i try to put the code u give for me in template forumhome_forumbit_level2_post

i get this error

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/____/public_html/vb/includes/adminfunctions_template.php(3938) : eval()'d code on line 1


and i have vb 3.8.1

in the template forumhome_forumbit_level2_post

the code related to viewing i think in the template when i search word browser is :

Code:
<if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if>
		</div>
		<if

so what i should do ?
Reply With Quote
  #6  
Old 04-26-2009, 02:50 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I didn't say to put it into the template. I said to hook into forumbit_display - that means create a plugin using the forumbit_display hook location. It's an easier method than doing the calculation in the template.

(If you aren't familiar with writing plugins, read the manual regarding products/plugins.)
Reply With Quote
  #7  
Old 04-26-2009, 09:30 AM
brave24 brave24 is offline
 
Join Date: Jun 2008
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes sir working great thx for help very much

i already did this with one section in my forums . so i ask if i want to do this in another section

i will need to add again new plugin hook and change x by secion id ?

so every time i will need to add new hook?

thx

Reply With Quote
  #8  
Old 04-26-2009, 11:42 AM
Sweeks Sweeks is offline
 
Join Date: Jul 2008
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by brave24 View Post
yes sir working great thx for help very much

i already did this with one section in my forums . so i ask if i want to do this in another section

i will need to add again new plugin hook and change x by secion id ?

so every time i will need to add new hook?

thx

Sounds right yes
________
Extreme Q
Reply With Quote
  #9  
Old 04-26-2009, 02:44 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can repeat the code in the same hook - no need to create a new hook for each forum.
Reply With Quote
  #10  
Old 04-26-2009, 09:28 PM
brave24 brave24 is offline
 
Join Date: Jun 2008
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<font color="Magenta">thx very much bro lynee i appricate ur help .

i have another question same about Inferno vBShout 2.5.0

if i want ' Active Users ' begin from 6 when no one chatting in chat box or posting new threads , so the default begin from 6 . so if no one posting or speaking in chat box appear

Active Users: 6

thx very much and wait ur reply bro

</font>
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 11:50 PM.


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.04695 seconds
  • Memory Usage 2,260KB
  • Queries Executed 13 (?)
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
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete