Hello,
I would like to create a dynamic sitemap on my site, but I have little no experience in PHP. Can someone give me a hand?
Need to have:
Album Name: (with link to album)
LinkToSubAlbum - AlbumText
LinkToPicture - CaptionTextOfPicture
LinkToPicture - CaptionTextOfPicture
LinkToPicture - CaptionTextOfPicture
LinkToSubAlbum - AlbumText
LinkToPicture - CaptionTextOfPicture
LinkToPicture - CaptionTextOfPicture
Next Album Name: (with link to album)
LinkToSubAlbum - AlbumText
LinkToPicture - CaptionTextOfPicture
LinkToPicture - CaptionTextOfPicture
LinkToPicture - CaptionTextOfPicture
LinkToSubAlbum - AlbumText
LinkToPicture - CaptionTextOfPicture
LinkToPicture - CaptionTextOfPicture
Is there a easy way to list all albums/pictures like this?
Posts: 13
Hello,
Sitemap would be a good, not only for visitors also for search engines. RSS-Feed looks a bit like a sitemap. But an automatic procedure to produce it would be better.
xlouisx
Posts: 3236
I'm trying to picture what you are asking for.
Would this be just a text based tree? Or would it involve images too? It sounds a little like you want something like the album_list that discobug made, only to have it add in images as well as albums.
That would be a freaking HUGE list. Its very likely that you'd run out of memory building it on 98% of systems. The albums-only tree is pretty bad as it is.
You can see the raw output of album_list (slightly modified by me) http://fryfrog.com/gallery/album_list.php
Posts: 238
Terje-,
It sounds like what you're looking for is album_list with also showing the photos in each album. I'm not sure that that exists at this point, but like fryfrog said, just album list might help you for now.
Here's an example of the raw album list output showing all subalbums:
http://www.discobug.com/gallery/album_list.php
Here it is integrated in my site:
http://www.discobug.com/staticpages/index.php?page=album-list
And here is the album list download and instructions.
Posts: 3236
I think the main problems are going to be page build time and memory usage. And they are going to be UGLY problems. Caching will speed up load times, but imagine 5,000+ images thats a lot of lines!
Posts: 238
Yes, and even with caching - when the cache has to be rebuilt you could easily run over the maximum execution time. A list with all photos would only be feasible for a very small site, which makes it not interesting for people to invest time in -- unless you are just writing it for yourself.
Posts: 13
Google has a new program for webmasters https://www.google.com/webmasters/sitemaps/login which uses an own standard for xml-sitemaps. If I change the RSS-Feed for google I still have only the pictures in it. Google does not index pictures (this is done by picsearch.com). What would be needed for a google sitemap is also a URL to every single php-generated html-page of gallery with description, title, comments etc, a collection of all deep-links so to say.
For all other search engines it would be useful to have such a sitemap in html with absolute or relative links to every generated html-page. They can follow links. Indexing the original php-pages does not tell them anything. I used a sitemap-generator from http://enarion.net/google/ but the sitemap it creates is useless, because it contains all original php-pages.
Best wishes
xlouisx
Posts: 13
Good News: Google (above address) accepts the RSS-feed 2.0 as sitemap! Just save it as sitemap.xml and upload it to your server! Then log in to Google sitemaps and give the link to it.
Best wishes
xlouisx
Posts: 7
Do you really need to save the output and upload it or can you just give google your url? I tried submitting my rss feed url (http://www.raianofamily.net/gallery/rss.php) to google as is. We'll see what happens...
Alex
Posts: 13
Google definitely accepts the link to the rss feed. But I have the impression that it sees some other website than the spider. The spider goes to the website via .htacess, usually with modiefied urls. So it sees a different site and I doubt that google is able to get both of them togehter. Anyone able to write a hack to have the rewritten url-s also in the rss-feed?
Louis
http://www.leipzig-picture.com
Posts: 13
Google reports a XML-Error (gallery 1.57). In some respect the rss does not seem to follow the xml-standards
Louis