Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

wrong sort order

11 years 6 months ago
  • Frank's Avatar
    Topic Author
  • Frank
  • Offline
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

ISSUE SUMMARY:
After uploading photos the photos are not displayed in normal alphabetical order

STEPS TO REPLICATE:
1 open one of the albums
2
3
4
5
RESULT
EXPECTED RESULT
BROWSER

11 years 6 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Frank,

This is default default behavior, the photos are ordering by the newest update. But you can see on album page, you can filter the photo from there



thank you

Attachments:
11 years 6 months ago
  • Frank's Avatar
    Topic Author
  • Frank
  • Offline
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

This is user unfriendly when he has to select this everytime when he will display an album.

Where can I change the default behaviour?

11 years 6 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Frank,

You should edit this file components/com_community/views/photos/view.html.php, find this code :

$sortBy = JRequest::getString('sort', 'date');
replace to :
$sortBy = JRequest::getString('sort', 'name');

11 years 6 months ago
  • Frank's Avatar
    Topic Author
  • Frank
  • Offline
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

I changed it, cleared the cache but it doesn't work

11 years 6 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

I see, I think we have bug regarding the sorting by name.. I will report it.

11 years 6 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Frank,

This is the patch :
1. open this file components/com_community/views/photos/view.html.php, find this code :

$lastUpdated = new JDate($albums[$i]->lastupdated);
                   $albums[$i]->lastupdated = CActivityStream::_createdLapse($lastUpdated, false);

comment that code or remove it :
//$lastUpdated = new JDate($albums[$i]->lastupdated);
                   //$albums[$i]->lastupdated = CActivityStream::_createdLapse($lastUpdated, false);

2. edit this file components/com_community/templates/jomsocial/layouts/album/list.php, remove this code :
<option value="featured" <?php if($sortBy=='featured') echo "selected='selected'";?>><?php echo JText::_('COM_COMMUNITY_FEATURED'); ?></option>
                <option value="like" <?php if($sortBy=='like') echo "selected='selected'";?>><?php echo JText::_('COM_COMMUNITY_LIKES'); ?></option>

3. download this file www.dropbox.com/s/fjbtrf31judqqaq/photos.php?dl=0 and copy to components/com_community/models/

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW