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)

sybaxi 04-25-2002 03:33 AM

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


Tarion 06-03-2002 02:19 AM

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

TWTCommish 06-03-2002 03:10 AM

Well, look at FireFly's hack and see if it changes that line. If it does, follow the modified instructions accordingly. :)

Tarion 06-03-2002 10:09 AM

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
"
); 


TWTCommish 06-03-2002 12:26 PM

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.

Tarion 06-03-2002 02:38 PM

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

TWTCommish 06-03-2002 02:46 PM

Can you give me the link to FireFly's hack?

Boofo 06-03-2002 03:30 PM

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"));

Tarion 06-03-2002 03:34 PM

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

THX for help

TWTCommish 06-03-2002 03:34 PM

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")); 



All times are GMT. The time now is 06:54 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.01115 seconds
  • Memory Usage 1,747KB
  • 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
  • (4)bbcode_code_printable
  • (4)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