test
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • infosource Friend
    #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…


    1. Screenshot-from-2012-07-12-123508
    Stork11 Friend
    #461024

    Hello 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.

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by  Stork11 12 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum