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
  #92  
Old 06-23-2002, 12:20 PM
Webmasta XT's Avatar
Webmasta XT Webmasta XT is offline
 
Join Date: Mar 2002
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, nevermind, I got it to work!
Reply With Quote
  #93  
Old 07-13-2002, 07:39 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the great hack, freddie! It's working great here.
Reply With Quote
  #94  
Old 07-24-2002, 06:13 PM
Lovaboye Lovaboye is offline
 
Join Date: Apr 2002
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

doesnt work, after you put the four edits you get a mysql error, it doesnt work for vbulletin2.2.6
Reply With Quote
  #95  
Old 07-24-2002, 06:34 PM
Lovaboye Lovaboye is offline
 
Join Date: Apr 2002
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Database error in vBulletin 2.2.6:

Invalid SQL:
SELECT
post.*,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,icon.title as icontitle,icon.iconpath,
attachment.attachmentid,attachment.filename,attach ment.visible AS attachmentvisible,attachment.counter,style.title as styletitle


,avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline
FROM post
LEFT JOIN icon ON icon.iconid=post.iconid
LEFT JOIN user ON user.userid=post.userid
LEFT JOIN style on (user.styleid = style.styleid)


LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid
LEFT JOIN attachment ON attachment.attachmentid=post.attachmentid
WHERE post.postid IN (0,13572,14921,14993)
ORDER BY dateline

mysql error: Unknown table 'userfield'

mysql error number: 1051

Date: Wednesday 24th of July 2002 03:28:33 PM
Script: http://www.mysite.com/wf/wf/showthre...?threadid=1203
Referer: http://www.mysite.com/wf/forumdisplay.php?forumid=9
Reply With Quote
  #96  
Old 07-24-2002, 06:38 PM
Lovaboye Lovaboye is offline
 
Join Date: Apr 2002
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i put all four edits in
Reply With Quote
  #97  
Old 07-24-2002, 06:38 PM
Lovaboye Lovaboye is offline
 
Join Date: Apr 2002
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i still just see "stlye:" nothing comes after it!!!!!!!!
Reply With Quote
  #98  
Old 07-25-2002, 08:21 PM
Brianna Brianna is offline
 
Join Date: Mar 2002
Location: home
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by freddie
[B]add this after it on the same line
Code:
,style.title as styletitle
add this after it on the next line
Code:
LEFT JOIN style on (user.styleid = style.styleid)
owheeee!! nice hack, but watch your case in PHP

that's probably your problem guys

my browser just went beserk ^_^

"as" in the first code should be "AS"
"on" in the second code should be "ON"
and
there should not be parenthesis around "user.styleid = style.styleid"

Well, I changed those three and it was working then, so that's my guess, that they should be this way, but I could be wrong of course
Reply With Quote
  #99  
Old 07-26-2002, 06:18 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by Brianna
Well, I changed those three and it was working then, so that's my guess, that they should be this way, but I could be wrong of course
Reply With Quote
  #100  
Old 08-02-2002, 07:32 PM
Brianna Brianna is offline
 
Join Date: Mar 2002
Location: home
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by FireFly

You are wrong. In MySQL keywords are not case-sensitive, only database, table and field names are. The parenthesis around the joining clause are optional.
odd, doing what i said fixed my problem :knockedout:
Reply With Quote
  #101  
Old 08-20-2002, 07:32 PM
EchoHype.com's Avatar
EchoHype.com EchoHype.com is offline
 
Join Date: Mar 2002
Location: Harrisburg, PA
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

An Admin on my site (AIM: M3Kamikaze) modified this hack to show which styles we are all using in showgroups.php (Forum Leaders Page).

He added it to showgroups.php by doing the following:

Open showgroups.php and find:

Code:
// get administrators & super moderators **********************************************************
$users = $DB_site->query("
	SELECT
		$locationfieldselect usergroup.title, user.username, user.userid, user.invisible, user.receivepm,
		user.usergroupid, user.lastactivity, user.lastvisit
Add this after it on the same line
Code:
, style.title as styletitle
Now find:

Code:
// get moderators **********************************************************
$users = $DB_site->query("
	SELECT
		$locationfieldselect forum.forumid, forum.title AS forumtitle,
		user.username, user.userid, user.invisible, user.receivepm, user.lastactivity, user.lastvisit
add this after it on the same line
Code:
, style.title as styletitle
Find:
Code:
LEFT JOIN user ON (usergroup.usergroupid = user.usergroupid)
Add this after it on the next line
Code:
LEFT JOIN style on (user.styleid = style.styleid)
Find:
Code:
LEFT JOIN user ON (user.userid = moderator.userid)
Add this after it on the next line
Code:
LEFT JOIN style on (user.styleid = style.styleid)
Go to your "Show Groups Templates [expand]" and add another column entitled "Style" or whatever. You'll have to fool around with doing this but eventually you'll get another column or whatever. Then just add:

Code:
$user[styletitle]
somewhere in there.

This was tested & has worked on vBulletin v.2.2.6
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 05:17 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.05135 seconds
  • Memory Usage 2,320KB
  • 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
  • (16)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
  • (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