Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
What style are we all using? Details »»
What style are we all using?
Version: 1.00, by Gary King Gary King is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 03-27-2004 Last Update: Never Installs: 86
 
No support by the author.

NOTE: Make sure all your styles have different display orders (only if they are in the same grouping). For instance, don't have 2 styles each with the display order of '1' otherwise this hack will just show 'Style: ' and no style shown.

This hack will show each users current selected style when viewing a post.
If you want to see how this looks, take a look at the screenshot attached.

The style system is a little more complex than the vBulletin 2 one, but it's still pretty simple and straightforward.

My apologies if this has already been released! I must also note that all of this code is original, meaning I made it all myself, I didn't look at someone else's code if anyone was wondering, so that we don't play the 'blame game' later on.

NOTE: For those who are wondering, this hack adds NO EXTRA QUERIES to your pages! Meaning the load and processing time are about the same as usual, they don't change much

Okay anyhow, here we go:

Instructions

Open includes/functions_showthread.php and find
PHP Code:
    static $gotrank$sigcache$sigperms$gotage$month$day$year$counter
Above, add:
PHP Code:
    global $stylechoosercache$vbphrase
Find
PHP Code:
    eval('$retval = "' fetch_template($maintemplatename) . '";'); 
Above add
PHP Code:
    // check what style the user is viewing
    
if (!$post['styleid'])
    {
        
$post['style'] = '(' $vbphrase['not_specified'] . ')';
    }
    else
    {
        
// loop thru the $stylechoosercache to see which style the user is using, has to loop thru a few times
        
foreach ($stylechoosercache as $parentstyle)
        {
            foreach (
$parentstyle as $innerstyleid)
            {
                if (
$innerstyleid[0]['styleid'] == $post['styleid'])
                {
                    
$post['style'] = '<a href="' $vboptions['forumhome'] . '.php?' $session['sessionurl'] . 'styleid=' $post['styleid'] . '">' $innerstyleid[0]['title'] . '</a>';
                    continue;
                }
            }    
        }
    } 
Open the postbit template (or postbit_legacy if you're using old-style postbits) and find
HTML Code:
					<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>
Above, add
HTML Code:
					<!-- user forum style -->
<div>$vbphrase[style]: <if condition="$post[style] == '$vbphrase[not_specified]'"><a href="$vboptions[forumhome].php?styleid=$vboptions[styleid]">Default Style</a><else />$post[style]</if></div>
					<!-- / user forum style -->
Now add the following phrase:

Phrase Type: GLOBAL

Title: not_specified
Text: not specified

Title: style
Text: Style

All done!

Show Your Support

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

Comments
  #102  
Old 10-01-2004, 02:28 PM
Anette's Avatar
Anette Anette is offline
 
Join Date: Apr 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I only get Style:
I have 3.0.3
Anyone can help?
Reply With Quote
  #103  
Old 10-14-2004, 02:26 PM
Spookysalem Spookysalem is offline
 
Join Date: Oct 2004
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

could some one just explain the phrases thing a little more for me please...i have found the section but i am lost.

Varname --- what do i put in the box next to this.
Reply With Quote
  #104  
Old 10-18-2004, 09:30 PM
weaver weaver is offline
 
Join Date: Mar 2004
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it only supposed to have the style you've chosen through the user cp? If you change your style using the drop down menu at the bottom of the page then it doesn't accurately show which style you're using. Is it supposed to do that?
Reply With Quote
  #105  
Old 10-18-2004, 10:17 PM
blubber12 blubber12 is offline
 
Join Date: Nov 2003
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, as the ones you choose in the drop down are really just temporary. It's basically a way to see what styles are being used. If you choose different ones a lot, it doesn't report that. Maybe it will one day.
Reply With Quote
  #106  
Old 10-18-2004, 10:18 PM
blubber12 blubber12 is offline
 
Join Date: Nov 2003
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you put the word style in the varname and the word Style in the text.
Reply With Quote
  #107  
Old 10-19-2004, 08:29 AM
Spookysalem Spookysalem is offline
 
Join Date: Oct 2004
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks i have got this now.

clicks installed
Reply With Quote
  #108  
Old 10-19-2004, 03:10 PM
maddawg138's Avatar
maddawg138 maddawg138 is offline
 
Join Date: Sep 2004
Location: Fort Bragg, NC
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/me installs

just one problem....it works kinda....im using one style but its still showing im using the default style...but for other users using the same style i am it shows up?

any idea why this is?
Reply With Quote
  #109  
Old 10-19-2004, 09:46 PM
blubber12 blubber12 is offline
 
Join Date: Nov 2003
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

are you sure that in your user cp, you have that paricular skin chosen?
Reply With Quote
  #110  
Old 10-19-2004, 10:47 PM
tHe Rk tHe Rk is offline
 
Join Date: Jan 2004
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by maddawg138
[high]* maddawg138 installs
[/high]

just one problem....it works kinda....im using one style but its still showing im using the default style...but for other users using the same style i am it shows up?

any idea why this is?
Because you probably changed via the "Quick Style Chooser" for it to show up in your posts you have to go to User CP -> Edit Options and change it there.
Reply With Quote
  #111  
Old 10-20-2004, 05:03 AM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tHe Rk
Because you probably changed via the "Quick Style Chooser" for it to show up in your posts you have to go to User CP -> Edit Options and change it there.
Well that stinks that is does not work and save when using the Quick Style Chooser. If I use the Quick Style Chooser and change my style and log off and when I log back in it picks up the style I changed to using the Quick Style Chooser from my last seasion. So I can not understand why it does this but does not change in my USERCP? Most users do not go through their ADMINCP to change or set there Style.
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 09:26 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.05145 seconds
  • Memory Usage 2,325KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_html
  • (4)bbcode_php
  • (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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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