Version: , by Kier
Developer Last Online: May 2011
Version: Unknown
Rating:
Released: 03-06-2001
Last Update: Never
Installs: 5
No support by the author.
This is a fairly simple hack, but my users wanted it, so here it is.
What it does is to add a link to the number of replies for a thread, which allows users to quickly see who has posted in a thread without opening the showthread.php page. The results are shown in a small popup window.
Any suggestions or comments are welcome.
[edit: this hack is now included in vBulletin 2.0.3 and above]
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
1. General comment to all: with regards to the $subscribed thingy, bear in mind that this is a serious invasion of privacy. And, unlike the "who is online", where you allow users to opt out, in adding this $subscrived thingy to the hack you are not allowing anyone any opt-out option.
2. Kier, I LOVE your hacks so please take my following comment as a constructive one: you do not follow strict php coding, which makes it immensely hard to debug a code that consists of your code and others.
Could you perhaps make sure you always use { and } for the ifs and elses? I think in a code made public, strict and global coding guidelines are imperative.
2. Kier, I LOVE your hacks so please take my following comment as a constructive one: you do not follow strict php coding, which makes it immensely hard to debug a code that consists of your code and others.
Could you perhaps make sure you always use { and } for the ifs and elses? I think in a code made public, strict and global coding guidelines are imperative.
Bira there is no "strict php coding" rulebook that says one must enclose if/then segments withing curly braces. Without curly braces the compiler will only process the first following line for inclusion in the if/then. It is perfectly valid code.
This hack is great, but it has a flaw. When you do a search, say for the new posts, or any search for that matter, it does not have the hack in it. I am sure it's a simple bit of code editing but I am just toO damn lazy to look into it...
Originally posted by bira unlike the "who is online", where you allow users to opt out, in adding this $subscrived thingy to the hack you are not allowing anyone any opt-out option.
Okay, if you want to allow users to opt-out, we'll use the invisible setting, so that 'invisible' users don't have their subscriptions shown:
Replace the query with this:
Code:
$posts = $DB_site->query("SELECT
COUNT(postid) AS posts, post.userid, user.username, user.invisible subscribethread.userid AS subuserid
FROM post LEFT JOIN user USING (userid)
LEFT JOIN subscribethread ON
(subscribethread.threadid=post.threadid AND subscribethread.userid=user.userid)
WHERE post.threadid=\"$threadid\"
GROUP BY post.userid ORDER BY posts DESC");
When I have your original code, plus someone else's hack, plus Kier, etc - if the style of coding is not unified, it makes it damn hard to debug if there's a mistake somewhere or a missing curly.
I am not saying this won't work - fact is it does - I am merely asking if possible that hackers restrict themselves to the same "full" (for lack of better word) coding.
Originally posted by Lordmusic This hack is great, but it has a flaw. When you do a search, say for the new posts, or any search for that matter, it does not have the hack in it. I am sure it's a simple bit of code editing but I am just toO damn lazy to look into it...
At the bottom of the pop-up box allow the user to click to go the actual thread and to close the window. [you can probably do these in a blink of an eye but I thgout I'd suggest it]