![]() |
This is a fairly simple hack, but my users wanted it, so here it is.
http://kier.3dfrontier.com/vbhacks/whoposted.gif 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] |
Another awesome release from Kier. Thanks again. :)
|
that is nice. Does it use any extra queries on forumdisplay or only when you click on the pop-up? I like it a lot.
|
No extra queries on forumdisplay.php at all. :)
|
Very nice.
I had some people asking for this, one less thing I have to write, thank you so much :) |
This is COOL!!!
|
Awesome another 5 star rating :)
|
I just installed the hack, and I have to say it was the easiest install I've ever did, the hack works great and it's pretty fast.
I think VBB's dev team ought be looking for someone like you Kier ;) |
yes i agree - installed it in less than 2 mins :)
works great hopefully it works in all netscape and IE browsers :D |
Quote:
|
man you're just one awsome hacking machine. You just keep on coming and coming and each time they get better and better. :)
|
heh. Nice hack.. might have to install once our site is ready to move to vb 2.0 beta 2. *cough* Rat *cough* Well... there are other reasons for our delay, but.... it's cool. :D
|
Excellent hack.
Keep up the good work. |
brilliant. Just installed it and it works perfectly. 5 Stars!
|
Cool! Many thanks for that - my users will appreciate it :)
|
|
one thing i was wondering, when you move a thread you get the "-" as the number of replies. With this hack it is no underlined because it still works but looks a little silly. Is there any way to not have this when the thread is moved. I would imagine not because you can't do and if elseif routine in the templates but just thought i would ask.
|
It would be fairly easy to implement that, but as you pointed out, it would require a little condition to be placed in the php code, rather than a simple template change.
If you really want it, this is the code to modify: Find in forumdisplay.php: Code:
} else { Code:
} else { You will also need to remove the hyperlink from the forumdisplaybit template. |
any way to modify something like this to show who subscribed or selected email notify on a thread ?
|
Yep, open whoposted.php and select the whole SQL query, and replace it with this:
Code:
$posts = $DB_site->query("SELECT Code:
eval("\$posters .= \"".gettemplate("whopostedbit")."\";"); Code:
if ($post[userid]==$post[subuserid]) $subscribed = " <smallfont>[subscribed]</smallfont>"; That oughta do it :) |
hmm it didn't work nothing no indicator of who subscribed showed up ?
|
oops... you should add $subscribed to your templates... not $subscribe. Sorry.
|
thanks Kier for the change, will do it on next upgrade. cheers.
|
great hack kier.
Just a couple of comments: 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. Anyhow, again, thanks for yet another great hack. Cheers, Bira |
Quote:
i.e. Code:
if ($x) Code:
if ($x) { |
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...
Lordmusic |
Quote:
Replace the query with this: Code:
$posts = $DB_site->query("SELECT Code:
if ($post[userid]==$post[subuserid] && !$post[invisible]) $subscribed = " <smallfont>[subscribed]</smallfont>"; Quote:
Quote:
|
Freddie,
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. |
Quote:
|
A great hack!
A couple of suggestions: 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] Again, great work! |
To do that, simply add this to your whoposted template:
Code:
<a href="javascript:opener.location=('showthread.php?s=$session[sessionhash]&threadid=$threadid');">Go to this thread</a> |
you can add self.close() to that javascript link, and the small window will close while the thread loads in the big window :)
|
thanks fortunately all my members are visible - since i removed the option of being invisible on my forums
|
Thanks!
|
Good idea bira :) For those who are not too familiar with javascript syntax, that would make the link look like this:
Code:
<a href="javascript:opener.location=('showthread.php?s=$session[sessionhash]&threadid=$threadid'); self.close();">Show thread and close this window</a> |
Just I am too dumb to know which one, please enlighten me...
|
Quote:
|
good hack!
congrats |
Quote:
offtopic: I don't get why many people code like this: Code:
if($this) { It's far better to code like this: Code:
if($this) |
Quote:
if you do if(whaterver): then you can have as many statements as you want, up until you write endif; BUT, that method as well as my previous complaint just makes the code even more incomprehensible. |
All times are GMT. The time now is 05:40 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|