Browsing this Thread:
1 Anonymous Users
Manual sorting is not working |
||
|---|---|---|
|
Not too shy to talk
![]()
Joined:
3/23 8:20 Posts:
35
![]() |
Hi,
when I try to sort the categories manually, does not work. Classifieds 2.5 Sort only alphabetically, in the settings I changed, though, it does not work. You can help ? Thanks
Posted on: 7/8 6:09
|
|
Transfer
|
||
Re: Manual sorting is not working |
||
|---|---|---|
|
Webmaster
![]()
Joined:
2004/10/6 16:13 Posts:
927
![]() |
host2,
Go to index.php around line 131 find this line: $sql = 'SELECT cid, title, img FROM '.$xoopsDB->prefix("".$mydirname."_categories").' WHERE pid = 0 '; change it to: $sql = 'SELECT cid, title, img, ordre FROM '.$xoopsDB->prefix("".$mydirname."_categories").' WHERE pid = 0 '; Then Before that line add this line: $cat_sort = $xoopsModuleConfig["".$mydirname."_csortorder"]; Then around line 141 find this line: $sql .= 'ORDER BY title'; change it to this: $sql .= 'ORDER BY '.$cat_sort.''; go to about line 174 and find this line: $arr = $mytree->getFirstChild($myrow['cid'], 'title'); change to this: $arr = $mytree->getFirstChild($myrow['cid'], $cat_sort); Save and close index.php Then go to catview.php around line 111 and 112 anf find these lines: $result = $xoopsDB->query("select cid, pid, title, cat_desc from ".$xoopsDB->prefix("".$mydirname."_categories")." where cid=".mysql_real_escape_string($cid)." $cat_perms"); list($cid, $pid, $title, $cat_desc) = $xoopsDB->fetchRow($result); change them to this: $result = $xoopsDB->query("select cid, pid, title, cat_desc, ordre from ".$xoopsDB->prefix("".$mydirname."_categories")." where cid=".mysql_real_escape_string($cid)." $cat_perms ORDER BY ".$cat_sort.""); list($cid, $pid, $title, $cat_desc, $ordre) = $xoopsDB->fetchRow($result); then BEFORE those lines add this line: $cat_sort = $xoopsModuleConfig["".$mydirname."_csortorder"]; Then go down to about line 136 find this line: $arr = $mytree->getFirstChild($cid, "title"); change it to this: $arr = $mytree->getFirstChild($cid, $cat_sort); then go down to about line 142 and find this line: $sub_arr = $mytree->getFirstChild($ele['cid'], 'title'); change it to: $sub_arr = $mytree->getFirstChild($ele['cid'], $cat_sort); Save and close catview.php I think that will do it. Let me know what happens. Thanks, John
Posted on: 7/13 14:09
|
|
Transfer
|
||
Re: Manual sorting is not working |
||
|---|---|---|
|
Not too shy to talk
![]()
Joined:
3/23 8:20 Posts:
35
![]() |
Hello John,
you are a genius This works perfect.Yery Yery Thanks for you help ![]() You can this please update in the RC 2.5 Final Thanks He is my Website, You can he see your Classifieds . http://www.gothaer-anzeigenmarkt.de/modules/classifieds/ Have a nice Day greet host2
Posted on: 7/13 15:46
|
|
Transfer
|
||
You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.




Transfer

This works perfect.