photoblog only shows large photos although thumb is selected

Creating and modifying plugins.
alef
Regular
Posts: 17
Joined: Tue Jul 25, 2006 12:44 pm

photoblog only shows large photos although thumb is selected

Post by alef »

well the topic says it all. even though i select that it should use the thumb, each time i get the large version.

anyone have any experience with this ?
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: photoblog only shows large photos although thumb is sele

Post by yellowled »

alef wrote:well the topic says it all. even though i select that it should use the thumb, each time i get the large version.

anyone have any experience with this ?
Can't say that I have, but this sounds as if maybe there's something wrong with thumbnail generation. Maybe you have chosen to use ImageMagick in Configuration -> Image Conversion Settings and the path to convert is wrong? Does you webspace actually have convert/ImageMagick?
alef
Regular
Posts: 17
Joined: Tue Jul 25, 2006 12:44 pm

Post by alef »

i found a reply of garvin somewhere else (can't find it anymore) that the code is actually doing this on intent? Riker should no about this ? I can't image no other people would be affected by this.

And no the path to convert is not wrong, and yes i get very nice thumbnails. But, after you say "yes use thumbnail" and you save, it's just resets the path to the normal picture again..
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

I assume you're using the Media button on the editor to select your images? Are they thumbnail-sized when you try to select them?

Could you please look at the image inserted into the editor, and see if it uses the thumbnail there? If you have the WYSIWYG editor, you'll need to click the <> or "View Tags" or "View Source" button.
Judebert
---
Website | Wishlist | PayPal
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Judebert, I think alef is using the "Photoblog Entries" event plugin.

It associates a single picture with a specific post (rather than putting the picture in the entry itself) at the time you save the entry.

I think the problem is that the photoblog plugin does not actually save the image path in the database, but instead saves the image id, and does not save any other data. Thus, when it loads the image (either on the front page or with the entry editor) it just grabs the path for the full image.

This seems to be feature clash... It seems like the updated version of Serendipity supports an option (the choice of a thumbnail) that the photoblog plugin actually doesn't look for.

Development options:
1) Easy: add a global configuration to the plugin to use thumbnails. Would not allow you to use thumbnails on some entries and regular on others. (I don't like this option much, because the plugin doesn't need any configuration as it is right now).

2) Hard: add a "thumb" column to the database, and store a boolean per entry. Tough to get migration/install of plugin right, but its made a little easier by the plugin already having a checkScheme() function.

I can add this to my list of things to look at, but I haven't actually managed to get to that list in a week or so.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Duh. It even says "photoblog" right in the title. :oops:

Here's my proposed hybrid option: Retrieve the ID from the database as usual. Get the full path. Check the s9y global thumbnail setting; if it's on, add .s9yThumb (or rather, the configured thumbnail string) before the final period in the full path (turning pic1.jpg to pic1.s9yThumb.jpg). Return the new string.

The only problem I see is that I don't know if the photoblog pictures are stored in the media gallery, so they may not have generated thumbnails. But if it'll work, I'll make those modifications (to free up your schedule just this little bit).
Last edited by judebert on Tue Oct 17, 2006 8:51 pm, edited 1 time in total.
Judebert
---
Website | Wishlist | PayPal
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

We have a global thumbnail setting? Where's that?
That is a great idea for a quick fix.

Any idea what the variable name is?
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

You just said that 1.1 supported an option to use thumbnails? What am I missing?
Judebert
---
Website | Wishlist | PayPal
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

*laugh* Ok, I see... *grin*
I don't think there is a global (serendipity wide) option... I'd have to add that option to the plugin configuration...
I'll take a look a the plugin and see what is up...
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

I'm glad ONE of us knows what's going on. :)

Is the thumbnail option alef was using a per-article or per-image thing, then? That would make sense, and be much more difficult to work with, too. Was it part of s9y 1.1 or an unimplemented part of the photoblog plugin? Just idle curiosity here, though; I'll stop polluting the thread with irrelevant questions now. :roll:
Judebert
---
Website | Wishlist | PayPal
alef
Regular
Posts: 17
Joined: Tue Jul 25, 2006 12:44 pm

Post by alef »

I have no idea what you guys are talking about right now :-)

Just to clarify:
I use imagemagick to convert
the media library has been thumbified [is that a word?] and the thumbs are next to the normal pics in the upload dir i believe.
i use indeed the photoblog event plugin [correct mrgroeniger]
i edit a story [or not] use the plugin by clicking on a button, it then asks me if i want to use the normal pic or the thumbnailed one, i choose the latter, i save, and the entry has the normal pic in it's path again, and the article on the weblog shows correspondinly.

again, i'll see if i can find the topic gargin sad something about this plugin riker made, and that it was intentionally that the path did not contain the thumbnail or something like that.

thank you for your help!
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

*grin* Yeah, I think we have hijacked this thread (which means I really feel obligated to fix the plugin for alef now).

But I'm going to answer your questions because I think they are important.. Or fun... Or because I have some compulsion...
Is the thumbnail option alef was using a per-article or per-image thing, then?
Yeap, per entry... And your second question is spot on about why it is per entry. :D
Was it part of s9y 1.1 or an unimplemented part of the photoblog plugin?
I think it is part of 1.1 (or maybe 1.0). Basically, the media chooser stuff has advanced but the photoblog plugin hasn't kept up to accept the new options.

Ok, now I'm fiddling with the plugin to see if I can get a quick solution to the problem.
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

alef, I have updated the plugin (to version 1.2), so it should be available in Spartacus in a few hours (24 at the most).

The update should get the plugin to recognize the difference between thumbnails and full images. It has only been tested on my test server, so there may be a bug or two floating around.

Please let me know if you have any problems.
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

alef, sorry I missed your last post (we posted at the same time...)
I found the other thread (http://www.s9y.org/forums/viewtopic.php?t=4043), but it just kind of tappered off... So I went a head and altered the plugin.

Like I said above, it should be available from Spartacus in the next 24 hours or so...

Let me know if you have any problems!
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Speedy job, Matt!
Judebert
---
Website | Wishlist | PayPal
Post Reply