4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: CannabisCow on February 25, 2003, 12:45:13 AM
-
###############################################################
##
## 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://come.no-ip.com/install/install_categoriessort.zip) (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 :wink:
-
Nice! :D
I didnt try the mod (yet?), but whant make it clear: it wont affect catogory sort in admin control panel -> edit categories. Right?
-
sorry, my english isn`t so good, but this mod allow you to sort categories by name (ASC|DESC) or manually (see "edit categories")
e.g.
==========
your categories:
==========
mgi
abc
zxy
def
============
activate this mod
============
abc
def
mgi
zxy[/img]
-
schon wieder ich mit nem doofen problem!
===============================================================
== SQL
===============================================================
Code:
INSERT INTO `babes_settings` ( `setting_name` , `setting_value` )
VALUES (
'cat_order', 'c.cat_name ASC'
);
wo finde ich diese SQL datei zu editieren???
where can i find the SQL file to edit?
-
schon wieder ich mit nem doofen problem!
===============================================================
== SQL
===============================================================
Code:
INSERT INTO `babes_settings` ( `setting_name` , `setting_value` )
VALUES (
'cat_order', 'c.cat_name ASC'
);
wo finde ich diese SQL datei zu editieren???
where can i find the SQL file to edit?
This u'll need run in your mysql control program (phpmyadmin for example)
also, babes_settings by default should be 4images_settings it's all depence how u installed 4images.
or u can use this installer (http://come.no-ip.com/install/install_categoriessort.zip)
-
thank you again V@no!!!
genialer mod! korrekt! hab mit dem sortieren schon langsam die krise bekommen!!
-
thx V@no for this installer
-
Does anyone have a demo or screenshot of this mod in action? Id like to see how it is incorperated into 4images. Thank you
Carl
-
It's ok I know how it works now, I'm having a dumb day lol ignore me
-
Has anyone tried this mod in 1.7.1 because this mod will save me a LOT of trouble from having to manually re-alphabetize new category folders. :lol:
-
Hi,
meine Kategoerien werden auf der Hauptseite zur Zeit so angezeigt
a - d - g
b - e - h
c - f - i
Ich möchte aber das sie so angezeigt werden
a - b - c
d - e - f
g - h - i
Was muss ich tun damit das so klappt???
-
can you make one that would work w/ 1.71?
because in global.php
I didnt not get this the same code as you do. I get this.
$sql = "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment
FROM ".CATEGORIES_TABLE."
ORDER BY cat_order, cat_name ASC";
-
thats close enough, replace
ORDER BY cat_order, cat_name ASC";
with ORDER BY ".$config['cat_order'];
-
ORDER BY ".$config['cat_order'];
I have this in 1.7 and it has not the effect i want....
-
DB Error: Bad SQL Query: SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image FROM girls_categories ORDER BY c.cat_name ASC
Unknown table 'c' in order clause
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/ascanio/domains/girlsandgirls.net/public_html/includes/db_mysql.php:188) in /home/ascanio/domains/girlsandgirls.net/public_html/includes/sessions.php on line 84
Warning: Cannot modify header information - headers already sent by (output started at /home/ascanio/domains/girlsandgirls.net/public_html/includes/db_mysql.php:188) in /home/ascanio/domains/girlsandgirls.net/public_html/admin/admin_functions.php on line 168
Warning: Cannot modify header information - headers already sent by (output started at /home/ascanio/domains/girlsandgirls.net/public_html/includes/db_mysql.php:188) in /home/ascanio/domains/girlsandgirls.net/public_html/admin/admin_functions.php on line 169
Warning: Cannot modify header information - headers already sent by (output started at /home/ascanio/domains/girlsandgirls.net/public_html/includes/db_mysql.php:188) in /home/ascanio/domains/girlsandgirls.net/public_html/admin/admin_functions.php on line 170
Warning: Cannot modify header information - headers already sent by (output started at /home/ascanio/domains/girlsandgirls.net/public_html/includes/db_mysql.php:188) in /home/ascanio/domains/girlsandgirls.net/public_html/admin/admin_functions.php on line 171
Warning: Cannot modify header information - headers already sent by (output started at /home/ascanio/domains/girlsandgirls.net/public_html/includes/db_mysql.php:188) in /home/ascanio/domains/girlsandgirls.net/public_html/admin/admin_functions.php on line 172
Why i get this error :S
does this mod workfor 1.7.1?
-
DB Error: Bad SQL Query: SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image FROM girls_categories ORDER BY c.cat_order
Unknown table 'c' in order clause
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/ascanio/domains/girlsandgirls.net/public_html/includes/db_mysql.php:188) in /home/ascanio/domains/girlsandgirls.net/public_html/includes/sessions.php on line 84
Warning: Cannot modify header information - headers already sent by (output started at /home/ascanio/domains/girlsandgirls.net/public_html/includes/db_mysql.php:188) in /home/ascanio/domains/girlsandgirls.net/public_html/encuestas.php on line 19
-
no it doesnt work with 1.7.1 u need change in lang/<yourlang>/admin.php
$cat_order_array = array(
'c.cat_order' => 'Manuell',
'c.cat_name ASC' => 'Name Aufsteigend',
'c.cat_name DESC' => 'Name Absteigend'
);
to this:$cat_order_array = array(
'cat_order' => 'Manuell',
'cat_name ASC' => 'Name Aufsteigend',
'cat_name DESC' => 'Name Absteigend'
);
-
no it doesnt work with 1.7.1 u need change in lang/<yourlang>/admin.php$cat_order_array = array(
'c.cat_order' => 'Manuell',
'c.cat_name ASC' => 'Name Aufsteigend',
'c.cat_name DESC' => 'Name Absteigend'
);
to this:$cat_order_array = array(
'cat_order' => 'Manuell',
'cat_name ASC' => 'Name Aufsteigend',
'cat_name DESC' => 'Name Absteigend'
);
if doesnot work for 1.7.1 why i have to change that? if i change that will work?
-
if doesnot work for 1.7.1 why i have to change that? if i change that will work?
please, dont be so dificult.
-
Installer Link geht nicht.
Hat den jemand für mich?
Gruß
michi-w.
-
it sais in my sig:
My site is down, please use a mirror site to download MODs: #2 (http://mirror2.vano.org) or #3 (http://mirror3.vano.org) or #4 (http://mirror4.vano.org) or #5 (http://mirror5.vano.org)
-
Hi.. I have installed categories sort order for v 1.7.1 I got this error message why I'm getting this error message.
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 cat_name ASC
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND i.image_active = 1) GROUP BY c.cat_id O
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/qapypayk/public_html/newgallery/includes/db_mysql.php:188) in /home/qapypayk/public_html/newgallery/includes/sessions.php on line 84
Jamestave.
-
u probably replaced/deleted the line that starts with $new_cutoff
put it back.
-
hi,
ich würde gern die kategorien so ordnen:
A
B
C
D
E
F
usw.
Kann mir da einer weiterhelfen?
-
Im ACP unter Einstellungen
Kategorie Einstellungen
"Wieviele Zellen soll die Tabelle der Kategorien haben" auf 1 stellen.
Und bau diesen Bugfix ein: http://www.4homepages.de/forum/index.php?topic=6677.0
Gruß
michi-w.
-
Ich würde gernde nicht nach ABC / ZYX sortieren, sondern nach neuerster / ältester Kategorie zuerst..
-
Could someone change it so that it works for 1.7.1?
-
Could someone change it so that it works for 1.7.1?
it works just fine if u read only 1.5 pages of the replys.
-
Could someone change it so that it works for 1.7.1?
it works just fine if u read only 1.5 pages of the replys.
nope
SQL for 1.7.1 has to be
INSERT INTO `4images_settings` ( `setting_name` , `setting_value` )
VALUES (
'cat_order', 'cat_name ASC'
);
instead of
INSERT INTO `4images_settings` ( `setting_name` , `setting_value` )
VALUES (
'cat_order', 'c.cat_name ASC'
);
-
Hi,
meine Kategoerien werden auf der Hauptseite zur Zeit so angezeigt
a - d - g
b - e - h
c - f - i
Ich möchte aber das sie so angezeigt werden
a - b - c
d - e - f
g - h - i
Was muss ich tun damit das so klappt???
Gibt es die Möglichkeit das so zu sortieren??? Irgendwie bekomm eich das nicht hin...
-
i am gettin this error..when i update my database...please advice... :?
DB Error: Bad SQL Query: INSERT INTO 4imagesga_settings (`setting_name`, `setting_value`) VALUES ('cat_order', 'c.cat_name ASC')
Duplicate entry 'cat_order' for key 1
-
I've Installed the mod and it worked fine thanks for it!
But I have a question about something Vano allready asked. Is there any way that it ALSO affect category sort in "admin control panel -> edit categories"
Would be great cause that's what I really need!
Habe den Mod installiert und funktioniert alles prima. Vielen Dank dafür!
Aber ne Frage zu dem was Vano schon fragte. Ist es möglich das man das ganze AUCH BEIM "admin control panel -> Kategorien bearbeiten" nutzen kann?
Denn sowas such ich dringend!
-
After go to gallery show this message with any pictures and categories!!
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. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND i.image_active = 1) GROUP BY c.cat_id O
Link: http://www.singersfan.com/gallery/
-
admin help me please! my web site is down and i can not run this mode please help me how i can run this
mode because now my data base have problem!! (after setup mysql installer) if you can run this mode tell
me i send to you my user & password of ftp
DB Error: Bad SQL Query: SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment FROM 4images_categories ORDER BY c.cat_name ASC
Unknown table 'c' in order clause
-
Hello,
I have read this post very carefully more than 10 times and also some other post with the same subject and I have done everything exactly as I should.
The problem is that the sorting doesn't work with my language.
I have the correct $lang['charset'] = at the main.php of my language, but doesn't sort the categories.
Everything are working fine, the sorting options at the Admins settings are there, but there is no correct sorting!
It does some kind of sorting, but it puts first B and then A for example!
Is there any way that this MOD can work with a foreign languages?
PLEASE, I need some help :oops:
.
-
I think its not about this mod, its about how your MySQL handles sorting...what about images? can you sort them by name?
-
Dear V@no, no, the images can't be sorted by name correctly also!
Please help, there must be an answer to solve this problem!
.
-
.
Is there any way that this MOD can work with a foreign languages?
PLEASE, can someone help ?
.
-
I have answered your question already, its not this mod's problem, in fact its not 4images problem, its MySQL problem...if MySQL can't sort it properly nothing you can do about it...
-
.
Thank you very much for your answer V@no,
I have understand what you have said,
I was just hoping that you or someone else may have some answer to this MySQL problem of sorting...
Where can I check or what can I add to MySQL settings to solve the sorting problem?
.
-
INSERT INTO `4images_settings` ( `setting_name` , `setting_value` )
VALUES (
'cat_order', 'cat_name ASC'
);
Thanks for the hint DaMike !
V@no I think you should specify that your installer is for 1.7 vesion.
-
hello,
i tried this mod and at the last line there was something whit phpmyadmin, where can i find it and how to use it and install the last line....?
-
please read the bold text below...
===============================================================
== SQL (add this with phpmyadmin or run this installer --> installer (http://come.no-ip.com/install/install_categoriessort.zip) (thx V@no for this installer)
===============================================================
-
yes i read , but i'm such a newbie that i don't know where to find phpmyadmin, what to do with, how to run an installer ....
do i have to look for phpmyadmin in the control panel of my server ?
-
please read the bold text below...
===============================================================
== SQL (add this with phpmyadmin or run this installer --> installer (http://come.no-ip.com/install/install_categoriessort.zip) (thx V@no for this installer)
===============================================================
You dont need to make any changes with phpmyadmin, please use the installer!
Download the *.zip File, put it in your 4images root folder and then use your Browser to execute the Installer
-
oh, thank you very much :)
-
Hi,
Gibt es das nicht wo für die 1.7.4 :cry:
hatte es in der 1.7.1 nur hier stimmt der code schon in der global.php nicht überein
gruss Harald
-
Hi Ivan,
Ein ganz großes Dankeschön, werde ich nachher noch einbauen, und bin sicher das es jetzt klappt.
Harald
Edit: SUPER, hat alles geklappt, auf zu neuen Taten :lol: