Thread Starter
Bryan
(@bromius)
Okay, message me here and I’ll send email address, lol.
But I think I migth have solved… on line 30 of templates/simple/gallery.js:
current_image_src = current_image_href.replace(ext_regex, diff[0] + '.' + diff[1]),
Changed it to:
current_image_src = diff[0] + '.' + diff[1],
This appears to have fixed it. I hope it didn’t break anything else.
Thread Starter
Bryan
(@bromius)
Yup. It broke it. I now have to different galleries posted. One works with original code, one only works with mine.
Using original code this one works:
[gallery link="file" link_size="large" include="2541,2542,2543,2544,2545,2546,2547,2548,2549,2550,2551,2552,2553" linkclass="thickbox" template="simple"]
which yields this html
[snipped – dude, WAAAAY too big. Use Pastebin.com please and thank you – moderators]
So apparently my fix didn’t work, so I’m back to what’s wrong with my original gallery?
Plugin Author
Aesqe
(@aesqe)
@bryan: please try installing the latest beta of the plugin, I’m pretty sure it’s fixed in that version.
You can download v1.7.5-beta-1 from here: http://downloads.wordpress.org/plugin/file-gallery.zip.
Thread Starter
Bryan
(@bromius)
Alas, it still has the same behavior. :-\
Plugin Author
Aesqe
(@aesqe)
@bryan: I need two things from you 🙂
1.) please post just the filename of the initial medium photo
2.) take a look at the source of the page you have the gallery on, and find a line that looks like this:
<dl class="gallery-item">
<dt class="gallery-icon">
<span class="diff">-300x225;#;#;jpg</span>
and paste here the contents of that <span class="diff">
element.
Thread Starter
Bryan
(@bromius)
The intial <img> tag has a src of:
http://www.tortugatwins.com/wp-content/uploads/members-only-journal/jefhall/2012/03/7-Sunset-over-Arizona-1024x768http://www.tortugatwins.com/wp-content/uploads/members-only-journal/jefhall/2012/03/7-Sunset-over-Arizona-300×225.jpg
The true url of the “medium” photo is:
http://www.tortugatwins.com/wp-content/uploads/members-only-journal/jefhall/2012/03/7-Sunset-over-Arizona-300×225.jpg
And the entire gallery-item element is:
<dl class="gallery-item">
<dt class="gallery-icon">
<span class="diff"><span><a class="linkclass" href="http://www.tortugatwins.com/wp-content/uploads/members-only-journal/jefhall/2012/03/7-Sunset-over-Arizona-300x225;#;#;jpg">http://www.tortugatwins.com/wp-content/uploads/members-only-journal/jefhall/2012/03/7-Sunset-over-Arizona-300x225;#;#;jpg</a></span></span>
<a href="http://www.tortugatwins.com/wp-content/uploads/members-only-journal/jefhall/2012/03/7-Sunset-over-Arizona-1024x768.jpg" title="Sunset+over+Arizona" class="" rel="thickbox-4">
<img src="http://www.tortugatwins.com/wp-content/uploads/members-only-journal/jefhall/2012/03/7-Sunset-over-Arizona-150x150.jpg" width="150" height="150" title="Sunset over Arizona" class="attachment-thumbnail" alt="Sunset over Arizona">
</a>
</dt>
</dl>
Plugin Author
Aesqe
(@aesqe)
@bryan: eh… something’s definitely wrong here.
that <span class diff>
should contain only 300x225;#;#;jpg
, not the whole link…
I’ll let you know as soon as I figure it out.
Thread Starter
Bryan
(@bromius)
Yeah… it did strike me as odd also. Let me know if you need any further debugging info.
B
I was having the same problem, initially.
I tracked it down to the fact that the images I was uploading happened to have a .jpeg extension, but the resized images were created with a .jpg extension. The code in file_gallery_filename_end_diff() assumes that the original and the resized images have the same extension — and since mine didn’t, I ended up with unexpected contents for the <span class=”diff”> element.
In my case it contained “-300×199.jpg;#;#;jpeg”.
@bryan, what was the extension on the files you were uploading?
I am not sure how/where the resized images are created — is this something the file-gallery plugin does, or the wordpress core?