Ticket #215 (testing enhancement)

Opened 3 years ago

Last modified 2 years ago

Sitemap for Plogger galleries

Reported by: sidtheduck Owned by:
Priority: normal Milestone: 1.1
Component: General Version: SVN
Severity: normal Keywords:
Cc:

Description

Per pandianbe's request, a sitemap for Plogger would be a good idea and should be somewhat easy to implement. Looking at Google and/or Yahoo sitemaps, this should be able to generate HTML or XML outputs for spidering.

Attachments

plogger-sitemap-partial-code.php Download (3.3 KB) - added by pandianbe 3 years ago.
Plogger XML Sitemap Gen Partial or Idea to Code
plog-sitemap.php Download (4.7 KB) - added by sidtheduck 2 years ago.

Change History

Changed 3 years ago by pandianbe

Plogger XML Sitemap Gen Partial or Idea to Code

comment:1 follow-up: ↓ 2 Changed 3 years ago by kimparsell

  • Version set to SVN

comment:2 in reply to: ↑ 1 Changed 3 years ago by pandianbe

Replying to kimparsell:

Kim or Sidtheduck,

Please concentrate on this features.

comment:3 Changed 2 years ago by sidtheduck

  • Status changed from new to testing

I just attached my attempt at cleaning up the code for generating both an HTML and XML sitemap for Plogger (named plog-sitemap.php). To use the file, save plog-sitemap.php to the main Plogger folder (same as plog-config.php). For HTML output, navigate to plog-sitemap.php. For XML, navigate to plog-sitemap.php?xml

I'm hoping to work this into a plugin for Plogger so the code could be inserted via a function into a separate file location (i.e. mysite.com/sitemap.php). I'll post additional code once I have had some time to work on it.

comment:4 Changed 2 years ago by sidtheduck

Also to note, if using the HTML output, it pulls in the head, header, and footer from the current theme file, so the HTML sitemap should look the same as your theme files. If you want to edit CSS, do it from the current theme's gallery.css.

comment:5 Changed 2 years ago by pandianbe

Hi Sidtheduck and Kim,

The Priority should be different in XML Sitemap.Is it possible to change the priority like below:

1.Main URL - 1.0 2.Sub URL - 0.8 3.Sub-Sub URL - 0.5

Google will give the error message or will not accept sitemap.

Regards, Pandian

comment:6 Changed 2 years ago by pandianbe

any update on this?

Changed 2 years ago by sidtheduck

comment:7 Changed 2 years ago by sidtheduck

I attached a new plog-sitemap.php file with the following priority:

  1. Main Gallery URL -> 1.0
  2. Collection -> 0.8
  3. Album -> 0.6
  4. Picture -> 0.4

This seems to coincide with the XML Sitemap Protocol.

comment:8 Changed 2 years ago by sidtheduck

Also, per pandianbe's forum request, the .htaccess rewrite rule would be something simliar to this:

RewriteRule sitemap.xml? plog-sitemap.php?xml [L]
Note: See TracTickets for help on using tickets.