View Full Version : Manage Categories Listing - display Bug?
Mark Brookes
12-05-2006, 04:32 PM
Hi,
when in Admin-panel and using manage-categories there is a column displaying "path".
But in my copy it does not actually report the correct path. the path is incomplete in most cases. I attach an example
Does anyone else experience this as abug? or is it just my installation/configuration?
regards
MArk
John Turner
12-06-2006, 07:49 AM
Hi Mark,
Provide me with your FTP and AdminPanel credentials I'll try to help you.
John Turner
12-06-2006, 10:56 AM
I have fixed this trouble.
I think it would be useful for all.
open your '../admin/manage-categories.php'
***find following code
$path = substr($value['path'], 0, strlen($value['path']) - strlen($value['title']));
***replace with following code
$temp_path = explode("/",$value['path']);
if(count($temp_path)>1)
{
array_splice($temp_path, 1);
$path = implode("/",$temp_path);
}
else
{
$path = '';
}
Mark Brookes
12-06-2006, 03:10 PM
Hello John,
Thank you for your time & attention.
The layout looks much better - it no longer looks 'broken'
However I believe that the Path values listed are actually the path of the category's parent category. Not the path of the current category.
eg the path for category = Favours
is actually ROOT/Wedding-Accessories/Wedding-Favours
but the listing reports the path as
ROOT/Wedding-Accessories.
I hope the 2 attached files will make it clear
Unless it is very tricky, may I suggest that the value for path be adjusted to show the full path of the current category, rather than it's parent.
Regards
Mark
John Turner
12-07-2006, 03:50 AM
Hi Mark,
Path field displays path to parent directory.
For example you have
Category1
->Category2
-->Category3
path to Category1 would be ROOT/
path to Category2 would be ROOT/category1
path to Category3 would be ROOT/category1/category2
So, if you want to see absolute path included current category
***replace with following code
$temp_path = explode("/",$value['path']);
if(count($temp_path)>1)
{
array_splice($temp_path, 1);
$path = implode("/",$temp_path);
}
else
{
$path = '';
}
*** replace this with
$path = $value['path'];
Mark Brookes
12-07-2006, 08:51 AM
Hi John
Excellent! :good:
Like it Lots!
... I understand now that the manage-categories listing is intended to display the path to the current category (ie the path of the parent category which leads to the current category) & so the first code correction does do what you - the programmers - intend it to do.
However I suggest that it is better for the manage-categories listing to report the path of the actual category being listed.
The difference is one of preference ... I know which one I prefer but have no idea which would be preferred by most users. If we were able to find out then that method could be built into the next version of eSC.
Are you able to add a 'survey' to this thread?
in the meantime maybe users/readers might like to post their views ....
ANYONE? ...
do you prefer attachment (New-manage-categories) = path of parent = path to listed category?
do you prefer attachment (ManageCategories-path_of_category) = path of listed category?
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.