By Adam O. on Thursday, 08 October 2015
Replies 4
Likes 0
Views 797
Votes 0
Hi there,

I've got a question about url to actually viewed user albums view.
In default.header.php is a piece of code:


<a href="/<?php echo FRoute::videos(array('uid' => $user->getAlias(), 'type' => SOCIAL_TYPE_USER));?>">
<i class="fa fa-film"></i>
<?php echo JText::sprintf(ES::string()->computeNoun('COM_EASYSOCIAL_GROUPS_VIDEOS' , $user->getTotalVideos()), $user->getTotalVideos()); ?>
</a>

which shows amount of movies in user library and after click, it load actually viewed user movie list.

I need the same, but related with albums. I've tried to make something like this:


<a href="/<?php echo FRoute::photos(array('uid' => $user->getAlias(), 'type' => SOCIAL_TYPE_USER));?>">
<i class="fa fa-photo"></i>
<?php echo JText::sprintf(ES::string()->computeNoun('COM_EASYSOCIAL_GROUPS_PHOTOS' , $user->getTotalPhotos()), $user->getTotalPhotos()); ?>
</a>


but it generates me incorrect sef url (when I disable SEF on page, it works).

Please... help me with this small issue - how to achieve the same "button" like above Videos, but related to Photos?

Best regards!
Adam
* I mean the same situation, like by clicking "Show all" in Photos app on user profile view
·
Thursday, 08 October 2015 06:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Adam,

You might want to try this:

<a href="<?php echo FRoute::albums(array('uid' => $user->getAlias(), 'type' => SOCIAL_TYPE_USER));?>">


·
Thursday, 08 October 2015 10:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Nik!

If I add in href=""


<?php echo JURI::root() ?>


it works

but it loads me three ///

eg. http://my-site.com///social/albums/user/729-adam


I deleted one / from your code, but still loads me // twice

where can I delete one useless / ?

Best regards!
Adam
·
Friday, 09 October 2015 02:35
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Adam,

You don't need to add the

<?php echo JURI::root() ?>


You just need this code (without '/').

<a href="<?php echo FRoute::albums(array('uid' => $user->getAlias(), 'type' => SOCIAL_TYPE_USER));?>">


By the way, I'm sorry but I can't help you for further customization as this is beyond our support scope.
·
Thursday, 15 October 2015 17:54
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post