[ABD] Google sitemap mod

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
outdooreyes
Registered User
Posts: 5
Joined: Sat May 10, 2003 12:01 pm

Post by outdooreyes »

In the Google Site Map instructions, it indicates the following:

INSERT INTO `phpbb_config` VALUES ('sitemap_announce_priority', '1.0');
INSERT INTO `phpbb_config` VALUES ('sitemap_default_priority', '0.5');
INSERT INTO `phpbb_config` VALUES ('sitemap_sort', 'DESC');
INSERT INTO `phpbb_config` VALUES ('sitemap_sticky_priority', '0.75');
INSERT INTO `phpbb_config` VALUES ('sitemap_topic_limit', '250');

How is this done? And in a prior post, it indicated that there should be a ,1 in the values. Are these the lastest and correct text of the insert commands?
Thanks.
PT
Visit Outdooreyes for all your outdoor adventure and outdoor photography needs.

kulinar
Registered User
Posts: 657
Joined: Thu Feb 17, 2005 7:31 pm
Contact:

Post by kulinar »

Rusty105 wrote: But what about my static pages??
What about them? You should hardcore them. Search for how in previous posts in this thread.
outdooreyes wrote: In the Google Site Map instructions, it indicates the following:

INSERT INTO `phpbb_config` VALUES ('sitemap_announce_priority', '1.0');
INSERT INTO `phpbb_config` VALUES ('sitemap_default_priority', '0.5');
INSERT INTO `phpbb_config` VALUES ('sitemap_sort', 'DESC');
INSERT INTO `phpbb_config` VALUES ('sitemap_sticky_priority', '0.75');
INSERT INTO `phpbb_config` VALUES ('sitemap_topic_limit', '250');

How is this done?
Run these queries through phpMyadmin or save this

Code: Select all

<?php
/***************************************************************************
 *                               db_update.php
 *                            -------------------
 *
 *   copyright            : ©2003 Freakin' Booty ;-P & Antony Bailey
 *   project              : http://sourceforge.net/projects/dbgenerator
 *   Website              : http://freakingbooty.no-ip.com/ & http://www.rapiddr3am.net
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   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.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//


if( !$userdata['session_logged_in'] )
{
	$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
	header($header_location . append_sid("login.$phpEx?redirect=db_update.$phpEx", true));
	exit;
}

if( $userdata['user_level'] != ADMIN )
{
	message_die(GENERAL_MESSAGE, 'You are not authorised to access this page');
}


$page_title = 'Updating the database';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

echo '<table width="100%" cellspacing="1" cellpadding="2" border="0" class="forumline">';
echo '<tr><th>Updating the database</th></tr><tr><td><span class="genmed"><ul type="circle">';


$sql = array();
$sql[] = "INSERT INTO `" . $table_prefix . "config` VALUES ('sitemap_announce_priority', '1.0')";
$sql[] = "INSERT INTO `" . $table_prefix . "config` VALUES ('sitemap_default_priority', '0.5')";
$sql[] = "INSERT INTO `" . $table_prefix . "config` VALUES ('sitemap_sort', 'DESC')";
$sql[] = "INSERT INTO `" . $table_prefix . "config` VALUES ('sitemap_sticky_priority', '0.75')";
$sql[] = "INSERT INTO `" . $table_prefix . "config` VALUES ('sitemap_topic_limit', '250')";

for( $i = 0; $i < count($sql); $i++ )
{
	if( !$result = $db->sql_query ($sql[$i]) )
	{
		$error = $db->sql_error();

		echo '<li>' . $sql[$i] . '<br /> +++ <font color="#FF0000"><b>Error:</b></font> ' . $error['message'] . '</li><br />';
	}
	else
	{
		echo '<li>' . $sql[$i] . '<br /> +++ <font color="#00AA00"><b>Successfull</b></font></li><br />';
	}
}


echo '</ul></span></td></tr><tr><td class="catBottom" height="28"> </td></tr>';

echo '<tr><th>End</th></tr><tr><td><span class="genmed">Installation is now finished. Please be sure to delete this file now.<br />If you have run into any errors, please visit the <a href="http://www.phpbbsupport.co.uk" target="_phpbbsupport">phpBBSupport.co.uk</a> and ask someone for help.</span></td></tr>';
echo '<tr><td class="catBottom" height="28" align="center"><span class="genmed"><a href="' . append_sid("index.$phpEx") . '">Have a nice day</a></span></td></table>';

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
as a file and run it once than delete it.
outdooreyes wrote: And in a prior post, it indicated that there should be a ,1 in the values.
No, the format of numbers should be '0.5', '0.75', '1.0' etc. You can always change them later through ACP.

berni23
Registered User
Posts: 102
Joined: Mon Oct 10, 2005 1:12 pm

Post by berni23 »

Hi i´m new to this forum and to phpbb.
After installing the sitemap mod i created a .htaccess file and after uploading it(ascii mode) my website is unreachable. Have i done something wrong or do i have to do something additionaly?
Here is the .htaccess:

Code: Select all

DirectoryIndex index.html index.php indexbb.php index.htm

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} /forums.html
RewriteRule (.*) /index.php [L]

RewriteCond %{REQUEST_FILENAME} /viewforum([0-9]*)-([0-9]*)-([0-9]*).html
RewriteRule (.*) /viewforum.php?f=%1&topicdays=%2&start=%3 [L]

RewriteCond %{REQUEST_FILENAME} /forum([0-9]*).html
RewriteRule (.*) /viewforum.php?f=%1 [L]

RewriteCond %{REQUEST_FILENAME} /ptopic([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&view=previous [L]

RewriteCond %{REQUEST_FILENAME} /ntopic([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&view=next [L]

RewriteCond %{REQUEST_FILENAME} /ftopic([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&postdays=%2&postorder=%3&start=%4 [L]

RewriteCond %{REQUEST_FILENAME} /ftopic([0-9]*)-([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&start=%2 [L]

RewriteCond %{REQUEST_FILENAME} /ftopic([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1 [L]

RewriteCond %{REQUEST_FILENAME} /ftopic([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&start=%2&postdays=%3&postorder=%4&highlight=%5 [L]

Short-URLs sitemap.php
RewriteCond %{REQUEST_FILENAME} /fsitemap([0-9]*)-([0-9]*).html
RewriteRule (.*) /sitemap.php?f=%1&t=%2 [L]

RewriteCond %{REQUEST_FILENAME} /fsitemap([0-9]*).html
RewriteRule (.*) /sitemap.php?f=all [L]

RewriteRule ^sitemap.xml$ sitemap.php [L]
RewriteRule ^forum-([0-9]+).xml$ sitemap.php?fid=$1 [L]
Thanx in advance
P.S:Hope i posted in the right location.

kulinar
Registered User
Posts: 657
Joined: Thu Feb 17, 2005 7:31 pm
Contact:

Post by kulinar »

This mod does NOT require URL rewrite.

You should ask where you got your mod (I guess phpbb.de).

berni23
Registered User
Posts: 102
Joined: Mon Oct 10, 2005 1:12 pm

Post by berni23 »

kulinar wrote: This mod does NOT require URL rewrite.

You should ask where you got your mod (I guess phpbb.de).


the original code looked like this:

Code: Select all

RewriteEngine On
RewriteRule ^sitemap.xml$ sitemap.php [L]
RewriteRule ^forum-([0-9]+).xml$ sitemap.php?fid=$1 [L]
i just wanted to know if there is a mistake in it, because once i upload it, i can´t reach my forum

kulinar
Registered User
Posts: 657
Joined: Thu Feb 17, 2005 7:31 pm
Contact:

Post by kulinar »

berni23 wrote: the original code looked like this:

Code: Select all

RewriteEngine On
RewriteRule ^sitemap.xml$ sitemap.php [L]
RewriteRule ^forum-([0-9]+).xml$ sitemap.php?fid=$1 [L]
i just wanted to know if there is a mistake in it, because once i upload it, i canґt reach my forum
Well, dude, you installed GSM from http://www.phpbb-tweaks.com/

You should ask there for support.

User avatar
itsonlybarney
Registered User
Posts: 238
Joined: Sun Apr 10, 2005 5:06 am
Location: /home/Sydney/public_html
Contact:

Post by itsonlybarney »

is there any download for this MOD??
Enjoy talking about trains?

kulinar
Registered User
Posts: 657
Joined: Thu Feb 17, 2005 7:31 pm
Contact:

Post by kulinar »

itsonlybarney wrote: is there any download for this MOD??


http://euro-consult.hit.bg/sitemap_mod.zip

User avatar
Rat
Registered User
Posts: 102
Joined: Wed Oct 23, 2002 4:46 am
Location: Houston, TX
Contact:

Post by Rat »

is this sitemap the same as this? i forgot where i got this.
http://www.vnforum.com/forums/site_map.php
Rat

kulinar
Registered User
Posts: 657
Joined: Thu Feb 17, 2005 7:31 pm
Contact:

Post by kulinar »

Rat wrote: is this sitemap the same as this? i forgot where i got this.
http://www.vnforum.com/forums/site_map.php
No, it is like this: http://freshproxy.com/sitemap.php

User avatar
Rat
Registered User
Posts: 102
Joined: Wed Oct 23, 2002 4:46 am
Location: Houston, TX
Contact:

Post by Rat »

thank you, great mod, work perfect.

http://www.vnforum.com/forums/sitemap.php
Rat

kulinar
Registered User
Posts: 657
Joined: Thu Feb 17, 2005 7:31 pm
Contact:

Post by kulinar »

Rat wrote: thank you, great mod, work perfect.
Now you have to submit it to Google :wink:

phonereviews
Registered User
Posts: 99
Joined: Sat Oct 22, 2005 4:51 pm
Contact:

Post by phonereviews »

I entered INSERT INTO `phpbb_config` VALUES ('sitemap_announce_priority', '1.0'); into my table by using the php code and then realised that I'd like my default topics to have a higher rank than my announcements and stickies.
I tried a lot to update the table, I simply wasn't able to figure it out...could you post update statements to modify the values such that default topics get 1, the announcements get 0.5 and the stickies get 0.75?

Thanks...

Edit: Found the problem, I had forgot to clear my cache! The following statement works... UPDATE phpbb_config SET config_value = 1.0 WHERE config_name = 'sitemap_default_priority';

One doubt though...how come the phpbb_config and 1.0 didn't need the single qoutes???



Double Edit: !!!, just installed the mod and just realised it had options to change the values in itself! Spent nearly half an hour trying out different UPDATE queries! My doubt still stands though...why were the quotes unnecessary?

It doesn't seem to work! Please help me...my site is Phone Reviews

mosa
Registered User
Posts: 23
Joined: Tue Sep 27, 2005 7:41 pm

Post by mosa »

Problem sorted.

User avatar
okada1314
Registered User
Posts: 209
Joined: Sat Oct 29, 2005 10:51 am

Post by okada1314 »

The download link is dead

Locked

Return to “[2.0.x] MODs in Development”