4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: V@no on March 20, 2005, 09:26:40 PM
-
This mod was written by CannabisCow before the hack and I'm just restoring it.
###############################################################
##
## Dieser Hack erlaubt euch, die Kategorien beliebig zu ordnen.
##
##############################################################
===============================================================
== ./global.php
===============================================================
///////////////////////////////////////////
// search
///////////////////////////////////////////
$sql = "SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images
FROM ".CATEGORIES_TABLE." c
LEFT JOIN ".IMAGES_TABLE." i ON (i.cat_id = c.cat_id AND i.image_date >= $new_cutoff AND i.image_active = 1)
GROUP BY c.cat_id
ORDER BY c.cat_order, c.cat_name ASC";
//////////////////////////////
// replace with
//////////////////////////////
$sql = "SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images
FROM ".CATEGORIES_TABLE." c
LEFT JOIN ".IMAGES_TABLE." i ON (i.cat_id = c.cat_id AND i.image_date >= $new_cutoff AND i.image_active = 1)
GROUP BY c.cat_id
ORDER BY ".$config['cat_order']."";
===============================================================
== ./lang/{lang}/admin.php
===============================================================
///////////////////////////////////////////
// search
///////////////////////////////////////////
/*-- Setting-Group 3 --*/
///////////////////////////////////////////
// add before
///////////////////////////////////////////
$setting['cat_order'] = "Nach welchem Prinzip, sollen die Kategorien bzw. Subkategorien geordnet werden";
$cat_order_array = array(
'c.cat_order' => 'Manuell',
'c.cat_name ASC' => 'Name Aufsteigend',
'c.cat_name DESC' => 'Name Absteigend'
);
===============================================================
== ./admin/settings.php
===============================================================
///////////////////////////////////////////
// search
///////////////////////////////////////////
show_setting_row("num_subcats");
///////////////////////////////////////////
// add after
///////////////////////////////////////////
show_setting_row("cat_order", "show_cat_order");
///////////////////////////////////////////
// search
///////////////////////////////////////////
function show_image_order_select($setting_name, $setting_value) {
global $image_order_optionlist;
echo "<select name=\"setting_item[".$setting_name."]\">";
foreach ($image_order_optionlist as $key => $val) {
echo "<option value=\"$key\"";
if ($setting_value == $key) {
echo " selected=\"selected\"";
}
echo ">".$val."</option>";
}
echo "</select>";
}
///////////////////////////////////////////
// add after
///////////////////////////////////////////
function show_cat_order($setting_name, $setting_value) {
global $cat_order_array;
echo "<select name=\"setting_item[".$setting_name."]\">";
foreach ($cat_order_array as $key => $val) {
echo "<option value=\"$key\"";
if ($setting_value == $key) {
echo " selected=\"selected\"";
}
echo ">".$val."</option>";
}
echo "</select>";
}
===============================================================
== SQL (add this with phpmyadmin or run this installer --> installer (http://gallery.vano.org/file7dl) (thx V@no for this installer)
===============================================================
INSERT INTO `4images_settings` ( `setting_name` , `setting_value` )
VALUES (
'cat_order', 'c.cat_name ASC'
);
PS: Viel Spass, hoffe hab nix vergessen ;)
-
Tried to install this mod, have no errors, but when I look in my ACP everything looks the same as it did before I installed this mod... using 4images 1.7 ..
Ive double checked everything twice..... is there some setting I cant find in ACP ti do this ?
-
there should be a new option below "number of subcategories" option
-
I know that this is not my hugest problem....
But I checked and I still cant find were I went wrong or the option in the ACP......
:oops: :oops:
I hate to draw your attention from the other mods Im having some serious issues with :|
perhaps tere is a problem with this mod (or yet I made a mistake?)
Robert
-
Ok... My mistake... I thought this was the mod that allowed you to move subcategoriesw up easier thatn clicking on them over and over in the ACP....
I realise now this is to rearrange their order....
I see the settings in the ACP under category settings...
Problem... my categories are now rearranged by name which is not a good thing.
Everytime I try to change the setting to manual and click save the ACP page refreshes, however the page is not saved and the categories remain sorted alphabetically, and the setting still says name... not manual like I tried to save...
I hate to uninstall the mod. You know why the settungs wont stay saved in the ACP?
-
one possible explanation is that u didnt update database.
-
I have added the tables to my database and the values.... I guess the only way to do it is to change the values in theDB manually if I cant figure it out...
-
mh mist hab da auch so nen fehler ...
DB Error: Bad SQL Query: SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images FROM 4images_categories c LEFT JOIN 4images_images i ON (i.cat_id = c.cat_id AND i.image_date >= AND i.image_active = 1) GROUP BY c.cat_id ORDER BY c.cat_name ASC
You have an error in your SQL syntax near 'AND i.image_active = 1) GROUP BY c.cat_id ORDER BY c.cat_n' at line 3
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/www/htdocs/d-wallpapers.de/includes/db_mysql.php:188) in /home/www/htdocs/d-wallpapers.de/includes/sessions.php on line 84
Warning: Cannot modify header information - headers already sent by (output started at /home/www/htdocs/d-wallpapers.de/includes/db_mysql.php:188) in /home/www/htdocs/d-wallpapers.de/admin/admin_functions.php on line 168
Warning: Cannot modify header information - headers already sent by (output started at /home/www/htdocs/d-wallpapers.de/includes/db_mysql.php:188) in /home/www/htdocs/d-wallpapers.de/admin/admin_functions.php on line 169
Warning: Cannot modify header information - headers already sent by (output started at /home/www/htdocs/d-wallpapers.de/includes/db_mysql.php:188) in /home/www/htdocs/d-wallpapers.de/admin/admin_functions.php on line 170
Warning: Cannot modify header information - headers already sent by (output started at /home/www/htdocs/d-wallpapers.de/includes/db_mysql.php:188) in /home/www/htdocs/d-wallpapers.de/admin/admin_functions.php on line 171
Warning: Cannot modify header information - headers already sent by (output started at /home/www/htdocs/d-wallpapers.de/includes/db_mysql.php:188) in /home/www/htdocs/d-wallpapers.de/admin/admin_functions.php on line 172
was dat für nen prob ? wäre kewl wenn mir jemand helfen könnte - big thx
gruß dirtycyclon
-
The only thing I see on here is how to put the pictures in order by ascending or descending and not the categories this mod didn't do anything but add errors to my gallery if someone comes up with a real way for the categories to automatically go in alphabetical order please keep me posted.
-
In Version 1.7.1 gibt es in der global.php den Code nicht mehr..
$sql = "SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images
FROM ".CATEGORIES_TABLE." c
LEFT JOIN ".IMAGES_TABLE." i ON (i.cat_id = c.cat_id AND i.image_date >= $new_cutoff AND i.image_active = 1)
GROUP BY c.cat_id
ORDER BY c.cat_order, c.cat_name ASC";
-
is this mod is working with v1.7.4? also can someone please translate it into english?
-
C'est possible d'avoir le code pour Category order pour la version 1.7.4 SVP
Merci d'avance bhavan