usergallery: show commentary on the picture?

Creating and modifying plugins.
Post Reply
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

usergallery: show commentary on the picture?

Post 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?
Ciao, Stephan
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post 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.
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

OK, I can wait for this.
Ciao, Stephan
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post 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.
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post 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.
Ciao, Stephan
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post 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.)
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Yeah, not it works. Very fine!
Ciao, Stephan
Post Reply