Hallo,
angeregt durch diesen Thread habe ich einen kleinen Hack für Joomla geschrieben, mit dem man sich mittels einer Dropdownlist die Contents sortiert anzeigen lassen kann.
Ich hab das ganze so wie einen phpBB Hack aufgebaut. Sagt mal wie ihrs findet.Code:####################################### ##### Hack zur Content-Sortierung ##### ############# im Backend ############## ############# version 1.0 ############# ####################################### Autor: fred.reichbier (ICQ#: 296-543-565) Zeigt im Backend eine Dropdown-Liste für die Contentsortierung bei den Contentseiten an. #################################################### ##### Datei ##### /administrator/components/com_content/admin.content.php ##### Suche ##### $filter = ''; //getting a undefined variable error ##### DARUNTER einfügen #### $ordering = intval($mainframe->getUserStateFromRequest( "ordering", 'ordering', 0 ) ); ##### Suche ##### if ( $search ) { $where[] = "LOWER( c.title ) LIKE '%$search%'"; } ##### DARUNTER einfügen #### switch ($ordering) { case 0: break; case 1: //Ordnung Erstellungsdatum [DESC] $order = "\n ORDER BY c.created DESC"; break; case 2: //Ordnung Erstellungsdatum [ASC] $order = "\n ORDER BY c.created ASC"; break; case 3: //Ordnung Name [DESC] $order = "\n ORDER BY c.title DESC"; break; case 4: //Ordnung Name [ASC] $order = "\n ORDER BY c.title ASC"; break; case 5: //Ordnung User [DESC] $order = "\n ORDER BY c.created_by DESC"; break; case 6: //Ordnung User [ASC] $order = "\n ORDER BY c.created_by ASC"; break; case 7: //Ordnung Modified [DESC] $order = "\n ORDER BY c.modified DESC"; break; case 8: //Ordnung Modified [ASC] $order = "\n ORDER BY c.modified ASC"; break; default: break; }; #################################################### ##### Datei ##### /administrator/components/com_content/admin.content.html.php ##### Suche ##### <td width="right" valign="top"> <?php echo $lists['authorid'];?> </td> ##### DARUNTER einfügen #### <td width="right" valign="top"> <select name="ordering" class="inputbox" size="1" onchange="document.adminForm.submit();"> <option value="0" selected="selected">- Wähle Ordnung -</option> <option value="1">Erstellungsdatum [DESC]</option> <option value="2">Erstellungsdatum [ASC]</option> <option value="3">Titel [DESC]</option> <option value="4">Titel [ASC]</option> <option value="5">Ersteller [DESC]</option> <option value="6">Ersteller [ASC]</option> <option value="7">Letzte Aktualisierung [DESC]</option> <option value="8">Letzte Aktualisierung [ASC]</option> </select> </td> #################################################### ################### ENDE ####################### ####################################################
mfg fred


LinkBack URL
About LinkBacks

Zitieren
Lesezeichen