Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
User Selectable Forum Width Display Details »»
User Selectable Forum Width Display
Version: 1.00, by JusteCards JusteCards is offline
Developer Last Online: Jun 2006 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 05-25-2006 Last Update: Never Installs: 14
 
No support by the author.

I don't know about you but I hate having to install two styles one for a Fixed Display and one for a Fluid. Anyways this hack gets around that by making the choice of Fixed or Fluid a user choice.

Now I must state that this mod may not work with some styles that are specifically designed to be a fixed width.. it really does depend on the way they've been coded.. If you do have problems with a style and this hack post here and we'll add a list to the first post.

New Profile Field
In your Admin CP Find the User Profile Fields Menu.. Open it.. Select "Add New User Profile Field"

Now you need to add a new Profile Field with the following details.

Title: Forum Width Display

Description: Do you want the forum display to be Fixed or Fluid?

Options:
Fixed
Fluid

Set Default: Yes

Field Required: Yes

Field Editable by User: Yes

Private Field: Yes

Field Searchable on Members List: No

Show on Members List: No

Allow user to input their own value for this option: No

(Everything else can be left as default)

You now need to select your Display Page, I placed mine on Options: Other

Save your new Profile field and now take note of it's field name. (mine was field5)

New Plugin
Next your need to find the Plugin System Menu.. Open it.. Select "Add New Plugin"

Now you need to add a new Plugin with the following details.

Product: vBulletin

Hook Location: global_start

Title: Forum Width Display

Plugin PHP Code:
Code:
        if ($vbulletin->userinfo['field5'] == 'Fixed')
        {
            $stylevar['outerdivwidth'] = '780px';
            $stylevar['outertablewidth'] = '780px';
        }
        else
        {
            $stylevar['outerdivwidth'] = '97%';
            $stylevar['outertablewidth'] = '97%';
        }
You need to change the field (in mine field5) to the one you took note of in the
first part.. You can also edit the widths to your liking.

and that's it.. Users can now select whichever they like and you just need to
install one version of a style now.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 05-26-2006, 07:13 PM
BeaLzeBuB's Avatar
BeaLzeBuB BeaLzeBuB is offline
 
Join Date: Mar 2006
Location: Turkey
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

first post


clicks install

can you add screenshots?
Reply With Quote
  #3  
Old 05-26-2006, 07:17 PM
Kaleem's Avatar
Kaleem Kaleem is offline
 
Join Date: May 2006
Location: New Jersey
Posts: 324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

will check it out Thanks
Reply With Quote
  #4  
Old 05-26-2006, 07:34 PM
JusteCards JusteCards is offline
 
Join Date: Mar 2006
Location: Ashton-Under-Lyne
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Screenshots added, not sure if they show what you were looking for.. let me know.
Reply With Quote
  #5  
Old 05-26-2006, 11:54 PM
yinyang's Avatar
yinyang yinyang is offline
 
Join Date: May 2004
Location: Los Angeles
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you add the ability to choose or specify the width %age?
Reply With Quote
  #6  
Old 05-27-2006, 12:51 AM
b6gm6n's Avatar
b6gm6n b6gm6n is offline
 
Join Date: Aug 2002
Location: UK
Posts: 691
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Should work with my lapsus7 skin...

-b6
Reply With Quote
  #7  
Old 05-27-2006, 06:50 AM
JusteCards JusteCards is offline
 
Join Date: Mar 2006
Location: Ashton-Under-Lyne
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by yinyang
can you add the ability to choose or specify the width %age?
mmmm.. untested, but you could change the profile field to a single line text box and then change the plugin to:
Code:
        if ($vbulletin->userinfo['field5'] != '')
        {
            $stylevar['outerdivwidth'] = $vbulletin->userinfo['field5'];
            $stylevar['outertablewidth'] = $vbulletin->userinfo['field5'];
        }
you'd need to pointout to users that the value should either be *px or *% (they'll need to add the px or % themselves)

or you can force then to either using:
Code:
        if ($vbulletin->userinfo['field5'] != '')
        {
            $stylevar['outerdivwidth'] = $vbulletin->userinfo['field5'].'px';
            $stylevar['outertablewidth'] = $vbulletin->userinfo['field5'].'px';
        }
for px or:
Code:
        if ($vbulletin->userinfo['field5'] != '')
        {
            $stylevar['outerdivwidth'] = $vbulletin->userinfo['field5'].'%';
            $stylevar['outertablewidth'] = $vbulletin->userinfo['field5'].'%';
        }
for %
Reply With Quote
  #8  
Old 05-27-2006, 07:59 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would you please attach the plug-in and a text file for the instructions?
Reply With Quote
  #9  
Old 05-27-2006, 08:08 AM
JusteCards JusteCards is offline
 
Join Date: Mar 2006
Location: Ashton-Under-Lyne
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Would you please attach the plug-in and a text file for the instructions?
Done
Reply With Quote
  #10  
Old 05-27-2006, 10:01 AM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

helo..seems interesting..

we ars using a ffixed skin..it will work on it?
Reply With Quote
Reply

Thread Tools

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 04:08 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.04503 seconds
  • Memory Usage 2,290KB
  • Queries Executed 23 (?)
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
  • (4)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)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
  • (9)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_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