Guest
06 Aug 2016 21:25

Hi, How to hide User details in Galley list.

user id.JPG

I am using 8.715 version on J 3.4.4

Last Modified: 11 Aug 2016


pepperstreet VIP
Total posts: 3,837
06 Aug 2016 23:05

Hello illusioninfotech, in most cases you will find many options and display parameters in your list template settings.
Go to YourSection -> General Parameters tab -> Templates -> Gallery (edit button)

cob_sec_templates_edit_button

In the edit screen (modal window) see General parameters tab -> Record Elements

cob_sec_templates_edit_parameters

Same logic applies to other displayed elements.


illusioninfotech VIP
Total posts: 35
08 Aug 2016 16:45

Hi pepperstreet,

I tried that earlier.

Show-hide-author.JPG

but its not reflecting on front end.

you can check at : http://www.devmahotsav.com/mandal-list

is there any other setting that controls it?


pepperstreet VIP
Total posts: 3,837
09 Aug 2016 00:56

Confirmed as template bug

Apparently this is a template bug.
Those 2 parameters are saved but not used in gallery list.
It simply lacks the proper conditional (IF) statements. Needs to be fixed!

cob_gallery_list_template_author_cdate_

Temporarily you might copy/rename or override the template...
See line 84 and 85.
Either delete them or turn author and date PHP lines into "Comments".
<!-- line 84 here -->
<!-- line 85 here -->


Apart from that, I have noticed Pack install issues under J!3.6.x again. I have seen similar issues with 3.4.8 in the past. So, I can't recommend to update your Joomla system (yet).

The Gallery Pack in downloads area has to be re-packaged and updated, too!


pepperstreet VIP
Total posts: 3,837
09 Aug 2016 01:46

pepperstreet Temporarily you might copy/rename or override the template... See line 84 and 85.

Alternatively, replace those 2 lines in default_list_gallery.php

<?php echo JText::sprintf('CWRITTENBY', CCommunityHelper::getName($item->user_id, $this->section));?>
<?php echo JText::sprintf('CONDATE', JHtml::_('date', $item->created, $params->get('tmpl_core.item_time_format')));?>

with the following code.
I have wrapped the lines with the missing IF statements to check the template parameters:

<?php if($params->get('tmpl_core.item_author') && $item->user_id):?>
    <?php echo JText::sprintf('CWRITTENBY', CCommunityHelper::getName($item->user_id, $this->section));?>
<?php endif;?>

<?php if($params->get('tmpl_core.item_ctime')):?>
    <?php echo JText::sprintf('CONDATE', JHtml::_('date', $item->created, $params->get('tmpl_core.item_time_format')));?>
<?php endif;?>

Hope this helps.


Sergey
Total posts: 13,748
09 Aug 2016 04:21

Gallery template is an example of custom template. It is made most simple way.

The idea here is that when you create custom template, you already know what you want there. You do not need parameter to show user name or not. BEcause you either show it ow not. So it is simple just drop a line into template where name is displaid.

Again want I mean that this is a concept. You do тещ need to create IF conditions. Just render what you need to render.

And IF conditions are only good if you create universal template that would fit all cases.


pepperstreet VIP
Total posts: 3,837
09 Aug 2016 16:03

Sergey You do not need parameter to show user name or not. BEcause you either show it ow not.

I agree, but the Gallery template HAS quite a few parameters ;)
Also for Name and Date. Which makes absolutely sense to me.

If you have a look into the template's XML, there is only one IF for the Avatar image.

So, my conclusions are:

  • Either add the missing IF statements.
  • Or the parameters have to be removed ;)

IMHO, a minmal set of parameters for common things like author infos and dates are helpful for the average user and easy usage.


illusioninfotech VIP
Total posts: 35
09 Aug 2016 20:52

Hi pepperstreet

Thanks for > pepperstreet

Alternatively, replace those 2 lines in default_list_gallery.php

it worked. and as of now, not affected anything else.


pepperstreet VIP
Total posts: 3,837
10 Aug 2016 18:11

illusioninfotech it worked. and as of now, not affected anything else.

If you have modified the original files... keep a BACKUP! ;)


illusioninfotech VIP
Total posts: 35
11 Aug 2016 09:55

Hi pepperstreet,

yes yes, off course. thanks.

Powered by Cobalt