MyXoops Forum

Aw:: Sortierung nach Postleitzahl in Modul ADDRESSES [Das aktuelle XOOPS-Update] - myXOOPS German Support

harry27

"myXOOPs"-Neuling
Gepostet am:01.02.2010 15:24
harry27
harry27 Offline (Show more)
"myXOOPs"-Neuling
Posts: 23
Since: 28.01.2010
#11

Aw:: Sortierung nach Postleitzahl in Modul ADDRESSES

Hallo Josef,

danke erstmal für die Unterstützung. Die Änderung mit orderby=zip%20ASC alleine bringt nicht den gewünschten Erfolg.

Daher noch

function convertorderbytrans($orderby)
{
if ($orderby == "hits ASC") $orderbyTrans = ""._MD_POPULARITYLTOM."";
if ($orderby == "hits DESC") $orderbyTrans = ""._MD_POPULARITYMTOL."";
if ($orderby == "title ASC") $orderbyTrans = ""._MD_TITLEATOZ."";
if ($orderby == "title DESC") $orderbyTrans = ""._MD_TITLEZTOA."";
if ($orderby == "date ASC") $orderbyTrans = ""._MD_DATEOLD."";
if ($orderby == "date DESC") $orderbyTrans = ""._MD_DATENEW."";
if ($orderby == "rating ASC") $orderbyTrans = ""._MD_RATINGLTOH."";
if ($orderby == "rating DESC") $orderbyTrans = ""._MD_RATINGHTOL."";
// hack LUCIO - start
if ($orderby == "zip ASC") $orderbyTrans = ""._MD_ZIPATOZ."";
if ($orderby == "zip DESC") $orderbyTrans = ""._MD_ZIPZTOA."";
if ($orderby == "city ASC") $orderbyTrans = ""._MD_CITYATOZ."";
if ($orderby == "city DESC") $orderbyTrans = ""._MD_CITYZTOA."";
// hack LUCIO - end
return $orderbyTrans;
}



Gruß und nochmals vielen Dank

Harry27

harry27

"myXOOPs"-Neuling
Gepostet am:01.02.2010 14:00
harry27
harry27 Offline (Show more)
"myXOOPs"-Neuling
Posts: 23
Since: 28.01.2010
#10

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 Benutzer

Advertisement

Gepostet am:0
Advertisement (Show more)
Posts: 0
Since: 0


Hier könnten Sie Ihre Anzeige aufgeben!
Bitte kontaktieren Sie uns, um mehr darüber zu erfahren.

Shine

"myXOOPs"-Neuling
Gepostet am:31.01.2010 22:55
Shine
Shine Offline (Show more)
"myXOOPs"-Neuling
Posts: 91
Since: 02.11.2002
#9

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
    
if($numrows>1){
        
$xoopsTpl->assign('show_nav'true);
        
$orderbyTrans convertorderbytrans($orderby);
        
$xoopsTpl->assign('lang_sortby'_MD_SORTBY);
        
$xoopsTpl->assign('lang_city'_MD_CITY);
        
$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_CURSORTEDBYconvertorderbytrans($orderby)));

Then you need to adjust the template:
addresses_viewcat.html
Look for:
<{if $show_nav == true}>
      <
div><{$lang_sortby}>&nbsp;&nbsp;<{$lang_title}> (<a href="viewcat.php?cid=<{$category_id}>&orderby=titleA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&orderby=titleD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>)<{$lang_date}> (<a href="viewcat.php?cid=<{$category_id}>&orderby=dateA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&orderby=dateD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>)<{$lang_rating}> (<a href="viewcat.php?cid=<{$category_id}>&orderby=ratingA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&orderby=ratingD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>)<{$lang_popularity}> (<a href="viewcat.php?cid=<{$category_id}>&orderby=hitsA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&orderby=hitsD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>)
      <
br /><b><{$lang_cursortedby}></b>
      </
div>

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


alfred

Administrator
Gepostet am:30.01.2010 12:42
alfred
alfred Offline (Show more)
Administrator
Posts: 7618
Since: 06.12.2004
#8

Aw:: Sortierung nach Postleitzahl in Modul ADDRESSES

Zitat:

feichtl schrieb:
Indem du in dem Dateinamen nur einen Punkt (.) verwendest! Dem Protector (ärks) stoßen zwei Punkte (..) im Dateinamen sauer auf.


liegt daran, das php Dateien geuplodet werden sollten. Das ist generell nicht möglich. Also entweder als txt oder zip Datei.

Gast

Gepostet am:30.01.2010 11:06
Gast
Gast (Show more)
Posts: 0
Since:
#7

Aw:: Sortierung nach Postleitzahl in Modul ADDRESSES

Zitat:
harry27 schrieb:
<--!
<{
$lang_zip}>
(<
a href="viewcat.php?cid=<{$category_id}>&orderby=zipA"><img src="images/up.gif" border="0" align="middle" alt="" />
</
a><a href="viewcat.php?cid=<{$category_id}>&orderby=zipD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>)
-->
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.

harry27

"myXOOPs"-Neuling
Gepostet am:29.01.2010 22:24
harry27
harry27 Offline (Show more)
"myXOOPs"-Neuling
Posts: 23
Since: 28.01.2010
#6

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: 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.= ''._MD_EDITTHISLINK.''; $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("/"," ",$path); $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: 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.= ''._MD_EDITTHISLINK.''; $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("/"," ",$path); $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

feichtl

Ehrenmitglied
Gepostet am:29.01.2010 21:57
feichtl
feichtl Offline (Show more)
Ehrenmitglied
Posts: 2650
Since: 11.06.2004
#5

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.

harry27

"myXOOPs"-Neuling
Gepostet am:29.01.2010 18:00
harry27
harry27 Offline (Show more)
"myXOOPs"-Neuling
Posts: 23
Since: 28.01.2010
#4

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

Muki

Co-Administrator
Gepostet am:29.01.2010 14:38
Muki
Muki Offline (Show more)
Co-Administrator
Posts: 1903
Since: 18.04.2006
#3

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
Es gibt keine dummen Fragen, nur dumme Antworten (Ausnahmen bestätigen die Regel).

Gast

Gepostet am:29.01.2010 12:30
Gast
Gast (Show more)
Posts: 0
Since:
#2

Aw:: Sortierung nach Postleitzahl in Modul ADDRESSES

kannst du mal den script viewcat.php zur Verfügung stellen.

(Datei anhängen und hochladen)
Diesen Thread durchsuchen:  1 Anonyme Benutzer

Aktuell aus dem Forum

Forum Thema Antworten Views Letzter Beitrag
OffOffTopic [Wichtig] Übernahme myXOOPS 0 491 11.12.2023 18:57
alfred Gehe zum letzten Beitrag
Die Installation und Administration von XOOPS 2.5.X [Offen] Upgrade 2.5.11 3 2202 07.05.2023 07:03
Goffy Gehe zum letzten Beitrag