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

Reply
 
Thread Tools
Details »»

Version: , by Freddie Bingham Freddie Bingham is offline
Developer Last Online: Aug 2016 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 07-19-2001 Last Update: Never Installs: 83
 
No support by the author.

This is a small hack that will show each users current selected style in showthread. For a demo just follow one of my links in my forum (chins & quills) and find your way to a thread.

Open showthread.php and find:
Code:
attachment.attachmentid,attachment.filename,attachment.visible AS attachmentvisible,attachment.counter
add this after it on the same line
Code:
,style.title as styletitle
find this in showthread.php
Code:
LEFT JOIN user ON user.userid=post.userid
add this after it on the next line
Code:
LEFT JOIN style on (user.styleid = style.styleid)
open up the postbit template and place this where you like
Code:
Style: <a href='index.php?styleid=$post[styleid]'>$post[styletitle]</a></smallfont>
Link it to whatever you want.

Show Your Support

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

Comments
  #112  
Old 12-13-2002, 08:26 PM
|DarkManX|'s Avatar
|DarkManX| |DarkManX| is offline
 
Join Date: Oct 2001
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone got this working in 2.2.9

can't get it to show in the postbit....

thx
Reply With Quote
  #113  
Old 12-13-2002, 11:35 PM
SiXXGuNNZ's Avatar
SiXXGuNNZ SiXXGuNNZ is offline
 
Join Date: Oct 2001
Location: WA, USA
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
showthread.php

find the second line of


code:
--------------------------------------------------------------------------------
attachment.attachmentid,attachment.filename,attachment.visible AS attachmentvisible,attachment.counter
--------------------------------------------------------------------------------



add this after it on the same line 

code
:
--------------------------------------------------------------------------------
,
style.title as styletitle
--------------------------------------------------------------------------------



find the second line of:

code:
--------------------------------------------------------------------------------
LEFT JOIN user ON user.userid=post.userid
--------------------------------------------------------------------------------



add this after it on the next line 

code
:
--------------------------------------------------------------------------------
LEFT JOIN style on (user.styleid style.styleid)
--------------------------------------------------------------------------------



open up the postbit template and place this where you like 
code
:
--------------------------------------------------------------------------------
<
smallfont>Theme: <a href='stylestats.php?s=$session[sessionhash]'>$post[styletitle]</a><br>
-------------------------------------------------------------------------------- 
Reply With Quote
  #114  
Old 12-21-2002, 04:40 AM
Ember's Avatar
Ember Ember is offline
 
Join Date: Sep 2002
Location: Hereford, England
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by Graphics
for some reason it shows the wrong style that i am using. i follwed the instructions exactly. i did do the 2 edits in the 2 places.

can ne1 help me
Reply With Quote
  #115  
Old 12-31-2002, 09:06 AM
-Sidekick- -Sidekick- is offline
 
Join Date: May 2002
Location: Cudahy, Wi
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I couldn't get this to work on v2.2.9 either.

It just shows "Style:" and then nothing in my postbit.
Reply With Quote
  #116  
Old 01-03-2003, 12:23 AM
HughJorgen HughJorgen is offline
 
Join Date: May 2002
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Once I added both lines of code in both places in Showthread, it worked like a CHARM. Kickass.
Reply With Quote
  #117  
Old 01-10-2003, 01:38 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it any bit possible to hack online.php so that as an Admin, you don't get:

Unknown Location: /showthread.php?styleid=4&postid=24564

When people (members/guests) are browsing a thread using the $userstyle link ?
(and thus also that when non-admins check the WOL, they won't see "Viewing $bbtitle Main Index" nor "Viewing attachment in thread ...." but that it properly displays which thread they are browsing)

I've tried several times to hack online.php but it's just not working

Can't work on it long enough to get the full overview well enough in my head to see the solution..
Reply With Quote
  #118  
Old 01-12-2003, 08:25 PM
Crinos's Avatar
Crinos Crinos is offline
 
Join Date: Oct 2001
Location: Los Angeles, CA
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since freddie has obviously abandoned this topic, I'll have to take a pitch at the dark and see if I get any answers

Okay, so I installed this hack (the updated version with the two edits in two places). Those who can't get it to show, here are two things to check:

1.) Make sure the style you want to show is user selectable. You can double-check this in the admin cp > styles > modify > properties
2.) Make sure that you "Allow Users To Change Styles" in the vbulletin options in your admin cp.

So anyway, here's the glitch I have in 2.2.8: It works for styles other than the Default. But since my default style is using the template set and replacement set of another style, it doesn't seem to show up. Only when users choose a style in the user cp do will it appear, but the style will come out blank for users who are using the default style.

This is probably along the lines of what VeloCD has observed in his own forums.

Anyway, I dunno if it makes sense or not, but I'm gonna hold off on installing this one (maybe never) until it works
Reply With Quote
  #119  
Old 03-09-2003, 12:12 AM
SiXXGuNNZ's Avatar
SiXXGuNNZ SiXXGuNNZ is offline
 
Join Date: Oct 2001
Location: WA, USA
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works great on vb 2.3.0 also, I have used it since this came out, on each version since then, I followed my instructions I posted above, and it worked for 2.2.9 and 2.3.0

PHP Code:
showthread.php

find the second line of


code:
--------------------------------------------------------------------------------
attachment.attachmentid,attachment.filename,attachment.visible AS attachmentvisible,attachment.counter
--------------------------------------------------------------------------------



add this after it on the same line 

code
:
--------------------------------------------------------------------------------
,
style.title as styletitle
--------------------------------------------------------------------------------



find the second line of:

code:
--------------------------------------------------------------------------------
LEFT JOIN user ON user.userid=post.userid
--------------------------------------------------------------------------------



add this after it on the next line 

code
:
--------------------------------------------------------------------------------
LEFT JOIN style on (user.styleid style.styleid)
--------------------------------------------------------------------------------



open up the postbit template and place this where you like 
code
:
--------------------------------------------------------------------------------
<
smallfont>Theme: <a href='stylestats.php?s=$session[sessionhash]'>$post[styletitle]</a><br>
-------------------------------------------------------------------------------- 
Reply With Quote
  #120  
Old 03-25-2003, 09:52 PM
-Sidekick- -Sidekick- is offline
 
Join Date: May 2002
Location: Cudahy, Wi
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any fix to the thing where clicking on the link doesn't update the style shown in your postbit?
Reply With Quote
  #121  
Old 04-03-2003, 07:36 AM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hack worked fine UNTIL vB2.3.0 Final.

Now, in 2.3.0 final, when user selects "Use Default Style" in his UserCP, the postbit part doesn't display any style name.
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 01:57 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.04942 seconds
  • Memory Usage 2,327KB
  • 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
  • (5)bbcode_code
  • (2)bbcode_php
  • (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
  • (1)pagenav_pagelinkrel
  • (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