Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Sort "ideas" by votes #27

Open
alexandruboboc opened this issue Jul 29, 2015 · 2 comments
Open

Sort "ideas" by votes #27

alexandruboboc opened this issue Jul 29, 2015 · 2 comments

Comments

@alexandruboboc
Copy link

Hi.
First of all, great extension, congrats!

I had the same issue with votes not registering, and had to delete that "/" sign on line 7 of votebutton.js. Why is it there anyway?

The second issue I have is that I would like, when displaying all the ideas or just those from a category, to be able to sort them by the number of votes.

How can I do that?

Thanks!

@alexandruboboc
Copy link
Author

To answer my own question, the following files should be edited:

file 1: administrator\components\com_userideas\language\en-GB\en-GB.com_userideas.ini you should add line 92:

COM_USERIDEAS_ORDER_BY_VOTES="Order by votes"

file 2: components\com_userideas\views\items\tmpl\default.xml add line 28:

<option value="3">COM_USERIDEAS_ORDER_BY_VOTES</option>

file 3: components\com_userideas\models\items.php add to line 191:

case 3:
    $orderCol  = "a.votes";
    break;

@todordev
Copy link
Owner

Hi,
Thank you very much! I am happy you like the extension and I hope to be useful for you.
You can order the items by that option if you create menu item for a category. You will find the option for ordering on the menu item view.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants