Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Show Thread Subscribers in All Threads Details »»
Show Thread Subscribers in All Threads
Version: 1.00, by Logician Logician is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-24-2002 Last Update: Never Installs: 16
 
No support by the author.

Hiya,

This hack shows who subscribed to a particular thread at the end of all threads while you're reading it. Very easy to implement:

1- Edit showthread.php, Find:
PHP Code:
  } else {
    
$postdone[$post[postid]]=1;
  }
  
$postbits .= getpostbit($post);

AFTER THAT ADD:

PHP Code:
// LOGICIAN THREAD SUBSCRIBERS HACK:
$log_subscribers=$DB_site->query("SELECT s.userid, u.username FROM subscribethread s, user u WHERE u.userid=s.userid AND s.threadid='$threadid' ORDER BY u.username");
$log_sayac=0;$log_subscribers_birik='';
while (
$log_subscriber=$DB_site->fetch_array($log_subscribers)) {$log_subscribers_birik.="<a href=$bburl/member.php?s=&action=getinfo&userid=".$log_subscriber['userid'].">".$log_subscriber['username']."</a>, ";$log_sayac++;}
if (
$log_sayac!=0) {$log_subscribers_birik=substr($log_subscribers_birik0strlen($log_subscribers_birik)-2);}
if (
$log_sayac==0) {$log_subscribers_table="<b>Thread Subscribers</b> : N/A";}
elseif (
$log_sayac==1) {$log_subscribers_table="<b>Thread Subscriber</b> : $log_subscribers_birik";}
else {
$log_subscribers_table="<b>Thread Subscribers</b> ($log_sayac) : ".$log_subscribers_birik;}
// LOGICIAN THREAD SUBSCRIBERS HACK: 
2- LOGIN CP/ MODIFY TEMPLATE/EDIT showthread templates/showthread

FIND:

PHP Code:
<!-- time zone and post buttons --> 
AFTER THAT ADD:

PHP Code:
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<
tr>
<
td bgcolor="{_firstaltcolor}"><smallfont>$log_subscribers_table</smallfont></td>
</
tr>
</
table
(Remove _ at {_firstaltcolor} above!)

if you liked this hack, you may want to take a look at these hacks too:
* Change "Subscribe to This Thread" link to "Unsubscribe" if already subscribed too. (IMO They make a good couple..)
* Confirm Unsubscribe From All Threads Requests

This hack has another version released in this thread too. In that version thread subscribers are not displayed in the thread view, instead there appears a link next to "Subscribe This Thread" to display them in a new window.. Choose your pick..

Hack works with any vb versions I know, dont hesitate to apply..

If you install the hack please click INSTALL, thank you..

Enjoy!
Regards,
Logician \\=^))

Ps. Not likely, but if you get a Parse Error while applying the hack, try to copy paste not from this message but from the TEXT instructions I attached a few messages below instead.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-25-2002, 07:02 PM
djr's Avatar
djr djr is offline
 
Join Date: Nov 2001
Location: Amsterdam
Posts: 220
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Although a bit off-topic, but you seem really busy with the whole subscribe/unsubscribe thing. May I point you to a really old request of mine and let me know if this is a request you're willing to consider?

mass unsubscribe selected messages:
https://vborg.vbsupport.ru/showthrea...threadid=33619

and btw: kudos for the webtemplates hack.. didn't install it yet, but the idea sounds very very promising!

- djr
Reply With Quote
  #3  
Old 03-26-2002, 12:16 AM
TWTCommish's Avatar
TWTCommish TWTCommish is offline
 
Join Date: Oct 2001
Location: Pittsburgh, PA, USA
Posts: 783
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please allow me to say that, though I like your hacks, naming variables after your username is...odd.
Reply With Quote
  #4  
Old 03-26-2002, 01:18 AM
nafae's Avatar
nafae nafae is offline
 
Join Date: Nov 2001
Posts: 240
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by TWTCommish
Please allow me to say that, though I like your hacks, naming variables after your username is...odd.
Hey, you wouldn't imagine what my variables would be (there is nothing wrong with a little self gratification in knowing that these people have your name embedded into their site)
Reply With Quote
  #5  
Old 03-26-2002, 05:06 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hiyas,
Quote:
Originally posted by TWTCommish
Please allow me to say that, though I like your hacks, naming variables after your username is...odd.
Nope.. there is a very good reason:

vbulletin is a sophisticated script and since I am not the coder of it, it's sometimes impossible to know what variable names coders use in the original script.

If I use a variable such as "$count", it's very likely that it will clash with a vbulletin variable and if you apply such a hack, then you'll see what "odd" really means LOL.

So I need a prefix which I will be sure that coders didnt use in their code and my nickname is a good start.

In my next hack, I will name a few variables after you, promise!

Regards,
Logician
Reply With Quote
  #6  
Old 05-05-2002, 01:53 PM
mashby's Avatar
mashby mashby is offline
 
Join Date: Jan 2002
Location: Nashville, TN - USA
Posts: 736
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm getting a parse error on the following line in showthread.php
PHP Code:
while?($log_subscriber=$DB_site->fetch_array($log_subscribers))?{$log_subscribers_birik.="<a?href=$bburl/member.php?s=&action=getinfo&userid=".$log_subscriber['userid'].">".$log_subscriber['username']."</a>, ";$log_sayac++;} 
I'm running 2.2.5
Reply With Quote
  #7  
Old 05-05-2002, 01:56 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Jesus Logician, add some linebreaks in your code, it's 100% unreadable!
Reply With Quote
  #8  
Old 05-05-2002, 04:23 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by mashby
I'm getting a parse error on the following line in showthread.php
PHP Code:
while?($log_subscriber=$DB_site->fetch_array($log_subscribers))?{$log_subscribers_birik.="<a?href=$bburl/member.php?s=&action=getinfo&userid=".$log_subscriber['userid'].">".$log_subscriber['username']."</a>, ";$log_sayac++;} 
Mashby there is nothing wrong with this line. In fact the hack is working in my board for 1.5 months with no problems. I thought may be there can be a copy/paste error while moving the hack code here, but there is none, I checked 3 times.

I dont know how can I help you but here are a few suggestions:
1- Please reapply the hack from the begining carefully. You may miss something.
2- There may be a problem from copying/pasting from your browser, I attached the text instructions to this message try to copy/paste from there.
Reply With Quote
  #9  
Old 05-05-2002, 10:19 PM
mashby's Avatar
mashby mashby is offline
 
Join Date: Jan 2002
Location: Nashville, TN - USA
Posts: 736
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Logician,

Thank you for your help today! The file that you sent back did the trick.

<look gift horse in the mouth>
Now that it's working, is there any way to modify this hack so that it works with subscribed forums as well?
</look gift horse in the mouth>
Reply With Quote
  #10  
Old 05-05-2002, 11:49 PM
mashby's Avatar
mashby mashby is offline
 
Join Date: Jan 2002
Location: Nashville, TN - USA
Posts: 736
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found the culprit. It was my browser - Opera.

I installed a different hack and ran into the same problem, so I launched IE and re-copied the code - it worked just fine. So, it's a browser issue.

And while we're on the subject, I'd recommend that all hacks be included as a .txt attachment. That way it would prevent this type of thing from happening and it also makes it easier for people like me who keep all hacks they install in a special file.

Just a thought.
Reply With Quote
Reply

Thread Tools

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 07:08 PM.


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.08620 seconds
  • Memory Usage 2,320KB
  • Queries Executed 23 (?)
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
  • (6)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)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