Jump to content

List active domains by default


stormy

Recommended Posts

Is there a way (maybe with jquery?) to have the list of domains in the client area default to "Active" status?

 

We keep getting requests from customers that have a long list of cancelled/expired domains and have to click "Active" in the sidebar every time they login to configure something.

Link to comment
Share on other sites

if you're talking about clientareadomains, you could use an action hook to do that or you can do it in the template...

 

<?php

/**
* Client Area Domains - Sort By Status
* @author brian!
*/

function clientarea_domains_sort_hook($vars) {

   return array("orderby" => "status");
}
add_hook("ClientAreaPageDomains", 1, "clientarea_domains_sort_hook");
?>

that would sort the table by status, so "Active" domains should be top of the list. :idea:

Link to comment
Share on other sites

  • 2 months later...
18 hours ago, stormy said:

I'm still on v6, but I'm using the Six theme as well.

in general, it's always good to mention which version you're using as that can make all the difference with regards to templates and hooks. :idea:

18 hours ago, stormy said:

Domains appear sorted by domain name, I tested it on two different users. There are no errors in the javascript console or anything.

i've just tried the hook on v6.2.2 and it's working fine - are you sure the hook is running ? it's not a browser cache issue ??

if you had to, you could come at this from a different angle, edit clientareahome.tpl and change...

<a href="clientarea.php?action=domains">

to...

<a href="clientarea.php?action=domains&orderby=status">

that would effectively do the same as the hook and default to sorting the table by status value - meaning active domains would be shown first... and you could expand that to using a navbar hook to change the "My Domains" link to do the same thing - however, none of this should be necessary if you could find out if the original hook is running.

Link to comment
Share on other sites

If I activate the hook debugging I can see it's getting loaded. Maybe some other hook interferes with it? I don't know how I could debug it. It's not the template, because I have the original six and my modified version, and it happens on both. And it's not the browser, because it happens on both Safari and Firefox.

Anyway, I'll try your other suggestion, it's pretty much foolproof :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated