News Photo Gallery and old embedded images

Grahame

Staff member
Administrator
Joined
May 23, 2005
Messages
4,337
Reaction score
77
Location
Galaxy's Edge
I believe I have worked out 99% of the bugs and issues with the transfer of the old Photopost gallery to the new Xenforo Media Gallery. There were issues where some photo albums were not created so even though the images existed in the new system they couldn't be seen. I had to do some MySQL Voodoo to recreate the missing albums with all of the pertinent data by cross-referencing old and new image IDs and the original filename.

An even bigger issue was the sheer number of direct-linked embedded images in old posts, with addresses like "http://forum.rebelscum.com/photogallery/data/500/lukestorm13.JPG". These URLs have no direct correlation to their new location so I had to write a script to analyse the URL, figure out what "lukestorm13.JPG" was now called and the correct URL to call it. There are a few differences, #1 there are no more "medium" sized images so any URL calling for a medium image gets the full size one, there's nothing I can do about that. #2 the thumbnail images are now quite a bit larger so you'll notice your threads might get a little bigger. #3 and the last one I need to work on is where images would call the "imagepopup" dialog box, that doesn't exist in Xenforo (because I wrote it for vBulletin) so I need to figure out a graceful way to deal with them.

Now that all of these redirects are working, I can purge the old vBulletin gallery files (we still have a backup copy, don't worry) from the server saving us a huge chuck of disk space.

Please let me know if you see anything weird or something that's not working how you think it should. I'm getting better at understanding the Xenforo infrastructure so hopefully small problems can be dealt with quicker now.

Grahame
 
Joined
Aug 1, 2006
Messages
5,044
Reaction score
6
Location
Charleston, SC
Grahame,
Question about an album in the photo gallery. I'd like to be able to sort my photos by filename but I only see options to sort by date, comments, rating, reaction, views. Is this something you can add?
 

Grahame

Staff member
Administrator
Joined
May 23, 2005
Messages
4,337
Reaction score
77
Location
Galaxy's Edge
Grahame,
Question about an album in the photo gallery. I'd like to be able to sort my photos by filename but I only see options to sort by date, comments, rating, reaction, views. Is this something you can add?
Well it's not built-in and there doesn't appear to be an Add-on for it, but the filename IS stored somewhere since you can see it in the mouse-over. I'll see what I can find when I get time
 
Joined
Aug 6, 2003
Messages
11,065
Reaction score
73
So with the new photo system, if we reposted an image on another site, it killed the link? :oops: For example, I snap a photo of a custom action figure, and post it here, and then on Yakface - now they'll have an X instead of a photo?!
 

Grahame

Staff member
Administrator
Joined
May 23, 2005
Messages
4,337
Reaction score
77
Location
Galaxy's Edge
So with the new photo system, if we reposted an image on another site, it killed the link? :oops: For example, I snap a photo of a custom action figure, and post it here, and then on Yakface - now they'll have an X instead of a photo?!
Firstly we'd rather you didn't do that, simply because it's incredibly bad manners to use the bandwidth from one site to post content on another. It gives the other site all of the benefit with none of the costs associated with it. Secondly, can you give me an example of the link you're posting? My guess is Xenforo has anti-leeching built in to stop this exact practice but I'm not 100% sure without knowing the link you're using.
 
Joined
Aug 6, 2003
Messages
11,065
Reaction score
73
Firstly we'd rather you didn't do that, simply because it's incredibly bad manners to use the bandwidth from one site to post content on another. It gives the other site all of the benefit with none of the costs associated with it. Secondly, can you give me an example of the link you're posting? My guess is Xenforo has anti-leeching built in to stop this exact practice but I'm not 100% sure without knowing the link you're using.
I actually asked if it was fine years ago - to both a mod and an admin, while I myself was a mod. Guess the policy changed, so I'll be sure not to share anything else.
 

Grahame

Staff member
Administrator
Joined
May 23, 2005
Messages
4,337
Reaction score
77
Location
Galaxy's Edge
I actually asked if it was fine years ago - to both a mod and an admin, while I myself was a mod. Guess the policy changed, so I'll be sure not to share anything else.
I'll discuss it with Philip, but I'm sure you can agree it's not in out best interests to allow it unless we start watermarking the images so that people know they are from Rebelscum, and I really don't want to do that.
 

Grahame

Staff member
Administrator
Joined
May 23, 2005
Messages
4,337
Reaction score
77
Location
Galaxy's Edge
I'll discuss it with Philip, but I'm sure you can agree it's not in out best interests to allow it unless we start watermarking the images so that people know they are from Rebelscum, and I really don't want to do that.
Also the irony of re-posting content we're hosting on Yakface, a site that doesn't even allow you to READ their content without being registered, is not lost on me.
 
Joined
Aug 1, 2006
Messages
5,044
Reaction score
6
Location
Charleston, SC
Well it's not built-in and there doesn't appear to be an Add-on for it, but the filename IS stored somewhere since you can see it in the mouse-over. I'll see what I can find when I get time
Interesting and surprising. My photo album is only 62 images but I can imagine if someone had a much larger album it would be quite hard to find an image without being able to sort by filename. Anyway, thanks in advance for looking into this for me.
 
Joined
Aug 1, 2006
Messages
5,044
Reaction score
6
Location
Charleston, SC
Grahame,
Some of the photos in my limelight thread (post #1) result in an "Oops" message when clicked on. For example the very first image here (Overview A 0518):
But if you click on the second, third or fourth image they correctly show the photo. I don't know how to fix this problem. Also I don't know how to insert a thumbnail image in a post such that the full image appears without being taken to my album. Using that little camera icon when editing a post inserts a thumbnail that takes the person away from my thread and into my album (not what I want to happen).
Thanks,
Ben
 

Grahame

Staff member
Administrator
Joined
May 23, 2005
Messages
4,337
Reaction score
77
Location
Galaxy's Edge
Grahame,
Some of the photos in my limelight thread (post #1) result in an "Oops" message when clicked on. For example the very first image here (Overview A 0518):
The first photo looks ok to me, and links to the correct URL which is https://forum.rebelscum.com/media/382681/full

But if you click on the second, third or fourth image they correctly show the photo. I don't know how to fix this problem. Also I don't know how to insert a thumbnail image in a post such that the full image appears without being taken to my album. Using that little camera icon when editing a post inserts a thumbnail that takes the person away from my thread and into my album (not what I want to happen).
This is a good point and I noticed that too, I'm going to see if I can find a way to open the images in a pop-up box vs taking them away from the thread. It might be an option I don't have turned on.
 
Joined
Aug 1, 2006
Messages
5,044
Reaction score
6
Location
Charleston, SC
Grahame,
Just uploaded a new photo to my album here:
It's the most recent photo there, titled "AcmeYodaCel1119.jpg"
It shows fine if you click on it in my photo album.
I am trying to get it to show as a clickable thumbnail in my limelight thread which is here:
Going into edit mode on the first post of the thread and turning on the BB Code gear icon, I am following the example of all the other photos and just replacing the fileaname. However when I save this code I get a torn picture icon and when it's clicked on I get the "Oops" screen. What am I doing wrong?
Thanks a bunch,
Ben
 
Last edited:

Grahame

Staff member
Administrator
Joined
May 23, 2005
Messages
4,337
Reaction score
77
Location
Galaxy's Edge
Grahame,
Just uploaded a new photo to my album here:
It's the most recent photo there, titled "AcmeYodaCel1119.jpg"
It shows fine if you click on it in my photo album.
I am trying to get it to show as a clickable thumbnail in my limelight thread which is here:
Going into edit mode on the first post of the thread and turning on the BB Code gear icon, I am following the example of all the other photos and just replacing the fileaname. However when I save this code I get a torn picture icon and when it's clicked on I get the "Oops" screen. What am I doing wrong?
Thanks a bunch,
Ben
You can’t just copy the bb code for new images unless you specifically get the thumbnail and full size URLs from the new gallery. What happens if you insert it using the camera icon and pick it from the gallery?

View media item 395440
 
Last edited:

Philip_Wise

Staff member
Webmaster
Joined
May 21, 2001
Messages
3,855
Reaction score
0
I actually asked if it was fine years ago - to both a mod and an admin, while I myself was a mod. Guess the policy changed, so I'll be sure not to share anything else.
I'm sorry you were given bad info on this. From the early days of the net it's always been a bad practice. Our answers about it should never have indicated it was ok.
 
Joined
Aug 1, 2006
Messages
5,044
Reaction score
6
Location
Charleston, SC
You can’t just copy the bb code for new images unless you specifically get the thumbnail and full size URLs from the new gallery. What happens if you insert it using the camera icon and pick it from the gallery?

View media item 395440
I get exactly what you have above...an image bigger than all the thumbnails in my thread that, when clicked on, takes the viewer into my album rather than just showing them the full size picture.
I don't understand why I can't use the same format code that all the other images in my thread use which is:
[ URL='http://forum.rebelscum.com/photogallery/data/926/AcmeYodaCel1119.JPG'][IMG ]http://forum.rebelscum.com/photogallery/data/926/thumbs/AcmeYodaCel1119.JPG[/IMG ][/URL ] (I've inserted some spaces so you can see the code rather than it posting the missing image icon).
 

Grahame

Staff member
Administrator
Joined
May 23, 2005
Messages
4,337
Reaction score
77
Location
Galaxy's Edge
I don't understand why I can't use the same format code that all the other images in my thread use which is:
Because there IS no image at those addresses, that's not how Xenforo stores gallery images. The time I spent last week getting the old images to work took so long because there is no direct correlation between the image name and where it's stored in Xenforo's attachment system. Right now when you use an IMG tag for an image that was imported from the old vBulletin system, this happens :

Browser requests img -> NginX interprets URL as being from old gallery (/photogallery/data) -> URL is passed to a custom PHP script I wrote -> PHP script dissects URL into components and does a MySQL lookup against 3 different tables to determine where the image is now stored in Xenforo -> PHP script constructs new URL and redirects the browser to load content from there instead.

Since the new images you're uploading didn't exist in the old system, the /photogallery/data/etc URLs will never work because there is no way to perform the lookups necessary.

Now having said all that, IF you open your gallery and use some creative right-clicking and copying of image URLs you could struct something that looks like this

[url=https://forum.rebelscum.com/media/acmeyodacel1119-jpg.395440/full][img]https://forum.rebelscum.com/data/xfmg/thumbnail/395/395440-5772d1f4850a2f74a6c7c94527235795.jpg?1573411187[/img]p[/url]

That should do exactly what the old links did, show the thumbnail for the IMG tag and the full size image when clicked in the URL tag. I want a better solution and I will have it but it's going to take some time for me to learn the system and write my own BB code tags to do specific things.

 
Joined
Aug 1, 2006
Messages
5,044
Reaction score
6
Location
Charleston, SC
Thanks so much for the detailed explanation Grahame. Whenever this gets done, it gets done. I really appreciate your help with this.
 
Top