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
  #12  
Old 04-25-2002, 03:33 AM
sybaxi sybaxi is offline
 
Join Date: Apr 2002
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't seem to install this. Does it works with 2.2.5 ? Cos i can't seem to find that line to replace with. This is installed in this forums though, and it's running 2.2.5. And oh, i tried installing leaving the last bit out. Everything is fine but when i clicked on the paperclip it displays the whole thread itself, not just the attachments.
Please help. Thanks alot.

PHP Code:
$pagenav getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage");

Replace it with this:

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

$pagenav getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage$attachment_querystring");

Save and upload
Reply With Quote
  #13  
Old 06-03-2002, 02:19 AM
Tarion's Avatar
Tarion Tarion is offline
 
Join Date: Nov 2001
Location: Germany
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had the same Problem only when i have installed FireFlys Number of Hacks Hack, without this hack it does work but with it the hole thread is displayed not only the messages with attachments, pleas help
Reply With Quote
  #14  
Old 06-03-2002, 03:10 AM
TWTCommish's Avatar
TWTCommish TWTCommish is offline
 
Join Date: Oct 2001
Location: Pittsburgh, PA, USA
Posts: 783
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, look at FireFly's hack and see if it changes that line. If it does, follow the modified instructions accordingly.
Reply With Quote
  #15  
Old 06-03-2002, 10:09 AM
Tarion's Avatar
Tarion Tarion is offline
 
Join Date: Nov 2001
Location: Germany
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i do follow FireFlys instructions, but your $attachment_clause has no effect.

This are FireFlys line:
PHP Code:
$getpostids=$DB_site->query("
    SELECT post.postid,post.userid AS postuserid FROM post
    WHERE post.threadid='
$threadid' AND post.visible=1
    ORDER BY dateline 
$postorder LIMIT ".($limitlower-1).",$perpage
"
); 
and this is my line:
PHP Code:
$getpostids=$DB_site->query("
    SELECT post.postid,post.userid AS postuserid FROM post
    WHERE post.threadid='
$threadid' AND post.visible=1$attachment_clause
    ORDER BY dateline 
$postorder LIMIT ".($limitlower-1).",$perpage
"
); 
Reply With Quote
  #16  
Old 06-03-2002, 12:26 PM
TWTCommish's Avatar
TWTCommish TWTCommish is offline
 
Join Date: Oct 2001
Location: Pittsburgh, PA, USA
Posts: 783
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're talking about different things. First, you were talking about another block of code, and now this one. Which is the problem? I don't see what it is you're saying.
Reply With Quote
  #17  
Old 06-03-2002, 02:38 PM
Tarion's Avatar
Tarion Tarion is offline
 
Join Date: Nov 2001
Location: Germany
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry TWT for my bad explaining.

Wath I mean is, wenn i install Fireflys Hack the above namde blocks are effekted by changes of both Hacks, but wenn i do Fireflys instructions and then yours (and the $attachment_clouse behinde the post.visibile) it doesn't work it alway shows up the complet Thread nut only the attachment messages, i tried to do it by my self but it doesn't work.

Sorry also for my bad english i don't often speak or write in english (i'am german )

I hope you know an answer
Reply With Quote
  #18  
Old 06-03-2002, 02:46 PM
TWTCommish's Avatar
TWTCommish TWTCommish is offline
 
Join Date: Oct 2001
Location: Pittsburgh, PA, USA
Posts: 783
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you give me the link to FireFly's hack?
Reply With Quote
  #19  
Old 06-03-2002, 03:30 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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"));
Reply With Quote
  #20  
Old 06-03-2002, 03:34 PM
Tarion's Avatar
Tarion Tarion is offline
 
Join Date: Nov 2001
Location: Germany
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

here ist the Link to Firefly's hack: https://vborg.vbsupport.ru/showthrea...threadid=33811

THX for help
Reply With Quote
  #21  
Old 06-03-2002, 03:34 PM
TWTCommish's Avatar
TWTCommish TWTCommish is offline
 
Join Date: Oct 2001
Location: Pittsburgh, PA, USA
Posts: 783
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, I don't think so. I'm not sure, but I think this ought to work, though:

PHP Code:
$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:16 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.04689 seconds
  • Memory Usage 2,323KB
  • 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
  • (4)bbcode_code
  • (4)bbcode_php
  • (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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)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