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.

Type: Ticket
Status: Archived
MattPesquet
View Replies:
shahroq replied on at Permalink Reply
shahroq
Hi,
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.
MattPesquet replied on at Permalink Reply
MattPesquet
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 ?
shahroq replied on at Permalink Reply
shahroq
Hi,
For switching to another attribute check Instruction page #4. Also, don't forget to upgrade to latest version (2.4.4)
MattPesquet replied on at Permalink Reply
MattPesquet
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.
shahroq replied on at Permalink Reply
shahroq
After adding a new file attribute put the attribute handle into the array, like this:
return array(
  'tags_attribute' => 'my_new_gallery_tags',
);
MattPesquet replied on at Permalink Reply
MattPesquet
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 :
<?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


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.
shahroq replied on at Permalink Reply
shahroq
Which version are you using? Did you upgrade to 2.4.4?
MattPesquet replied on at Permalink Reply 1 Attachment
MattPesquet
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.
shahroq replied on at Permalink Reply
shahroq
Hi,
Send me your site credentials via private msg and I'll take a look.
shahroq replied on at Permalink Reply
shahroq
Fixed.
The new attribute must be "Textarea".
MattPesquet replied on at Permalink Reply
MattPesquet
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
shahroq replied on at Permalink Reply
shahroq
Hi,
About the Express Object, I don't see any problem, it just needs some tweaks.
MattPesquet replied on at Permalink Reply
MattPesquet
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 :
<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 ?>
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.
shahroq replied on at Permalink Reply
shahroq
Hi,
Code like this should work fetch an express attribute values:
$expressVal = $fv->getAttributeValue('attrTest')->getDisplayValue();
MattPesquet replied on at Permalink Reply
MattPesquet
hi shahroq,

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 :
defined('C5_EXECUTE') or die('Access denied.');
$c = Page::getCurrentPage();
$expressVal = $fv->getAttributeValue('architecte')->getDisplayValue();


'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.
shahroq replied on at Permalink Reply
shahroq
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:
<?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.
MattPesquet replied on at Permalink Reply
MattPesquet
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
shahroq replied on at Permalink Reply
shahroq
Welcome, I'm glad it helped.
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
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.
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
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.
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
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.

concrete5 Environment Information

# concrete5 Version
Core Version - 8.3.2
Version Installed - 8.3.2
Database Version - 20180122213656

# concrete5 Packages
Community Store (1.3.2), Simple Gallery (1.0.7), Whale Grid Gallery (2.4.2)

# concrete5 Overrides
blocks/simple_gallery/templates/mp/js/isotope.pkgd.min.js, blocks/simple_gallery/templates/mp/js, blocks/simple_gallery/templates/mp/view.php, blocks/simple_gallery/templates/mp, blocks/simple_gallery/templates, blocks/simple_gallery, themes/mp/blank.php, themes/mp/css/bootstrap-modified.css, themes/mp/css/build/add-ons/calendar.less, themes/mp/css/build/add-ons, themes/mp/css/build/blocks/date-navigation.less, themes/mp/css/build/blocks/faq.less, themes/mp/css/build/blocks/feature-template-hover-description.less, themes/mp/css/build/blocks/feature.less, themes/mp/css/build/blocks/image-slider.less, themes/mp/css/build/blocks/image.less, themes/mp/css/build/blocks/next-previous.less, themes/mp/css/build/blocks/page-attribute-display.less, themes/mp/css/build/blocks/page-list-option-buttons.less, themes/mp/css/build/blocks/page-list-template-thumbnail-grid.less, themes/mp/css/build/blocks/page-list.less, themes/mp/css/build/blocks/page-title-option-byline.less, themes/mp/css/build/blocks/page-title.less, themes/mp/css/build/blocks/tags.less, themes/mp/css/build/blocks/testimonial.less, themes/mp/css/build/blocks/topic-list.less, themes/mp/css/build/blocks, themes/mp/css/build/body.less, themes/mp/css/build/bootstrap-3.2.0/alerts.less, themes/mp/css/build/bootstrap-3.2.0/badges.less, themes/mp/css/build/bootstrap-3.2.0/bootstrap.less, themes/mp/css/build/bootstrap-3.2.0/breadcrumbs.less, themes/mp/css/build/bootstrap-3.2.0/button-groups.less, themes/mp/css/build/bootstrap-3.2.0/buttons.less, themes/mp/css/build/bootstrap-3.2.0/carousel.less, themes/mp/css/build/bootstrap-3.2.0/close.less, themes/mp/css/build/bootstrap-3.2.0/code.less, themes/mp/css/build/bootstrap-3.2.0/component-animations.less, themes/mp/css/build/bootstrap-3.2.0/dropdowns.less, themes/mp/css/build/bootstrap-3.2.0/forms.less, themes/mp/css/build/bootstrap-3.2.0/glyphicons.less, themes/mp/css/build/bootstrap-3.2.0/grid.less, themes/mp/css/build/bootstrap-3.2.0/input-groups.less, themes/mp/css/build/bootstrap-3.2.0/jumbotron.less, themes/mp/css/build/bootstrap-3.2.0/labels.less, themes/mp/css/build/bootstrap-3.2.0/list-group.less, themes/mp/css/build/bootstrap-3.2.0/media.less, themes/mp/css/build/bootstrap-3.2.0/mixins/alerts.less, themes/mp/css/build/bootstrap-3.2.0/mixins/background-variant.less, themes/mp/css/build/bootstrap-3.2.0/mixins/border-radius.less, themes/mp/css/build/bootstrap-3.2.0/mixins/buttons.less, themes/mp/css/build/bootstrap-3.2.0/mixins/center-block.less, themes/mp/css/build/bootstrap-3.2.0/mixins/clearfix.less, themes/mp/css/build/bootstrap-3.2.0/mixins/forms.less, themes/mp/css/build/bootstrap-3.2.0/mixins/gradients.less, themes/mp/css/build/bootstrap-3.2.0/mixins/grid-framework.less, themes/mp/css/build/bootstrap-3.2.0/mixins/grid.less, themes/mp/css/build/bootstrap-3.2.0/mixins/hide-text.less, themes/mp/css/build/bootstrap-3.2.0/mixins/image.less, themes/mp/css/build/bootstrap-3.2.0/mixins/labels.less, themes/mp/css/build/bootstrap-3.2.0/mixins/list-group.less, themes/mp/css/build/bootstrap-3.2.0/mixins/nav-divider.less, themes/mp/css/build/bootstrap-3.2.0/mixins/nav-vertical-align.less, themes/mp/css/build/bootstrap-3.2.0/mixins/opacity.less, themes/mp/css/build/bootstrap-3.2.0/mixins/pagination.less, themes/mp/css/build/bootstrap-3.2.0/mixins/panels.less, themes/mp/css/build/bootstrap-3.2.0/mixins/progress-bar.less, themes/mp/css/build/bootstrap-3.2.0/mixins/reset-filter.less, themes/mp/css/build/bootstrap-3.2.0/mixins/resize.less, themes/mp/css/build/bootstrap-3.2.0/mixins/responsive-visibility.less, themes/mp/css/build/bootstrap-3.2.0/mixins/size.less, themes/mp/css/build/bootstrap-3.2.0/mixins/tab-focus.less, themes/mp/css/build/bootstrap-3.2.0/mixins/table-row.less, themes/mp/css/build/bootstrap-3.2.0/mixins/text-emphasis.less, themes/mp/css/build/bootstrap-3.2.0/mixins/text-overflow.less, themes/mp/css/build/bootstrap-3.2.0/mixins/vendor-prefixes.less, themes/mp/css/build/bootstrap-3.2.0/mixins, themes/mp/css/build/bootstrap-3.2.0/mixins.less, themes/mp/css/build/bootstrap-3.2.0/modals.less, themes/mp/css/build/bootstrap-3.2.0/navbar.less, themes/mp/css/build/bootstrap-3.2.0/navs.less, themes/mp/css/build/bootstrap-3.2.0/normalize.less, themes/mp/css/build/bootstrap-3.2.0/pager.less, themes/mp/css/build/bootstrap-3.2.0/pagination.less, themes/mp/css/build/bootstrap-3.2.0/panels.less, themes/mp/css/build/bootstrap-3.2.0/popovers.less, themes/mp/css/build/bootstrap-3.2.0/print.less, themes/mp/css/build/bootstrap-3.2.0/progress-bars.less, themes/mp/css/build/bootstrap-3.2.0/responsive-embed.less, themes/mp/css/build/bootstrap-3.2.0/responsive-utilities.less, themes/mp/css/build/bootstrap-3.2.0/scaffolding.less, themes/mp/css/build/bootstrap-3.2.0/tables.less, themes/mp/css/build/bootstrap-3.2.0/theme.less, themes/mp/css/build/bootstrap-3.2.0/thumbnails.less, themes/mp/css/build/bootstrap-3.2.0/tooltip.less, themes/mp/css/build/bootstrap-3.2.0/type.less, themes/mp/css/build/bootstrap-3.2.0/utilities.less, themes/mp/css/build/bootstrap-3.2.0/variables.less, themes/mp/css/build/bootstrap-3.2.0/wells.less, themes/mp/css/build/bootstrap-3.2.0, themes/mp/css/build/breadcrumb.less, themes/mp/css/build/buttons.less, themes/mp/css/build/captcha.less, themes/mp/css/build/content.less, themes/mp/css/build/custom-design-classes/area-content-accent.less, themes/mp/css/build/custom-design-classes/block-sidebar-padded.less, themes/mp/css/build/custom-design-classes/block-sidebar-wrapped.less, themes/mp/css/build/custom-design-classes/blog-entry-list.less, themes/mp/css/build/custom-design-classes/recent-blog-entry.less, themes/mp/css/build/custom-design-classes/testimonial-bio.less, themes/mp/css/build/custom-design-classes, themes/mp/css/build/errors.less, themes/mp/css/build/fonts/blue-sky.less, themes/mp/css/build/fonts/defaults.less, themes/mp/css/build/fonts/mp-defaults.less, themes/mp/css/build/fonts/night-road.less, themes/mp/css/build/fonts/royal.less, themes/mp/css/build/fonts, themes/mp/css/build/footer.less, themes/mp/css/build/header.less, themes/mp/css/build/miscellaneous-styles.less, themes/mp/css/build/mixins.less, themes/mp/css/build/mobile/navigation.less, themes/mp/css/build/mobile, themes/mp/css/build/pagination.less, themes/mp/css/build/reset.less, themes/mp/css/build/search.less, themes/mp/css/build, themes/mp/css/main.less, themes/mp/css/presets/blue-sky.less, themes/mp/css/presets/defaults.less, themes/mp/css/presets/mp-defaults.less, themes/mp/css/presets/night-road.less, themes/mp/css/presets/royal.less, themes/mp/css/presets, themes/mp/css/styles.xml, themes/mp/css, themes/mp/default.php, themes/mp/description.txt, themes/mp/elements/footer.php, themes/mp/elements/footer_bottom.php, themes/mp/elements/header.php, themes/mp/elements/header_top.php, themes/mp/elements, themes/mp/full.php, themes/mp/images/background-slider-blue-sky.png, themes/mp/images/background-slider-default.png, themes/mp/images/background-slider-night-road.png, themes/mp/images/background-slider-royal.png, themes/mp/images/background.png, themes/mp/images, themes/mp/index.html, themes/mp/left_sidebar.php, themes/mp/page_forbidden.php, themes/mp/page_not_found.php, themes/mp/page_theme.php, themes/mp/right_sidebar.php, themes/mp/thumbnail.png, themes/mp/view.php, themes/mp

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache/2.4.29 (Win32) OpenSSL/1.0.2n PHP/7.0.27

# Server API
apache2handler

# PHP Version
7.0.27

# PHP Extensions
apache2handler, bcmath, bz2, calendar, Core, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, json, libxml, mbstring, mcrypt, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, Reflection, session, SimpleXML, SPL, standard, tokenizer, wddx, xml, xmlreader, xmlwriter, zip, zlib

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 8M
sql.safe_mode - Off
upload_max_filesize - 2M
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200

Browser User-Agent String

Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.