Leser in diesem Thema:
1 Anonyme(r)
Nach unten Vorheriges Thema Nächstes Thema
Bitte erst registrieren. Danach ist es möglich Beiträge zu schreiben.
Sortierung nach Postleitzahl in Modul ADDRESSES |
Gast
|
Aw:: Sortierung nach Postleitzahl in Modul ADDRESSES |
Gast-Gast
|
kannst du mal den script viewcat.php zur Verfügung stellen.
(Datei anhängen und hochladen)
Geschrieben: 29.01.2010
|
|||
|
Aw:: Sortierung nach Postleitzahl in Modul ADDRESSES |
![]() ![]() |
Eigentlich bräuchten wir nur ein Vorher, Nachher.
Also den Code vor der Änderung und nach der Änderung des template. Muki
Geschrieben: 29.01.2010
|
|||
_________________
Es gibt keine dummen Fragen, nur dumme Antworten (Ausnahmen bestätigen die Regel). ![]() |
||||
|
Aw:: Sortierung nach Postleitzahl in Modul ADDRESSES |
![]() ![]() |
Hallo zusammen,
glaube nicht, dass ich an der Datei was geändert habe. Beim Hochladen erhalte ich die Meldung: Protector detects attacking actions Wie kann ich Euch die Datei zukommen lassen? Gruß harry27
Geschrieben: 29.01.2010
|
|||
|
Aw:: Sortierung nach Postleitzahl in Modul ADDRESSES |
![]() ![]() |
Indem du in dem Dateinamen nur einen Punkt (.) verwendest! Dem Protector (ärks) stoßen zwei Punkte (..) im Dateinamen sauer auf.
![]()
Geschrieben: 29.01.2010
|
|||
_________________
if(ahnung == 0) {use SEARCH; use BRAIN; use GOOGLE; } else {make post;} Wie man Fragen richtig stellt |
||||
|
Aw:: Sortierung nach Postleitzahl in Modul ADDRESSES |
![]() ![]() |
Hallo,
ich hatte nur einen Punkt, aber einen Unterstrich im Dateinamen(viewcat_alt.php und viewcat_aktuell.php). Jetzt hab ich die Datei mit unverändertem Dateinamen im Originalzustand genommen; gleiche Meldung: Protector detects attacking actions Ich kopiere den Dateitext jetzt einfach hier hinein: ************************************************************* Alte Version: // $Id: viewcat.php,v 1.12 2003/03/27 12:11:07 w4z004 Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // // <http://www.xoops.org/> // // ------------------------------------------------------------------------- // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or // // (at your option) any later version. // // // // You may not change or alter any portion of this comment or credits // // of supporting developers from this source code or any supporting // // source code which is considered copyrighted (c) material of the // // original comment or credit authors. // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY; without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License for more details. // // // // You should have received a copy of the GNU General Public License // // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // include "header.php"; $myts =& MyTextSanitizer::getInstance(); // MyTextSanitizer object include_once XOOPS_ROOT_PATH."/class/xoopstree.php"; $mytree = new XoopsTree($xoopsDB->prefix("addresses_cat"),"cid","pid"); $cid = intval($_GET['cid']); $xoopsOption['template_main'] = 'addresses_viewcat.html'; include XOOPS_ROOT_PATH."/header.php"; if (isset($_GET['show'])) { $show = intval($_GET['show']); } else { $show = $xoopsModuleConfig['perpage']; } $min = isset($_GET['min']) ? intval($_GET['min']) : 0; if (!isset($max)) { $max = $min + $show; } if(isset($_GET['orderby'])) { $orderby = convertorderbyin($_GET['orderby']); } else { $orderby = "title ASC"; } // hack LUCIO - start $pathstring = ""; //$pathstring = ""._MD_MAIN." : "; $pathstring .= $mytree->getNicePathFromId($cid, "title", "viewcat.php?op="); $pathstring = str_replace(':', '>', $pathstring); //$pathstring = ""._MD_MAIN." : "; //$pathstring .= $mytree->getNicePathFromId($cid, "title", "viewcat.php?op="); // hack LUCIO - end $xoopsTpl->assign('category_path', $pathstring); $xoopsTpl->assign('category_id', $cid); // hack LUCIO - start $sql = "SELECT title, imgurl, show_map"; $sql.= " FROM ".$xoopsDB->prefix("addresses_cat"); $sql.= " WHERE cid=".$cid; $result=$xoopsDB->query($sql) or exit("Error"); list($title, $imgurl, $show_map) = $xoopsDB->fetchRow($result); $description = ""; $sql = "SELECT description"; $sql.= " FROM ".$xoopsDB->prefix("addresses_cat_text"); $sql.= " WHERE cid=".$cid; $result=$xoopsDB->query($sql) or exit("Error"); list($description) = $xoopsDB->fetchRow($result); if ($imgurl && $imgurl != "http://") {$imgurl = $myts->makeTboxData4Edit($imgurl);} else {$imgurl = '';} $xoopsTpl->assign('category_title', $myts->makeTboxData4Show($title)); $xoopsTpl->assign('category_imgurl', $imgurl); $xoopsTpl->assign('category_show_map', $show_map); $xoopsTpl->assign('category_description', $myts->makeTareaData4Show($description,0)); // hack LUCIO - end // get child category objects $arr=array(); $arr=$mytree->getFirstChild($cid, "title"); if ( count($arr) > 0 ) { $scount = 1; foreach($arr as $ele) { $sub_arr=array(); $sub_arr=$mytree->getFirstChild($ele['cid'], "title"); $space = 0; $chcount = 0; $infercategories = ""; foreach($sub_arr as $sub_ele) { $chtitle=$myts->makeTboxData4Show($sub_ele['title']); if ($chcount>5) { $infercategories .= "..."; break; } if ($space>0) { $infercategories .= ", "; } $infercategories .= "".$chtitle.""; $space++; $chcount++; } $xoopsTpl->append('subcategories', array( 'title' => $myts->makeTboxData4Show($ele['title']), 'id' => $ele['cid'], 'infercategories' => $infercategories, 'totallinks' => getTotalItems($ele['cid'], 1), 'count' => $scount )); $scount++; } } // hack LUCIO - start $xoopsTpl->assign('api_key', $xoopsModuleConfig['api_key']); $xoopsTpl->assign('default_lat', $xoopsModuleConfig['default_lat']); $xoopsTpl->assign('default_lon', $xoopsModuleConfig['default_lon']); $xoopsTpl->assign('default_zoom', $xoopsModuleConfig['default_zoom']); $xoopsTpl->assign('default_address', $xoopsModuleConfig['default_address']); // hack LUCIO - end if ($xoopsModuleConfig['useshots'] == 1) { $xoopsTpl->assign('shotwidth', $xoopsModuleConfig['shotwidth']); $xoopsTpl->assign('tablewidth', $xoopsModuleConfig['shotwidth'] + 10); $xoopsTpl->assign('show_screenshot', true); $xoopsTpl->assign('lang_noscreenshot', _MD_NOSHOTS); } if (!empty($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) { $isadmin = true; } else { $isadmin = false; } $fullcountresult=$xoopsDB->query("SELECT count(*) FROM ".$xoopsDB->prefix("addresses_links")." WHERE cid=$cid and status>0"); list($numrows) = $xoopsDB->fetchRow($fullcountresult); $page_nav = ''; if($numrows>0) { $xoopsTpl->assign('lang_description', _MD_DESCRIPTIONC); $xoopsTpl->assign('lang_address', _MD_ADDRESS); $xoopsTpl->assign('lang_zip', _MD_ZIP); $xoopsTpl->assign('lang_city', _MD_CITY); $xoopsTpl->assign('lang_country', _MD_COUNTRY); $xoopsTpl->assign('lang_phone', _MD_PHONE); $xoopsTpl->assign('lang_fax', _MD_FAX); $xoopsTpl->assign('lang_mobile', _MD_MOBILE); $xoopsTpl->assign('lang_contemail', _MD_CONTEMAIL); $xoopsTpl->assign('lang_opened', _MD_OPENED); $xoopsTpl->assign('lang_viewmore', _MD_VIEWMORE); $xoopsTpl->assign('lang_lastupdate', _MD_LASTUPDATEC); $xoopsTpl->assign('lang_hits', _MD_HITSC); $xoopsTpl->assign('lang_rating', _MD_RATINGC); $xoopsTpl->assign('lang_ratethissite', _MD_RATETHISSITE); $xoopsTpl->assign('lang_reportbroken', _MD_REPORTBROKEN); $xoopsTpl->assign('lang_tellafriend', _MD_TELLAFRIEND); $xoopsTpl->assign('lang_modify', _MD_MODIFY); $xoopsTpl->assign('lang_category' , _MD_CATEGORYC); $xoopsTpl->assign('lang_visit' , _MD_VISIT); $xoopsTpl->assign('show_links', true); $xoopsTpl->assign('lang_comments' , _COMMENTS); // hack LUCIO - start (l.lon, l.lat, l.zoom) $sql = "SELECT l.lid, l.cid, l.title, l.address, l.zip, l.city, l.country, l.lon, l.lat, l.zoom, l.phone, l.mobile, l.fax, l.contemail, l.opentime, l.url, l.logourl, l.status, l.date, l.hits, l.rating, l.votes, l.comments, t.description"; $sql.= " FROM ".$xoopsDB->prefix("addresses_links")." l, ".$xoopsDB->prefix("addresses_links_text")." t"; $sql.= " WHERE cid=$cid AND l.lid=t.lid AND status>0"; $sql.= " ORDER BY $orderby"; // hack LUCIO - end $result=$xoopsDB->query($sql,$show,$min); //if 2 or more items in result, show the sort menu if($numrows>1) { $xoopsTpl->assign('show_nav', true); $orderbyTrans = convertorderbytrans($orderby); $xoopsTpl->assign('lang_sortby', _MD_SORTBY); $xoopsTpl->assign('lang_title', _MD_TITLE); $xoopsTpl->assign('lang_date', _MD_DATE); $xoopsTpl->assign('lang_rating', _MD_RATING); $xoopsTpl->assign('lang_popularity', _MD_POPULARITY); $xoopsTpl->assign('lang_cursortedby', sprintf(_MD_CURSORTEDBY, convertorderbytrans($orderby))); } // hack LUCIO - start ($lon, $lat, $zoom) while(list($lid, $cid, $ltitle, $address, $zip, $city, $country, $lon, $lat, $zoom, $phone, $mobile, $fax, $contemail, $opentime, $url, $logourl, $status, $time, $hits, $rating, $votes, $comments, $description) = $xoopsDB->fetchRow($result)) // hack LUCIO - end { if ($isadmin) {$adminlink = ''; $adminlink.= ' ![]() $adminlink.= '';} else {$adminlink = '';} if ($votes == 1) {$votestring = _MD_ONEVOTE;} else {$votestring = sprintf(_MD_NUMVOTES,$votes);} $path = $mytree->getPathFromId($cid, "title"); $path = substr($path, 1); $path = str_replace("/"," ![]() $new = newlinkgraphic($time, $status); $pop = popgraphic($hits); //JE moet hieronder nog aanpassen ivm tonen... $xoopsTpl->append('links', array( 'id' => $lid, 'cid' => $cid, 'rating' => number_format($rating, 2), // hack LUCIO - start 'title' => $myts->makeTboxData4Show($ltitle), 'new' => $new, 'pop' => $pop, // hack LUCIO - end 'category' => $path, 'logourl' => $myts->makeTboxData4Show($logourl), 'address' => $myts->makeTboxData4Show($address), 'zip' => $myts->makeTboxData4Show($zip), 'city' => $myts->makeTboxData4Show($city), 'country' => $myts->makeTboxData4Show($country), // hack LUCIO - start 'lon' => $lon, 'lat' => $lat, 'zoom' => $zoom, // hack LUCIO - end 'phone' => $myts->makeTboxData4Show($phone), 'fax' => $myts->makeTboxData4Show($fax), 'mobile' => $myts->makeTboxData4Show($mobile), 'contemail' => $myts->makeTboxData4Show($contemail), 'opentime' => $myts->makeTboxData4Show($opentime), 'updated' => formatTimestamp($time,"m"), 'description' => $myts->makeTareaData4Show($description,0), 'adminlink' => $adminlink, 'hits' => $hits, 'comments' => $comments, 'votes' => $votestring, 'mail_subject' => rawurlencode(sprintf(_MD_INTRESTLINK,$xoopsConfig['sitename'])), 'mail_body' => rawurlencode(sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/addresses/singlelink.php?cid='.$cid.'&lid='.$lid) )); } $orderby = convertorderbyout($orderby); //Calculates how many pages exist. Which page one should be on, etc... $linkpages = ceil($numrows / $show); //Page Numbering if ($linkpages!=1 && $linkpages!=0) { $cid = intval($_GET['cid']); $prev = $min - $show; if ($prev>=0) { $page_nav .= "« "; } $counter = 1; $currentpage = ($max / $show); while ( $counter<=$linkpages ) { $mintemp = ($show * $counter) - $show; if ($counter == $currentpage) { $page_nav .= "($counter) "; } else { $page_nav .= "$counter "; } $counter++; } if ( $numrows>$max ) { $page_nav .= ""; $page_nav .= "»"; } } } $xoopsTpl->assign('page_nav', $page_nav); include XOOPS_ROOT_PATH.'/footer.php'; ?> ************************************************************ Aktuelle Version: // $Id: viewcat.php,v 1.12 2003/03/27 12:11:07 w4z004 Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // // <http://www.xoops.org/> // // ------------------------------------------------------------------------- // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or // // (at your option) any later version. // // // // You may not change or alter any portion of this comment or credits // // of supporting developers from this source code or any supporting // // source code which is considered copyrighted (c) material of the // // original comment or credit authors. // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY; without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License for more details. // // // // You should have received a copy of the GNU General Public License // // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // include "header.php"; $myts =& MyTextSanitizer::getInstance(); // MyTextSanitizer object include_once XOOPS_ROOT_PATH."/class/xoopstree.php"; $mytree = new XoopsTree($xoopsDB->prefix("addresses_cat"),"cid","pid"); $cid = intval($_GET['cid']); $xoopsOption['template_main'] = 'addresses_viewcat.html'; include XOOPS_ROOT_PATH."/header.php"; if (isset($_GET['show'])) { $show = intval($_GET['show']); } else { $show = $xoopsModuleConfig['perpage']; } $min = isset($_GET['min']) ? intval($_GET['min']) : 0; if (!isset($max)) { $max = $min + $show; } if(isset($_GET['orderby'])) { $orderby = convertorderbyin($_GET['orderby']); } else { $orderby = "title ASC"; } // hack LUCIO - start $pathstring = ""; //$pathstring = ""._MD_MAIN." : "; $pathstring .= $mytree->getNicePathFromId($cid, "title", "viewcat.php?op="); $pathstring = str_replace(':', '>', $pathstring); //$pathstring = ""._MD_MAIN." : "; //$pathstring .= $mytree->getNicePathFromId($cid, "title", "viewcat.php?op="); // hack LUCIO - end $xoopsTpl->assign('category_path', $pathstring); $xoopsTpl->assign('category_id', $cid); // hack LUCIO - start $sql = "SELECT title, imgurl, show_map"; $sql.= " FROM ".$xoopsDB->prefix("addresses_cat"); $sql.= " WHERE cid=".$cid; $result=$xoopsDB->query($sql) or exit("Error"); list($title, $imgurl, $show_map) = $xoopsDB->fetchRow($result); $description = ""; $sql = "SELECT description"; $sql.= " FROM ".$xoopsDB->prefix("addresses_cat_text"); $sql.= " WHERE cid=".$cid; $result=$xoopsDB->query($sql) or exit("Error"); list($description) = $xoopsDB->fetchRow($result); if ($imgurl && $imgurl != "http://") {$imgurl = $myts->makeTboxData4Edit($imgurl);} else {$imgurl = '';} $xoopsTpl->assign('category_title', $myts->makeTboxData4Show($title)); $xoopsTpl->assign('category_imgurl', $imgurl); $xoopsTpl->assign('category_show_map', $show_map); $xoopsTpl->assign('category_description', $myts->makeTareaData4Show($description,0)); // hack LUCIO - end // get child category objects $arr=array(); $arr=$mytree->getFirstChild($cid, "title"); if ( count($arr) > 0 ) { $scount = 1; foreach($arr as $ele) { $sub_arr=array(); $sub_arr=$mytree->getFirstChild($ele['cid'], "title"); $space = 0; $chcount = 0; $infercategories = ""; foreach($sub_arr as $sub_ele) { $chtitle=$myts->makeTboxData4Show($sub_ele['title']); if ($chcount>5) { $infercategories .= "..."; break; } if ($space>0) { $infercategories .= ", "; } $infercategories .= "".$chtitle.""; $space++; $chcount++; } $xoopsTpl->append('subcategories', array( 'title' => $myts->makeTboxData4Show($ele['title']), 'id' => $ele['cid'], 'infercategories' => $infercategories, 'totallinks' => getTotalItems($ele['cid'], 1), 'count' => $scount )); $scount++; } } // hack LUCIO - start $xoopsTpl->assign('api_key', $xoopsModuleConfig['api_key']); $xoopsTpl->assign('default_lat', $xoopsModuleConfig['default_lat']); $xoopsTpl->assign('default_lon', $xoopsModuleConfig['default_lon']); $xoopsTpl->assign('default_zoom', $xoopsModuleConfig['default_zoom']); $xoopsTpl->assign('default_address', $xoopsModuleConfig['default_address']); // hack LUCIO - end if ($xoopsModuleConfig['useshots'] == 1) { $xoopsTpl->assign('shotwidth', $xoopsModuleConfig['shotwidth']); $xoopsTpl->assign('tablewidth', $xoopsModuleConfig['shotwidth'] + 10); $xoopsTpl->assign('show_screenshot', true); $xoopsTpl->assign('lang_noscreenshot', _MD_NOSHOTS); } if (!empty($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) { $isadmin = true; } else { $isadmin = false; } $fullcountresult=$xoopsDB->query("SELECT count(*) FROM ".$xoopsDB->prefix("addresses_links")." WHERE cid=$cid and status>0"); list($numrows) = $xoopsDB->fetchRow($fullcountresult); $page_nav = ''; if($numrows>0) { $xoopsTpl->assign('lang_description', _MD_DESCRIPTIONC); $xoopsTpl->assign('lang_address', _MD_ADDRESS); $xoopsTpl->assign('lang_zip', _MD_ZIP); $xoopsTpl->assign('lang_city', _MD_CITY); $xoopsTpl->assign('lang_country', _MD_COUNTRY); $xoopsTpl->assign('lang_phone', _MD_PHONE); $xoopsTpl->assign('lang_fax', _MD_FAX); $xoopsTpl->assign('lang_mobile', _MD_MOBILE); $xoopsTpl->assign('lang_contemail', _MD_CONTEMAIL); $xoopsTpl->assign('lang_opened', _MD_OPENED); $xoopsTpl->assign('lang_viewmore', _MD_VIEWMORE); $xoopsTpl->assign('lang_lastupdate', _MD_LASTUPDATEC); $xoopsTpl->assign('lang_hits', _MD_HITSC); $xoopsTpl->assign('lang_rating', _MD_RATINGC); $xoopsTpl->assign('lang_ratethissite', _MD_RATETHISSITE); $xoopsTpl->assign('lang_reportbroken', _MD_REPORTBROKEN); $xoopsTpl->assign('lang_tellafriend', _MD_TELLAFRIEND); $xoopsTpl->assign('lang_modify', _MD_MODIFY); $xoopsTpl->assign('lang_category' , _MD_CATEGORYC); $xoopsTpl->assign('lang_visit' , _MD_VISIT); $xoopsTpl->assign('show_links', true); $xoopsTpl->assign('lang_comments' , _COMMENTS); // hack LUCIO - start (l.lon, l.lat, l.zoom) $sql = "SELECT l.lid, l.cid, l.title, l.address, l.zip, l.city, l.country, l.lon, l.lat, l.zoom, l.phone, l.mobile, l.fax, l.contemail, l.opentime, l.url, l.logourl, l.status, l.date, l.hits, l.rating, l.votes, l.comments, t.description"; $sql.= " FROM ".$xoopsDB->prefix("addresses_links")." l, ".$xoopsDB->prefix("addresses_links_text")." t"; $sql.= " WHERE cid=$cid AND l.lid=t.lid AND status>0"; $sql.= " ORDER BY $orderby"; // hack LUCIO - end $result=$xoopsDB->query($sql,$show,$min); //if 2 or more items in result, show the sort menu if($numrows>1) { $xoopsTpl->assign('show_nav', true); $orderbyTrans = convertorderbytrans($orderby); $xoopsTpl->assign('lang_sortby', _MD_SORTBY); $xoopsTpl->assign('lang_title', _MD_TITLE); $xoopsTpl->assign('lang_date', _MD_DATE); $xoopsTpl->assign('lang_rating', _MD_RATING); $xoopsTpl->assign('lang_popularity', _MD_POPULARITY); $xoopsTpl->assign('lang_cursortedby', sprintf(_MD_CURSORTEDBY, convertorderbytrans($orderby))); } // hack LUCIO - start ($lon, $lat, $zoom) while(list($lid, $cid, $ltitle, $address, $zip, $city, $country, $lon, $lat, $zoom, $phone, $mobile, $fax, $contemail, $opentime, $url, $logourl, $status, $time, $hits, $rating, $votes, $comments, $description) = $xoopsDB->fetchRow($result)) // hack LUCIO - end { if ($isadmin) {$adminlink = ''; $adminlink.= ' ![]() $adminlink.= '';} else {$adminlink = '';} if ($votes == 1) {$votestring = _MD_ONEVOTE;} else {$votestring = sprintf(_MD_NUMVOTES,$votes);} $path = $mytree->getPathFromId($cid, "title"); $path = substr($path, 1); $path = str_replace("/"," ![]() $new = newlinkgraphic($time, $status); $pop = popgraphic($hits); //JE moet hieronder nog aanpassen ivm tonen... $xoopsTpl->append('links', array( 'id' => $lid, 'cid' => $cid, 'rating' => number_format($rating, 2), // hack LUCIO - start 'title' => $myts->makeTboxData4Show($ltitle), 'new' => $new, 'pop' => $pop, // hack LUCIO - end 'category' => $path, 'logourl' => $myts->makeTboxData4Show($logourl), 'address' => $myts->makeTboxData4Show($address), 'zip' => $myts->makeTboxData4Show($zip), 'city' => $myts->makeTboxData4Show($city), 'country' => $myts->makeTboxData4Show($country), // hack LUCIO - start 'lon' => $lon, 'lat' => $lat, 'zoom' => $zoom, // hack LUCIO - end 'phone' => $myts->makeTboxData4Show($phone), 'fax' => $myts->makeTboxData4Show($fax), 'mobile' => $myts->makeTboxData4Show($mobile), 'contemail' => $myts->makeTboxData4Show($contemail), 'opentime' => $myts->makeTboxData4Show($opentime), 'updated' => formatTimestamp($time,"m"), 'description' => $myts->makeTareaData4Show($description,0), 'adminlink' => $adminlink, 'hits' => $hits, 'comments' => $comments, 'votes' => $votestring, 'mail_subject' => rawurlencode(sprintf(_MD_INTRESTLINK,$xoopsConfig['sitename'])), 'mail_body' => rawurlencode(sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/addresses/singlelink.php?cid='.$cid.'&lid='.$lid) )); } $orderby = convertorderbyout($orderby); //Calculates how many pages exist. Which page one should be on, etc... $linkpages = ceil($numrows / $show); //Page Numbering if ($linkpages!=1 && $linkpages!=0) { $cid = intval($_GET['cid']); $prev = $min - $show; if ($prev>=0) { $page_nav .= "« "; } $counter = 1; $currentpage = ($max / $show); while ( $counter<=$linkpages ) { $mintemp = ($show * $counter) - $show; if ($counter == $currentpage) { $page_nav .= "($counter) "; } else { $page_nav .= "$counter "; } $counter++; } if ( $numrows>$max ) { $page_nav .= ""; $page_nav .= "»"; } } } $xoopsTpl->assign('page_nav', $page_nav); include XOOPS_ROOT_PATH.'/footer.php'; ?> *********************************************************** Gruß harry27
Geschrieben: 29.01.2010
|
|||
|
Gast
|
Aw:: Sortierung nach Postleitzahl in Modul ADDRESSES |
Gast-Gast
|
Zitat:
Der Script ist soweit OK. Was mir hier nur auffällt ist deine Parameterübergabe. Ändere mal &orderby=zipA in &orderby=zip%20ASC ab, dann sollte es funktionieren. Es sei denn, dass die Funktion convertorderbytrans() den Parameter verändert. Eventuell den source von convertorderbytrans() hier noch posten.
Geschrieben: 30.01.2010
|
|||
|
Aw:: Sortierung nach Postleitzahl in Modul ADDRESSES |
![]() ![]() |
Zitat:
liegt daran, das php Dateien geuplodet werden sollten. Das ist generell nicht möglich. Also entweder als txt oder zip Datei.
Geschrieben: 30.01.2010
|
|||
|
Aw:: Sortierung nach Postleitzahl in Modul ADDRESSES |
![]() ![]() |
I hope you understand english.
Since the adresses module (1.7) original was made by me, later on the google map hack was added by lucio... To change the order you also have to adjust the php script: addresses/include: functions.php Prox line 49 - Link sorting function order by title order by ... Prox line 92 order by title order by ... you need to change title into city Keep in mind that this will NOT change the sort order option above the overview. This will still be title/date etc. If you want to change this, than you have to adjust this also. Instead of title, city. Or you can add antoher sort option. Look for: //if 2 or more items in result, show the sort menu You can copy and paste the below code. As you can see I ADDED the option City.
//if 2 or more items in result, show the sort menu
Then you need to adjust the template: addresses_viewcat.html Look for:
<{if $show_nav == true}>
Here you need to change the first 2 line sort by titleA into cityA and titleD into cityD. Now the standard sortorder will be on city. I would advice you if you do this to add the sortorder title option into the order option menu.. In this case just copy the sortorderlines with titleA/titleD and change title into city. Hope this will help you in the right direction. Grtz., Shine
Geschrieben: 31.01.2010
|
|||
|
Aw:: Sortierung nach Postleitzahl in Modul ADDRESSES |
![]() ![]() |
Hello Shine,
thanks for your answer. Maybe there is a misunderstanding. I have already done some changings in the code successfully - see: http://www.mittagessen-deutschland.de ... resses/viewcat.php?cid=10. The sorting for "city" already is OK!!! Only the sorting of the zip-code was NOT successful. Concerning your suggestions: 1) Functions.php: I can not find the code prox lines 42 and 92. So you will find attached my functions.php in txt-file. 2) I have already included a line with $xoopsTpl->assign('lang_zip', _MD_ZIP); in viewcat.php (see my posting 29.01 22:24, second part of the quoting ***"Aktuelle Version"***) 3) I have already changed the addresses_viewcat.html as suggested by you - see my very first posting 29.01 10:24 I hope you can help me. Thanks & best regards Harry 27 Datei anhängen: Link nur für registrierte User sichtbar
Geschrieben: 01.02.2010
|
|||
|