Xml Sitemaps pligg module v0.9


Thanks for visiting! If you're new here, you may want to subscribe to my RSS feed. This blog posts regular information about web development, unix/linux, How-tos and patches. Go ahead, subscribe to my feed! You can also receive updates via email, instant messenger, skype or tweeter.

This one is a quick release just like the previous one that fixes just one thing.

All previous versions had this problem that the urls were not urlencoded so those urls that contained special characters like those with an accent or diacritics were invalid and of course google would show an error on those sitemaps.

Version 0.9 makes escapes those urls so now those of you with such special characters in the urls can finally enjoy this module.

It seems like the modules is getting closer to version 1.0 . If you have any suggestion about some feature you would like in 1.0 or you found some other bug that needs fixed, don't hesitate to let me know about it.

download v 0.9 from the module's page

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Reddit
  • del.icio.us
  • Slashdot
  • Spurl
  • StumbleUpon
  • Furl
  • description
  • Netscape
  • NewsVine
  • Technorati
  • YahooMyWeb
  • Simpy
If you enjoyed this post, you should subscribe to my full RSS Feeds

RSS feed | Trackback URI

38 Comments »

collapse thread Comment by PierreR Subscribed to comments via email
2000-01-06 05:00:42

Hello.

When I set up the plugin on link:
http://www.chevauxduweb.com/admin_config.php?page=XmlSitemaps

I’ve on page only:
nothing found :(

Some Idea ?
On pligg 9.9… Thanks

 
collapse thread Comment by pligg Subscribed to comments via email
2008-05-18 17:04:51

Hello,

For me don t work, i install the module, i insert the cod in htaccess, and when i run the sitemap i riceve this message:


http://www.pligg.ro/module.php?modul…ow_sitemap&i=1
2008-05-18T18:10:28+03:00

 
collapse thread Comment by Mihai
2008-05-19 05:46:40

this doesn’t mean it’s not working . It’s working it’s just not using friendly urls. You have to make sure you have activated these types of urls in the Xml sitemaps config.
also make sure you delete the cache is you use it.

 
collapse thread Comment by pligg Subscribed to comments via email
2008-05-19 06:51:48

thanks, you can tell me how and where to config the xml sitemaps..

 
collapse thread Comment by pligg Subscribed to comments via email
2008-05-19 06:56:52

i modificated in admin with TRUE friendly ulr, i delete the files from cache and i insert the line in httaccess, but the url is the same..

collapse thread Comment by Mihai
2008-05-19 07:04:24

the value has to be ‘true’ not ‘TRUE’ … this is case sensitive

 
 
collapse thread Comment by pligg Subscribed to comments via email
2008-05-19 07:15:10

yes is true not TRUE

 
collapse thread Comment by mushmoosh Subscribed to comments via email
2008-06-28 23:39:41

The XML Sitemaps module has been excellent; however, I recently ran into a problem with assigning the correct priority value.

Google returned the following Warning message:

All the URLs in your Sitemap are set to the same priority (not the default priority). Priority indicates the importance of a particular URL relative to other URLs on your site, and doesn’t impact your site’s performance in search results. If all URLs have the same priority, Google can’t tell which are more important.

Does anyone know how to correct this?

Any guidance will be appreciated!! :-)

collapse thread Comment by Mihai
2008-06-29 00:08:42

The module computes the priority based on the link age, number of comments, number of votes, and the last time when it was updated.

This is the exact formula at xml_sitemaps_main.php line 154:
$v=(time()-$link->date)/60;
$pri=max(0.0001,(( $link->comments /$v ) * 30 + ( $link->votes * 10 / $v ) + ( 100 / max(100,time()-$link->modified) ) * 60 )/ 100 );

my idea was that the number of comments it got since it was created should account for 30% of the priority, the number of votes for 10% and the time when it was last updated ( commented, voted, modified ) for 60%

I guess this isn’t perfect for all sites, so just change it till you get it right for your site.

collapse thread Comment by Mihai
2008-07-13 13:31:07

I think, for sites using cache and the RSS importer or sites that don’t have much traffic or many active users voting all the time it would be a good idea to modify the script like this:
on line 154:
instead of $v=(time()-$link->date)/60;
use $v=(time()-$link->date)/3600;

you should clear the cache if you use it and resubmit the sitemap to google after this modification.
IF you still get warnings just increase the divisor ( 3600 ) until it’s ok
I’m guessing that if you use a cache set for 1 day 3600 should be ok, if not you could go higher

 
 
 
collapse thread Comment by mushmoosh Subscribed to comments via email
2008-06-29 00:17:57

Thank you for such a prompt response! One more quick question… For about half of my generated sitemaps, every entry will have a priority set to: 0.0001.

I can definitely tinker with the formula you pointed out.

I am using the RSS Import module and it randomizes the votes. Everything else will probably be close to constant values. It worked perfectly for a long time until recently.

Maybe I should shift the weight of your formula toward the number of votes since the update or # of comments is typically constant.

Thank you for your guidance!

collapse thread Comment by Mihai
2008-06-29 13:44:53

0.0001 is used for all links that have a priority that is less then 0.0001 . If all your links have that then maybe they all have a priority less then 0.0001

as you can see from the formula, the number of votes and comments are divided by the link age ( in minutes ) . So for really old links that were not updated recently, with few comments and few votes the priority is very likely to be under 0.0001
And the fact that you are using the RSS import module makes it worse because it assigns votes randomly but all at the same time. So the link is only updated once when it it posted but then not updated unless someone comments on it.

Also if you are caching the sitemap you will almost never have ( depending on how long you decide to cache it ) an updated sitemap right after a link was posted ( when it should have the highest priority because it was updated very recently, and has a lot of votes)

 
 
collapse thread Comment by mushmoosh Subscribed to comments via email
2008-06-29 18:35:26

Thank you for the thorough explanation. I now understand the exact problem. In result, using the RSS import will definitely cause me to experience this problem as time passes.

Do you suggest that I completele re-arrange the formula to ensure that it is divided by the # of votes? Also, what do you suggest in terms of an appropriate cache time?

 
collapse thread Comment by Mihai
2008-07-01 09:05:38

I don’t see how dividing by # of votes would help or what is the logic in that since you’re assigning votes randomly, unless all you are trying to get is different / variable / random priority for each link, but I see no point in this.

I have cache set to one day for a site that also uses the RSS import module. I don’t think less then a day would make much sense cause I doubt google or other search engines would try to download your sitemap more then once a day and even if they do they would not start fetching your new links so soon…but it’s just a guess..I may be wrong…

 
collapse thread Comment by mushmoosh Subscribed to comments via email
2008-07-04 18:23:15

Hi Mihai

Here is the warning I receive according to Google Sitemaps:

“All the URLs in your Sitemap are set to the same priority (not the default priority). Priority indicates the importance of a particular URL relative to other URLs on your site, and doesn’t impact your site’s performance in search results. If all URLs have the same priority, Google can’t tell which are more important.”

In result, if i divide by the # of votes, then i will have a better chance of receiving a unique priority. Is that correct? Am I overlooking something?

collapse thread Comment by Mihai
2008-07-13 13:42:49

do some testing and see how it looks .
If you want the number of votes to take a higher value in the priority you could
replace $link->votes * 10 with something like $link->votes * 35 and ( $link->comments /$v ) * 30 with ( $link->comments /$v ) * 5 . this makes votes account for 35% and comments for only 5%
You should also take a look at this :
http://patchlog.com/php/xml-sitemaps-pligg-module-v09/#comment-7577

 
 
collapse thread Comment by Goe D
2008-07-11 21:31:42

I’m getting the same error on my Google’s sitemap. Any patch on the formula?

It looks like G now is very strict in using a sitemap. I haven’t had no errors before, the erroors just appeared recently. Any idea to fix it. It is not actually errors but WARNINGS.

 
 
collapse thread Comment by Israel Subscribed to comments via email
2008-07-26 16:56:10

Wouldnt we be able to just submit sitemapindex.xml and let google find the other sitemaps using that xml?

collapse thread Comment by Mihai
2008-07-27 10:02:08

actually that’s the only thing you have to submit

collapse thread Comment by Israel Subscribed to comments via email
2008-07-27 15:52:56

Okay great. I think you should have something somewhere where this is noted. It was a pain in the butt to figure where to find the sitemap pages and index. Maybe you can update the original sitemap post here, or even update the modules index page so it notes it from within the admin area.

Thx.

collapse thread Comment by Mihai
2008-07-28 04:07:34

actually I have posted a more recent post where I explain that:
http://patchlog.com/php/wheres-the-xml-sitemap/

(Comments wont nest below this level)
 
 
 
 
collapse thread Comment by sara
2008-08-08 03:11:52

Today I see new error in Google Webmaster Tools

” Invalid tag value
This XML tag has an invalid value. Please fix it and resubmit. ”

I have 6 sitemap sitemap-0.xml - sitemap-6.xml

This error only for sitemap-6.xml

Before I have other error and I fix it by you siad

” $v=(time()-$link->date)/60;
$pri=max(0.0001,(( $link->comments /$v ) * 30 + ( $link->votes * 10 / $v ) + ( 100 / max(100,time()-$link->modified) ) * 60 )/ 100 ); ”

” on line 154:
instead of $v=(time()-$link->date)/60;
use $v=(time()-$link->date)/3600; ”

and error disappear but yesturday I upgrade pligg to 9.5.5 so I see this new error (before I use 9.8.2)

 
collapse thread Comment by sara
2008-08-08 10:35:17

this more detail

79 Invalid tag value
This XML tag has an invalid value. Please fix it and resubmit. Help Help Parent tag:
Tag:
Value:
Found: url
priority
1.21323383742
Aug 8, 2008
Details 31 Invalid tag value
This XML tag has an invalid value. Please fix it and resubmit. Help Help
Parent tag:
Tag:
Value:
Found: url
priority
1.36334286505
Aug 8, 2008
Details 19 Invalid tag value
This XML tag has an invalid value. Please fix it and resubmit. Help Help
Parent tag:
Tag:
Value:
Found: url
priority
1.19110785838
Aug 8, 2008
Details 13 Invalid tag value
This XML tag has an invalid value. Please fix it and resubmit. Help Help
Parent tag:
Tag:
Value:
Found: url
priority
3.67763278809
Aug 8, 2008
Details 7 Invalid tag value
This XML tag has an invalid value. Please fix it and resubmit. Help Help
Parent tag:
Tag:
Value:
Found: url
priority
6.76048565121
Aug 8, 2008

collapse thread Comment by Mihai
2008-08-12 20:41:36

the fact that you divided by 3600 gives the priority more decimals … maybe too many… And I think google doesn’t like that

use : $v=round((time()-$link->date)/3600,3);
instead of what you used before and let me know if you still have a problem

collapse thread Comment by sara
2008-08-20 10:50:18

When I use
$v=round((time()-$link->date)/3600,3);

some priority go high 2.0 or 3.0 like that and error agian

so now I change back to the original

$v=(time()-$link->date)/60;
$pri=max(0.0001,(( $link->comments /$v ) * 5 + ( $link->votes * 35 / $v ) + ( 100 / max(100,time()-$link->modified) ) * 60 )/ 100 );

and no error now, the highest priority are around 0.4 or 0.5 in new story on sitemap but sometime I got warning “All the URLs in your Sitemap have the same priority. ” in some sitemap again in sitemap-1.xml (I have 6 sitemap) but sometime no warings

sitemap-1 to sitemap-5 all priority same 0.0001 but only sitemap-6 (the latest) have 0.1 0.2 0.3 like that

I like you plugin because this is only one sitemap plugin for pligg no more out there so I love it but I don’t like to always go to check in Webmaster Tools that my pligg sitemap will okay or not? Sometime ok sometime not. sometime priority go higher that 1.0 sometime all same 0.0001

I understand your formula a bit but it very hard for me or other people to understand and fix it, Can you make it easier.

I have some example very good sitemap plugin for wordpress
“XML Sitemap Generator for WordPress 3.1.0.1 ”
Very easy to config and nothing to do after that, no error

I like the option that let people set priority (see picture below)

Can you make Xml Sitemaps pligg module has option like that, If you can do that I think no more problem about Google Webmaster Tools and priority issues again

Xml Sitemaps pligg module is the Best, Cheers

Thank

 
 
 
collapse thread Comment by iamcanadian Subscribed to comments via email
2008-08-12 07:12:06

Same as above (Pligg 9.9.5)

“Invalid tag value
This XML tag has an invalid value. Please fix it and resubmit. ”

 
collapse thread Comment by Temi Subscribed to comments via email
2008-08-12 19:09:09

Is there any way this formula can be rewritten to give votes at least 60% input to priority and have the lowest priority value greater than 0.1? I have all my priorities 0.00000x (E-5 in xml) and they all reset to 0.001 (the min function) making them all the same. I have 40,000 links and the older a link gets the lower this formula makes the value. can the lowest priority be greater than 0.1?

collapse thread Comment by Mihai
2008-08-14 16:24:07

You can rewrite the formula as you wish. but if you have 40000 links and the votes range is small how is giving the votes 60% going to improve the uniqueness of the priority ?

 
 
collapse thread Comment by Zach
2008-08-12 19:40:00

I’ve had this module installed for a day but my sitemap is incomplete — it only shows two pages.

http://www.getofftheinternet.net/sitemapindex.xml

How can I fix this? Thanks for any info.

collapse thread Comment by Mihai
2008-08-12 20:31:13

That’s not your sitemap. It’s the sitemap index. IT only contains links to other sitemaps. Go to the links in it and you’ll see the actual sitemaps.

 
 
collapse thread Comment by Temi Subscribed to comments via email
2008-08-13 03:10:58

Mihal cold you please help me with my question above? i have sitemap-0.xml up to sitemap-76.xml and everything from 0-75 all have the same priority in webmaster tools. :(

 
collapse thread Comment by Temi Subscribed to comments via email
2008-08-13 03:13:03

*Mihai

 
collapse thread Comment by Temi Subscribed to comments via email
2008-08-14 06:35:34

Please please and please offer some help Mihai

collapse thread Comment by Mihai
2008-08-14 16:21:51

Temi, please look at the discussions above about changing the formula if you really care about turning off those warnings.

You should also read google help that says that a waring is just that … it’s not an error and it doesn’t mean they will not process your sitemap if you have those warnings. The only problem is they don’t know which is more important to you.

 
 
collapse thread Comment by Temi Subscribed to comments via email
2008-08-23 01:45:55

I have read the discussions but when I make changes to the formula some of my priorities go above 1.0 and 75 out of 76 sitemaps all have 0.001 priority. does anyone know how to change the formula so the priority relies solely on votes + comments and will still stay between 0 and 1.0 ?

 
collapse thread Comment by sara
2008-09-07 10:25:50

I same Temi

… who know how to set and priorities still stay between 0-1.0

Thank

 
Name (required)
E-mail (required - never shown publicly)
URI
Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

Trackback responses to this post


Creative Commons License
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License

Technology Blogs - Blog Top Sites Search For Blogs, Submit Blogs, The Ultimate Blog Directory Blogarama - The Blog Directory 5starsblog Computers Blogs - Blog Flare blog search directory gob BlogHop