image tags
Permalink Browser Info Environment
Hi there,
i just purchased and installed Grid Gallery 2 for my coming soon site still under development.
The addon looks great and all what i need for my image gallery oriented portfolio, tho i already have an important question :
Is it possible to assign image tags to a bunch of selected image in file manager ?
(sorry if the reply is somewhere in the docs or existing support thread)
instead of having to go through each file properties to set the right tags ?
I came across Easy image Gallery addon (3 years old discontinued dev addon, that doesnt work well on last C5 version / php 7), that is supposed for tag filtering purpose to create a file attribute for inserting tags, this way adding tags can be done on multiple file selection.
I tried to create a new file attribute with image_tag Handle (Option List attribute with "Allow users to add to this list." option ticked), to be able to do the same, but created tags are not used for Grid Gallery tag filtering function.
Can you provide any solution to this ? to be able to add tags to multiple selection of files ?
Thanks in advance.
i just purchased and installed Grid Gallery 2 for my coming soon site still under development.
The addon looks great and all what i need for my image gallery oriented portfolio, tho i already have an important question :
Is it possible to assign image tags to a bunch of selected image in file manager ?
(sorry if the reply is somewhere in the docs or existing support thread)
instead of having to go through each file properties to set the right tags ?
I came across Easy image Gallery addon (3 years old discontinued dev addon, that doesnt work well on last C5 version / php 7), that is supposed for tag filtering purpose to create a file attribute for inserting tags, this way adding tags can be done on multiple file selection.
I tried to create a new file attribute with image_tag Handle (Option List attribute with "Allow users to add to this list." option ticked), to be able to do the same, but created tags are not used for Grid Gallery tag filtering function.
Can you provide any solution to this ? to be able to add tags to multiple selection of files ?
Thanks in advance.
Type: | Ticket |
---|---|
Status: | Archived |
hey, thanks for that reply.
Do you mean there is no way at all to edit code in block controller.php or view.php to use the new created file attribute as tag filters ?
Do you mean there is no way at all to edit code in block controller.php or view.php to use the new created file attribute as tag filters ?
Hi,
For switching to another attribute check Instruction page #4. Also, don't forget to upgrade to latest version (2.4.4)
For switching to another attribute check Instruction page #4. Also, don't forget to upgrade to latest version (2.4.4)
Hey shahrop,
Thank you for the support, that sounds totally like what i need.
Could you please elaborate a bit more about the last step of instruction page ?
" 3- Add newly created attribute handle to 'tags_attribute' config "
Since i m not a developper, i have no idea what piece of code i have to add to the duplicated php file, and i couldnt find any information to figure it out myself.
Thank you for the support, that sounds totally like what i need.
Could you please elaborate a bit more about the last step of instruction page ?
" 3- Add newly created attribute handle to 'tags_attribute' config "
Since i m not a developper, i have no idea what piece of code i have to add to the duplicated php file, and i couldnt find any information to figure it out myself.
After adding a new file attribute put the attribute handle into the array, like this:
return array( 'tags_attribute' => 'my_new_gallery_tags', );
I appreciate the fast feedback, thank you, but this thing isnt working on my side.
I pasted your code in Application/config/whale_grid_gallery.php, so now that looks like :
But i guess i can turn it like this too :
I tried both, but i cant get my new file attribute (option list with handle name 'pers_tags') be used to filter gallery instead of "core tag" file attribute.
I tried to edit whale_grid_gallery.php directly in the package directory too, in case of override not working, with no success.
I pasted your code in Application/config/whale_grid_gallery.php, so now that looks like :
<?php defined('C5_EXECUTE') or die('Access denied.'); /* THIS IS A SAMPLE FILE, CONTAINS AVAILABLE CONFIGS FOR THIS ADD-ON. For using any of this configs for this add-on, copy this file to /application/config/ and change them to match your requirement. //var_dump(Config::get('whale_grid_gallery.permission')); - permission: who can access/modify galleries at dashboard: 0: all users 1: only super admin and owner 2: only owner - notice_list: print a notice above dashboard grid for users - notice_form print a notice above dashboard add/edit form for users
Viewing 15 lines of 24 lines. View entire code block.
But i guess i can turn it like this too :
return array( 'permission' => 0, 'notice_list' => '', 'notice_form' => '', 'tags_attribute' => 'pers_tags', );
I tried both, but i cant get my new file attribute (option list with handle name 'pers_tags') be used to filter gallery instead of "core tag" file attribute.
I tried to edit whale_grid_gallery.php directly in the package directory too, in case of override not working, with no success.
Which version are you using? Did you upgrade to 2.4.4?
I was using 2.4.2 (i thought i was using last version since i purchased the addon 3 days ago).
I just upgraded to 2.4.4
So now with the same setup, i can see my own file attribute tags in 'filter' section of Whale Grid Gallery settings, so it is getting better.
If none of the images files have a tag attribute, the gallery displays fine, but if i add at least one tag to an image (using my own file attribute) i get this error message when i try to reach the page with the gallery :
An unexpected error occurred.
Attempt to assign property of non-object
I noticed in my file manager (see attached screenshot please) that when a tag is added and the file attribute column is displayed it appears like this : Tag<br/>
i dont know if it can be related to the error message.
I also tried various options in my tag file attribute, like no multiple values (from what i understand i should be able to use multiple values, that is not related to the addon limitation about multiple button filtering).
But i get the same error message with different options sets, at the moment an image got a tag in my file attribute.
I just upgraded to 2.4.4
So now with the same setup, i can see my own file attribute tags in 'filter' section of Whale Grid Gallery settings, so it is getting better.
If none of the images files have a tag attribute, the gallery displays fine, but if i add at least one tag to an image (using my own file attribute) i get this error message when i try to reach the page with the gallery :
An unexpected error occurred.
Attempt to assign property of non-object
I noticed in my file manager (see attached screenshot please) that when a tag is added and the file attribute column is displayed it appears like this : Tag<br/>
i dont know if it can be related to the error message.
I also tried various options in my tag file attribute, like no multiple values (from what i understand i should be able to use multiple values, that is not related to the addon limitation about multiple button filtering).
But i get the same error message with different options sets, at the moment an image got a tag in my file attribute.
Hi,
Send me your site credentials via private msg and I'll take a look.
Send me your site credentials via private msg and I'll take a look.
Fixed.
The new attribute must be "Textarea".
The new attribute must be "Textarea".
Hey shahroq,
Everything is working fine with the right file attribute type !
You really deserve all the reviews about the great support, thank you very much for the help !!!
(i will make sure to post an happy user review soon)
i would have less urgent questions about customization tho, should i open another support thread or can i go further here ?
For example, i have in mind using express objects to give "parent datas" to a group of images (with an express entity file attribute), since i guess that would be a not so complicated way to inject data into a custom view template for the block (without editing controller or db.xml, etc.), without other features in mind like sorting by those attributes.
Lets say i have 4 images from the same project, i would create a 'project_A' express object, with few attributes (like architect/client, year, Place, etc), then add an express entity file attribute to 4 images with 'project_A' selected.
So i could display in Hover layer of thumbnails for example, the architect name, the year...Etc
Everything is working fine with the right file attribute type !
You really deserve all the reviews about the great support, thank you very much for the help !!!
(i will make sure to post an happy user review soon)
i would have less urgent questions about customization tho, should i open another support thread or can i go further here ?
For example, i have in mind using express objects to give "parent datas" to a group of images (with an express entity file attribute), since i guess that would be a not so complicated way to inject data into a custom view template for the block (without editing controller or db.xml, etc.), without other features in mind like sorting by those attributes.
Lets say i have 4 images from the same project, i would create a 'project_A' express object, with few attributes (like architect/client, year, Place, etc), then add an express entity file attribute to 4 images with 'project_A' selected.
So i could display in Hover layer of thumbnails for example, the architect name, the year...Etc
Hi,
About the Express Object, I don't see any problem, it just needs some tweaks.
About the Express Object, I don't see any problem, it just needs some tweaks.
Hey shahroq,
Once again, let me know if i better start a new thread (and copy that post to start), that might be very helpfull informations to other users wanting to cross express objects datas with Whale Gallery Grid, and it should be easier to find.
Could you give me few hints and tips to output or inject express entity attributes (image with express entity file attribute) into templates ?
From what i understand about C5, i guess the main part of code to edit is in view.php of Whale Grid block (instanced to a new template in Application/), especially those lines :
I guess is the line of code to modify.
i have no idea about the code to get the express entity attribute (or groupe of attributes) associated to each image in the loop (gallery item).
Lets say i have an express object 'Projet' (with handle 'projet') with few text/number attributes named (handles) : 'projet_name','architecte','year'
Can you give me a kind of framework code to retrieve those express attributes linked to an image called into a template?
If i want those data to appear in lightbox header, is it straight forward as only editing the view.php ?
Since i dont want to have access or manipulate that kind of data from gallery editing/creating page, i think there is no reason to edit controller.php ?
I would really appreciate some help to achieve this, and i m sure lots of users could take advantage of such a customization.
Once again, let me know if i better start a new thread (and copy that post to start), that might be very helpfull informations to other users wanting to cross express objects datas with Whale Gallery Grid, and it should be easier to find.
Could you give me few hints and tips to output or inject express entity attributes (image with express entity file attribute) into templates ?
From what i understand about C5, i guess the main part of code to edit is in view.php of Whale Grid block (instanced to a new template in Application/), especially those lines :
<div class="whale-grid-gallery-container" style="height:;display:;"> <?php if (1==1 && isset($gallery->items) && count($gallery->items)>0) { ?> <?php foreach ($gallery->items as $key=>$value) {?> <div class="box" <?php echo $value->dataTags ?>> <div data-thumbnail="<?php echo $value->thumb ?>" ></div> <div data-image="<?php echo $value->image ?>" ></div> <div class="thumbnail-caption <?php echo $gallery->optionsObj->hCaptionPosition ?>"><?php echo $value->hCaption ?></div> <div class="lightbox-text"><?php echo $value->lCaption ?></div> </div> <?php } ?> <?php } ?> </div>
I guess
<?php echo $value->lCaption ?>
i have no idea about the code to get the express entity attribute (or groupe of attributes) associated to each image in the loop (gallery item).
Lets say i have an express object 'Projet' (with handle 'projet') with few text/number attributes named (handles) : 'projet_name','architecte','year'
Can you give me a kind of framework code to retrieve those express attributes linked to an image called into a template?
If i want those data to appear in lightbox header, is it straight forward as only editing the view.php ?
Since i dont want to have access or manipulate that kind of data from gallery editing/creating page, i think there is no reason to edit controller.php ?
I would really appreciate some help to achieve this, and i m sure lots of users could take advantage of such a customization.
Hi,
Code like this should work fetch an express attribute values:
Code like this should work fetch an express attribute values:
$expressVal = $fv->getAttributeValue('attrTest')->getDisplayValue();
hi shahroq,
I m not sure how to insert your code correctly and exactly in the right place.
I tried this with no success :
with your code at the top of the PHP file (i guess this piece of code declare the variable $expressVal, to call it in the right HTML element), just after :
'architecte' is a Text attribute of the express entity linked to the image file.
The error message i get is :
"Call to a member function getAttributeValue() on null"
Can you tell me how to insert that line of code in the quoted part of the template (in last post) please ?
Thank you very much for the help.
I m not sure how to insert your code correctly and exactly in the right place.
I tried this with no success :
<?php echo $expressVal->hCaption ?>
with your code at the top of the PHP file (i guess this piece of code declare the variable $expressVal, to call it in the right HTML element), just after :
'architecte' is a Text attribute of the express entity linked to the image file.
The error message i get is :
"Call to a member function getAttributeValue() on null"
Can you tell me how to insert that line of code in the quoted part of the template (in last post) please ?
Thank you very much for the help.
Ok, this is a more detailed manual:
1- Copy "\packages\whale_grid_gallery\blocks\whale_grid_gallery\view.php" to "\packages\whale_grid_gallery\blocks\whale_grid_gallery\templates\view.php" and give it a new name like "new_template.php"
2- Open newly copied file and at line 28 after "foreach" line add this code:
And be aware that you should rename the attrbute name handles.
1- Copy "\packages\whale_grid_gallery\blocks\whale_grid_gallery\view.php" to "\packages\whale_grid_gallery\blocks\whale_grid_gallery\templates\view.php" and give it a new name like "new_template.php"
2- Open newly copied file and at line 28 after "foreach" line add this code:
<?php $f = File::getByID($value->id); $fv = $f->getApprovedVersion(); $architecteExpEntObject = $fv->getAttribute('architecte'); if ($architecteExpEntObject) { $architecteExpEntArray = $architecteExpEntObject->getSelectedEntries(); $architecteExpEnt = $architecteExpEntArray[0]; //use getFirstName for "first_name" handle //hCaption value use for hover caption, lCaption for lightbox title $gallery->items[$key]->hCaption = '<h3 class="h-title">' . $architecteExpEnt->getFirstName() . ' - ' . $architecteExpEnt->getLastName() . '</h3>'; $gallery->items[$key]->lCaption = '<h3 class="h-title">' . $architecteExpEnt->getFirstName() . ' - ' . $architecteExpEnt->getLastName() . '</h3>'; } ?>
And be aware that you should rename the attrbute name handles.
Thank you very much shahroq, it is working great !!!
That example and that piece of code is gold to me, that makes me understand a whole new level of php coding to retrieve attributes and echo them in any template, this is a perfect 'code snippet' with the <?php echo $xxx->xxx->xxx ?> syntax to customize any existing page/block templates.
Cheers
That example and that piece of code is gold to me, that makes me understand a whole new level of php coding to retrieve attributes and echo them in any template, this is a perfect 'code snippet' with the <?php echo $xxx->xxx->xxx ?> syntax to customize any existing page/block templates.
Cheers
Welcome, I'm glad it helped.
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.
To re-open this issue, reply to this message.
To re-open this issue, reply to this message.
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.
To re-open this issue, reply to this message.
To re-open this issue, reply to this message.
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.
To re-open this issue, reply to this message.
To re-open this issue, reply to this message.
unfortunately, the grid gallery does not have this feature. We have hoped that the core team adds this feature to file manager page, but apparently, they haven't done that yet.