![]() |
|
|
Thread Tools |
|
#1
|
||||||||
|
||||||||
|
Issue with attachment.php calling thumbs
I'm using attachment.php to display thumbnails for attachments. This is being used in a custom script which resides within the AdminCP and it's called in the same manner in which it's used in postbit to display thumbs:
http://www.mysite.com/forum/attachme...1&d=1189977330 The thumbnails display properly when any menber views their own attachments, however when they attempt to view another member's attachments, the image is not displayed (i get the box with red X in it). You can see the result of the query which is called within the script in attached "query.gif" The issue which i feel might be the problem is that there's no forumid passed into $attachmentinfo and therefore no $forumperms to view the attachment? I think that's the issue, but not sure because when I comment out the following block of code (taken from attachment.php) the image still doesn't show, however when i run the script to call the same exact imageid but while logged in as the user who posted the attachment, it does show.
How can I bypass this issue? I can't seem to narrow down what the problem is really. I even tried editing the attachment.php file and adding the following just before the block above but it didnt work either:
Any ideas? I've been stumped on this for 2 days now. ![]()
__________________
Please feel free to PM me about custom work, installations, and upgrades! Eclipse Records - Streetcult Street Team No members have liked this post.
Last edited by Antivirus : 18 Oct 2007 at 22:59. |
||||||||
|
#2
|
||||
|
||||
|
bump - can anyone help?
![]()
__________________
Please feel free to PM me about custom work, installations, and upgrades! Eclipse Records - Streetcult Street Team No members have liked this post.
|
|
#3
|
||||
|
||||
|
I'm so sad, this is killing me. Still can't figure this out.
__________________
Please feel free to PM me about custom work, installations, and upgrades! Eclipse Records - Streetcult Street Team No members have liked this post.
|
|
#4
|
||||
|
||||
|
It would probably be useful to see what the source code in the page looks like for the img tags. Also, have you tried doing a query in the attachment.php page to find out what forum the attachment is in and using that variable in the rest of the code? At least that way you can find out if the forumid is the problem.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
|
#5
|
||||||||||||
|
||||||||||||
|
The code which is creating the thumbnails is as follows:
I don't think that's the issue as it works just fine for generating thumbs for attachments posted by myself, the problem occurrs when viewing thumbs for any other member. It's probably relevant that these thumbnails for attachments are NOT associated with posts, threads or forums. they are associated with Feedback reports. Therefore the query which gathers the attachment data from the database returns no forumid. (please see attached "query_result_attachment-php.gif" ). I thought since there's no forumid returned, the following code in attachment.php is unable to generate the $forumperms needed and it's the reason for the error:
But that can't be it, since there's no forum id returned either when viewing my own attachment thumbnail. If the thumb is clisked on to view the attachment in a full size window, I get a NO PERMISSION error. Now the interesting thing is, the no permission error ( print_no_permission(); ) is only located in the following part of the attachment.php script:
But if i comment that part out in attachment php, the thumbnail still doesn't display, and i still get the nopermission error when opening the full wondow. It baffles my mind. Please anyone help, i will be eternally grateful.
__________________
Please feel free to PM me about custom work, installations, and upgrades! Eclipse Records - Streetcult Street Team No members have liked this post.
|
||||||||||||
|
#6
|
||||
|
||||
|
I was actually wondering about what was being printed out in the source code for the page. I always like to see what is actually being parsed from the code. In fact, it sometimes helps to hide variables in there so you can see what is being fed to the page.
When you click on the thumbnail, you get a new window that is supposed to have the large image, correct? It would be useful to see what the source code is for that. Perhaps try to hide some variables in there in order to see what is being passed. (Sorry I can't be more help specifically, I'm still running vB 3.0 - I'm just throwing out suggestions on how I troubleshoot things like this.)
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
|
#7
|
||||
|
||||
|
Thanks Lynne. I actually was able (finally) to solve this by assigning the missing $forumperms within hook location attachment_start.
__________________
Please feel free to PM me about custom work, installations, and upgrades! Eclipse Records - Streetcult Street Team No members have liked this post.
|
![]() |
«
Previous Thread
|
Next Thread
»
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding Lightbox to Attachment thumbs | imranbaig | vBulletin 3.6 Template Modifications | 79 | 13 Jul 2008 20:44 |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| Thread Tools | |
|
|
| New To Site? | Need Help? |
All times are GMT. The time now is 05:07.





