Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Closed Thread
 
Thread Tools
Details »»

Version: , by Kier Kier is offline
Developer Last Online: May 2011 Show Printable Version Email this Page

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.

Comments
  #32  
Old 03-23-2001, 05:08 AM
Guest
 
Posts: n/a
Default

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>
  #33  
Old 03-23-2001, 05:26 AM
Guest
 
Posts: n/a
Default

you can add self.close() to that javascript link, and the small window will close while the thread loads in the big window
  #34  
Old 03-23-2001, 05:30 AM
Guest
 
Posts: n/a
Default

thanks fortunately all my members are visible - since i removed the option of being invisible on my forums
  #35  
Old 03-23-2001, 06:18 AM
Guest
 
Posts: n/a
Default

Thanks!
  #36  
Old 03-23-2001, 07:21 AM
Guest
 
Posts: n/a
Default

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>
  #37  
Old 03-23-2001, 07:39 AM
Guest
 
Posts: n/a
Default

Just I am too dumb to know which one, please enlighten me...
  #38  
Old 03-23-2001, 04:15 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by freddie


Bira there is no "strict php coding" rulebook that says one must enclose if/then segments withing curly braces.
i.e.

Code:
if ($x)
  if ($y)
    if ($z)
      echo "YES";
is the same as and as valid as

Code:
if ($x) {
  if ($y) {
    if ($z) {
      echo "YES";
    }
  }
}
Not to mention the first makes your code shorter. Not to argue, bira, but I always use if ($whatever): instead of if ($whatever) { because I am forever forgetting to close the curly braces. So maybe I'm just lazy but I prefer to not use the braces.
  #39  
Old 03-25-2001, 10:58 AM
Guest
 
Posts: n/a
Default

good hack!

congrats
  #40  
Old 03-25-2001, 11:12 AM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by tubedogg


Not to mention the first makes your code shorter. Not to argue, bira, but I always use if ($whatever): instead of if ($whatever) { because I am forever forgetting to close the curly braces. So maybe I'm just lazy but I prefer to not use the braces.
Well, you do have to enclose it in brackets when an if block contains multiple statements...

offtopic:

I don't get why many people code like this:

Code:
if($this) {
  doThis();
  doThat();
  if($that) {
    bla()
  }
}
else {
  doThose();
  doThese();
}
This way you easily forget those brackets to close, especially with nesting if's and else's...

It's far better to code like this:

Code:
if($this)
{	doThis();
  	doThat();
	if($that)
	{	bla();
	}
}
else
{	doThose();
  	doThese();
}
When I go to the vb-code I often can't see what belongs to where...
  #41  
Old 03-25-2001, 11:38 AM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Mas*Mind

Well, you do have to enclose it in brackets when an if block contains multiple statements...
No, not in the alternative method he's talking about.

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.
Closed Thread


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 01:00 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.07943 seconds
  • Memory Usage 2,279KB
  • Queries Executed 25 (?)
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_code
  • (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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_onlinestatus
  • (11)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