[added r1335] Additional column in admin - items view

More
13 years 9 months ago #25632 by victorio404
Perfect, thanks a lot :)

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

More
13 years 9 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
13 years 9 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
13 years 9 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 review. Thanks!

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

More
13 years 9 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 review. Thanks!

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

More
13 years 9 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.

More
13 years 9 months ago #25669 by ggppdk
Currently we have 3 sizes of display variables (plus 3 URL variables):

Absolute path URLs paths:
$field->display_small_src
$field->display_medium_src
$field->display_large_src

HTML IMG tags:
$field->display_small
$field->display_medium
$field->display_large

I think to either add
$field->display_mini
or
$field->display_backend

what do you think better? adding $field->display_backend requires less changes


-- 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 review. Thanks!

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

More
13 years 9 months ago #25674 by micker
great !!!

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
13 years 9 months ago #25678 by igcorreia
Smaller, because of performance, the idea is for the user to get a VISUAL FEEDBACK of the images.

So I think would be:

SMALLER THUMBNAILS with RESIZE, do not use the crop or we will lose part of the images.

From our perspective this would be more powerful:
Absolute path URLs paths:
$field->display_small_src
$field->display_medium_src
$field->display_large_src


This was we can change easily the sizes, distortions and proportions and we wont depend in each field configuration.

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

More
13 years 9 months ago #25685 by igcorreia
Worked, this is FREKKING SEXY ;D

Finally I can Have custom fields in the backed and thumbs to. This PHP THUMB is fk.ng awesome.

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

Moderators: vistamediajoomlacornerggppdk
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
Save