Media gallery attributes

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
ormus7577
Regular
Posts: 122
Joined: Sat Nov 04, 2006 12:11 pm
Location: Ulm, Germany

Media gallery attributes

Post 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.
my installations:
family blog: http://familie.lobenstein.info/
personal blog: http://www.ormus.info/
OrmusTool Homepage: http://tool.ormus.info/
Online Adventskalender: http://www.ormus.info/pages/advent.html
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Media gallery attributes

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ormus7577
Regular
Posts: 122
Joined: Sat Nov 04, 2006 12:11 pm
Location: Ulm, Germany

Post 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!
my installations:
family blog: http://familie.lobenstein.info/
personal blog: http://www.ormus.info/
OrmusTool Homepage: http://tool.ormus.info/
Online Adventskalender: http://www.ormus.info/pages/advent.html
ormus7577
Regular
Posts: 122
Joined: Sat Nov 04, 2006 12:11 pm
Location: Ulm, Germany

Post 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?
my installations:
family blog: http://familie.lobenstein.info/
personal blog: http://www.ormus.info/
OrmusTool Homepage: http://tool.ormus.info/
Online Adventskalender: http://www.ormus.info/pages/advent.html
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ormus7577
Regular
Posts: 122
Joined: Sat Nov 04, 2006 12:11 pm
Location: Ulm, Germany

Post 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? ;)
my installations:
family blog: http://familie.lobenstein.info/
personal blog: http://www.ormus.info/
OrmusTool Homepage: http://tool.ormus.info/
Online Adventskalender: http://www.ormus.info/pages/advent.html
Post Reply