Version 1.5.1: Sitemap Bug!?

Please report bugs here!

Moderator: Thorsten

Post Reply
rom
Posts: 15
Joined: Tue Jul 12, 2005 9:48 am

Version 1.5.1: Sitemap Bug!?

Post by rom »

Hallo

PHP Version 5.0.2
IIS 5.0 Win2k Server
MySQL 4.0.22

Wir haben heute auf phpmyFAQ Version 1.5.1 geupdatet, und gleich mal das Sitemap-Feature testen wollen. Leider scheint die Sitemap nur zu funktionieren, wenn man die mod_rewrite funktion nutzt, da Links innerhalb der Sitemap auf html-Seiten verweisen statt auf die index.php+Parameter.

Meines Wissens ist mod_rewrite aber nur unter einem Apache Webserver möglich, nicht bei unserem IIS.

Meine Frage: Gibt es eine Möglichkeit mod_rewrite unter IIS zu aktivieren? Oder die Sitemap-Funktionalität auch ohne mod_rewrite zu betreiben?

Edit:
sitemap.php, Line 35:

Code: Select all

if (isset($PMF_CONF["mod_rewrite"]) && $PMF_CONF["mod_rewrite"] == "TRUE") {
Dort hast du eine Abfrage für mod_rewrite, das funktioniert auch super. Aber unter sitemap.php, Line 47 fehlt diese Abfrage :(
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

teste doch mal diese Version der sitemap.php:

Code: Select all

<?php
/**
* $Id: sitemap.php,v 1.1.2.3 2005/09/19 12:08:37 thorstenr Exp $
*
* Shows the whole FAQ articles
*
* @author       Thomas Zeithaml <seo@annatom.de>
* @author       Thorsten Rinne <thorsten@phpmyfaq.de>
* @since        2005-08-21
* @copyright    (c) 2001-2005 phpMyFAQ Team
* 
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the 'License'); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
* 
* Software distributed under the License is distributed on an 'AS IS'
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*/

Tracking('sitemap', 0);

if (isset($_REQUEST['letter']) ) {
	$currentLetter = $db->escape_string($_REQUEST['letter']);
} else {
    $currentLetter = 'A';
}

$writeLetters = '<p>';
$result = $db->query("SELECT DISTINCT substring(thema, 1, 1) AS letters FROM ".SQLPREFIX."faqdata WHERE lang = '".$lang."' AND active = 'yes' ORDER BY letters");
while ($row = $db->fetch_object($result)) {
	$letters = stripslashes($row->letters);
	if (isset($PMF_CONF["mod_rewrite"]) && $PMF_CONF["mod_rewrite"] == "TRUE") {
        $writeLetters .= '<a href="sitemap-'.$letters.'.html">'.$letters.'</a> ';
	} else {
	    $writeLetters .= '<a href="'.$_SERVER["PHP_SELF"].'?'.$sids.'action=sitemap&letter='.$letters.'">'.$letters.'</a> ';
	}
}
$writeLetters .= '</p>';

$writeMap = '<ul>';
$result = $db->query('SELECT a.thema, a.id, a.lang, b.category_id, a.content AS snap FROM '.SQLPREFIX.'faqdata a, '.SQLPREFIX.'faqcategoryrelations b WHERE a.id = b.record_id AND substring(thema, 1, 1) = "'.$currentLetter.'" AND lang = "'.$lang.'" AND active = "yes"');

while ($row = $db->fetch_object($result)) {
    if (isset($PMF_CONF["mod_rewrite"]) && $PMF_CONF["mod_rewrite"] == "TRUE") {
        $writeMap .= '<li><a href="'.$row->category_id.'_'.$row->id.'_'.$row->lang.'.html">'.stripslashes($row->thema) ."</a><br />\n";
    } else {
        $writeMap .= '<li><a href="index.php?'.$sids.'action=artikel&cat='.$row->category_id.'&id='.$row->id.'&artlang='.$row->lang.'">'.stripslashes($row->thema) ."</a><br />\n";
    }
	$writeMap .= stripslashes(chopString(strip_tags($row->snap), 25)). "</li>\n";
}
$writeMap .= '</ul>';

$tpl->processTemplate ('writeContent', array(
				       'writeLetters' => $writeLetters,
                       'writeMap' => $writeMap,
					   'writeCuttentLetter' => $currentLetter
						));

$tpl->includeTemplate('writeContent', 'index');
Für den IIS gibts auch Support für ISAPI_rewrite in der Datei httpd.ini.

Danke für deinen Hinweis!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
rom
Posts: 15
Joined: Tue Jul 12, 2005 9:48 am

Post by rom »

funktioniert super, vielen dank!
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

gut, ist seit eben im CVS eingecheckt. Ob ich dafür aber eine neue Version herausbringe, weiß ich noch nicht.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
jr-ewing
Posts: 37
Joined: Sun Jul 10, 2005 6:52 pm
Location: Germany
Contact:

Post by jr-ewing »

Sorry, an IIS hab ich nicht gedacht :-)
Mein Baby Lexikon | Gegen Contentdiebstahl -> Spider Trap
rom
Posts: 15
Joined: Tue Jul 12, 2005 9:48 am

Post by rom »

jo macht ja nix, thorsten konnte ja helfen.
schade halt nur das mit dem release 1.5.1 die sitemap als neues feature angepriesen wird, aber dann beim iis nicht läuft. und sofort ne version 1.5.2 zu releasen deswegen wäre extrem nervig.
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

die 1.5.2 ist eh schon in Arbeit und kommt sicher bald. :-)

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply