Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #11  
Old 09-29-2012, 02:44 PM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #12  
Old 09-29-2012, 03:31 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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));
and in the SHOWTHREAD template:
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.
Reply With Quote
  #13  
Old 09-29-2012, 03:45 PM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice! Ok let me try it....brb...
Reply With Quote
  #14  
Old 09-29-2012, 03:50 PM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #15  
Old 09-29-2012, 03:53 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?)
Reply With Quote
  #16  
Old 09-29-2012, 04:03 PM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #17  
Old 09-29-2012, 04:06 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #18  
Old 09-29-2012, 04:08 PM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #19  
Old 09-29-2012, 04:14 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Edit: OK, cool.
Reply With Quote
  #20  
Old 10-01-2012, 05:51 PM
Jonm Jonm is offline
 
Join Date: May 2011
Location: Staffordshire
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is what I need... but I'm lost... idiots guide please ?
Reply With Quote
Reply

Thread Tools
Display Modes

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 06:22 AM.


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.05278 seconds
  • Memory Usage 2,249KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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