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

Reply
 
Thread Tools
View All Attachments in Thread Details »»
View All Attachments in Thread
Version: 1.00, by TWTCommish TWTCommish is offline
Developer Last Online: Dec 2022 Show Printable Version Email this Page

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

This hack is simple and pretty easy to install.

What's it do?
Ya' know that little paperclip icon you see next to thread links containing attachments? Well, this hack makes that icon clickable. Clicking on it will give you the normal thread view and page navigation and all that, except you'll only see the posts with attachments in them. I find this particularly useful if you have a few threads where, say, members post their pictures. It's nice to cut through a lot of the comments and get straight to the files.


What's it involve?
7 code changes in 2 files. No template work of any sort.


Got a demo?
Surely: Demo...yay.


The attached instructions.txt file will walk you through things. Enjoy; and let me know if you find any bugs, as I haven't tested this on any board but my own yet.

Show Your Support

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

Comments
  #22  
Old 06-03-2002, 03:36 PM
Tarion's Avatar
Tarion Tarion is offline
 
Join Date: Nov 2001
Location: Germany
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Boofo
In your instructions you said to replace this line of code:
Code:
$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage");
With this:
Code:
if ($view == 'attachments') {
    $attachment_querystring = '&view=attachments';
  } else {
    $attachment_querystring = '';
  }

$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage$attachment_querystring");
The code I found was:
Code:
$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage&display=$display".iif(isset($highlight), "&highlight=$highlight", ""));
Here's what I did, will it work ok?
Code:
$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage&display=$display".iif(isset($highlight), "&highlight=$highlight", "$attachment_querystring"));
no

put it after this

Code:
$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage&$attachment_querystring&display=$display".iif(isset($highlight), "&highlight=$highlight"));
Reply With Quote
  #23  
Old 06-03-2002, 03:47 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's what I have for that piece of code right now.
Code:
if ($view == 'attachments') {
    $attachment_querystring = '&view=attachments';
  } else {
    $attachment_querystring = '';
  }

$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage&display=$display".iif(isset($highlight), "&highlight=$highlight", "$attachment_querystring"));
What should it actually be?
Reply With Quote
  #24  
Old 06-03-2002, 03:49 PM
TWTCommish's Avatar
TWTCommish TWTCommish is offline
 
Join Date: Oct 2001
Location: Pittsburgh, PA, USA
Posts: 783
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It should be this, I think:

PHP Code:
if ($view == 'attachments') {
    
$attachment_querystring '&view=attachments';
  } else {
    
$attachment_querystring '';
  }

$pagenav getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage&display=$display$attachment_querystring".iif(isset($highlight), "&highlight=$highlight""")); 
Reply With Quote
  #25  
Old 06-03-2002, 03:55 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tarion? You agree? I just want to make sure on this. If you don't agree, can you tell me why, please?
Reply With Quote
  #26  
Old 06-03-2002, 04:00 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

TWTCommish ,

How did you put the attachment box in the message and what is the hack for who downloaded it? And, lastly, how did you put the link in the box under the attachment? I'd like to try it, if I can.
Reply With Quote
  #27  
Old 06-05-2002, 10:29 PM
Martin64's Avatar
Martin64 Martin64 is offline
 
Join Date: Nov 2001
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent job. Works like a charm.
Reply With Quote
  #28  
Old 06-07-2002, 05:32 PM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, installed. Marvelous!
Reply With Quote
  #29  
Old 06-07-2002, 08:22 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This must have been the right way to do it because it works great! thanks for all of your help and an excellent hack!

Quote:
Originally posted by TWTCommish
It should be this, I think:

PHP Code:
if ($view == 'attachments') {
    
$attachment_querystring '&view=attachments';
  } else {
    
$attachment_querystring '';
  }

$pagenav getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage&display=$display$attachment_querystring".iif(isset($highlight), "&highlight=$highlight""")); 
Reply With Quote
Reply


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 03:41 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.04137 seconds
  • Memory Usage 2,301KB
  • 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_code
  • (2)bbcode_php
  • (2)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
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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