[added r1335] Additional column in admin - items view

More
12 years 6 months ago #25632 by victorio404
Perfect, thanks a lot :)

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

More
12 years 6 months ago #25660 by igcorreia
This is great I have been wanting this for so long.

How can I adapt that example but for an image field??

I want to show a thumbnail on the list but the result of an image field is this:
Code:
a:5:{s:12:"originalname";s:30:"paginas_15-20_0051_layer-4.jpg";s:7:"urllink";s:0:"";s:3:"alt";s:0:"";s:5:"title";s:0:"";s:4:"desc";s:0:"";}

haahaha I DONT KONW WHAT TO DO. In the front end I would do something like this:
Code:
echo $item->field->get['image_fieldname']->display;

but in the backend via query it is IMPOSIBUUUU for me.

Any help?

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

More
12 years 6 months ago #25662 by igcorreia
I am almouse getting there, the problem is that the field after explode prints this: "nameimage.jpg";s

How can I stract the image name? Can I use php thumb in the backend? :D
Code:
<!-- Algarweb --> <?php /* $querymine = ' SELECT value' .' FROM #__flexicontent_fields_item_relations' .' WHERE item_id = '.(int)$row->id .' AND valueorder = 1' .' AND field_id = 16'; $db->setQuery($querymine); $fieldvalmine = $db->loadResult(); $fieldvalminearray = explode(":", $fieldvalmine); echo "<img src=\"http://www.quintadolago.com/images/stories/flexicontent/".$fieldvalminearray[6]."\">"; */ ?> </div>

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

More
12 years 6 months ago #25663 by ggppdk
The value of the image field is in this format because it is an array of properties that was serialized into a string via the PHP function serialize().

If you wanted to print it you would do:
Code:
$v_arr = unserialize($value); echo "<pre>"; print_r($v_arr) echo "</pre>";


You do not need to unserialize it in order to display it, because the plugin function onDisplayFieldValue will do that when it creates the image thumbnails and returns the html.

It is possible to call this in the backend ...


-- 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
12 years 6 months ago #25664 by ggppdk
I have added in r1335 (global and per content type) custom fields as columns in the backend items manager list.

Format for defining custom fields (in Global Configuration and in Content Type) is

fieldname1:dispname1, fieldname2:dispname2, fieldname3:dispname3

e.g.

myimg22:display_small, mytext26:display_backend, myfield44, myfield45



-- 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
12 years 6 months ago #25666 by igcorreia
that is awesome. it is easier to the user see the thumbnails when contents have the same name.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.597 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