-
AuthorPosts
-
July 12, 2012 at 7:07 am #179017
hello,
We are using JA voice component, we are not able sort the questions based on Comment posted…
we want to posted voice based on latest question, based on date..
can u help us?here is a screenshot.
in this screenshot we can see,, it is displaying based on old date first, we want latest comment should be displayed first…
Stork11 FriendStork11
- Join date:
- March 2011
- Posts:
- 2273
- Downloads:
- 0
- Uploads:
- 142
- Thanks:
- 55
- Thanked:
- 431 times in 393 posts
July 16, 2012 at 10:35 am #461024Hello infosource,
Please open “componentscom_javoiceviewsitemstmpldefault_options.php”, then edit “order=total_vote_up desc” to “order=create_date desc” in first “li” tag.
Before:
[PHP]
<li class=”first <?php if(JRequest::getString(‘order’)==’total_vote_up desc’ || (!JRequest::getInt(‘status’) && !JRequest::getString(‘order’))){ $default = true;?> current <?php }?>”>
<?php $link = JURI::base().’index.php?option=com_javoice&view=items&layout=search&tmpl=component&order=total_vote_up desc&type=’.$this->type->id.’&Itemid=’.$Itemid.$forums;?>
<a onclick=”change_options(this, ‘<?php echo $link?>’, <?php echo $this->type->id?>);” href=”javascript:void(0)”>
<?php echo JText::_(‘TOP’)?>
<small <?php if(!$default){?> style=”display: none;” <?php }?>> <?php echo $this->type->alias?></small></a>
</li>
[/PHP]After:
[PHP]
<li class=”first <?php if(JRequest::getString(‘order’)==’total_vote_up desc’ || (!JRequest::getInt(‘status’) && !JRequest::getString(‘order’))){ $default = true;?> current <?php }?>”>
<?php $link = JURI::base().’index.php?option=com_javoice&view=items&layout=search&tmpl=component&order=create_date desc&type=’.$this->type->id.’&Itemid=’.$Itemid.$forums;?>
<a onclick=”change_options(this, ‘<?php echo $link?>’, <?php echo $this->type->id?>);” href=”javascript:void(0)”>
<?php echo JText::_(‘TOP’)?>
<small <?php if(!$default){?> style=”display: none;” <?php }?>> <?php echo $this->type->alias?></small></a>
</li>
[/PHP]Regards.
AuthorPostsViewing 2 posts - 1 through 2 (of 2 total)This topic contains 2 replies, has 2 voices, and was last updated by Stork11 12 years, 4 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Problem in Sorting Questions in Ja Voice
Viewing 2 posts - 1 through 2 (of 2 total)