The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
HA! yes it works now.
I am going to bug you with one more question if you don't mind. How would you do it to show exactly who is subscribed to the thread just like who is currently browsing the thread? |
#12
|
|||
|
|||
You can try this:
Code:
$res = $vbulletin->db->query_read_slave("SELECT subscribethread.userid, username, usergroupid, infractiongroupid, displaygroupid FROM " . TABLE_PREFIX . "subscribethread AS subscribethread LEFT JOIN " . TABLE_PREFIX . "user AS user ON(subscribethread.userid = user.userid) WHERE threadid = $thread[threadid]"); $subscribed_count = 0; $subscribers = array(); while ($row = $db->fetch_array($res)) { $subscribed_count++; fetch_musername($row); $row['is_last'] = ($subscribed_count == $db->num_rows($res)); $subscribers[] = $row; } vB_Template::preRegister('SHOWTHREAD', array('subscribed_count' => $subscribed_count, 'subscribers' => $subscribers)); Code:
</BR>{vb:raw subscribed_count} subscribed to this thread</BR> <vb:each from="subscribers" value="subscriber"> <a class="username" href="{vb:link member, {vb:raw subscriber}}">{vb:raw subscriber.musername}</a><vb:if condition="!$subscriber[is_last]">, </vb:if> </vb:each> And I know it doesn't give you colored user names or show you which ones are logged in or are friends. If you really want any of that I'll have to work on it a little later. Edit: Well, now it does color the username, which turned out to be pretty easy. I think that matches what's in the other lists in the info, so I probably won't add anything else unless someone really wants it. |
#13
|
||||
|
||||
Nice! Ok let me try it....brb...
|
#14
|
||||
|
||||
Yeep! that works perfect, thanks a lot kh99!
When ever you get to it if you can add the colored names or show you which ones are logged in or are friends, but this is fine. Once again thanks a lot! |
#15
|
|||
|
|||
I updated the above so it will display the colored usernames. (There's only one small change to the template code, where subscriber.username is changed to subscriber.musername, so you don't have to copy over the entire template code block if you've made other changes to it).
As I mentioned, I don't think I'll add the other things unless someone really has a strong desire for them (I don't think the other lists in that section have Invisible/logged in/friend marks, do they?) |
#16
|
||||
|
||||
Ok, I added the m to subscriber.username and that didn't show any usernames at all just the comman.
The following does have the Invisible/logged in/friend marks <li><a class="username" href="{vb:link member, {vb:raw row}}">{vb:raw row.musername}</a>{vb:raw row.invisiblemark}{vb:raw row.buddymark}{vb:raw row.comma}</li> |
#17
|
|||
|
|||
Did you also copy the new plugin code? I did change the plugin code as well, I just wanted to point out the minor change in the template code in case you were making other chnages, so you wouldn't have to start from scratch.
Is that code from one of the other lists? Then I can probably go steal the code for that, but this time it really will be later. |
#18
|
||||
|
||||
Yes I also did the plugin code as well and just the comma shows up.
Yeah no problem man , you have done more than enough! Once again thanks! I will recheck the the plugin code though just to make sure --------------- Added [DATE]1348938873[/DATE] at [TIME]1348938873[/TIME] --------------- Disregard that kh99 it works now...once again thanks! |
#19
|
|||
|
|||
Edit: OK, cool.
|
#20
|
|||
|
|||
this is what I need... but I'm lost... idiots guide please ?
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|