|
Joined: Apr 2004
Posts: 1,945 Likes: 145
|
Joined: Apr 2004
Posts: 1,945 Likes: 145 |
If your forum does not allow attachments to be viewed by guests (not logged in), guests will not be able to view embedded attachments.
|
|
|
|
Joined: Mar 2007
Posts: 285 Likes: 1
Enthusiast
|
Enthusiast
Joined: Mar 2007
Posts: 285 Likes: 1 |
If your forum does not allow attachments to be viewed by guests (not logged in), guests will not be able to view embedded attachments. I had tried enabling attachment downloads for guests earlier, but it didn't seem to help me see the embeds at the bottom of page 2 Right now they are enabled for Guests and I can see the new one I did today on page 3, but not the older one at bottom of page 2. Signing on as a member it is the same way. If I sign on as Admin I can see them both. Can you see embeds on bottom of page 2? https://www.electrical-contractor.net/forums/ubbthreads.php/topics/220154/2.html
Last edited by ECNet; 09/03/2019 3:14 PM. Reason: added link
|
|
|
|
Joined: Apr 2004
Posts: 1,945 Likes: 145
|
Joined: Apr 2004
Posts: 1,945 Likes: 145 |
edit the post and view the attachment in the attachment manager.
if you don't see the file attached to that post, then it doesnt exist. your browser is attempting to be helpful in showing your a cached version of it.
if you do see the file there, then attempt to embed it again. look at the file name of your new embed vs your old embed. im guessing that it will be different.
|
|
|
|
Joined: Apr 2004
Posts: 1,945 Likes: 145
|
Joined: Apr 2004
Posts: 1,945 Likes: 145 |
Attachments are stored in the Attachment Storage Directory: Control Panel > Paths & Database > Attachment Storage Directory
Attachments are deleted when: If you click on the trashcan next to the attachment in the attachment manager, the attachment will be deleted. If you do not save your post with the newly attached item, the attachment will be deleted. If you delete the post, its attachments are also deleted.
|
|
|
|
Joined: Mar 2007
Posts: 285 Likes: 1
Enthusiast
|
Enthusiast
Joined: Mar 2007
Posts: 285 Likes: 1 |
Could be wrong, but I didn't think I did anything to delete the attachment and that it did work for sometime after and then not. It's working now, but still seems odd: The original image is still there in the Attachment Directory: https://www.electrical-contractor.net/forums/upload/attach/605.jpgI created a new post with the old non-working link in img tags... I updated the Forum Cache (in Chrome) opened a FireFox Browser, (which I rarely use), cleared the History and signed on as Admin. I can see the original image in the new post I just made with the original link ( https://www.electrical-contractor.n...ownload/Number/605/filename/DCP_0004.JPG )
Last edited by ECNet; 09/03/2019 5:48 PM.
|
|
|
|
Joined: Mar 2007
Posts: 285 Likes: 1
Enthusiast
|
Enthusiast
Joined: Mar 2007
Posts: 285 Likes: 1 |
And...
After Logging out as Admin I can't see it as Member or Guest. If I was seeing a cached Image as Admin wouldn't I still be able to see it ?
|
|
|
|
Joined: Apr 2004
Posts: 1,945 Likes: 145
|
Joined: Apr 2004
Posts: 1,945 Likes: 145 |
Nothing really has changed in many years about how the attached files are handled, other than image compression, and image orientation via its exif data.
The embedding of post attachments in to the post body is nothing magical. 1/ the current code just takes the URL that would appear in the attachments section, and places it in to the post. 2/ upon display of the post, if there are links inside the post which are matched with attached file links, the attached file links will not be shown. this is done to prevent duplication of the same content on the screen.
Its really not magical at all. "If IMAGE00 is in the post, dont show IMAGE00 in the attachment group."
for example, you can have 10 attachments. embed 2 of them. have the remaining 8 show in the attachment group. it is basically what an article would be; attach all the relevant graphics, such as a lead image. then use 1 or 2 items as examples. and then followup with the attachment-grouping of the rest.
--
I see that you have hot-linked (posted a direct link) to your attachment directory, and a file within it.
When you bypass the UBB.threads attachments permission system by hot-linking to an attachment, you are hard-coding it in to your post.
Rather than hot-linking directly to the images within the server file system, UBB.threads uses a attachments permission system to control which member groups have permission to see the attachments.
By using the permission system, we can also move the storage directory around to wherever, and still have it function correctly in the post body because we are using the UBB.threads settings to grab the file name and directory. All that would be needed is to update UBB.threads's attachment storage directory path in the control panel.
Use .htaccess to secure your directory against hot-linking. But if you have several posts where you've already hot-linked to your files, those links will be blocked.
Last edited by isaac; 09/03/2019 6:23 PM. Reason: removed an editorial random clipboard copy/paste
|
|
|
|
Joined: Mar 2007
Posts: 285 Likes: 1
Enthusiast
|
Enthusiast
Joined: Mar 2007
Posts: 285 Likes: 1 |
I think we're missing each other here. I direct linked to show the original file was still in the Attachments Directory. If I understand you correctly a link going through the Forum Software with https://www.electrical-contractor.n...ownload/Number/605/filename/DCP_0004.JPG would be a permission based thing. If I have Attachment Downloads enabled for Guest on Up why can only the Admin see it?
|
|
|
|
Joined: Apr 2004
Posts: 1,945 Likes: 145
|
Joined: Apr 2004
Posts: 1,945 Likes: 145 |
Confirm the member group permission for that forum is set correctly.
You may also want to review: Control Panel > Attachments > Max File Size for Displaying Attached Images Inline I believe 5MB is the default for this.
|
|
|
|
Joined: Mar 2007
Posts: 285 Likes: 1
Enthusiast
|
Enthusiast
Joined: Mar 2007
Posts: 285 Likes: 1 |
Here's the Permissions settings for that Forum: Attachment Settings... I don't have anything that says Max Size. Is that what the second setting should say? Do I even need to have a Maximum Attachment size for Guests as they're not permitted to upload any?
Last edited by ECNet; 09/03/2019 7:12 PM.
|
|
|
|
Joined: Apr 2004
Posts: 1,945 Likes: 145
|
Joined: Apr 2004
Posts: 1,945 Likes: 145 |
It looks like you are missing several language strings from an incomplete upgrade.
i sent you a PM
|
|
|
|
Joined: Mar 2007
Posts: 285 Likes: 1
Enthusiast
|
Enthusiast
Joined: Mar 2007
Posts: 285 Likes: 1 |
I should've said copies of the same image. First one was uploaded about 2 weeks ago and the second today
|
|
|
|
Joined: Apr 2004
Posts: 1,945 Likes: 145
|
Joined: Apr 2004
Posts: 1,945 Likes: 145 |
https://www.electrical-contractor.net/forums/ubbthreads.php/ubb/download/Number/605/filename/DCP_0004.JPG
https://www.electrical-contractor.net/forums/ubbthreads.php/ubb/download/Number/612/filename/DCP_0004.JPG
They may both be the same photo, but they are not the same file. One file is a file stored with "FILE_ID 605" and the other is a file stored with "FILE_ID 612". Permissions for each FILE_ID are based on which forum the post lives in, and what the user's access is set to.
|
|
|
|
Joined: Mar 2007
Posts: 285 Likes: 1
Enthusiast
|
Enthusiast
Joined: Mar 2007
Posts: 285 Likes: 1 |
They may both be the same photo, but they are not the same file.
One file is a file stored with "FILE_ID 605" and the other is a file stored with "FILE_ID 612".
Permissions for each FILE_ID are based on which forum the post lives in, and what the user's access is set to. I understand that, that's why I clarified they were copies of the same image. And, they were uploaded to the same thread, and attempted to be seen by the same person so if only one can be seen there must be something else going on. There must be somehow be different permissions for each image that is not overridden by the CP settings Anyway, if you think what might be the cause of that let me know, otherwise I'll keep an eye on things to see if it happens again.
|
|
|
|
Joined: Mar 2007
Posts: 285 Likes: 1
Enthusiast
|
Enthusiast
Joined: Mar 2007
Posts: 285 Likes: 1 |
I took a look in the Database and noticed the Image that can't be seen (605) has a different Post ID (220211) than the newly uploaded one (Image File 605 with Post ID 220213)
Not sure how it happened, but somehow I had images associated with Post ID 220211 linked inside Post #220213
So uploaded attachments are tied to a specific Post?
As Admin I can still see a Post #220211 that has the older images. What am I looking at?
|
|
|
|
Joined: Apr 2004
Posts: 1,945 Likes: 145
|
Joined: Apr 2004
Posts: 1,945 Likes: 145 |
Yes. post attachments are tied to the post they are attached to.
When a post is displayed, all attachments matching that post id are displayed with the post. When the post is deleted, so are its attachments.
Attachment view/download permissions are granted based on what post they are attached to, and the post + its parent's permission settings.
|
|
|
|
Joined: Mar 2007
Posts: 285 Likes: 1
Enthusiast
|
Enthusiast
Joined: Mar 2007
Posts: 285 Likes: 1 |
If the Post was deleted and Forum Cache Updated why can I as Admin still see a Post #220211 that has the older images? Are they never really deleted?
|
|
|
|
Joined: Apr 2004
Posts: 1,945 Likes: 145
|
Joined: Apr 2004
Posts: 1,945 Likes: 145 |
This is the file operation which happens when you delete a post: $query = "
select FILE_NAME,FILE_DIR
from {$config['TABLE_PREFIX']}FILES
where POST_ID = ?
";
$sth = $dbh->do_placeholder_query($query, array($Number), __LINE__, __FILE__);
while (list($File, $dir) = $dbh->fetch_array($sth)) {
if (!$dir) {
unlink("{$config['ATTACHMENTS_PATH']}/$File");
} else {
unlink("{$config['FULL_PATH']}/gallery/$dir/full/$File");
unlink("{$config['FULL_PATH']}/gallery/$dir/medium/$File");
unlink("{$config['FULL_PATH']}/gallery/$dir/thumbs/$File");
}
} SOURCE: scripts/deletepost.inc.php unlink — Deletes a file https://www.php.net/manual/en/function.unlink.php
|
|
|
|
Joined: Mar 2007
Posts: 285 Likes: 1
Enthusiast
|
Enthusiast
Joined: Mar 2007
Posts: 285 Likes: 1 |
Okay... I just figured this thing out Post # 220211 is in a Forum only accessible to Moderators and Admin. So, images associated with that post could not be seen by Members or Guests. But... apparently images linked to posts in accessible forums can be embedded in other posts and in different threads (without uploading) using the img tags wonder if it would work here too...
|
|
|
|
Joined: Mar 2007
Posts: 285 Likes: 1
Enthusiast
|
Enthusiast
Joined: Mar 2007
Posts: 285 Likes: 1 |
|
|
|
|
Joined: Sep 2019
Posts: 1
Stranger
|
Stranger
Joined: Sep 2019
Posts: 1 |
Same problem... Nothing helps.
|
|
|
|
Joined: Mar 2007
Posts: 285 Likes: 1
Enthusiast
|
Enthusiast
Joined: Mar 2007
Posts: 285 Likes: 1 |
Same problem... Nothing helps. sloger5, In my case the referenced image was an attachment in a Private Forum. That's why general Membership and Guests weren't eligible to see it. It was not a software issue like I had originally thought.
|
|
|
|
Joined: Apr 2004
Posts: 1,945 Likes: 145
|
Joined: Apr 2004
Posts: 1,945 Likes: 145 |
Same problem... Nothing helps. Seeing as this is your first post and you havent shared any details about your forum or your issue... What version of UBB.threads do you have installed? What steps have you tried already? Please describe the issue you are having, or post a link to it, so someone can further assist you with it.
|
|
|
|
Joined: Dec 2003
Posts: 6,562 Likes: 78
|
Joined: Dec 2003
Posts: 6,562 Likes: 78 |
As isaac stated it would be helpful to state what version you are using and if it is a upgrade or new install. As well as the url to the site. Same problem does not mean same issues.. It can be many issues such as you tried to upload a file that is not supported in settings or exceeds the hosts php.ini setting which ubb will not supersede
For one example when you create the storage folder you must click on the test directory link., It creates a file in that folder that is needed..
There are several of us here willing to help by simple registering on your site and testing.
Last edited by Ruben; 09/09/2019 6:42 PM.
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
|
|
|
0 members (),
764
guests, and
261
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|