Page 1 of 1

Media gallery attributes

Posted: Fri Mar 07, 2008 1:07 pm
by ormus7577
Hi,

there are property fields in the media gallery (title, long desc, short desc ... set by config). Now is there any way to add a combobox to the media gallery picker of htmlarea to let the user choose a field to be used as the title attribute for the inserted media?

I know htmlarea is a pita, but that way all those light-, thick-, whateverboxes could pick up the title and display it. Avoiding to have to open the html source of the entry and adding a manual title attribute.

Re: Media gallery attributes

Posted: Fri Mar 07, 2008 1:29 pm
by garvinhicking
Hi!

Not for HTMLARea, but for the insertion through the s9y media panel this can be achieved, by adapting the javascript that injects the required HTML code into the entry.

The serendipity_eveng_imageselectorplus should have a stub for this where a custom javascript could be used to add the title to the <a href> stuff.

Requires some PHP and JS coding, but would integrate seamlessly through plugins. :)

Regards,
Garvin

Posted: Fri Mar 07, 2008 4:16 pm
by ormus7577
Actually the imageselectorplus plugin does pretty much what I've been looking for :-) I'll adjust it to work with php4 as well and check out the media properties support. Everything beyond that should be possible via the .tpl of the plugin. Thank you!

Posted: Fri Mar 07, 2008 11:57 pm
by ormus7577
I love that mediainsert plugin :-) I've got it pretty much working and will write a long use-case (media blogging with s9y) article pointing out s9y's strength once the final bits are done. Here's what I'm still fighting with:

- entries create by the mediainsert plugin somehow look strange (trackbacks and comments dont start below the entry data). I guess it's some css issue, I just can't find it:
http://familie.lobenstein.info/archives ... ntrag.html

- 2nd problem is solved: htmlarea messes around with empty xml elements in the html code view. Solved it by putting some CDATA (any character should do) into the element. The entire xml will be replaced anyway...

Any ideas on problem #1?

Posted: Sat Mar 08, 2008 11:39 am
by garvinhicking
Hi!

Hm, which empty XML elemnts do you mean exactly? I could insert some CDATA there in the plugin, of course.

As for the CSS, I believe this should do:

Code: Select all

.serendipity_section_trackbacks {
clear: both;
}
However, YellowLED might know more about this in the mimbo theme?!

Regards,
Garvin

Posted: Sat Mar 08, 2008 1:44 pm
by ormus7577
garvinhicking wrote:Hi!
Hm, which empty XML elemnts do you mean exactly? I could insert some CDATA there in the plugin, of course.
The mediainsert requires some placeholder like

Code: Select all

<mediainsert>
<gallery name="verzeichnis/" />
<media type="gallery" />
</mediainsert>
The sourceview of the htmlarea changes this to:

Code: Select all

<mediainsert>
<gallery name="verzeichnis/">
<media type="gallery">
</media></gallery></mediainsert>
I solved it by using:

Code: Select all

<mediainsert>
<gallery name="nails/">-</gallery>
<media type="gallery">-</media>
</mediainsert>
The css didn't do the trick, I'll ask in the mimbo thread and will keep trying. Can't be that hard, can it? ;)