Author |
Message |
KennyW
Hangin' Around

Joined: Jul 15, 2004
Posts: 44
|
Posted:
Sun Nov 27, 2005 9:05 am |
|
Anybody who knows how to get sitemap and backend googletaped ? |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sun Nov 27, 2005 9:10 am |
|
KennyW, For backend.php, I believe you will have to modify the code directly since calls to this will not be going through the GT code in the core nuke files. You will need to modify the code which writes to headlines links to match your GT statements in your GT-News.php and .htaccess files.
I am not familiar with a tool/module for "sitemap". Are you referring to some tool that is generating a sitemap for you? If so, you will need to take the output from that generation process, and similarly to backend.php, you'll need to manually change the links to match your respective GT and .htaccess files. A good text editor, such as Textpad or UltraEdit, will help you make those find/replace edits. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
KennyW

|
Posted:
Sun Nov 27, 2005 9:20 am |
|
removed |
Last edited by KennyW on Sun Nov 27, 2005 2:30 pm; edited 1 time in total |
|
|
 |
Susann
Moderator

Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support
|
Posted:
Sun Nov 27, 2005 10:05 am |
|
|
|
 |
KennyW

|
Posted:
Sun Nov 27, 2005 10:56 am |
|
removed |
Last edited by KennyW on Sun Nov 27, 2005 2:30 pm; edited 2 times in total |
|
|
 |
Susann

|
Posted:
Sun Nov 27, 2005 1:32 pm |
|
I´m afraid I´m not the sitemap expert and I´m not using any sitemaps therefore I ´can´t help. But there are different addresses to generate a sitemap for your nuke website I´m sure you `ll find the best address here in the forum.
Some month before I have generate a sitemap.xml but just for fun. Your sitemap should look something like this.
Quote: | <?xml version="1.0" encoding="UTF-8" ?>
- <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
- <url>
<loc>http://www.mysite.de/</loc>
<lastmod>2005-08-12</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
- <url>
<loc>http://www.mysite.de/account.html</loc>
<lastmod>2005-08-12</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
- <url>
<loc>http://www.mysite.de/downloads.html</loc>
<lastmod>2005-08-12</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<loc>http://www.mysite.de/news.html</loc>
<lastmod>2005-08-12</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
etc. etc. |
|
Last edited by Susann on Sun Nov 27, 2005 1:45 pm; edited 1 time in total |
|
|
 |
KennyW

|
Posted:
Sun Nov 27, 2005 1:44 pm |
|
Well i got it working,thanks for the help below are the sitemapscript i use,i'm not sure that it will suite all sites but it is just to edit line 66 in Sitemap and line 65 in RSS2.0
Sitemap
Code:<?php
/**
* Google-Sitemap (sitemap.php)
* <code>
* XMG-Modul-ID 71
* Google-Sitemap Erweiterung
* ~
* Help on http://guggemahier.de/help:google-sitemap
* ~
* This Modul is tested with:
* - mmc-XMG larger Version 3.x from http://guggemahier.de
* - vkpMX2.1a and pragmaMX 0.1 from http://pragmamx.org
* - C-Portal Light from http://c-portal.de
* - PHPNuke larger Version 5.5 from http://phpnuke.org
* - PHP-Version 4.10
* ~
* * Output completly XML
* * Documentation german only!
*
* __
* __ __ (__) ___ ___ ___
* / \/ \/ \/ __\/ _// \
* <___\/___>__/\___/\_\ \___/
* ______ ____ __ _
* / ____/___ / / /__ _____/ /_(_)___ ____
* / / / __ \/ / / _ \/ ___/ __/ / __ \/ __ \
* / /___/ /_/ / / / __/ /__/ /_/ / /_/ / / / /
* \____/\____/_/_/\___/\___/\__/_/\____/_/ /_/
* ® 2002/2005 http://guggemahier.de
* google-sitemap 1.0
* </code>
*
*
* Preview: http://guggemahier.de/sitemap.php
* http://guggemahier.de
*
* @link http://guggemahier.de Micro's Home
* @version $Id: sitemap.php,v 1.3 2005/10/03 18:47:28 micro Exp $
* @copyright 2005 by microg
* @since 20.05.2005
* @deprec Vorläufige Dokumentation!
* This module is open license, if the last line is not changed or is not deleted! All rights reserved by micro http://guggemahier.de
* @license This module is open license, if the last line is not changed or is not deleted! All rights reserved by micro
*/
define('mmc_sys', "system");
if(file_exists(mmc_sys . "/mmc_sys_init.php")){
require_once(mmc_sys . "/mmc_sys_init.php");
}else{
include ("mainfile.php");
}
// Settings
// sitemap.xml muss vorhanden und mit Schreibrechten versehen sein!
$fileout = 0;
$res = sql_query("SELECT sid, time FROM " . $prefix . "_stories ORDER BY sid ASC", $dbi);
$out = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd\">";
while($result = sql_fetch_array($res, $dbi, MYSQL_ASSOC)){
$time = explode(" ", $result["time"]);
$out .= "
<url>
<loc>$nukeurl/article" . $result["sid"] . ".html</loc>
<lastmod>" . $time[0] . "</lastmod>
<changefreq>never</changefreq>
<priority>1.0</priority>
</url>";
}
$time = date("Y-m-d", time());
$res = sql_query("SELECT topicid FROM " . $prefix . "_topics", $dbi);
// Listet die Topis
while($result = sql_fetch_array($res, $dbi, MYSQL_ASSOC)){
$out .= "
<url>
<loc>$nukeurl/modules.php?name=News&new_topic=" . $result["topicid"] . "</loc>
<lastmod>" . $time . "</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>";
}
// do not touch this!
// Diese Zeile NICHT ändern!
// This module is open license, if this lines is not changed or is not deleted!
$out .= "
<url>
<loc>http://guggemahier.de</loc>
<lastmod>" . $time . "</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>";
$out .= "\n</urlset>";
if(!empty($fileout)){
$file = fopen("sitemap.xml", "w");
fwrite($file, $out);
fclose($file);
}
header("Content-type: application/xml");
echo $out;
?>
|
RSS2.0
Code:<?php
/************************************************************************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.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. */
/* */
/************************************************************************/
/* Additional security checking code 2003 by chatserv */
/* http://www.nukefixes.com -- http://www.nukeresources.com */
/************************************************************************/
/* RSS/Atom feed created by Brennan Stehling (2004) */
/* http://brennan.offwhite.net/blog/ - http://portal.spiderlogic.com */
/************************************************************************/
@require_once("mainfile.php");
global $prefix, $db, $nukeurl;
header("Content-Type: text/xml");
$gmtdiff = date("O", time());
$gmtstr = substr($gmtdiff, 0, 3) . ":" . substr($gmtdiff, 3, 9);
$now = date("Y-m-d\TH:i:s", time());
$now = $now . $gmtstr;
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n";
echo "<rss version=\"2.0\" \n";
echo " xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n";
echo " xmlns:sy=\"http://purl.org/rss/1.0/modules/syndication/\"\n";
echo " xmlns:admin=\"http://webns.net/mvcb/\"\n";
echo " xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n\n";
echo "<channel>\n";
echo "<title>".htmlspecialchars($sitename)."</title>\n";
echo "<link>".htmlspecialchars($nukeurl)."</link>\n";
echo "<description>".$slogan."</description>\n";
echo "<dc:language>".$backend_language."</dc:language>\n";
echo "<dc:creator>".$adminmail."</dc:creator>\n";
echo "<dc:date>".$now."</dc:date>\n\n";
echo "<sy:updatePeriod>hourly</sy:updatePeriod>\n";
echo "<sy:updateFrequency>1</sy:updateFrequency>\n";
echo "<sy:updateBase>".$now."</sy:updateBase>\n\n";
$result = $db->sql_query("SELECT s.sid,t.topicname,s.informant,s.title,s.time,s.hometext FROM ".$prefix."_stories s, ".$prefix."_topics t where s.topic = t.topicid ORDER BY sid DESC LIMIT 10");
while ($row = $db->sql_fetchrow($result)) {
$rsid = intval($row['sid']);
$topicname = $row['topicname'];
$informant = $row['informant'];
$title = $row['title'];
$time = $row['time'];
$hometext = $row['hometext'];
// format: 2004-08-02T12:15:23-06:00
$date = date("Y-m-d\TH:i:s", strtotime($time));
$date = $date . $gmtstr;
echo "<item>\n";
echo "<title>".$title."</title>\n";
echo "<link>$nukeurl/article$row[sid].html</link>\n";
echo "<description>".htmlspecialchars($hometext)."</description>\n";
echo "<guid isPermaLink=\"false\">".$rsid."@".$nukeurl."</guid>\n";
echo "<dc:subject>".$topicname."</dc:subject>\n";
echo "<dc:date>".$date."</dc:date>\n";
echo "</item>\n\n";
}
echo "</channel>\n";
echo "</rss>\n";
?>
|
|
|
|
|
 |
Susann

|
Posted:
Sun Nov 27, 2005 2:20 pm |
|
Well, I know the site and also the German Nuke forum where the made promotion for this sitemap. A sitemap should be complete but it´s your choice. |
|
|
|
 |
KennyW

|
Posted:
Sun Nov 27, 2005 2:25 pm |
|
Yeah the adress is in there to Mirko he even helped me out with it,and I only need the sitemap for my news,but hey it's a start and you could easily build on this one and add more to it. |
Last edited by KennyW on Sun Nov 27, 2005 2:31 pm; edited 1 time in total |
|
|
 |
Susann

|
Posted:
Sun Nov 27, 2005 2:31 pm |
|
Quote: | I only need the sitemap for my news |
It´s ok.  |
|
|
|
 |
|