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)
-   -   Attachments as files (https://vborg.vbsupport.ru/showthread.php?t=35193)

Scott MacVicar 02-19-2002 08:55 PM

There is no code which is changed which would stop people from downloading attachments, did you make sure the usergroup had permission to view attachments?

JJR512 02-19-2002 09:07 PM

Prior to installing this hack, all usergroups were able to download/view attachments. There wasn't a problem before this hack, only after it.

As I mentioned, there is so far only one other person, besides me, that can view attachments. There is another person in the same usergroup as that guy that has said he cannot. I don't think it's a usergroup-based problem.

I can view all the attachments that other people are not able to.

Sean 02-19-2002 09:16 PM

Same thing here.

I have checked and rechecked the user groups. tried numerous things. I am going to revert to an old attachments database, and reload all changed databases and re-install. I'll let you know what happens.

JJR512 02-19-2002 09:26 PM

Update: As an unlogged-in visitor, I cannot view attachments.

JJR512 02-20-2002 12:04 AM

You can see my attachment test thread, and the replies from all the people that can't see it and the two people (now two instead of one, besides me) that can see it: http://forums.jjr512.com/showthread....threadid=29545

Sean 02-20-2002 02:24 AM

FYI: Doesn't work for me either.. :D Really weird if ya ask me.. hmmm

Aaow AnD wHiTe 02-20-2002 11:17 AM

Thanx PPN :)

We would like to know if it would be possible to make something like an... attachments backup hack.

With this hack, you could save all your attachments as binaries without removing them from the database. It would be really usefull for us ^^

Thanx again ^^

Sean 02-20-2002 12:07 PM

I'm re-installing now. Last time (and this time), I found this:


VISABLE was not included in the string you wanted us to find.
Code:

if (!$attachmentinfo=$DB_site->query_first("SELECT filename,filedata,dateline,visible
                                                        FROM attachment
                                                        WHERE attachmentid='$attachmentid'")){

Instead of:

Code:

if (!$attachmentinfo=$DB_site->query_first("SELECT filename,filedata,dateline FROM attachment WHERE attachmentid='$attachmentid'")){
Do I replace what I found? Because when I look for the above line, it is not found..

Scott MacVicar 02-20-2002 03:31 PM

Sean, this is for vB 2.2.2, the visible part was added as it was missing in 2.2.1

I'll do some testing then, I'll do some testin on my own boards where I implemented this hack.
I know for a fact that the attachments are there as I can view them via shell and ftp. So there must be an error in the top 30 lines or so.

Is everyone running 2.2.2?

Scott MacVicar 02-20-2002 03:41 PM

Ok, I've worked out the problem now :)

sorry about all the problems.

Look for

PHP Code:

if (!$attachmentinfo=$DB_site->query_first("SELECT filename,hash,dateline,visible FROM attachment WHERE attachmentid='$attachmentid'")){ 

Please ensure that visible is there in that list, this is super super important as if it isn't then only moderators and admins will be able to view it as they have permission to moderate attachments.


All times are GMT. The time now is 01:36 PM.

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.01240 seconds
  • Memory Usage 1,739KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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