4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: helio on July 28, 2017, 12:48:19 PM
-
Hello,
I am using version 1.7.11 and I have installed the mod Uploader Toplist/ Our photographers (http://www.4homepages.de/forum/index.php?topic=31789.0). When I click on the number of pictures of a user it returns me a list of pictures that this user has in his various sub-categories but sorted by the date they were created. I would like to sort these sub-categories by their name. Is it possible to do this?
Thanks
-
Fragen solltest Du immer im richtigen Thread posten.
-
Hello!
Please also use the search!
In ACP / General / Category Settings, you can sort the subcategories by name or date, ascending or descending.
In ACP / Manage categories / Edit category, you can use the up / down arrows to sort the main categories.
You can also change the order in ACP / Manage Categories / Edit Category / Category Sequence (for each category).
nobby
-
Hello,
Thank you for the reply. In ACP in settings I only see Categories no subcategories to sort. And the categories are already sorted by name ASC.
In toplist.php in the script there is a sort indication by cat_id and matches the way the list is sorted. Does this have anything to do with this? Can this be changed to sort by sub category name?
$sql2 = "SELECT cat_id, cat_name, cat_parent_id FROM ".$table_prefix."categories WHERE cat_id='".$row['cat_id']."' ORDER BY cat_id ASC";
$result2 = $site_db->query($sql2);
while ($row2 = $site_db->fetch_array($result2)){
if ($row2['cat_parent_id'] >= 1)
{
$sql3 = "SELECT cat_name FROM ".$table_prefix."categories WHERE cat_id='".$row2['cat_parent_id']."' ORDER BY cat_id ASC";
Helio
-
Hello,
Admin, at the top left "Edit categories" then click the + sign next to a category
Then either right-arrows up and down, or the sub-category and "category-order" then the subcategory according to the desire.
A subcategory is nothing more than a category in a category
nobby
-
Thanks nobby,
But I go up and down with the subcategories in Admin panel and have no effect on the uploaders toplist. They keep ordered by ID # and not by name.
In my top uploaders list when I click on the number of pictures that a certain user has it gives the list I have attached. And I would like to see this list sorted by airlines name and it is sorted by subcategory ID # ASC.
Helio
-
Hello,
Now I understand. The sorting you need is not provided and must be adjusted.
But it is possible. You want to sort by Artline.
I look again.
nobby
EDIT:
search in: /lang/english/admin.php
/*-- Setting-Group 3 --*/
$setting_group[3]="Image settings";
$setting['image_order'] = "Sort images by";
$image_order_optionlist = array(
"image_name" => "Name",
"image_date" => "Date",
"image_downloads" => "Downloads",
"image_votes" => "Votes",
"image_rating" => "Rating",
"image_hits" => "Hits"
);
replace by
/*-- Setting-Group 3 --*/
$setting_group[3]="Image settings";
$setting['image_order'] = "Sort images by";
$image_order_optionlist = array(
"image_name" => "Name",
"image_date" => "Date",
"image_downloads" => "Downloads",
"image_votes" => "Votes",
"image_rating" => "Rating",
"image_hits" => "Hits",
"image_id" => "ID-Nummer"
);
You can also replace "image_id" => "ID number" with: "image_media_file" => "File name"
-
Hello,
It did not work. Gave an error and could not open the website.
Helio
-
Hello,
OK, then I know at the moment synonymous not further :|
If something new, I report.
nobby