Loading...
 
Skip to main content

Features / Usability


Default Directory Sorting

I am using TikiWiki for my local Chamber of Commerce website.

I need to change the default sorting method to hits ascending. We want the entries to be the fairest to the member businesses in town, and thought that placing the least visited sites on top would encourage traffic their way. We expect that overall, the sites will take turns being on top, since the first entry is the one most often clicked 😊

Is there are place to select that attribute, or do I need to go in and hack the code?

Thanks,

Eric

> I am using TikiWiki for my local Chamber of Commerce website.
>
> I need to change the default sorting method to hits ascending. We want the entries to be the fairest to the member businesses in town, and thought that placing the least visited sites on top would encourage traffic their way. We expect that overall, the sites will take turns being on top, since the first entry is the one most often clicked 😊
>
> Is there are place to select that attribute, or do I need to go in and hack the code?
>


You're talking about the directory feature, right? You can specify the search order by adding &sort_mode=hits_asc to the incoming link.

For example, this will show the items in the Tiki directory in ascending order:

http://tikiwiki.org/tiki-directory_ranking.php?sort_mode=hits_ascQuestion

HTH,

-RickQuestion
Coming soon: TikiWiki for Dummies Smarties — A beginner's guide to using ))TikiWiki((.


Rick,

Yes, I mean the directory feature.

I actually want the DEFAULT search method for all users to be asc, as it is desc now. This way the lesser visited businesses will show on top unless otherwise specified.

Is there an actual setting for that?

Thanks for the reply.

Eric

>
> I actually want the DEFAULT search method for all users to be asc, as it is desc now. This way the lesser visited businesses will show on top unless otherwise specified.
>

As I said, the easiest way is to simply change your incoming link. However, if you want to modify the code:

  1. Edit the tiki-directory_ranking.php file.
  2. Find this line:
    Copy to clipboard
    if (!isset($_REQUEST["sort_mode"])) { $sort_mode = 'created_desc';
  3. Change it to:
    Copy to clipboard
    if (!isset($_REQUEST["sort_mode"])) { $sort_mode = 'hits_asc';


HTH,

-RickQuestion
Coming soon: TikiWiki for Dummies Smarties — A beginner's guide to using ))TikiWiki((.


Thanks Rick,
So, I have figured out how Tiki keeps track of preferences. I also understand that this application is so powerful because people share when they make Modifications.

HI can modify my tiki to add the preference and use it in lieu of hard-coding it (which has to be done in a couple places), but I do not understand at all how that is shared with the community.

Maybe you could next guide me down THAT slippery slope!

Thanks,

Eric