Any core hack hor arange category ?
Any core hack hor arange category ?
I need to know if is possible to arange the category in alphabetical order:
http://forum.phpwcms.org/viewtopic.php? ... 05#p113205
http://forum.phpwcms.org/viewtopic.php? ... 05#p113205
Packging design,labels, catalogs,postcards,
Re: Any core hack hor arange category ?
No guaranty!
Backend:
include\inc_lib\admin.functions.inc.php
around row 30
find:
change to
Frontend:
include\inc_front\front.func.inc.php
around row 392
find:
change to:
You can NOT change the sort order manually anymore.
Backend:
include\inc_lib\admin.functions.inc.php
around row 30
find:
Code: Select all
$sql = "SELECT * FROM ".DB_PREPEND."phpwcms_articlecat WHERE acat_trash=0 AND acat_struct=".intval($id)." ORDER BY acat_sort";
Code: Select all
$sql = "SELECT * FROM ".DB_PREPEND."phpwcms_articlecat WHERE acat_trash=0 AND acat_struct=".intval($id)." ORDER BY acat_name";
include\inc_front\front.func.inc.php
around row 392
find:
Code: Select all
$sql .= "acat_trash=0 ORDER BY acat_struct, acat_sort";
Code: Select all
$sql .= "acat_trash=0 ORDER BY acat_name";
Re: Any core hack hor arange category ?
Thank you , I will try it and let you know if it works
Packging design,labels, catalogs,postcards,
Re: Any core hack hor arange category ?
i HAVE TRY THE CODE AND IS WORKING BUT AFTER THAT i HAVCE TRY to see if i put the original code back and to keep that arangement and to have also the manual sort function also....then I have seen that again all is randomly arange , is not keeping the alfabetical order and I get this error also:
ALSO I have try to put back with the code that arange in the alfabetical; order and I get this error:
and the structure is not availabel anymore
and in front end I get this error:
ok what should I do?
Code: Select all
Warning: include_once(/home/budo/public_html/include/inc_lib/admin.structure.inc.php) [function.include-once]: failed to open stream: No such file or directory in /home/budo/public_html/phpwcms.php on line 464
Warning: include_once() [function.include]: Failed opening '/home/budo/public_html/include/inc_lib/admin.structure.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/budo/public_html/phpwcms.php on line 464
structura site
ALSO I have try to put back with the code that arange in the alfabetical; order and I get this error:
Code: Select all
Fatal error: Call to undefined function get_root_childcount() in /home/budo/public_html/include/inc_tmpl/admin.structlist.tmpl.php on line 58
and the structure is not availabel anymore
and in front end I get this error:
Code: Select all
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/budo/public_html/include/inc_front/front.func.inc.php on line 6039
Packging design,labels, catalogs,postcards,
Re: Any core hack hor arange category ?
also I see that I can not add anymore no category in the structure.
Packging design,labels, catalogs,postcards,
Re: Any core hack hor arange category ?
what have you done?
put back the original files, best would be the whole include folder.
try it again
do only change the two lines as described above
when you change the code as described NO manually arrangement is possible anymore, till you go back to the original code
Almost certainly you messed things up. For the error messages you need to do more than the changes I described.
put back the original files, best would be the whole include folder.
try it again
do only change the two lines as described above
when you change the code as described NO manually arrangement is possible anymore, till you go back to the original code
Almost certainly you messed things up. For the error messages you need to do more than the changes I described.
Re: Any core hack hor arange category ?
well I put back original files and is all ok, then I hve try again with your instructions ..in the backend is all fine but in frontend I get this error:
and is show only that error,
and to line 3012 I have this code:
what is wrong now?
Code: Select all
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/budo/public_html/include/inc_front/front.func.inc.php on line 3012
and to line 3012 I have this code:
Code: Select all
$redirect = get_redirect_link($GLOBALS['content']['struct'][$key]["acat_redirect"], ' ''', ''','','');
Packging design,labels, catalogs,postcards,
Re: Any core hack hor arange category ?
also I have seen that after I switch back to orginal code is not keeping the alfabetical order, any ideea how to do that to keep the alfabetical order and to have the posibility to move(arange) each category separatly up and down?
Packging design,labels, catalogs,postcards,
Re: Any core hack hor arange category ?
Are you testing me?
What application do you use to edit the files?
---------------------------------------
as I said it's not possible to sort the structure in alphabetical order AND then move the items up and down.
I don't quite see the sense here.
You can not expect from the code to figure out when you want to add which sort order, it's either alphabetically or by sortnumber in db
What application do you use to edit the files?
front.func.inc never had 6039 lines!culda_a wrote:...nc_front/front.func.inc.php on line 6039
original code is:culda_a wrote:$redirect = get_redirect_link($GLOBALS['content']['struct'][$key]["acat_redirect"], ' ''', ''','','');
so, either you or your editor does something wrong here$redirect = get_redirect_link($GLOBALS['content']['struct'][$key]["acat_redirect"], ' ', '');
---------------------------------------
as I said it's not possible to sort the structure in alphabetical order AND then move the items up and down.
I don't quite see the sense here.
You can not expect from the code to figure out when you want to add which sort order, it's either alphabetically or by sortnumber in db