Version: , by Freddie Bingham
Developer Last Online: Aug 2016
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
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
[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
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:
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: