Page 1 of 1

usergallery: show commentary on the picture?

Posted: Sun Oct 08, 2006 9:52 pm
by stm999999999
I have written some text in the short and long commentary field of an image in the media-lib.

Is it possible to show these texts under "Filesize: xxx kb" in the single picture site?

Posted: Sun Oct 08, 2006 11:47 pm
by mgroeninger
Right now... no.

(Well, not really... there is a way to hack it together, but it isn't very pretty. If you want to try you can take a look at the Smarty variable $plugin_usergallery_extended_info, which is set in the current version. I actually have changed the structure of that variable, so anything you do based on that will break with the next version bump.)

Pretty soon, yes! I've been fiddling with this from time to time and I am pretty close.

The difficulty is that those entries are completely dynamic (and can be changed in the general configuration page), so the output needs to be completely dynamic, too.

Posted: Sun Oct 08, 2006 11:56 pm
by stm999999999
OK, I can wait for this.

Posted: Mon Oct 09, 2006 12:34 am
by mgroeninger
Stephan, I'm actually pretty close to done... Would you mind testing it for me and giving me some feed back? I can email it to you if you send me a private message with your email.

Posted: Mon Oct 09, 2006 7:56 pm
by stm999999999
H, I installed your code and make an update of my gallery-template-files, but nothing comes!?

I have an image with some text:

Image

But nothing of them appears under the image!

I also try your tpl-files, nothing.

Posted: Mon Oct 09, 2006 8:09 pm
by mgroeninger
Did you change the configuration of the plugin to enable the output?
The last option in the plugins configurations is "Show Media Properties" and it should be set to yes...

Once you have enabled that, you should take a look at the option "Media properties list"; the default is "COPYRIGHT:Copyright;TITLE:Title;COMMENT2:Comment".

That means it will output the COPYRIGHT, TITLE, and COMMENT2 (with the second word of each entry being the test used on the page.

(Sorry, I didn't mention that I had changed the options list in my email to you. I guess it might make sense to enable that by default and use a version check so version erlier than 1.1 don't try to use it.)

Posted: Mon Oct 09, 2006 9:18 pm
by stm999999999
Yeah, not it works. Very fine!