I just updated to fix a bug where See All Community photos did not show any photos. Since updating, the photos do load when you click on an individual thumbnail, but there is no link to "View All Community Photos"
See: Community Photos module on right side.
Hi Ian,
On newest version we do not show any photo from avatar or cover on the photos module, but will show any photo on album or photo sharebox.
thank you
I'm not sure i understand. There are clearly avatars and cover photos still showing in the photos module. Which is fine. I don't mind that. But there is no "See All Community Photos" link at the bottom of the module. How then is someone able to view all photos?
I see that you added a photo to the stream. I see the photo in the Community Photos module on the right. However, only 20 thumbnails display in the module. If more than 20 people add photos, then your photo will not be visible in the module anymore without a "View All Community Photos" button.
Hi Ian,
Gotcha..this is valid bug, thank you for reporting
cheers!
this is quick fix, open this file modules/mod_community_photos/tmpl/photos.php, add this code after line 32 :
<?php $user = CFactory::getUser()?>
<?php if($user->id==''):?>
<a href="<?php echo CRoute::_('index.php?option=com_community&view=photos')?>"><?php echo JText::_('COM_COMMUNITY_FRONTPAGE_VIEW_ALL_PHOTOS')?></a>
<?php else:?>
<a href="<?php echo CRoute::_('index.php?option=com_community&view=photos&task=myphotos')?>"><?php echo JText::_('COM_COMMUNITY_PHOTOS_MY_PHOTOS_TITLE')?></a>
<?php endif ?>
sorry, echo code is missing there, please try with this one :
<a href="<?php echo CRoute::_('index.php?option=com_community&view=photos')?>"><?php echo JText::_('COM_COMMUNITY_FRONTPAGE_VIEW_ALL_PHOTOS')?></a>
A bit better Dimas but, if user is logged in, that link takes you to My Photos only. If you are not logged in it takes you to all photos which is what we want. How can we make this work while being logged in?
Hi Ian,
You can change that code to this code :
<?php $user = CFactory::getUser()?>
<?php if($user->id==''):?>
<a href="<?php echo CRoute::_('index.php?option=com_community&view=photos')?>"><?php echo JText::_('COM_COMMUNITY_FRONTPAGE_VIEW_ALL_PHOTOS')?></a>
<?php else:?>
<a href="<?php echo CRoute::_('index.php?option=com_community&view=photos&task=myphotos')?>"><?php echo JText::_('COM_COMMUNITY_FRONTPAGE_VIEW_ALL_PHOTOS')?></a>
<?php endif ?>
So I am to replace the code that you provided previously with the code you have just provided?
So I will delete this:
<a href="<?php echo CRoute::_('index.php?option=com_community&view=photos')?>"><?php echo JText::_('COM_COMMUNITY_FRONTPAGE_VIEW_ALL_PHOTOS')?></a>
And i will replace with:
<?php $user = CFactory::getUser()?>
<?php if($user->id==''):?>
<a href="<?php echo CRoute::_('index.php?option=com_community&view=photos')?>"><?php echo JText::_('COM_COMMUNITY_FRONTPAGE_VIEW_ALL_PHOTOS')?></a>
<?php else:?>
<a href="<?php echo CRoute::_('index.php?option=com_community&view=photos&task=myphotos')?>"><?php echo JText::_('COM_COMMUNITY_FRONTPAGE_VIEW_ALL_PHOTOS')?></a>
<?php endif ?>
yes right..
I replaced the code as discussed above. It did not change. Clicking Photos on main menu is still different when you are logged in. Can you do the change?
This is what the entire page looks like:
<?php
/**
* @copyright (C) 2013 iJoomla, Inc. - All rights reserved.
* @license GNU General Public License, version 2 (
www.gnu.org/licenses/gpl-2.0.html
)
* @author iJoomla.com <This email address is being protected from spambots. You need JavaScript enabled to view it.>
* @url
www.jomsocial.com/license-agreement
* The PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript *are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0
* More info at
www.jomsocial.com/license-agreement
*/
defined('_JEXEC') or die();
$config = CFactory::getConfig();
$document = JFactory::getDocument();
$document->addScriptDeclaration("joms_prev_comment_load = +'" . $config->get('prev_comment_load', 10) . "';");
?>
<?php // echo var_dump($photos); ?>
<?php if( $photos ) { ?>
<ul class="joms-list--thumbnail">
<?php for( $i = 0 ; $i < count( $photos ); $i++ ) {
$row =& $photos[$i];
$row->user = CFactory::getUser($row->creator);
?>
<li class="joms-list__item">
<a href="javascript:" onclick="joms.api.photoOpen('<?php echo $row->albumid; ?>', '<?php echo $row->id; ?>');" >
<img title="<?php echo JText::sprintf('MOD_COMMUNITY_PHOTOS_UPLOADED_BY' , $row->user->getDisplayName() );?>" src="<?php echo $row->getThumbURI(); ?>" alt="<?php echo CStringHelper::escape( $row->user->getDisplayName() );?>" >
</a>
</li>
<?php } ?>
</ul>
<p>
<?php $user = CFactory::getUser()?>
<?php if($user->id==''):?>
<a href="<?php echo CRoute::_('index.php?option=com_community&view=photos')?>"><?php echo JText::_('COM_COMMUNITY_FRONTPAGE_VIEW_ALL_PHOTOS')?></a>
<?php else:?>
<a href="<?php echo CRoute::_('index.php?option=com_community&view=photos&task=myphotos')?>"><?php echo JText::_('COM_COMMUNITY_FRONTPAGE_VIEW_ALL_PHOTOS')?></a>
<?php endif ?>
</p>
<?php } else { ?>
<div class="joms-blankslate"><?php echo JText::_('MOD_COMMUNITY_PHOTOS_NO_PHOTO_UPLOADED');?></div>
<?php } ?>