Minigallery - How to add title/alt field

More
13 years 2 months ago #19554 by dama
Hi ppl

I changed minigallery to use Colorbox, lightbox plugin for jQuery to display images. Is there a way to alter miniglallery plugin so user can enter alt title or long desctiption for image, like image plugin?

Tnx in advance
Dama

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #19560 by ggppdk
Not an obvious and easily implemented way to do it inside the item edit form while editing the minigallery field to add images since it would need some more coding. Although this would be user friendly

Maybe it would be easier, outside of the item edit form with a file that you would read or with a db table that you would query, but these solutions, i don't know if you can make them user friendly.

I will keep this in mind as an enhancement for minigallery field.

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #20251 by krapaic
I was looking today the code from the external plugin Gallery flashmatic , maybe you can start from that.

The two section onDisplayField and onBeforeSaveField you can easily copy in order to create additional input. onDisplayField use a modified version of the filefield js plugin but add title (input text), description (textarea), link (input text) and a select and the onBeforeSaveField is done with the POST addition, just add or edit sub-fields names if needed. onDisplayFieldValue, need to cut all the xml, file write and swf render but much has been done.

I'm thinking myself adapt this in order to create a simple mp3 playlist player. I don't know yet which mp3swf player open source to choose in order to be completely customizable. If i'll get mad i'll simply add a normal textfield with prefix and suffix and use some plugin (like jw_allvideo) but if i'll code something that works i'll surely share.

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #20252 by ggppdk
Ok , about adding more fields to EACH FILE in the file manager, already enjoyman, has added a description field, as for title field we already have a field called name, which serves as a title.

The negative of this approach , and reason that i had not suggested it, is that if you use these data in the minigallery (and also other fields too) is that all minigallery fields or other FC fields will share these data, you will not be able to change them and have different title/description per use of the file/image. You could say most times it would be ok, but then it will also be difficult to remember why you put a description to an image and in which minigallery field you used it. I plan to make the item count in file manager clickable so that you can easily display the items that use a file, but still this doesnot apply for all FLEXIcontent fields, some non-standard fields may use the file and the file manager will not tell you about it. So i was thinking of putting the description together with the minigallery field.


Also about mini-gallery in recent updates:
+ Enhanced mini gallery plugin (v1.5.6) to optionally display playback controls and to optionally hide thumbnails.

In (v2.0) enhanced to support multiple rows or columns
for the thumbnails and to be able to properly position the thumbnails to top, left, right

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #20262 by krapaic
Sorry maybe i don't understand properly and i don't want you to loose time but just for brainstorm, you're suggestin to add field to #_flexicontent_files, aren't you?
Because gallery_flashmatic add serialization to the field_item_relation itself and it doesn't touch files name/altname. Each field has its title/description/link/popup.

I try a couple of example:
With the 2 field type, each assign same files and you see
imageshack.us/photo/my-images/802/flashmatic1.jpg/
With the same field but another item with same files assign and you see
imageshack.us/photo/my-images/339/flashmatic2.jpg/

if i get your tip right, this information are not shared with other FC fields but each item has its additional title/description and data it's stored serialized not in filemanager
Code:
function onBeforeSaveField(&$field, &$post, $file) { // execute the code only if the field type match the plugin type if ($field->field_type != 'fmp3player') return; global $mainframe; // reformat the post $newpost = array(); $new = 0; foreach ($post as $n => $v) { if ($post[$n]['file'] != '') { $newpost[$new]['file'] = $post[$n]['file']; $newpost[$new]['title'] = $post[$n]['title']; $newpost[$new]['desc'] = $post[$n]['desc']; $new++; } } $post = $newpost; foreach ($post as $v) { $searchindex .= $v['title']; $searchindex .= ' '; $searchindex .= $v['desc']; $searchindex .= ' '; } $searchindex .= ' | '; $field->search = $searchindex; }
imageshack.us/photo/my-images/708/flashmatic3.jpg/
That's why i'm starting from that plugin but maybe you mean something else

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #20282 by ggppdk
I was saying exactly this. That the correct way to do it is to add them to the field values !!!

About saving this extra info (form fields), it is not difficult to do, we have it already for other fields like image field (same does the flashmatic gallery)

I was skeptical of where to display these extra form fields (title/description/etc), but now i think i know where, it is easy , we could just insert them inside the sortable boxes of the file list.

Ok, i have all details now, i have opened an enhancement task:
code.google.com/p/flexicontent/i ... ail?id=268

Despite not being difficult to do, i want to avoid adding new features to v1.5.6.

The v1.5.7 beta will follow immediately afterwards.


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.333 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline