[ABD]google sitemap generator for phpbb3.0.x

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
dark_angelo
Registered User
Posts: 1
Joined: Thu Jan 03, 2008 5:47 am

Re: google sitemap generator for phpbb3.0.x

Post by dark_angelo »

hello, i installed the sitemap generator, and i submited it. so while google was analysing the sitemap.xml file, it got the forums, and said it was OK.
but then it started to find warnings, and i got 10 warnings, telling me the following :
" Invalid XML tag
This tag was not recognized. Please fix it and resubmit "

its indicating line number just before : "Invalid XML tag"

So what should I do ?
krabbat
Registered User
Posts: 3
Joined: Thu Aug 09, 2007 7:42 pm

Re: google sitemap generator for phpbb3.0.x

Post by krabbat »

Hi,

This contrib is really nice, I've used the previous to the phpbb2. Now I've upgraded to phpBB3 and this contrib doesn't work.

I get this error message:

Code: Select all

SQL ERROR [ mysql4 ]

Table 'mytable_com.phpbb_forums' doesn't exist [1146]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.
Someone have a solution? That would be great!
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 26346
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: google sitemap generator for phpbb3.0.x

Post by Paul »

Hello,

Please edit your topic title with a prefix as outlined in Modifications Development Forum Rules, section 3.a. This will allow people to see the development status of your modification at a glance.

Thank you,
The phpBB Modifications Team
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development
User avatar
alecrust
Registered User
Posts: 348
Joined: Thu Mar 27, 2008 11:24 am
Location: London, UK
Contact:

Re: google sitemap generator for phpbb3.0.x

Post by alecrust »

I also get the same errors at Google Webmaster tools. Looking for a solution!
woodsman
Registered User
Posts: 8
Joined: Wed Apr 02, 2008 6:32 pm

Re: google sitemap generator for phpbb3.0.x

Post by woodsman »

It's an excellent mod and works great on a completely open forum but on limited access forums it generates lists of ALL forums and topics, even those that are only available to administrators, moderators or any other admin defined special group of users.

As an example - this is the content of a link generated for a forum only accessible to admins:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
  <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
  </urlset>
Google doesn't like empty lists apparently.
User avatar
TheMoustic
Registered User
Posts: 76
Joined: Sat Aug 25, 2007 1:32 pm
Location: France

Re: google sitemap generator for phpbb3.0.x

Post by TheMoustic »

Sorry it was en error.
Last edited by TheMoustic on Tue Apr 22, 2008 1:04 pm, edited 1 time in total.
Theory, it is when nothing works, and when we know why.
Practice, it is when everything works, and when we do not know why.

Here, both are combined: nothing works, and nobody knows why.
Albert Einstein
User avatar
TheMoustic
Registered User
Posts: 76
Joined: Sat Aug 25, 2007 1:32 pm
Location: France

Re: google sitemap generator for phpbb3.0.x

Post by TheMoustic »

Sorry it was en error.
Theory, it is when nothing works, and when we know why.
Practice, it is when everything works, and when we do not know why.

Here, both are combined: nothing works, and nobody knows why.
Albert Einstein
User avatar
melocompri.it
Registered User
Posts: 1
Joined: Thu Jun 12, 2008 2:53 pm
Contact:

Re: google sitemap generator for phpbb3.0.x

Post by melocompri.it »

Good work, congrats.
I modified it to fit with the phpBB-SEO "Advanced phpBB3 SEO mod Rewrite" V 0.4.2, if anyone is using it with phpbb3.

I am not a php programmer so there can be stuff that could be done better.

I changed the db commands in the code with call to $db object defined in common.php, because I got errors with the prevous db commands.

I added a $disallow array where you can put the names of the forum you do not want to map (for instance forum you disallowed in robots.txt or that are always empty, containing only other forums).

you can download files here

hope that helps.

vincenzo
vrillusions
Registered User
Posts: 7
Joined: Fri Aug 01, 2003 5:09 pm
Location: Ohio, USA
Contact:

Re: google sitemap generator for phpbb3.0.x

Post by vrillusions »

melocompri.it wrote:Good work, congrats.
I modified it to fit with the phpBB-SEO "Advanced phpBB3 SEO mod Rewrite" V 0.4.2, if anyone is using it with phpbb3.

I am not a php programmer so there can be stuff that could be done better.

I changed the db commands in the code with call to $db object defined in common.php, because I got errors with the prevous db commands.

I added a $disallow array where you can put the names of the forum you do not want to map (for instance forum you disallowed in robots.txt or that are always empty, containing only other forums).

you can download files here

hope that helps.

vincenzo
I got this working great... almost. I was getting the "forums table not found" message that others were getting. So after a quick glance I noticed there really isn't a forums table, there's a phpbb_forums table. Basically the table prefix isn't getting checked. So the easy solution was to include it. The script sources common.php and thus also sources the config.php that has $table_prefix set. So you have to go through and add that variable to the end of every table name. If I get around to actually uploading the file somewhere I will but in case i forget and for those that don't know a whole lot about SQL here's the basic plan.

Look for lines like the following:

Code: Select all

$sql = 'SELECT forum_id,forum_name FROM forums';
The "FROM part is where the table names are referenced, and where you need to add the table prefix, like so:

Code: Select all

$sql = 'SELECT forum_id,forum_name FROM '.$table_prefix.'forums';
You will have to do that for every table name. Most of them are simple like that but there's a rather lengthy query starting at line 77:

Code: Select all

      $sql = 'SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time 
			FROM topics t, users u, posts p, 'posts p2, users u2, forums f 
			WHERE t.forum_id = f.forum_id and t.forum_id = '.$fid.' AND t.topic_poster = u.user_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id ORDER BY t.topic_type DESC, t.topic_last_post_id DESC';
becomes

Code: Select all

      $sql = 'SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time 
			FROM '.$table_prefix.'topics t, '.$table_prefix.'users u, '.$table_prefix.'posts p, '.$table_prefix.'posts p2, '.$table_prefix.'users u2, '.$table_prefix.'forums f 
			WHERE t.forum_id = f.forum_id and t.forum_id = '.$fid.' AND t.topic_poster = u.user_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id ORDER BY t.topic_type DESC, t.topic_last_post_id DESC';
Hope that helps others that are running into problems
wookiewarrior
Registered User
Posts: 17
Joined: Tue Apr 03, 2007 4:47 pm

Re: google sitemap generator for phpbb3.0.x

Post by wookiewarrior »

vincenzo, thank you for taking the time to get this to work. I do have one question though. How are you getting the disallow to work? I've tried forum names, id's, etc and they still show up.
wookiewarrior
Registered User
Posts: 17
Joined: Tue Apr 03, 2007 4:47 pm

Re: google sitemap generator for phpbb3.0.x

Post by wookiewarrior »

Nevermind.. I got it. For some reason, it doesn't work with the first on in the array.
jonli447
Registered User
Posts: 8
Joined: Sun Jul 01, 2007 10:06 pm

Re: google sitemap generator for phpbb3.0.x

Post by jonli447 »

wookiewarrior wrote:Nevermind.. I got it. For some reason, it doesn't work with the first on in the array.
Do you mind clarifying this a bit? Thanks. :)
pashmak
Registered User
Posts: 55
Joined: Sun Apr 10, 2005 12:07 am

Re: google sitemap generator for phpbb3.0.x

Post by pashmak »

jonli447 wrote:
wookiewarrior wrote:Nevermind.. I got it. For some reason, it doesn't work with the first on in the array.
Do you mind clarifying this a bit? Thanks. :)
Ye, I would love to know that too :)
What are we suppose to put in $disallow = array('none'); ?
pashmak
Registered User
Posts: 55
Joined: Sun Apr 10, 2005 12:07 am

Re: google sitemap generator for phpbb3.0.x

Post by pashmak »

vrillusions wrote:
melocompri.it wrote:Good work, congrats.
I modified it to fit with the phpBB-SEO "Advanced phpBB3 SEO mod Rewrite" V 0.4.2, if anyone is using it with phpbb3.

I am not a php programmer so there can be stuff that could be done better.

I changed the db commands in the code with call to $db object defined in common.php, because I got errors with the prevous db commands.

I added a $disallow array where you can put the names of the forum you do not want to map (for instance forum you disallowed in robots.txt or that are always empty, containing only other forums).

you can download files here

hope that helps.

vincenzo
I got this working great... almost. I was getting the "forums table not found" message that others were getting. So after a quick glance I noticed there really isn't a forums table, there's a phpbb_forums table. Basically the table prefix isn't getting checked. So the easy solution was to include it. The script sources common.php and thus also sources the config.php that has $table_prefix set. So you have to go through and add that variable to the end of every table name. If I get around to actually uploading the file somewhere I will but in case i forget and for those that don't know a whole lot about SQL here's the basic plan.

Look for lines like the following:

Code: Select all

$sql = 'SELECT forum_id,forum_name FROM forums';
The "FROM part is where the table names are referenced, and where you need to add the table prefix, like so:

Code: Select all

$sql = 'SELECT forum_id,forum_name FROM '.$table_prefix.'forums';
You will have to do that for every table name. Most of them are simple like that but there's a rather lengthy query starting at line 77:

Code: Select all

      $sql = 'SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time 
			FROM topics t, users u, posts p, 'posts p2, users u2, forums f 
			WHERE t.forum_id = f.forum_id and t.forum_id = '.$fid.' AND t.topic_poster = u.user_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id ORDER BY t.topic_type DESC, t.topic_last_post_id DESC';
becomes

Code: Select all

      $sql = 'SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time 
			FROM '.$table_prefix.'topics t, '.$table_prefix.'users u, '.$table_prefix.'posts p, '.$table_prefix.'posts p2, '.$table_prefix.'users u2, '.$table_prefix.'forums f 
			WHERE t.forum_id = f.forum_id and t.forum_id = '.$fid.' AND t.topic_poster = u.user_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id ORDER BY t.topic_type DESC, t.topic_last_post_id DESC';
Hope that helps others that are running into problems

Can you implement the disallow function to the regular sitemap mod, which is not build for mod_rewrite? Iblieve we are some who doesnt use the rewrite tool :P

Thanks
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 26346
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: google sitemap generator for phpbb3.0.x

Post by Paul »

Iam going to lock this topic as ADB as zlst hasnt visted phpBB.com for nearly a year now.

zlst, if you want to have your topic reopend, please send me a PM.

Locked.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development
Locked

Return to “[3.0.x] Abandoned MODs”