vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   View All Attachments in Thread (https://vborg.vbsupport.ru/showthread.php?t=36416)

TWTCommish 03-21-2002 10:00 PM

View All Attachments in Thread
 
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.

Jawelin 03-22-2002 10:45 PM

Very useful !!!
I'll use ASAP.... but FireFly, please install it here too so everybody could get rid of those long and rich-of-attachments thread in this hack forum !

Thanks a lot

Admin 03-23-2002 07:20 AM

Excellent idea Chris. :) Will install this right away...

Admin 03-23-2002 07:25 AM

Works great, good job.

Jawelin 03-23-2002 08:41 AM

Very very useful...

Just a NON-problem, better a constatation, with another hack:
when I use the 'attach' ikon and only posts with attachments are displayed, post shown are numbered (Post #X hack) in a relative way, of course... I.e. they don't refer to the original post sequence in thread.
As said, just a point out...
;)

Thanks again, to both (now!)

TWTCommish 03-23-2002 01:15 PM

Oh, do you mean with the post counter/direct link hack? Hmmm, I haven't looked at that one in any sort of significant detail...but I imagine, to keep their original numbers and such, I'd have to either give up the page navigation the way it is (so that it'd refer to the original thread including non-attachment posts), or I'd have to stick another query in there somewhere. I'm not sure.

Anyway, glad you like it, guys. :) I remember thinking of it and then wondering why I hadn't before. Hand it to my members, though, for asking for an easy way to access the attachments. :)

Jawelin 03-23-2002 01:20 PM

Of course.... I was first liked this hack ! ;)
Just a think I noticed... that's all.
Thanks

TWTCommish 04-07-2002 01:04 PM

Small update to this: the original hack doesn't turn the paperclip image on the search results page into a clickable link the way it does for the one on the forumdisplay. This is easily corrected. Find this around line 970-something in you search.php file:

PHP Code:

$paperclip="<img src=\"{*imagesfolder*}/paperclip.gif\" alt=\"$searchresult[attach] Attachment(s)\" border=\"0\">"

...and replace it with this...
PHP Code:

$paperclip="<a href=\"showthread.php?s=$session[sessionhash]&threadid=$searchresult[threadid]&view=attachments\"><img src=\"{*imagesfolder*}/paperclip.gif\" width=\"10\" height=\"13\" alt=\"$searchresult[attach] Attachment(s)\" border=\"0\" align=\"absmiddle\"></a>"

That should do it. :) Take the asterisks out, however, from the {*imagesfolder*} part -- I had to add them in there, or this forum would process them as vB.org's image folder location.

skyline2002 04-08-2002 04:52 AM

how can make this hack work with v2.01.

i couldnt find the code below (in showtheard.php):
-------------------------------------------------
$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage");
----------------------------------------------------

Admin 04-08-2002 12:52 PM

If I were I would forget about this hack and upgrade to 2.2.5 ASAP. I don't know how to say this so you will listen, this is very important and 2.0.1 is highly exploitable.


All times are GMT. The time now is 11:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01038 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete