4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: thestroller on November 28, 2006, 07:54:24 AM
-
Hi,
You can create a Google Sitemap for your Gallery to improve traffic to your site.
You must install the Search Engine friendly MOD before use this file.
1. Upload the file google.php to the root folder of 4images.
2. Modify the .htaccess to rewrite the URL of sitemap.
RewriteRule ^sitemap.xml$ google.php
Now the URL of sitemap is: http://www.yourdomain.com/sitemap.xml
You can send a ping to Google to notify your new sitemap by this way: http://www.google.com/webmasters/sitemaps/ping?sitemap=URL_TO_YOUR_SITEMAP
Good luck!
Mai
-
Thanx a million :lol:
This is an excellent MOD, been looking for it for quite a while now.
Cheers :mrgreen:
-
Ok there is an error in the sitemap.
There is no Last Modified Date for categories and google throws that as an error. Maybe we can assign current date there similar to $mod
-
In php file is
echo "<?xml version='1.0' encoding='UTF-8'?>
Should I change it to ISO-8859-2 is whole my gallery works with it ?
Yeah I know i can check it but... I don't want play with google
How can add a links for profiles to a map ?
-
I have modify the Code a little bit... (o:
-now the Profiles are included
-now you can use it also without the Short URL Mod
(# Use Short URLs
$shortURL = 1; // 0 or 1)
-bugfix: Last Modified Date for categories...
Enjoy it...
<?
# Create Google Sitemap for 4images
# Created by Mai Minh (minh@maingo.com http://www.vna2z.com)
# Modified by Oliver van der Werf (info@flash-webdesign.de http://www.flash-webdesign.de)
# Date: 28/11/2006 | 02.01.2007
# You can send ping to Google with this request: http://www.google.com/webmasters/sitemaps/ping?sitemap=URL_TO_YOUR_SITEMAP
#---------------------------------
require("config.php");
$link=mysql_connect("$db_host","$db_user","$db_password");
mysql_select_db("$db_name") or die ("Cannot connect database!");
# 4images top page (with trailing slash)
$gallery_url = 'http://www.picsforfree.de/';
# Priotity
//select between 0.0 and 1.0
//0.0 identifies the lowest priority page(s) on your website
//1.0 identifies the highest priority page(s) on your website
$prio_img = 0.5;
$prio_cat = 0.8;
$prio_profile = 0.3;
# Frequency
//"always", "hourly", "daily", "weekly", "monthly", "yearly" or "never"
$freq_img = 'yearly';
$freq_cat = 'daily';
$freq_profile = 'daily';
# Use Short URLs
$shortURL = 1; // 0 or 1
# Print XML header
xml_head();
# Print URLs
$categories = mysql_query('SELECT cat_id FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
if ($shortURL == 1) {
$cat_url = $gallery_url.'cat'.$catid.'.htm';
}else {
$cat_url = $gallery_url.'categories.php?cat_id='.$catid;
}
print_xml($cat_url,$prio_cat,'',$freq_cat);
}
$images = mysql_query('SELECT image_id,image_active,image_date FROM ' . $table_prefix . 'images ');
while ($image = mysql_fetch_array($images))
{
if ($image['image_active'] == 1) {
$imgid = $image['image_id'];
$date = $image['image_date'];
$date = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
if ($shortURL == 1) {
$img_url = $gallery_url.'img'.$imgid.'.htm';
}else{
$img_url = $gallery_url.'details.php?image_id='.$imgid;
}
print_xml($img_url,$prio_img,$date,$freq_img);
}
}
$profiles = mysql_query('SELECT user_id, user_lastaction FROM ' . $table_prefix . 'users WHERE user_id >= "1"');
while ($profile = mysql_fetch_array($profiles))
{
$profileid = $profile['user_id'];
$date = $profile['user_lastaction'];
$date = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
$profile_url = $gallery_url.'member.php?action=showprofile&user_id='.$profileid;
print_xml($profile_url,$prio_profile,$date,$freq_profile);
}
# Print XML footer
xml_foot();
function xml_head() {
$freq = 'daily';
$priority = '1.0';
$mod = date("Y-m-d")."T".date("H:i:s")."+00:00";
echo "<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd\">";
}
#-----------------------------------------------
# xml_foot
#-----------------------------------------------
function xml_foot() {
echo "
</urlset>";
}
#-----------------------------------------------
# print_xml
#-----------------------------------------------
function print_xml($url,$priority,$lastmod,$changefreq) {
$temp = "<url>
<loc>$url</loc>";
$temp .= " <priority>$priority</priority>";
if ($lastmod != '') {
$temp .=" <lastmod>$lastmod</lastmod>";
}
$temp .= " <changefreq>$changefreq</changefreq>
</url>";
echo $temp;
}
?>
@mawenzi
Verschiebe diesen Thread doch bitte mal und umbennen des Titels wäre bestimmt auch keine schlechte Idee... (o:
-
@ Acidgod
... gesagt ... getan ... ;)
-
THX... (o:
-
Great job!
-
I think I dont have access to .htaccess.
Can you tell me exactly what this mod does?
-
You don't need the .htaccess Part....
Here you can take a look:
http://www.picsforfree.de/google.php
-
You don't need the .htaccess Part....
Here you can take a look:
http://www.picsforfree.de/google.php
I can't see it!
I get this:
http://www.picsforfree.de/cat1.htm 0.8 daily http://www.picsforfree.de/cat2.htm 0.8 daily http://www.picsforfree.de/cat4.htm 0.8 daily http://www.picsforfree.de/cat5.htm 0.8 daily http://www.picsforfree.de/cat6.htm 0.8 daily http://www.picsforfree.de/cat7.htm 0.8 daily http://www.picsforfree.de/cat8.htm 0.8 daily http://www.picsforfree.de/cat9.htm 0.8 daily http://www.picsforfree.de/cat10.htm 0.8 daily http://www.picsforfree.de/cat11.htm 0.8 daily http://www.picsforfree.de/cat12.htm 0.8 daily http://www.picsforfree.de/cat13.htm 0.8 daily http://www.picsforfree.de/cat14.htm 0.8 daily http://www.picsforfree.de/cat15.htm 0.8 daily http://www.picsforfree.de/cat16.htm 0.8 daily http://www.picsforfree.de/cat17.htm 0.8 daily http://www.picsforfree.de/cat18.htm 0.8 daily http://www.picsforfree.de/cat19.htm 0.8 daily http://www.picsforfree.de/cat20.htm 0.8 daily http://www.picsforfree.de/cat21.htm 0.8 daily http://www.picsforfree.de/cat22.htm 0.8 daily http://www.picsforfree.de/cat23.htm 0.8 daily http://www.picsforfree.de/cat24.htm 0.8 daily http://www.picsforfree.de/cat25.htm 0.8 daily http://www.picsforfree.de/cat26.htm 0.8 daily http://www.picsforfree.de/cat27.htm 0.8 daily http://www.picsforfree.de/cat28.htm 0.8 daily http://www.picsforfree.de/cat29.htm 0.8 daily http://www.picsforfree.de/cat30.htm 0.8 daily http://www.picsforfree.de/cat31.htm 0.8 daily http://www.picsforfree.de/cat32.htm 0.8 daily http://www.picsforfree.de/cat33.htm 0.8 daily http://www.picsforfree.de/cat34.htm 0.8 daily http://www.picsforfree.de/cat36.htm 0.8 daily http://www.picsforfree.de/cat37.htm 0.8 daily http://www.picsforfree.de/cat38.htm 0.8 daily http://www.picsforfree.de/cat39.htm 0.8 daily http://www.picsforfree.de/cat40.htm 0.8 daily http://www.picsforfree.de/cat41.htm 0.8 daily http://www.picsforfree.de/cat42.htm 0.8 daily http://www.picsforfree.de/cat43.htm 0.8 daily http://www.picsforfree.de/cat44.htm 0.8 daily http://www.picsforfree.de/cat45.htm 0.8 daily http://www.picsforfree.de/cat46.htm 0.8 daily http://www.picsforfree.de/cat47.htm 0.8 daily http://www.picsforfree.de/cat48.htm 0.8 daily http://www.picsforfree.de/cat49.htm 0.8 daily http://www.picsforfree.de/cat50.htm 0.8 daily http://www.picsforfree.de/cat51.htm 0.8 daily http://www.picsforfree.de/cat52.htm 0.8 daily http://www.picsforfree.de/cat53.htm 0.8 daily http://www.picsforfree.de/cat54.htm 0.8 daily http://www.picsforfree.de/cat55.htm 0.8 daily http://www.picsforfree.de/cat56.htm 0.8 daily http://www.picsforfree.de/cat57.htm 0.8 daily http://www.picsforfree.de/cat58.htm 0.8 daily http://www.picsforfree.de/cat68.htm 0.8 daily http://www.picsforfree.de/cat73.htm 0.8 daily http://www.picsforfree.de/cat83.htm 0.8 daily http://www.picsforfree.de/cat84.htm 0.8 daily http://www.picsforfree.de/cat85.htm 0.8 daily http://www.picsforfree.de/cat86.htm 0.8 daily http://www.picsforfree.de/cat87.htm 0.8 daily http://www.picsforfree.de/cat88.htm 0.8 daily http://www.picsforfree.de/cat89.htm 0.8 daily http://www.picsforfree.de/cat90.htm 0.8 daily http://www.picsforfree.de/cat91.htm 0.8 daily http://www.picsforfree.de/cat92.htm 0.8 daily http://www.picsforfree.de/cat93.htm 0.8 daily http://www.picsforfree.de/cat94.htm 0.8 daily http://www.picsforfree.de/cat95.htm 0.8 daily http://www.picsforfree.de/cat96.htm 0.8 daily http://www.picsforfree.de/cat97.htm 0.8 daily http://www.picsforfree.de/cat98.htm 0.8 daily http://www.picsforfree.de/cat99.htm 0.8 daily http://www.picsforfree.de/cat100.htm 0.8 daily http://www.picsforfree.de/cat101.htm 0.8 daily http://www.picsforfree.de/cat102.htm 0.8 daily http://www.picsforfree.de/cat103.htm 0.8 daily http://www.picsforfree.de/cat104.htm 0.8 daily http://www.picsforfree.de/cat105.htm 0.8 daily http://www.picsforfree.de/cat106.htm 0.8 daily http://www.picsforfree.de/cat107.htm 0.8 daily http://www.picsforfree.de/cat108.htm 0.8 daily http://www.picsforfree.de/cat109.htm 0.8 daily http://www.picsforfree.de/cat110.htm 0.8 daily http://www.picsforfree.de/cat111.htm 0.8 daily http://www.picsforfree.de/cat112.htm 0.8 daily http://www.picsforfree.de/cat113.htm 0.8 daily http://www.picsforfree.de/cat114.htm 0.8 daily http://www.picsforfree.de/cat115.htm 0.8 daily http://www.picsforfree.de/cat116.htm 0.8 daily http://www.picsforfree.de/cat117.htm 0.8 daily http://www.picsforfree.de/cat118.htm 0.8 daily http://www.picsforfree.de/cat119.htm 0.8 daily http://www.picsforfree.de/cat120.htm 0.8 daily http://www.picsforfree.de/cat121.htm 0.8 daily http://www.picsforfree.de/cat122.htm 0.8 daily http://www.picsforfree.de/cat123.htm 0.8 daily http://www.picsforfree.de/cat124.htm 0.8 daily http://www.picsforfree.de/cat125.htm 0.8 daily http://www.picsforfree.de/cat126.htm 0.8 daily http://www.picsforfree.de/cat127.htm 0.8 daily http://www.picsforfree.de/cat128.htm 0.8 daily http://www.picsforfree.de/cat129.htm 0.8 daily http://www.picsforfree.de/cat130.htm 0.8 daily http://www.picsforfree.de/cat131.htm 0.8 daily http://www.picsforfree.de/cat132.htm 0.8 daily http://www.picsforfree.de/cat134.htm 0.8 daily http://www.picsforfree.de/cat135.htm 0.8 daily http://www.picsforfree.de/cat136.htm 0.8 daily http://www.picsforfree.de/cat137.htm 0.8 daily http://www.picsforfree.de/cat138.htm 0.8 daily http://www.picsforfree.de/cat139.htm 0.8 daily http://www.picsforfree.de/cat140.htm 0.8 daily http://www.picsforfree.de/cat141.htm 0.8 daily http://www.picsforfree.de/cat142.htm 0.8 daily http://www.picsforfree.de/cat143.htm 0.8 daily http://www.picsforfree.de/cat144.htm 0.8 daily http://www.picsforfree.de/img7367.htm 0.5 2006-09-05T11:07:18+00:00 yearly http://www.picsforfree.de/img7368.htm 0.5 2006-09-05T11:07:18+00:00 yearly http://www.picsforfree.de/img193.htm 0.5 2005-09-06T16:16:20+00:00 yearly http://www.picsforfree.de/img192.htm 0.5 2005-09-06T16:16:20+00:00 yearly http://www.picsforfree.de/img191.htm 0.5 2005-09-06T16:16:20+00:00 yearly http://www.picsforfree.de/img190.htm 0.5 2005-09-06T16:16:20+00:00 yearly http://www.picsforfree.de/img189.htm 0.5 2005-09-06T16:16:20+00:00 yearly http://www.picsforfree.de/img188.htm 0.5 2005-09-06T16:16:20+00:00 yearly http://www.picsforfree.de/img274.htm 0.5 2005-09-06T17:01:54+00:00 yearly http://www.picsforfree.de/img186.htm 0.5 2005-09-06T16:16:20+00:00 yearly http://www.picsforfree.de/img276.htm 0.5 2005-09-06T17:01:54+00:00 yearly http://www.picsforfree.de/img185.htm 0.5 2005-09-06T16:16:20+00:00 yearly http://www.picsforfree.de/img202.htm 0.5 2005-09-06T16:43:19+00:00 yearly http://www.picsforfree.de/img275.htm 0.5 2005-09-06T17:01:54+00:00 yearly http://www.picsforfree.de/img182.htm 0.5 2005-09-06T16:16:20+00:00 yearly http://www.picsforfree.de/img181.htm 0.5 2005-09-06T16:16:20+00:00 yearly http://www.picsforfree.de/img180.htm 0.5 2005-09-06T16:16:20+00:00 yearly http://www.picsforfree.de/img179.htm 0.5 2005-09-06T16:16:20+00:00 yearly http://www.picsforfree.de/img178.htm 0.5 2005-09-06T16:16:20+00:00 yearly http://www.picsforfree.de/img177.htm 0.5 2005-09-06T16:16:20+00:00 yearly http://www.picsforfree.de/img176.htm 0.5 2005-09-06T16:16:20+00:00 yearly http://www.picsforfree.de/img175.htm
Lot's of that! :D
-
LOL...
You don't now Google Sitemap? 8O
http://www.google.com/webmasters/sitemaps/
-
I don't have sitemap.xml file!
I have to create it manualy or...? :?
-
Try to use the IE... (o:
Mozilla don't show XML Files correctly...
-
How does this MOD treat links to images/categories which belong to locked/non-public categories/images?
-
is it so hard to put the file on your webspace and take a look? :? :?
-
thanks for mod.
But
Acidgod I see this error.
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /.../galeri/google.php on line 68
-
which mysql version?
-
thanks for reply.
my mysql version: 4.1.20-1
my php version: 4.4.2-1
my httpd version: 2.0.53-9.15
on suse linux 9.3
:(
-
try to change
'users WHERE user_id >= "1"'
to
'users'
-
thanks for reply.
but some error. :cry:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /.../galeri/google.php on line 68
-
is it so hard to put the file on your webspace and take a look? :? :?
Well I tried and I found out that it listed ALL images/categories. Also those which is supposed to be non-public. I don't know anything about is, but is that smart? Or doesn't it compromise the procettion of non-public images/categories?
-
how do i get the xml file ?
-
1. Upload the file google.php to the root folder of 4images.
2. Modify the .htaccess to rewrite the URL of sitemap.
RewriteRule ^sitemap.xml$ google.php
Now the URL of sitemap is: http://www.yourdomain.com/sitemap.xml
-
Got it thanks a lot
-
i get this error
Errors
Line:
5
Paths don't match
We've detected that you submitted your Sitemap using a URL path that doesn't include the www prefix (for instance, http://example.com/sitemap.xml). However, the URLs listed inside your Sitemap do use the www prefix (for instance, http://www.example.com/myfile.htm). [?] URL:
http://www.mehsus.com
Line:
14
Invalid date
An invalid date was found. Please fix the date or formatting before resubmitting. [?] Parent tag:
Tag:
Value: url
lastmod
Line:
11
Paths don't match
We've detected that you submitted your Sitemap using a URL path that doesn't include the www prefix (for instance, http://example.com/sitemap.xml). However, the URLs listed inside your Sitemap do use the www prefix (for instance, http://www.example.com/myfile.htm). [?] URL:
http://www.mehsus.com/cat1.htm
Line:
20
Invalid date
An invalid date was found. Please fix the date or formatting before resubmitting. [?] Parent tag:
Tag:
Value: url
lastmod
Line:
17
Paths don't match
We've detected that you submitted your Sitemap using a URL path that doesn't include the www prefix (for instance, http://example.com/sitemap.xml). However, the URLs listed inside your Sitemap do use the www prefix (for instance, http://www.example.com/myfile.htm). [?] URL:
http://www.mehsus.com/cat2.htm
Line:
26
Invalid date
An invalid date was found. Please fix the date or formatting before resubmitting. [?] Parent tag:
Tag:
Value: url
lastmod
Line:
23
Paths don't match
We've detected that you submitted your Sitemap using a URL path that doesn't include the www prefix (for instance, http://example.com/sitemap.xml). However, the URLs listed inside your Sitemap do use the www prefix (for instance, http://www.example.com/myfile.htm). [?] URL:
http://www.mehsus.com/cat3.htm
Line:
32
Invalid date
An invalid date was found. Please fix the date or formatting before resubmitting. [?] Parent tag:
Tag:
Value: url
lastmod
Line:
29
Paths don't match
We've detected that you submitted your Sitemap using a URL path that doesn't include the www prefix (for instance, http://example.com/sitemap.xml). However, the URLs listed inside your Sitemap do use the www prefix (for instance, http://www.example.com/myfile.htm). [?] URL:
http://www.mehsus.com/cat4.htm
Line:
38
Invalid date
An invalid date was found. Please fix the date or formatting before resubmitting. [?] Parent tag:
Tag:
Value: url
lastmod
-
The Mod works fine... (o:
But you have set up google sitemap wrong...
go to google.com an setup the sitemap with www in front of your domain...
http://www.mehsus.com/google.php
and not:
http://mehsus.com/google.php
Do you understand what i meen?
-
thanks a lot its done now :D
-
bro 1200 submitted successfully but whats this error about ?
Errors
Line:
14
Invalid date
An invalid date was found. Please fix the date or formatting before resubmitting. [?] Parent tag:
Tag:
Value: url
lastmod
Line:
20
Invalid date
An invalid date was found. Please fix the date or formatting before resubmitting. [?] Parent tag:
Tag:
Value: url
lastmod
Line:
26
Invalid date
An invalid date was found. Please fix the date or formatting before resubmitting. [?] Parent tag:
Tag:
Value: url
lastmod
Line:
32
Invalid date
An invalid date was found. Please fix the date or formatting before resubmitting. [?] Parent tag:
Tag:
Value: url
lastmod
Line:
38
Invalid date
An invalid date was found. Please fix the date or formatting before resubmitting. [?] Parent tag:
Tag:
Value: url
lastmod
Line:
44
Invalid date
An invalid date was found. Please fix the date or formatting before resubmitting. [?] Parent tag:
Tag:
Value: url
lastmod
Line:
50
Invalid date
An invalid date was found. Please fix the date or formatting before resubmitting. [?] Parent tag:
Tag:
Value: url
lastmod
Line:
56
Invalid date
An invalid date was found. Please fix the date or formatting before resubmitting. [?] Parent tag:
Tag:
Value: url
lastmod
Line:
62
Invalid date
An invalid date was found. Please fix the date or formatting before resubmitting. [?] Parent tag:
Tag:
Value: url
lastmod
Line:
68
Invalid date
An invalid date was found. Please fix the date or formatting before resubmitting. [?] Parent tag:
Tag:
Value: url
las
-
please post you google.php here....
-
here it is bro
-
why you don't use my code???
<?
# Create Google Sitemap for 4images
# Created by Mai Minh (minh@maingo.com http://www.vna2z.com)
# Modified by Oliver van der Werf (info@flash-webdesign.de http://www.flash-webdesign.de)
# Date: 28/11/2006 | 02.01.2007
# You can send ping to Google with this request: http://www.google.com/webmasters/sitemaps/ping?sitemap=URL_TO_YOUR_SITEMAP
#---------------------------------
require("config.php");
$link=mysql_connect("$db_host","$db_user","$db_password");
mysql_select_db("$db_name") or die ("Cannot connect database!");
# 4images top page (with trailing slash)
$gallery_url = 'http://www.picsforfree.de/';
# Priotity
//select between 0.0 and 1.0
//0.0 identifies the lowest priority page(s) on your website
//1.0 identifies the highest priority page(s) on your website
$prio_img = 0.5;
$prio_cat = 0.8;
$prio_profile = 0.3;
# Frequency
//"always", "hourly", "daily", "weekly", "monthly", "yearly" or "never"
$freq_img = 'yearly';
$freq_cat = 'daily';
$freq_profile = 'daily';
# Use Short URLs
$shortURL = 1; // 0 or 1
# Print XML header
xml_head();
# Print URLs
$categories = mysql_query('SELECT cat_id FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
if ($shortURL == 1) {
$cat_url = $gallery_url.'cat'.$catid.'.htm';
}else {
$cat_url = $gallery_url.'categories.php?cat_id='.$catid;
}
print_xml($cat_url,$prio_cat,'',$freq_cat);
}
$images = mysql_query('SELECT image_id,image_active,image_date FROM ' . $table_prefix . 'images ');
while ($image = mysql_fetch_array($images))
{
if ($image['image_active'] == 1) {
$imgid = $image['image_id'];
$date = $image['image_date'];
$date = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
if ($shortURL == 1) {
$img_url = $gallery_url.'img'.$imgid.'.htm';
}else{
$img_url = $gallery_url.'details.php?image_id='.$imgid;
}
print_xml($img_url,$prio_img,$date,$freq_img);
}
}
$profiles = mysql_query('SELECT user_id, user_lastaction FROM ' . $table_prefix . 'users WHERE user_id >= "1"');
while ($profile = mysql_fetch_array($profiles))
{
$profileid = $profile['user_id'];
$date = $profile['user_lastaction'];
$date = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
$profile_url = $gallery_url.'member.php?action=showprofile&user_id='.$profileid;
print_xml($profile_url,$prio_profile,$date,$freq_profile);
}
# Print XML footer
xml_foot();
function xml_head() {
$freq = 'daily';
$priority = '1.0';
$mod = date("Y-m-d")."T".date("H:i:s")."+00:00";
echo "<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd\">";
}
#-----------------------------------------------
# xml_foot
#-----------------------------------------------
function xml_foot() {
echo "
</urlset>";
}
#-----------------------------------------------
# print_xml
#-----------------------------------------------
function print_xml($url,$priority,$lastmod,$changefreq) {
$temp = "<url>
<loc>$url</loc>";
$temp .= " <priority>$priority</priority>";
if ($lastmod != '') {
$temp .=" <lastmod>$lastmod</lastmod>";
}
$temp .= " <changefreq>$changefreq</changefreq>
</url>";
echo $temp;
}
?>
-
ok bro using da code u gave me thx bro
-
Works great! Thanks both!
Got a "Parse error: syntax error, unexpected T_STRING"
replaced
echo "<?xml version='1.0' encoding='UTF-8'?>
with
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
Dont know if its a cut/paste/firefox/IE/PHP error but that solved it.
/Thomas
-
I still can't get sitemap.xml file! :(
-
http://www.4homepages.de/forum/index.php?action=dlattach;topic=15687.0;attach=1098
here dude
-
What to avoid mistakes at processing google the robot of categories, it is necessary a code
$categories = mysql_query('SELECT cat_id FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
if ($shortURL == 1) {
$cat_url = $gallery_url.'cat'.$catid.'.htm';
}else {
$cat_url = $gallery_url.'categories.php?cat_id='.$catid;
}
print_xml($cat_url,$prio_cat,'',$freq_cat);
}
replace
$categories = mysql_query('SELECT cat_id FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
if ($shortURL == 1) {
$cat_url = $gallery_url.'cat'.$catid.'.htm';
}else {
$cat_url = $gallery_url.'categories.php?cat_id='.$catid;
}
$date = date("Y-m-d")."T".date("H:i:s")."+00:00";
print_xml($cat_url,$prio_cat,$date,$freq_cat);
}
-
In which directory this the file .htaccecs , is necessary to create one new one in the root of 4i?
In GOOGLE:
That direction is necessary to write in gloogle for sitemap:
http://www.site.com/sitemap.xml
ór
http://www.site.com/google.php
thanks
-
Nifty code, thank you very much.
My one question is there a way I can get it to output the rewrite URL I use on my site like http://www.imgdump.info/cat-funny-39.htm instead of http://www.imgdump.info/cat39.htm?
-
You may need to add this line to you htaccess to get the file to work
RewriteEngine On
-
# Frequency
//"always", "hourly", "daily", "weekly", "monthly", "yearly" or "never"
$freq_img = 'yearly';
$freq_cat = 'daily';
$freq_profile = 'daily';
Does that mean daily indexing?
-
and would this
# Use Short URLs
$shortURL = 1; // 0 or 1
which one is for if you dont have the short url mod-
0 or 1?
-
Its actually very easy (once you know the answer :wink:)
1 = ON
0 = OFF
so in your case, you don’t need the shortURL so it has to be off
$shortURL = 0;
And this maybe off interest to some of you.
I have several private categories and if I give those url s to Google it will end up at the start page because Google doesn’t have permission to view the image. I changed the query string so that Google will only get the url for public images.
$categories = mysql_query('SELECT cat_id FROM ' . $table_prefix . 'categories WHERE auth_viewimage = 0');
and
$images = mysql_query('SELECT image_id,image_active,image_date
FROM ' . $table_prefix . 'images
WHERE image_active = 1
AND cat_id IN (SELECT cat_id
FROM 4images_categories
WHERE auth_viewimage = 0)');
-
Thanks!
Appreciate it
Robert
-
I am using short url and daily update my site, plz tell me will google.php file updates sitemap every time when i update my site ?
one more thing is i give this link "http://www.yourdomain.com/sitemap.xml" but i didnt have sitemap.xml file, will google.php will create sitemap.xml itself ?
Plz can you give code file in zip format for short url enables, infact i am afraid that i will make some mistake in php file.
I will upload wallpapers and gd libarary etc... will create thumbnails itself, Can you plz tell how to control thumbnails size ?
AcidGod Dear Plz Help i will be very thankfull to you and i am using version 1.74
-
Hi..
am using google SEO mod.. http://www.4homepages.de/forum/index.php?topic=17598.0 (http://www.4homepages.de/forum/index.php?topic=17598.0)
can i have a site map based on this? please help me out.. ill be grateful
Regards,
sami
-
Hallo,
ich möchte den MOD auch gerne Nutzen, aber bei mir wird irgendwie keine sitemap.xml erstellt.
Also wenn ich auf htt://www.picture-collection.net/google.php (http://htt://www.picture-collection.net/google.php) durchlaufen lassen, wird keine sitemap datei erstellt. Habe das auch schon mit dem IE ausprobiert und in meinem Webspace geschaut. Die .htaccess Datei musste ich deaktivieren, da ich sonst das script nicht laufen lassen konnte und bei mir einfach nur der Quellcode erschienen ist.
Wer kann mir helfen.
Gruß Lennforce
-
Hallo,
das ist auch kein funktionierender link :wink:
versuch mal: http://www.picture-collection.net/google.php (http://www.picture-collection.net/google.php)
Kurt
-
Ja, den meinte ich ja, aber von einer sitemap.xml nichts zu sehen.
-
sehr gute arbeit!
-
oh jetzt hab ich doch noch ne frage bzw. nen problem:
ich nutze den MOD google friendly urls (http://www.4homepages.de/forum/index.php?topic=17598.0), so dass die short urls bei mir anders aussehen. mit diesem sitemap mod stimmen die urls dann nicht überein
Wie müsste ich den code in der google.php umschreiben? ich vermute es handelt sich um zeile 38 - 49.
-
I daily update my site, will sitemap also be updated automatically when i update my site ? Plz attach sitemap final working file. Thanks
-
how can i prevent google's search engine/robots from adding my site links to their search engine without "?sessionid=0f89a8a34ec9ef1872abc65b47a0a8dc" , after every link there is "?sessionid=" which i dont like .. :S anybody can help me? thanks
-
@skunk:
Please read this:
http://www.4homepages.de/forum/index.php?topic=8802.0
-
I daily update my site, will sitemap also be updated automatically when i update my site ? Plz attach sitemap final working file. Thanks
Will anyone plz help with this issue ?
-
:arrow: yes
-
THen plz dear help as you told yes.
-
As others say, this would be nice to have working with the "[MOD] Google Friendly Urls For 4images Best Seo Mod" "http://www.4homepages.de/forum/index.php?topic=17598.60"
-
Do not cat id vs photo id
seo activ
/cat1.htm = Not Found
/img700.htm = Not Found
Please help me
-
Thanks but I have more than 50000 URL :roll:
so I got this error on Google Sitemape
Your Sitemap contains too many URLs. Please create multiple Sitemaps with up to 50000 URLs each and submit all Sitemaps
-
I don´t need to copy into the file of this topic my first xml code?
-
Forget it... I just have to put the right URL...
-
Hi,
I have done everything as per instruction below. How do I create the sitemap? Is it created automatically or do I need to turn on the process?
Thank you.
Hi,
You can create a Google Sitemap for your Gallery to improve traffic to your site.
You must install the Search Engine friendly MOD before use this file.
1. Upload the file google.php to the root folder of 4images.
2. Modify the .htaccess to rewrite the URL of sitemap.
RewriteRule ^sitemap.xml$ google.php
Now the URL of sitemap is: http://www.yourdomain.com/sitemap.xml
You can send a ping to Google to notify your new sitemap by this way: http://www.google.com/webmasters/sitemaps/ping?sitemap=URL_TO_YOUR_SITEMAP
Good luck!
Mai
-
Just Download google.zip
-
Just Download google.zip
Thank you.
I have installed it but I encountered a problem.
I have earlier install a MOD to have a Google SEF URL as per this thread: http://www.4homepages.de/forum/index.php?topic=17598.0
The URL format does not work with this Google sitemap. Does anyone has any solution to it? I am not a programmer and it is really tough for me to read those code.
Thank you.
-
Hey dar!
I Need some help please..
Ive installed your mod for short urls http://www.4homepages.de/forum/index.php?topic=6729.msg57268#msg57268 (http://www.4homepages.de/forum/index.php?topic=6729.msg57268#msg57268)
It works fine, and ive also installed Google Sitemap:http://www.4homepages.de/forum/index.php?topic=15687.0 (http://www.4homepages.de/forum/index.php?topic=15687.0)
Now i'd like to know how i can have the same urls in my sitemap as my gallery?
Hope you cna help me :wink:
Julz
-
I'm not understanding well what you want...
-
oky
I installed the Short URLs MOD, so my urls are now like this:
www.site.com/cat-categoryname-id.htm & www.site.com/img-imagename-id.htm
That is all working fine, but now in my Google Sitemap, the image name are still as follow:
www.site.com/cat-id.htm & www.site.com/img-id.htm
How could i change it so that my urls in my sitemap will also show the ../img-imagename-id.htm in it?
Hope that makes more sense :oops:
Julz
-
plz i confused now :cry:
what is the exact file which i upload it
the one in the attachment
or the code in this reply
http://www.4homepages.de/forum/index.php?topic=15687.msg85639#msg85639
i want the final php after all customization
plz help
-
Hello,
I have the same problem, like other users. I don't get the file "sitemap.xml" in the webroot created.
And please, I want the absolutely updated and latest version of this great mod too.
Kind regards,
Krali
-
I'm having the same problem others are that are using the Search Engine Friendly URLs aka Short URLs mod found here: http://www.4homepages.de/forum/index.php?topic=6729.0
My new image url's are like this: http://www.domain.com/image-demon-236.htm, but the sitemap is showing the urls like this: http://www.domain.com/img236.htm, which is the old url structure.
Can I fix this?
-
I'm having the same problem others are that are using the Search Engine Friendly URLs aka Short URLs mod found here: http://www.4homepages.de/forum/index.php?topic=6729.0
My new image url's are like this: http://www.domain.com/image-demon-236.htm, but the sitemap is showing the urls like this: http://www.domain.com/img236.htm, which is the old url structure.
Can I fix this?
Try this...
Open google.php
Find:
$categories = mysql_query('SELECT cat_id FROM ' . $table_prefix . 'categories');
Replace with:
$categories = mysql_query('SELECT cat_id, cat_name FROM ' . $table_prefix . 'categories');
Find:
$catid = $category['cat_id'];
Add after:
$cat_name = $category['cat_name'];
Find:
$cat_url = $gallery_url.'cat'.$catid.'.htm';
Replace with:
$cat_url = $gallery_url.'cat-'.$cat_name.'-'.$catid.'.htm';
Find:
$images = mysql_query('SELECT image_id,image_active,image_date FROM ' . $table_prefix . 'images ');
Replace with:
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images ');
Find:
$imgid = $image['image_id'];
Add after:
$imgna = $image['image_name'];
Find:
$img_url = $gallery_url.'img'.$imgid.'.htm';
Replace with:
$img_url = $gallery_url.'img'.$image_name.'-'.$imgid.'.htm';
When works, enjoy. It should be not work with "äüöß" or "ÄÖÜ" in cat_name or image_name. Have somebody a solution?
OR
Find:
$shortURL = 1;
Change to:
$shortURL = 0;
Take care, CanonInk
-
CanonInk, this works for me only for categories.
The images continues
http://www.estampafotos.com/galeria/img-23.htm
Any idea?
Thanks!!!
-
I'm having a problem
My root folder of 4 images is http://www.estampafotos.com/galeria/
The sitemap is generated in http://www.estampafotos.com/sitemap.xml
When i open the sitemap in browser shows this error
Warning: require(config.php) [function.require]: failed to open stream: No such file or directory in /home2/estampaf/public_html/google.php on line 9
Warning: require(config.php) [function.require]: failed to open stream: No such file or directory in /home2/estampaf/public_html/google.php on line 9
Fatal error: require() [function.require]: Failed opening required 'config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home2/estampaf/php') in /home2/estampaf/public_html/google.php on line 9
How can i fix this?
Thanks!!!!
-
edit lol.. i was using another seo mod.. im try use the right one now ;)
-
I'm having a problem
My root folder of 4 images is http://www.estampafotos.com/galeria/
The sitemap is generated in http://www.estampafotos.com/sitemap.xml
When i open the sitemap in browser shows this error
Warning: require(config.php) [function.require]: failed to open stream: No such file or directory in /home2/estampaf/public_html/google.php on line 9
Warning: require(config.php) [function.require]: failed to open stream: No such file or directory in /home2/estampaf/public_html/google.php on line 9
Fatal error: require() [function.require]: Failed opening required 'config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home2/estampaf/php') in /home2/estampaf/public_html/google.php on line 9
How can i fix this?
Thanks!!!!
you need put google.php to root where is config.php (it seems config.php missing) or try set better attributres to config.php (set it to 777)
-
I'm having a problem
My root folder of 4 images is http://www.estampafotos.com/galeria/
The sitemap is generated in http://www.estampafotos.com/sitemap.xml
Thanks!!!!
Hi,
The 4images Copyright is not available.
I assume that you have been licensed.
http://www.4homepages.de/4images/license.php#english
KurtW
-
I adapted for those who use the [Mod] Search Engine Friendly URLs aka Short URLs (http://www.4homepages.de/forum/index.php?topic=6729.0).
I hope it will be useful for someone.
-
Thanks but I have more than 50000 URL :roll:
so I got this error on Google Sitemape
Your Sitemap contains too many URLs. Please create multiple Sitemaps with up to 50000 URLs each and submit all Sitemaps
any fix for this 50000 url limit. i too facing the same issue now :(
-
Dear sir it is Argent that i using your given site map detail everything is fine but site map is showing the url like that
http://www.picturexone.com/cat4.htm
but my actually link is like that: http://picturexone.com/img-lamberti-car-2-7.htm
how can i change my site map like that please dear do it please please
-
So I did some changes in google.php and right now I have "almost" properly formatted links in sitemap.xml
but still I cant figure out how to replace empty space in names with "-"
Right now my links in sitemap looks like this:
http://www.myanimalsworld.com/img-wedge pond-17.htm
but working link should be like this with missing - between words
http://www.myanimalsworld.com/img-wedge-pond-17.htm
here is my google.php
<?
# Create Google Sitemap for 4images
# Created by Mai Minh (minh@maingo.com http://www.vna2z.com)
# Modified by Oliver van der Werf (info@flash-webdesign.de http://www.flash-webdesign.de)
# Date: 28/11/2006 | 02.01.2007
# You can send ping to Google with this request: http://www.google.com/webmasters/sitemaps/ping?sitemap=URL_TO_YOUR_SITEMAP
#---------------------------------
require("config.php");
$link=mysql_connect("$db_host","$db_user","$db_password");
mysql_select_db("$db_name") or die ("Cannot connect database!");
# 4images top page (with trailing slash)
$gallery_url = 'http://www.myanimalsworld.com/';
# Priotity
//select between 0.0 and 1.0
//0.0 identifies the lowest priority page(s) on your website
//1.0 identifies the highest priority page(s) on your website
$prio_img = 0.5;
$prio_cat = 0.8;
$prio_profile = 0.3;
# Frequency
//"always", "hourly", "daily", "weekly", "monthly", "yearly" or "never"
$freq_img = 'daily';
$freq_cat = 'daily';
$freq_profile = 'daily';
# Use Short URLs
$shortURL = 1; // 0 or 1
# Print XML header
xml_head();
# Print URLs
$categories = mysql_query('SELECT cat_id, cat_name FROM ' . $table_prefix . 'categories WHERE auth_viewimage = 0');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
$cat_name = $category['cat_name'] = strtr($category['cat_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
if ($shortURL == 1) {
$cat_url = $gallery_url.'cat-'.$cat_name.'-'.$catid.'.htm';
}else {
$cat_url = $gallery_url.'categories.php?cat_id='.$catid;
}
print_xml($cat_url,$prio_cat,'',$freq_cat);
}
$images = mysql_query('SELECT image_id, image_name, image_active, image_date FROM ' . $table_prefix . 'images');
while ($image = mysql_fetch_array($images))
{
if ($image['image_active'] == 1) {
$imgid = $image['image_id'];
$imgna = $image['image_name'] = strtr($image['image_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
$date = $image['image_date'];
$date = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
if ($shortURL == 1) {
$img_url = $gallery_url.'img-'.$imgna.'-'.$imgid.'.htm';
}else{
$img_url = $gallery_url.'details.php?image_id='.$imgid;
}
print_xml($img_url,$prio_img,$date,$freq_img);
}
}
$profiles = mysql_query('SELECT user_id, user_lastaction FROM ' . $table_prefix . 'users WHERE user_id >= "1"');
while ($profile = mysql_fetch_array($profiles))
{
$profileid = $profile['user_id'];
$date = $profile['user_lastaction'];
$date = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
$profile_url = $gallery_url.'member.php?action=showprofile&user_id='.$profileid;
print_xml($profile_url,$prio_profile,$date,$freq_profile);
}
# Print XML footer
xml_foot();
function xml_head() {
$freq = 'daily';
$priority = '1.0';
$mod = date("Y-m-d")."T".date("H:i:s")."+00:00";
echo "<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd\">";
}
#-----------------------------------------------
# xml_foot
#-----------------------------------------------
function xml_foot() {
echo "
</urlset>";
}
#-----------------------------------------------
# print_xml
#-----------------------------------------------
function print_xml($url,$priority,$lastmod,$changefreq) {
$temp = "<url>
<loc>$url</loc>";
$temp .= " <priority>$priority</priority>";
if ($lastmod != '') {
$temp .=" <lastmod>$lastmod</lastmod>";
}
$temp .= " <changefreq>$changefreq</changefreq>
</url>";
echo $temp;
}
?>
-
below
$imgna = $image['image_name'] = strtr($image['image_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
Insert:
$imgna = str_replace(array(" ", "-"), array("_", "_"), $imgna); ### " - " used as a string separator in URL, it might break the link if image name has such character
$imgna = urlencode($imgna); ### make sure any other non-latin letters or special characters converted to a proper url string
-
Thanks V@no this help me a lot!!!! I have actually one more question, some of my photo names are in this format
Ovis Canadensis (Bighorn sheep)
in my links they are shown like ovis_canadensis_(bighorn_sheep)
what kind of characters are safe for using in links because I think I have to change this () to something else. Maybe for _ but I am not sure if you can have two of them in line like this __
-
urlencode() function would convert anything that is not safe for links to link-safe format, so if () are not converted, then they are safe. Do you have problems with such links?
(http://img401.imageshack.us/img401/8317/problemsolvingep8.th.jpg) (http://img401.imageshack.us/img401/8317/problemsolvingep8.jpg)
(warning: foul language)
P.S.
You can have as many _ in a link as a link length standard limit is.
-
urlencode() function would convert anything that is not safe for links to link-safe format, so if () are not converted, then they are safe. Do you have problems with such links?
(http://img401.imageshack.us/img401/8317/problemsolvingep8.th.jpg) (http://img401.imageshack.us/img401/8317/problemsolvingep8.jpg)
(warning: foul language)
I don't have any problem with this kind of links but I was asking because I wasn't sure if this characters are safe or not. Thanks for you help and time.
-
Thanks for this mod!
-
Кто нибудь может помочь мне?? Как исправить google.php, чтоб картинки не брались из категории 0?
PLEASE!!! :cry:
-
$images = mysql_query('SELECT image_id,image_active,image_date FROM ' . $table_prefix . 'images WHERE cat_id NOT IN (0,1,2,3)');
-
что значит NOT IN (0,1,2,3)');?
Мне нужно не брать из категорий 0 и 7, а брать из 1,2,3,4,5,6.
ps V@no, СПАСИБО! Thanx, +1 :)
-
это был пример. меняете числа на ID категорий, которые хотите исключить из списка. (1,7) = исключить две категории: категорию с ID 7 и с ID 1
P.S.
в 4images не возможно иметь категорию с ID 0
-
Ясно, понял. Как поступить с категориями? Также?
$categories = mysql_query('SELECT cat_id, cat_name FROM ' . $table_prefix . 'categories' WHERE cat_id NOT IN (0,1,2,3)');
Еще возвращаясь к карте сайта, возможно ли там добавить к выводу не только категории, но и все картинки?
PS. У меня категория 0 есть, это мод, который делали на заказ отдельно. Он выводит к основной картинке дополнительные, которые появляются рядом, и дают увеличенный вид вместо основной без перезагрузки страницы. Так вот все эти картинки привязаны к 0 категории и к имени основной картинки. Из за этого яша дал кучу ошибок на на не существующие страницы, и выкинул из поиска....
если вам понадобится этот мод могу вам выслать :wink:
-
Need help on google sitemaps,
can't get it work on details page
my url is like this http://www.arcadewall.net/play_driving_2_gamename_22.html (http://www.arcadewall.net/play_driving_2_gamename_22.html)
so would need to change in google.php something to get url like this so I would need to get mysql query from categories and image tables
play_Categoryname_CategoryID_Gamename_GameID.html
but don't know how to get it working
Awall
http://www.arcadewall.net (http://www.arcadewall.net)
-
hello there
im having this error from google
Sitemap file size error
Your Sitemap exceeds the maximum file size limit. Please create multiple Sitemaps containing fewer URLs to meet the file size limit. Help Help
-
hi leblover,
62000 links is a big deal in one file, btw for you server too...
split you google.php into example
google.php and google2.php
edit mysql queries in google.php to list as example the 1st 20000 entries
and in google2.php the rest of them
add:
RewriteRule ^sitemap2.xml$ google2.php
into .htaccess
tell google to visit the sitemap2.xml
voilla :)
-
This works great. Thank you to all the smart people on this forum.
One question...
Currently the only pages being mapped are:
categories.php?cat_id=
details.php?image_id=
member.php?action=showprofile&user_id=
Is it possible to include other pages that are not in the database.
Eg. I have created extra pages like about.html etc... and their hyperlinks are written http://www.example.com/index.php?template=about
Id like these adhoc pages to be mapped also. Is this feasible.
Thanks in advance.
Rob
-
thx alote but how to make that 20000 in the google.php ?
thats my code
i cant find it ?
pls
:oops:
<?
# Create Google Sitemap for 4images
# Created by Mai Minh (minh@maingo.com http://www.vna2z.com)
# Date: 28/11/2006
# You can send ping to Google with this request: http://www.google.com/webmasters/sitemaps/ping?sitemap=URL_TO_YOUR_SITEMAP
#---------------------------------
require("config.php");
# 4images top page (with trailing slash)
$gallery_url = 'http://www.leblover.com/gallery/';
$link=mysql_connect("$db_host","$db_user","$db_password");
mysql_select_db("$db_name") or die ("Cannot connect database!");
# Priotity
$prio_img = 0.3;
$prio_cat = 0.8;
# Frequency
$freq_img = 'yearly';
$freq_cat = 'daily';
# Print XML header
xml_head();
# Print URLs
$categories = mysql_query('SELECT cat_id FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
$cat_url = $gallery_url.'cat'.$catid.'.htm';
print_xml($cat_url,$prio_cat,'',$freq_cat);
}
$images = mysql_query('SELECT image_id,image_active,image_date FROM ' . $table_prefix . 'images');
while ($image = mysql_fetch_array($images))
{
if ($image['image_active'] == 1) {
$imgid = $image['image_id'];
$date = $image['image_date'];
$date = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
$img_url = $gallery_url.'img'.$imgid.'.htm';
print_xml($img_url,$prio_img,$date,$freq_img);
}
}
# Print XML footer
xml_foot();
function xml_head() {
$freq = 'daily';
$priority = '1.0';
$mod = date("Y-m-d")."T".date("H:i:s")."+00:00";
echo "<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd\">
<url>
<loc>http://www.leblover.com/gallery</loc>
<lastmod>$mod</lastmod>
<changefreq>$freq</changefreq>
<priority>$priority</priority>
</url>";
}
#-----------------------------------------------
# xml_foot
#-----------------------------------------------
function xml_foot() {
echo "
</urlset>";
}
#-----------------------------------------------
# print_xml
#-----------------------------------------------
function print_xml($url,$priority,$lastmod,$changefreq) {
echo "
<url>
<loc>$url</loc>
<priority>$priority</priority>
<lastmod>$lastmod</lastmod>
<changefreq>$changefreq</changefreq>
</url>";
}
?>
-
hi,
google.php
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images ORDER by image_id ASC limit 0,20000');
google2.php
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images ORDER by image_id ASC limit 20000,20000');
in google2.php
remove
$categories = mysql_query('SELECT cat_id FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
$cat_url = $gallery_url.'cat'.$catid.'.htm';
print_xml($cat_url,$prio_cat,'',$freq_cat);
}
there is no need to add categories again
-
Greetings...
Ok I have seen the code on the first pages to add to this mod if you are using short URL mod....
And I iknow there are two popular SEO mods here.
I am using the http://www.4homepages.de/forum/index.php?topic=17598.0 [MOD] Google Friendly Urls For 4images Best Seo Mod
Whish is not the short URL mod.
When I install the file of this mod I get this result when going to the google.php file 0.3 2008-12-03T00:00:00+00:00 yearly http://thelifephotography.com/img15.htm
But I think this is wrong.. shouldnt it list the image and cat names?
And I want them to come daily I guess... The more the better. Is there any bad reason to not want google to come daily?
the Best Seo Mod works great... can you tell me what to do to get these to work together?
And whats the best way to9 get the IPTC keyword data stored in the database indexed by google? Thanks!
-
Ok, with short url mod turned on I am getting results like this:
http://thelifephotography.com/img69.htm 0.5 2009-01-17T00:00:00+00:00 daily http://thelifephotography.com/img70.htm 0.5 2009-01-17T00:00:00+00:00 daily http://thelifephotography.com/img71.htm 0.5
IS this how it should look? Shouldnt it say the image name in the address instead of img71.htm ?? Imm am not sure how to kknow if it is working or not....
-
hi AntiNSA2,
this is because google.php is using [Mod] Search Engine Friendly URLs aka Short URLs (http://www.4homepages.de/forum/index.php?topic=6729.0)
here are changes which i did for [MOD] Google Friendly Urls For 4images Best Seo Mod (http://www.4homepages.de/forum/index.php?topic=17598.0)
replace
# Print URLs
$categories = mysql_query('SELECT cat_id FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
$cat_url = $gallery_url.'cat'.$catid.'.htm';
print_xml($cat_url,$prio_cat,'',$freq_cat);
}
$images = mysql_query('SELECT image_id,image_active,image_date FROM ' . $table_prefix . 'images');
while ($image = mysql_fetch_array($images))
{
if ($image['image_active'] == 1) {
$imgid = $image['image_id'];
$date = $image['image_date'];
$date = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
$img_url = $gallery_url.'img'.$imgid.'.htm';
print_xml($img_url,$prio_img,$date,$freq_img);
}
}
with
# Print URLs
$categories = mysql_query('SELECT cat_id, cat_name FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
$catname = strtr($category['cat_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
if ($shortURL == 1) {
$cat_url = $gallery_url.'cat-'.$catname.'-'.$catid.'.html';
}else {
$cat_url = $gallery_url.'categories.php?cat_id='.$catid;
}
print_xml($cat_url,$prio_cat,$lastmod,$freq_cat);
}
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images');
while ($image = mysql_fetch_array($images))
{
if ($image['image_active'] == 1) {
$imgid = $image['image_id'];
$imgname = strtr($image['image_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
$date = $image['image_date'];
$lastmod = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
if ($shortURL == 1) {
$img_url = $gallery_url.'img-'.$imgname.'-'.$imgid.'.html';
}else{
$img_url = $gallery_url.'details.php?image_id='.$imgid;
}
print_xml($img_url,$prio_img,$lastmod,$freq_img);
}
}
in my original google.php i added more replacement chars
-
Hey Thanks! I think that it is working now... jsut submitted to google will wait to see what happens... il report back to see if there were no errors....
Thanks
-
you should try it before you are submitting non working urls ;)
eg
http://thelifephotography.com/img-the chinese lower class struggle for work daily as global economic crises widens as unemployment increases,and income gap widens-11.html
http://thelifephotography.com/cat-news updates-10.html
therefore i wrote that i have more then default replacement chars
-
I really was trying to avoid submitting it with errors and it seems I am to late....
I am using this google.php
<?
# Create Google Sitemap for 4images
# Created by Mai Minh (minh@maingo.com http://www.vna2z.com)
# Modified by Oliver van der Werf (info@flash-webdesign.de http://www.flash-webdesign.de)
# Date: 28/11/2006 | 02.01.2007
# You can send ping to Google with this request: http://www.google.com/webmasters/sitemaps/ping?sitemap=URL_TO_YOUR_SITEMAP
#---------------------------------
require("config.php");
$link=mysql_connect("$db_host","$db_user","$db_password");
mysql_select_db("$db_name") or die ("Cannot connect database!");
# 4images top page (with trailing slash)
$gallery_url = 'http://thelifephotography.com/';
# Priotity
//select between 0.0 and 1.0
//0.0 identifies the lowest priority page(s) on your website
//1.0 identifies the highest priority page(s) on your website
$prio_img = 0.5;
$prio_cat = 0.8;
$prio_profile = 0.3;
# Frequency
//"always", "hourly", "daily", "weekly", "monthly", "yearly" or "never"
$freq_img = 'daily';
$freq_cat = 'daily';
$freq_profile = 'daily';
# Use Short URLs
$shortURL = 1; // 0 or 1
# Print XML header
xml_head();
# Print URLs
$categories = mysql_query('SELECT cat_id, cat_name FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
$catname = strtr($category['cat_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
if ($shortURL == 1) {
$cat_url = $gallery_url.'cat-'.$catname.'-'.$catid.'.html';
}else {
$cat_url = $gallery_url.'categories.php?cat_id='.$catid;
}
print_xml($cat_url,$prio_cat,$lastmod,$freq_cat);
}
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images');
while ($image = mysql_fetch_array($images))
{
if ($image['image_active'] == 1) {
$imgid = $image['image_id'];
$imgname = strtr($image['image_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
$date = $image['image_date'];
$lastmod = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
if ($shortURL == 1) {
$img_url = $gallery_url.'img-'.$imgname.'-'.$imgid.'.html';
}else{
$img_url = $gallery_url.'details.php?image_id='.$imgid;
}
print_xml($img_url,$prio_img,$lastmod,$freq_img);
}
}
$profiles = mysql_query('SELECT user_id, user_lastaction FROM ' . $table_prefix . 'users WHERE user_id >= "1"');
while ($profile = mysql_fetch_array($profiles))
{
$profileid = $profile['user_id'];
$date = $profile['user_lastaction'];
$date = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
$profile_url = $gallery_url.'member.php?action=showprofile&user_id='.$profileid;
print_xml($profile_url,$prio_profile,$date,$freq_profile);
}
# Print XML footer
xml_foot();
function xml_head() {
$freq = 'daily';
$priority = '1.0';
$mod = date("Y-m-d")."T".date("H:i:s")."+00:00";
echo "<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd\">";
}
#-----------------------------------------------
# xml_foot
#-----------------------------------------------
function xml_foot() {
echo "
</urlset>";
}
#-----------------------------------------------
# print_xml
#-----------------------------------------------
function print_xml($url,$priority,$lastmod,$changefreq) {
$temp = "<url>
<loc>$url</loc>";
$temp .= " <priority>$priority</priority>";
if ($lastmod != '') {
$temp .=" <lastmod>$lastmod</lastmod>";
}
$temp .= " <changefreq>$changefreq</changefreq>
</url>";
echo $temp;
}
?>
I understand I guess that I need to add characters to mine? To tell you the truth I am not wuite sure how the site map should work... should it display an exact url to each image/page? I am guessing this is so...
Im not sure how to add special characters or even how to add any characters. If you are using the same mod can I ask you to post your google.php?
Here is the only message I could get from google about the errors
83 Parsing error
We were unable to read your Sitemap. It may contain an entry we are unable to recognize. Please validate your Sitemap before resubmitting. Help Help
Problem detected on: May 15, 2009
I noticed some strange characters on my google.php file when viewed @ www.thelifephotography.com/google.php which look like this
s�
I am guessing this is also something to do with the characters that need to be added?
I really am hoping to get a ton of hits from google, as each of my images are so heavily keyworded ... I am struggling to try to sell stock photography ...
Because it indexed the sitemap I have now and reported errors, how long before it re-indexes? I hope it doesnt kill the status of seach listing.
-
hi,
try to use chars replacement which you are using in includes/sessions.php
my
$catname = strtr($category['cat_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
$imgname = strtr($image['image_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
was only an example.
you have to remove all special chars, which google can't read from your sitemap
-
OK Im sorry , I am trying to understand what you mean... I looked in sessions and see this [code]
$row['cat_name'] = strtr($row['cat_name'], "éèêàëâúóíì àáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
and this
$row['image_name'] = strtr($row['image_name'], "éèêàëâúóì íáàABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
I have these two characters which I think caused a problem with google àì
So I need to add these to the google site map? I added them to both session and google.php... But I dont underastand why I see the eeeaea and other repeated letters which are all vowels.. I mean we cant take them out or the english is destroyed.. And google can read them.
I am confused. On my sitemap I am seeing urls like this http://thelifephotography.com/img-csian boy sitting in front of grandparents house locked out while grandma plays mahjong eanton iuangzhou iuandong csia-194.html
Which is strange... letters are missing and filled with random letters meaning jibberish .. The actual address is this http://thelifephotography.com/img-dsianaboyasittingainafrontaofagrandparentsahousealockedaoutawhileagrandmaaplaysamahjongafantonajuangzhouajuandongadsia-195.htm
Im sorry if I m missing something so obvious... I am trying to figure out this is a really important mod ...... If you can offer any more help I really appreciate it.
Thanks
Robert
[/code]
-
ok things I thought were ok with sitemap are now producing a different problem...
Google is looking for this:
http://thelifephotography.com/cat-show%20me%20the%20money-7.html
even though my sitemap says this at www.thelifephotography.com/googlex.php :
http://thelifephotography.com/cat-show_me_the_money-7.htm
so I am guessing google and not accept underscore _ as a character in an address. My questin is what to replace the underscore with to make replace a <space> in an address in the special characters?
ANd why is google looking for html files even though my sitemap says to look for htm files? :?
Ok, I got it working...
with this: $imgname = strtr($image['image_name'], ", éèêàëâúóíìáàABCDEFGHIJKLMNOPQRSTUVWXYZ","--eeeaeauoiiaaabcdefghijklmnopqrstuvwxyz");
and this for cats
$imgname = strtr($image['image_name'], ", éèêàëâúóíìáàABCDEFGHIJKLMNOPQRSTUVWXYZ","--eeeaeauoiiaaabcdefghijklmnopqrstuvwxyz");
$img_url = $gallery_url.'img-'.$imgname.'-'.$imgid.'.html';
and this
$cat_url = $gallery_url.'cat-'.$catname.'-'.$catid.'.html';
The I replaced <spaces> with - and .htm with html....
But I have just came to a cold hard realization...
Somehow rewrite is not working...
I have placed my .htaccess @
/htdocs/.htaccess
which is the same directory as 4images.
it looks like this RewriteEngine On
RewriteRule ^sitemap.xml$ googlez.php
#RewriteBase /
RewriteRule ^cat-(.*)-([0-9]+)\.htm$ categories.php?cat_id=$2&%{QUERY_STRING}
RewriteRule ^cat\.htm$ categories.php?%{QUERY_STRING}
#Mod_bmollet : Image name in URL
RewriteRule ^img-(.*)-([0-9]+)\.htm$ details.php?image_id=$2&%{QUERY_STRING}
RewriteRule ^img([0-9]+)\.search.htm$ details.php?image_id=$1&%{QUERY_STRING}
RewriteRule ^img([0-9]+)\.lightbox.htm$ details.php?image_id=$1&%{QUERY_STRING}
RewriteRule ^sitemap.xml$ googlez.php
#Mod_bmollet : This is to make search function work ( redirect links from search results )
RewriteRule ^search\.htm$ search.php?%{QUERY_STRING}
RewriteRule ^search\.([0-9]+)\.htm$ search.php?page=$1&%{QUERY_STRING}
RewriteRule ^lightbox\.htm$ lightbox.php?%{QUERY_STRING}
RewriteRule ^lightbox\.([0-9]+)\.htm$ lightbox.php?page=$1&%{QUERY_STRING}
RewriteRule ^sitemap.xml$ googlez.php
I know i did this three times.... Becuse 1 time didnt work.
my googlez.php creates the xml and looks like this: <?
# Create Google Sitemap for 4images
# Created by Mai Minh (minh@maingo.com http://www.vna2z.com)
# Modified by Oliver van der Werf (info@flash-webdesign.de http://www.flash-webdesign.de)
# Date: 28/11/2006 | 02.01.2007
# You can send ping to Google with this request: http://www.google.com/webmasters/sitemaps/ping?sitemap=URL_TO_YOUR_SITEMAP
#---------------------------------
require("config.php");
$link=mysql_connect("$db_host","$db_user","$db_password");
mysql_select_db("$db_name") or die ("Cannot connect database!");
# 4images top page (with trailing slash)
$gallery_url = 'http://thelifephotography.com/';
# Priotity
//select between 0.0 and 1.0
//0.0 identifies the lowest priority page(s) on your website
//1.0 identifies the highest priority page(s) on your website
$prio_img = 0.5;
$prio_cat = 0.8;
$prio_profile = 0.1;
# Frequency
//"always", "hourly", "daily", "weekly", "monthly", "yearly" or "never"
$freq_img = 'daily';
$freq_cat = 'daily';
$freq_profile = 'daily';
# Use Short URLs
$shortURL = 1; // 0 or 1
# Print XML header
xml_head();
# Print URLs
$categories = mysql_query('SELECT cat_id, cat_name FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
$catname = strtr($category['cat_name'], " éèêàëâúóíìáàABCDEFGHIJKLMNOPQRSTUVWXYZ","_eeeaeauoiiaaabcdefghijklmnopqrstuvwxyz");
if ($shortURL == 1) {
$cat_url = $gallery_url.'cat-'.$catname.'-'.$catid.'.html';
}else {
$cat_url = $gallery_url.'categories.php?cat_id='.$catid;
}
print_xml($cat_url,$prio_cat,$lastmod,$freq_cat);
}
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images');
while ($image = mysql_fetch_array($images))
{
if ($image['image_active'] == 1) {
$imgid = $image['image_id'];
$imgname = strtr($image['image_name'], ", éèêàëâúóíìáàABCDEFGHIJKLMNOPQRSTUVWXYZ","--eeeaeauoiiaaabcdefghijklmnopqrstuvwxyz");
$date = $image['image_date'];
$lastmod = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
if ($shortURL == 1) {
$img_url = $gallery_url.'img-'.$imgname.'-'.$imgid.'.html';
}else{
$img_url = $gallery_url.'details.php?image_id='.$imgid;
}
print_xml($img_url,$prio_img,$lastmod,$freq_img);
}
}
$profiles = mysql_query('SELECT user_id, user_lastaction FROM ' . $table_prefix . 'users WHERE user_id >= "1"');
while ($profile = mysql_fetch_array($profiles))
{
$profileid = $profile['user_id'];
$date = $profile['user_lastaction'];
$date = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
$profile_url = $gallery_url.'member.php?action=showprofile&user_id='.$profileid;
print_xml($profile_url,$prio_profile,$date,$freq_profile);
}
# Print XML footer
xml_foot();
function xml_head() {
$freq = 'daily';
$priority = '1.0';
$mod = date("Y-m-d")."T".date("H:i:s")."+00:00";
echo "<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd\">";
}
#-----------------------------------------------
# xml_foot
#-----------------------------------------------
function xml_foot() {
echo "
</urlset>";
}
#-----------------------------------------------
# print_xml
#-----------------------------------------------
function print_xml($url,$priority,$lastmod,$changefreq) {
$temp = "<url>
<loc>$url</loc>";
$temp .= " <priority>$priority</priority>";
if ($lastmod != '') {
$temp .=" <lastmod>$lastmod</lastmod>";
}
$temp .= " <changefreq>$changefreq</changefreq>
</url>";
echo $temp;
}
?>
Things are getting indexed like this http://thelifephotography.com/img-the-chinese-lower-class-struggle-for-work-daily-as-global-economic-crises-widens-as-unemployment-increopeases--23.html
which I hope will prevent the %20 stuff...
But the problem is when you go to my site the actual url is still http://thelifephotography.com/img-these_workers_too_but_on_a_smile_for_the_camera..._people_like_them_who_are_at_the_greatest_immediate_risk_if_you_come_early_all-142.htm
Is there supposed to be some kind of rewrite to reversly convert all addresses to match the characters replaced in the character map?
THanks for any help.
OK!!!!! I found out why!!!
God I dont know why it takes my brain so long to work!!!!
If you are using the Google BEST SEO mod you must edit your sessions.php to make the special characthers match the special characters in your google.php file!!!!!
-
as you have changed .htm to .html in your google.php now repeat it in your site's .htaccess file as well.
-
I have received negative comments on google webmaster forums about my site map date, with no explanation:
This is the third site this morning where I've seen EXACTLY the same thing and the second even using the same date:
<url>
<loc>http://thelifephotography.com/img-millions-of-chinese-migrant-workers-traveling-home-for-holiday-893.htm</loc>
<priority>0.5</priority>
<lastmod>2008-09-29T00:00:00+00:00</lastmod>
<changefreq>daily</changefreq>
</url>
I'm starting to wonder whether Google is now actually penalising these garbage sitemaps.
Can anyone explain what might be wrong for this man to call my sitemap garbage????
-
same for me here, :(
Google does not accept my sitemap.xml
my site map link: sitemap (http://www.wallpaperowner.com/sitemap.xml)
this is what i am seeing(the message in the attached snapshot) since the day i added it to my site,
no matter how many times i re-edit the files so that if i missed or typed something wrong could become ok
but they are not accepting it.
anyone here, who used it and is valid/verified in Google's point of View?
in Firefox browser it works but when it comes to internet Explorer it shows the following error
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
A name was started with an invalid character. Error processing resource 'http://www.wallpaperowner.com/sitemap.xml'. Line ...
<loc>http://www.wallpaperowner.com/category-animals-&-pets-wallpapers-3.html</loc> <priority>0.8<...
-
makesure you are pointing google to google.php file, not sitemap.xml......
Still waiting for a solution to the question of why does google forum call my sitemap garbage?
This is the third site this morning where I've seen EXACTLY the same thing and the second even using the same date:
<url>
<loc>http://thelifephotography.com/img-millions-of-chinese-migrant-workers-traveling-home-for-holiday-893.htm</loc>
<priority>0.5</priority>
<lastmod>2008-09-29T00:00:00+00:00</lastmod>
<changefreq>daily</changefreq>
</url>
I'm starting to wonder whether Google is now actually penalising these garbage sitemaps.
I thus far can not get google to index one single page from my 4images site :( : (
-
How to show correctly URLs with multilanguage mod?
http://www.mysite.com/cat-[english]gallery 3[deutsch]galerie 3[russian]Галерея 3.htm
-
Im using the same mod, an I have to do no special changes. I can tell you I had to block robots from visiting the different languages in order to avoid duplicate content errors. First I tried robots text, now I am trying treat robots as users mod....
-
Hello,
When I add the sitemap in google webmaster tools, I get an error:
"sitemap file is too big"
Can you help me?
Thank you:)
-
if you are using [MOD] Google Sitemap for your gallery
than check this post : http://www.4homepages.de/forum/index.php?topic=15687.msg134966#msg134966
and then this one: http://www.4homepages.de/forum/index.php?topic=15687.msg135185#msg135185
-
Ok, thanks :)
But, I will create 4 files (google, google2, google3, google4), how in the code?
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images ORDER by image_id ASC limit 20000,[b]20000[/b]');
I do like this:
google3 : limit 20000,40000')
google 4 : limit 40000,60000')
google 5 ! limit 60000,80000') :?: :?:
-
hi satine88,
no :)
correct way:
google.php
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images ORDER by image_id ASC limit 0,20000');
google1.php
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images ORDER by image_id ASC limit 20000,20000');
google2.php
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images ORDER by image_id ASC limit 40000,20000');
google3.php
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images ORDER by image_id ASC limit 60000,20000');
google4.php
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images ORDER by image_id ASC limit 80000,20000');
google5.php
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images ORDER by image_id ASC limit 100000,20000');
and so on...
-
Thanks Nicky :)
Is there a way of knowing the number of sitemap that you have to create?
-
hi AntiNSA2,
this is because google.php is using [Mod] Search Engine Friendly URLs aka Short URLs (http://www.4homepages.de/forum/index.php?topic=6729.0)
here are changes which i did for [MOD] Google Friendly Urls For 4images Best Seo Mod (http://www.4homepages.de/forum/index.php?topic=17598.0)
replace
# Print URLs
$categories = mysql_query('SELECT cat_id FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
$cat_url = $gallery_url.'cat'.$catid.'.htm';
print_xml($cat_url,$prio_cat,'',$freq_cat);
}
$images = mysql_query('SELECT image_id,image_active,image_date FROM ' . $table_prefix . 'images');
while ($image = mysql_fetch_array($images))
{
if ($image['image_active'] == 1) {
$imgid = $image['image_id'];
$date = $image['image_date'];
$date = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
$img_url = $gallery_url.'img'.$imgid.'.htm';
print_xml($img_url,$prio_img,$date,$freq_img);
}
}
with
# Print URLs
$categories = mysql_query('SELECT cat_id, cat_name FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
$catname = strtr($category['cat_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
if ($shortURL == 1) {
$cat_url = $gallery_url.'cat-'.$catname.'-'.$catid.'.html';
}else {
$cat_url = $gallery_url.'categories.php?cat_id='.$catid;
}
print_xml($cat_url,$prio_cat,$lastmod,$freq_cat);
}
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images');
while ($image = mysql_fetch_array($images))
{
if ($image['image_active'] == 1) {
$imgid = $image['image_id'];
$imgname = strtr($image['image_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
$date = $image['image_date'];
$lastmod = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
if ($shortURL == 1) {
$img_url = $gallery_url.'img-'.$imgname.'-'.$imgid.'.html';
}else{
$img_url = $gallery_url.'details.php?image_id='.$imgid;
}
print_xml($img_url,$prio_img,$lastmod,$freq_img);
}
}
in my original google.php i added more replacement chars
hi nicky,
I followed your advices - as I also use the [MOD] Google Friendly Urls For 4images Best Seo Mod
but when I look at my sitemap.xml I see
./details.php?image_id=356 instead of ./img-bildnahme-356.htm
what changes have you done moreover?? what have you placed in your .htaccess?
thanx, bergblume
-
hi bergblume,
set in google.php
# Use Short URLs
$shortURL = 0; // 0 or 1
to
# Use Short URLs
$shortURL = 1; // 0 or 1
-
I adapted for those who use the [Mod] Search Engine Friendly URLs aka Short URLs (http://www.4homepages.de/forum/index.php?topic=6729.0).
I hope it will be useful for someone.
finally I got it work with your file as I also use the [Mod] Search Engine Friendly URLs aka Short URLs
Thank you very much, fbmd!!!
P.S. it would be nice if an administrator could put the working file of fbmd in attachemnt for those guys who are using [Mod] Search Engine Friendly URLs aka Short URLs in the first post of this thread! thanx!
-
Thanks Nicky :)
Is there a way of knowing the number of sitemap that you have to create?
hi satine,
depence how much images(X) you have.
X / 20000 = Y :mrgreen:
-
2 Questions:
1. How to exclude the profile links? For my site only registered users have the possibility to see the profile, so it's nonsense to inform a search-engine about this.
2. In my XML-sitemap around 1700 urls are listened, but after a month google has only indexed around 250 urls. What about the others? Where is the problem? There exist no technically problem on my site or at the sitemap.
-
Damit die Sitemap auch die deutschen Umlaute verstehen kann, wenn die MOD Google Friendly Urls For 4images Best Seo Mod genutzt wird, folgenden Quelltext in der google.php abändern:
Suche
$imgna = $image['image_name'] = strtr($image['image_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZsSiIÝIÇçGgýþÞðÐ","eeeaeauoiaabcdefghijklmnopqrstuvwxyzssiiiiccggissgg");
Ersetze mit
$image['image_name'] = $image['image_name'] = strtr($image['image_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZsSiIÝIÇçGgýþÞðÐ","eeeaeauoiaabcdefghijklmnopqrstuvwxyzssiiiiccggissgg");
$imgna = strtr($image['image_name'],Array("ä"=>"ae","ö"=>"oe","ü"=>"ue", "Ä"=>"Ae","Ö"=>"Oe","Ü"=>"Ue"));
-
Bei mir enthalten die Links keine Umlaute, wieso die Änderung? :?
-
Steht alles im obigen Beitrag.
-
Currently the only pages being mapped are:
categories.php?cat_id=
details.php?image_id=
member.php?action=showprofile&user_id=
Is it possible to include other pages that are not in the database.
Eg. I have created extra pages like about.html etc... and their hyperlinks are written http://www.example.com/index.php?template=about
Id like these adhoc pages to be mapped also. Is this feasible.
Thanks in advance.
Rob
Anyone have an answer to my original question?
thanks
-
iam totally confuesed? :? :?
1) may i know whats the limit of urls in one single google. php page?
2) and how to create two different google1. php n google2. php pages with different friendly urls in it of the site?
google2. php will show the same urls which showed on google1. php?
3) can we add sitemap. xml and sitemap2. xml ? will google accepts both?
-
so..
1.)
as i know., google accept 50000 entries per sitemap
2.)
yes you can:
example with 20000 urls (for to don't stress your server if you have tousends of pictures)
create google.php
change original
$images = mysql_query('SELECT image_id,image_active,image_date FROM ' . $table_prefix . 'images');
query for images
to
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images ORDER by image_id ASC limit 0,20000');
entry for .htaccess
RewriteRule ^sitemap.xml$ google.php
call for google: http://www.google.com/webmasters/sitemaps/ping?sitemap=http://yourdomain_com/gallery/sitemap.xml
create google2.php
change original
$images = mysql_query('SELECT image_id,image_active,image_date FROM ' . $table_prefix . 'images');
query for images
to
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images ORDER by image_id ASC limit 20000,20000');
entry for .htaccess
RewriteRule ^sitemap2.xml$ google2.php
call for google: http://www.google.com/webmasters/sitemaps/ping?sitemap=http://yourdomain_com/gallery/sitemap2.xml
create google3.php
change original
$images = mysql_query('SELECT image_id,image_active,image_date FROM ' . $table_prefix . 'images');
query for images
to
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images ORDER by image_id ASC limit 40000,20000');
entry for .htaccess
RewriteRule ^sitemap3.xml$ google3.php
call for google: http://www.google.com/webmasters/sitemaps/ping?sitemap=http://yourdomain_com/gallery/sitemap3.xml
if you need more, create more... :)
3.) yes and yes
have phun
-
here r the url for my 4images gallery http://www.wallpaperspecial.com/wallzz/
1) well should i add sitemap.xml on public_html or public_html/wallzz?
2) is it ok? i've this in my .htaccess
RewriteRule ^sitemap.xml$ /wallzz/google.php
http://www.google.com/webmasters/sitemaps/ping?sitemap=http://wallpaperspecial.com/sitemap.xml
3) i've google.php in my 4imges folder which is (wallzz) is it ok?
-
any body here? i want YOUr help badly..
-
1)
http://www.google.com/webmasters/sitemaps/ping?sitemap=http://wallpaperspecial.com/sitemap.xml
should not be in .htaccess
2) where is your .htaccess located? public_html or public_html/wallzz?
3) maybe try
RewriteRule ^sitemap.xml$ wallzz/google.php
4) http://wallpaperspecial.com/sitemap.xml returns:
</head><!-- ValueClick Media 300x250 Medium Rectangle CODE for wallpaperspecial.com -->
<script language="javascript" src="http://media.fastclick.net/w/get.media?sid=19948&m=6&tp=8&d=j&t=s"></script>
<noscript><a href="http://media.fastclick.net/w/click.here?sid=19948&m=6&c=1" target="_top">
<img src="http://media.fastclick.net/w/get.media?sid=19948&m=6&tp=8&d=s&c=1"
width=300 height=250 border=1></a></noscript>
<!-- ValueClick Media 300x250 Medium Rectangle CODE for wallpaperspecial.com -->
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
Why?
-
1)http://www.google.com/webmasters/sitemaps/ping?sitemap=http://wallpaperspecial.com/sitemap.xml
should not be in .htaccess
2) where is your .htaccess located? public_html or public_html/wallzz?
3) maybe try
RewriteRule ^sitemap.xml$ wallzz/google.php
4) http://wallpaperspecial.com/sitemap.xml returns:
</head><!-- ValueClick Media 300x250 Medium Rectangle CODE for wallpaperspecial.com -->
<script language="javascript" src="http://media.fastclick.net/w/get.media?sid=19948&m=6&tp=8&d=j&t=s"></script>
<noscript><a href="http://media.fastclick.net/w/click.here?sid=19948&m=6&c=1" target="_top">
<img src="http://media.fastclick.net/w/get.media?sid=19948&m=6&tp=8&d=s&c=1"
width=300 height=250 border=1></a></noscript>
<!-- ValueClick Media 300x250 Medium Rectangle CODE for wallpaperspecial.com -->
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
Why?
1) ok i simply send them a notification from I.E
2) at public_html ..is it fine?
3) Ok i will try? r u not sure abt this?
4) iam fixing it..
5) and y is shows this?????
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
A name was started with an invalid character. Error processing resource 'http://wallpaperspecial.com/sitemap.xml'. Line 28...
-
nobody repling.. is this forum is useless :(
-
Well, I can only assume there is something you do wrong, because your sitemap.xml produce garbage - and you said "iam fixing it", yet, nothing changed since then. and your 5) is direct result of 4)
-
now please check it at the end..
http://www.wallpaperspecial.com/wallzz/sitemap.xml
-
still no reply since a week.. please help me out.
-
As far as I can tell Nicky already answered your original question...
-
ahsancharming,
i still have no idea what is your problem..
...you asked i answered
...you asked V@no answered
which problem do you still have?
what is on the end?
-
sitemap Search does not include words.
How can we add?
-
I did some work. I would add the code below. shows only 1 and more not coming. Where do you think I made a mistake
<?
# Create Google Sitemap for 4images
# Created by Mai Minh (minh@maingo.com http://www.vna2z.com)
# Modified by Oliver van der Werf (info@flash-webdesign.de http://www.flash-webdesign.de)
# Adapted for [MOD] Google Friendly Urls by Fábio Dantas (fabio@amopiaui.com http://www.famosasx.info)
# Date: 28/11/2006 | 02.01.2007 | 16/06/2008
# You can send ping to Google with this request: http://www.google.com/webmasters/sitemaps/ping?sitemap=http://www.resimli.net/arama.xml
#---------------------------------
require("config.php");
# 4images top page (with trailing slash)
$gallery_url = 'http://www.resimli.net/';
# Choose the URL format
# 0 is http://www.site.com/cat123.htm
# 1 is http://www.site.com/details.php?image_id=123
# 2 is http://www.site.com/r-category-1-subcategory-2-image-123.htm
$shortURL = 2; // 0 or 1 or 2
# If $shortURL is different of 2, you can delete these three lines below:
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$link=mysql_connect("$db_host","$db_user","$db_password");
mysql_select_db("$db_name") or die ("Cannot connect database!");
# Priotity
//select between 0.0 and 1.0
//0.0 identifies the lowest priority page(s) on your website
//1.0 identifies the highest priority page(s) on your website
$prio_arama = 1.0;
# Frequency
//"always", "hourly", "daily", "weekly", "monthly", "yearly" or "never"
$freq_arama = 'monthly';
# Print XML header
xml_head();
# Print URLs
$arama = mysql_query('SELECT word_id,word_text FROM 4images_wordlist ORDER by word_id ');
while ($arama = mysql_fetch_array($arama))
{
$aramaid = $arama['word_id'];
$date = $arama['word_id'];
$date = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
$arama_url = $gallery_url.'search.htm?search_keywords='.$aramaid;
print_xml($arama_url,$prio_arama,$date,$freq_arama);
}
# Print XML footer
xml_foot();
function xml_head() {
$freq = 'daily';
$priority = '1.0';
$mod = date("Y-m-d")."T".date("H:i:s")."+00:00";
echo "<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd\">";
}
#-----------------------------------------------
# xml_foot
#-----------------------------------------------
function xml_foot() {
echo "
</urlset>";
}
#-----------------------------------------------
# print_xml
#-----------------------------------------------
function print_xml($url,$priority,$lastmod,$changefreq) {
$temp = "<url>
<loc>$url</loc>";
$temp .= " <priority>$priority</priority>";
if ($lastmod != '') {
$temp .=" <lastmod>$lastmod</lastmod>";
}
$temp .= " <changefreq>$changefreq</changefreq>
</url>";
echo $temp;
}
?>
see code...
www.resimli.net/arama.php
-
Habe da mal eine Frage, Google gibt mir bei diesem Sitemap MOD diese Fehlermeldung raus, der sich denn alle 6 Zeilen später wieder holen soll, also Zeile 14, 20, 26, 32 etc etc ....
Zeile 14 Ungültiges Datum
Es wurde ein ungültiges Datum gefunden. Berichtigen Sie bitte das Datum bzw. dessen Formatierung, bevor Sie Ihre Daten erneut einreichen.
Übergeordnetes Tag: url
Tag: lastmod
Wert:
Problem ermittelt am: 18.01.2010
vllt hat ja jemand eine Idee
URL zu meiner sitemap www.tram-und-bahnbilder.de/sitemap.xml
-
Toller Mod,fettes merci.
Einbau funktioniert ohne probleme und läuft sofort.
Wichtig eben nur das die .htacsess erweitert wird sonst gibts keine Xml.
Danach eine Ping an Tante Google senden und staunen wie die Besucher hereinströmen...
TOP TOP !!
:D
-
Hi,
I use [MOD] Google Friendly Urls For 4images Best Seo Mod , but I want to display sitemap link for image like this:
http://mydomain.com/cat-catname-1-img-imagename-1.htm but I follow edit code the result is
http://mydomain.com/img-imagename-1.htm
Pls help to change this, Tks
-
someone can help me
i have more than 50000 photo
so google reject it
Too many URLs
Your Sitemap contains too many URLs. Please create multiple Sitemaps with up to 50000 URLs each and submit all Sitemaps.
also there is error like this
Invalid date
An invalid date was found. Please fix the date or formatting before resubmitting.
-
someone can help me
i have more than 50000 photo
so google reject it
Too many URLs
Your Sitemap contains too many URLs. Please create multiple Sitemaps with up to 50000 URLs each and submit all Sitemaps.
quick help for to much entries: http://www.4homepages.de/forum/index.php?topic=15687.msg141666#msg141666
tip:
make in your first google.php only categories and profiles
google2.php start with the pictures..
and so on..
-
Hi,
I need some help. I set up xml site map but it does not work properly.
Can somebody look at that?
Site map is here: xxx: mojefotke. raftingtarom. org. rs/sitemap. xml
Thanks
Danijel
-
Hi,
I need some help. I set up xml site map but it does not work properly.
Can somebody look at that?
Site map is here: xxx: mojefotke. raftingtarom. org. rs/sitemap. xml
Thanks
Danijel
ћаос Данијел,
измени у google.php датотеци ово
$gallery_url = 'http://mojefotke.raftingtarom.org.rs/';
па ће све бити ок :)
-
Hvala Nicky,
Odmah da kažem da nisam očekivao da će mi neko odgovoriti na SRB :lol:
Nabudžio sam ovo ali ne radi još uvek kako treba. Nemam linkove na sitemap stranici a gogole webmaster tools mi javlja ovo:
Путање се не подударају
Открили смо да сте Sitemap послали помоћу путање URL адресе која садржи префикс „www“ (на пример: http://www.example.com/sitemap.xml). Међутим, URL адресе наведене у вашем Sitemap-у не користе префикс „www“ (на пример: http://example.com/mojadatoteka.htm).
Redirekcije su podešene i nemam www na tom sajtu, tako da mi ovo nema smisla, i kako god da se kuca uvek će da skine www.
Jel imaš ideju zašto mi ne daje linkove na sitemap.xml stranici?
Poz
-
Odmah da kažem da nisam očekivao da će mi neko odgovoriti na SRB.
Nabudžio sam ovo ali ne radi još uvek kako treba. Nemam linkove na sitemap stranici a gogole webmaster tools mi javlja ovo:
Путање се не подударају
Открили смо да сте Sitemap послали помоћу путање URL адресе која садржи префикс „www“ (на пример: http://www.example.com/sitemap.xml). Међутим, URL адресе наведене у вашем Sitemap-у не користе префикс „www“ (на пример: http://example.com/mojadatoteka.htm).
ћаос опет :)
па има нас срба и овде :)
да ли си у webmaster tools додао суб домену mojefotke.raftingtarom.org.rs?
то бих ти препоручио..
ја видим линкове у http://mojefotke.raftingtarom.org.rs/sitemap.xml
што се тиче www и без www то можеш наместиту исто тамо, али пази на доубле контент.. да те гоогле не би казнио..
одлучи се за један..
срдачан поздрав.
-
Namestio sam bez www i to nije problem. Takođe sam sajt prijavio i na Google webmasters tools. Sajt je verifikovan ali kad sam prijavio sitemap, WMT mi daje grešku.
Vidim i ja da stoje putanje do stranica sajta na sitemap.xml stranici, ali ja ne vidim da je od njih napravio linkove, a mislim da to moraju da budu linkovi.
Imao sam isti problem sa wordpressom, ali sam to lako sredio, i čim su se napravili linkovi do tih putanja sve je bilo ok.
Čini mi se da sam nešto zeznuo oko koda u onom google.php fajlu.
Evo baš gledam sada kod tebe na http://nicky.net/sitemap.xml i tu postoji tabela sa 4 kolone. U prvoj su linkovi, u drugoj datum poslednje izmene, u trećoj frekvencija promene, i u poslednjoj su priioriteti. Kod mene je sve nešto nabacano i nema linkova.
-
пошаљи ми твој логин за FTP и за WMT преко приватне поруке погледаћу вечерас.. тј. најкасније сутра пре подне.
-
Hi@all
ich habe ein problem.
ich habe die google.php raufgeladen. und .htaccess datei erstellt
<?
# Create Google Sitemap for 4images
# Created by Mai Minh (minh@maingo.com http://www.vna2z.com)
# Modified by Oliver van der Werf (info@flash-webdesign.de http://www.flash-webdesign.de)
# Date: 28/11/2006 | 02.01.2007
# You can send ping to Google with this request: http://www.google.com/webmasters/sitemaps/ping?sitemap=URL_TO_YOUR_SITEMAP
#---------------------------------
require("config.php");
$link=mysql_connect("$db_host","$db_user","$db_password");
mysql_select_db("$db_name") or die ("Cannot connect database!");
# 4images top page (with trailing slash)
$gallery_url = 'http://www.pj-firepower.com/picgallerie/';
# Priotity
//select between 0.0 and 1.0
//0.0 identifies the lowest priority page(s) on your website
//1.0 identifies the highest priority page(s) on your website
$prio_img = 0.5;
$prio_cat = 0.8;
$prio_profile = 0.3;
# Frequency
//"always", "hourly", "daily", "weekly", "monthly", "yearly" or "never"
$freq_img = 'yearly';
$freq_cat = 'daily';
$freq_profile = 'daily';
# Use Short URLs
$shortURL = 1; // 0 or 1
# Print XML header
xml_head();
# Print URLs
$categories = mysql_query('SELECT cat_id FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
if ($shortURL == 1) {
$cat_url = $gallery_url.'cat'.$catid.'.htm';
}else {
$cat_url = $gallery_url.'categories.php?cat_id='.$catid;
}
print_xml($cat_url,$prio_cat,'',$freq_cat);
}
$images = mysql_query('SELECT image_id,image_active,image_date FROM ' . $table_prefix . 'images ');
while ($image = mysql_fetch_array($images))
{
if ($image['image_active'] == 1) {
$imgid = $image['image_id'];
$date = $image['image_date'];
$date = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
if ($shortURL == 1) {
$img_url = $gallery_url.'img'.$imgid.'.htm';
}else{
$img_url = $gallery_url.'details.php?image_id='.$imgid;
}
print_xml($img_url,$prio_img,$date,$freq_img);
}
}
$profiles = mysql_query('SELECT user_id, user_lastaction FROM ' . $table_prefix . 'users WHERE user_id >= "1"');
while ($profile = mysql_fetch_array($profiles))
{
$profileid = $profile['user_id'];
$date = $profile['user_lastaction'];
$date = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
$profile_url = $gallery_url.'member.php?action=showprofile&user_id='.$profileid;
print_xml($profile_url,$prio_profile,$date,$freq_profile);
}
# Print XML footer
xml_foot();
function xml_head() {
$freq = 'daily';
$priority = '1.0';
$mod = date("Y-m-d")."T".date("H:i:s")."+00:00";
echo "<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd\">";
}
#-----------------------------------------------
# xml_foot
#-----------------------------------------------
function xml_foot() {
echo "
</urlset>";
}
#-----------------------------------------------
# print_xml
#-----------------------------------------------
function print_xml($url,$priority,$lastmod,$changefreq) {
$temp = "<url>
<loc>$url</loc>";
$temp .= " <priority>$priority</priority>";
if ($lastmod != '') {
$temp .=" <lastmod>$lastmod</lastmod>";
}
$temp .= " <changefreq>$changefreq</changefreq>
</url>";
echo $temp;
}
?>
so folgendes probleme:
1) auf der google.php , http://www.pj-firepower.com/picgallerie/google.php
werden short urls angezeigt wie ich es auch wollte
http://www.pj-firepower.com/picgallerie/cat1.htm
nur diese links funktionieren nicht..... wenn ich einen der links verwende kommt
Die Webseite wurde nicht gefunden.
Jetzt muss ich dadurch short urls ausschalten, aber ich hätte es gerne an nur warum funktionieren diese links dann nicht .... ist doch sinlos die links zb cat1 zu benommen, und diese kommen dann in google und dann funken die gar nicht :(
kann mir bitte jemand helfen.
vielen Dank
mfg
Nosferatu
-
For all the Russian users out there - here is the google.php that works on my site
it transliterates the categories and images names to become Google friendly. the transliteration function MUST be exactly identical to the one stored in sessions.php
<?
# Create Google Sitemap for 4images
# Created by Mai Minh (minh@maingo.com http://www.vna2z.com)
# Modified by Oliver van der Werf (info@flash-webdesign.de http://www.flash-webdesign.de)
# Date: 28/11/2006 | 02.01.2007
# You can send ping to Google with this request: http://www.google.com/webmasters/sitemaps/ping?sitemap=URL_TO_YOUR_SITEMAP
#---------------------------------
require("config.php");
//require(ROOT_PATH.'includes/sessions.php');
$link=mysql_connect("$db_host","$db_user","$db_password");
mysql_select_db("$db_name") or die ("Cannot connect database!");
# 4images top page (with trailing slash)
$gallery_url = 'http://www.fotodvor.com/';
# Priotity
//select between 0.0 and 1.0
//0.0 identifies the lowest priority page(s) on your website
//1.0 identifies the highest priority page(s) on your website
$prio_img = 0.5;
$prio_cat = 0.8;
$prio_profile = 0.1;
# Frequency
//"always", "hourly", "daily", "weekly", "monthly", "yearly" or "never"
$freq_img = 'daily';
$freq_cat = 'daily';
$freq_profile = 'monthly';
# Use Short URLs
$shortURL = 1; // 0 or 1
# Print XML header
xml_head();
# Print URLs
$categories = mysql_query('SELECT cat_id, cat_name FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
$catname = strtr($category['cat_name'], " eeeaeauoiiaaABCDEFGHIJKLMNOPQRSTUVWXYZ","-eeeaeauoiiaaabcdefghijklmnopqrstuvwxyz");
$catname = fixname($catname);
if ($shortURL == 1) {
$cat_url = $gallery_url.'cat-'.$catname.'-'.$catid.'.htm';
}else {
$cat_url = $gallery_url.'categories.php?cat_id='.$catid;
}
print_xml($cat_url,$prio_cat,$lastmod,$freq_cat);
}
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images');
while ($image = mysql_fetch_array($images))
{
if ($image['image_active'] == 1) {
$imgid = $image['image_id'];
$imgname = strtr($image['image_name'], ", eeeaeauoiiaaABCDEFGHIJKLMNOPQRSTUVWXYZ","--eeeaeauoiiaaabcdefghijklmnopqrstuvwxyz");
$imgname = fixname ($imgname);
$date = $image['image_date'];
$lastmod = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
if ($shortURL == 1) {
$img_url = $gallery_url.'img-'.$imgname.'-'.$imgid.'.htm';
}else{
$img_url = $gallery_url.'details.php?image_id='.$imgid;
}
print_xml($img_url,$prio_img,$lastmod,$freq_img);
}
}
$profiles = mysql_query('SELECT user_id, user_lastaction FROM ' . $table_prefix . 'users WHERE user_id >= "1"');
while ($profile = mysql_fetch_array($profiles))
{
$profileid = $profile['user_id'];
$date = $profile['user_lastaction'];
if ($date == 0) {
$date_ = time();
$date = date("Y-m-d",$date_)."T".date("H:i:s",$date_)."+00:00";
} else {
$date = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
}
$profile_url = $gallery_url.'member.php?action=showprofile&user_id='.$profileid;
print_xml($profile_url,$prio_profile,$date,$freq_profile);
}
# Print XML footer
xml_foot();
function xml_head() {
$freq = 'daily';
$priority = '1.0';
$mod = date("Y-m-d")."T".date("H:i:s")."+00:00";
echo "<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd\">";
}
#-----------------------------------------------
# xml_foot
#-----------------------------------------------
function xml_foot() {
echo "
</urlset>";
}
#-----------------------------------------------
# print_xml
#-----------------------------------------------
function print_xml($url,$priority,$lastmod,$changefreq) {
$temp = "<url>
<loc>$url</loc>";
$temp .= " <priority>$priority</priority>";
if ($lastmod != '') {
$temp .=" <lastmod>$lastmod</lastmod>";
}
$temp .= " <changefreq>$changefreq</changefreq>
</url>";
echo $temp;
}
function fixname($text)
{
return strtolower(strtr(
$text,
array(
"e" => "e",
"e" => "e",
"e" => "e",
"a" => "a",
"e" => "e",
"a" => "a",
"u" => "a",
"o" => "o",
"i" => "i",
"a" => "a",
//russian UTF8 encoded alphabet (lower and upper cases)
"А" => "a",
"а" => "a",
"Б" => "b",
"б" => "b",
"В" => "v",
"в" => "v",
"Г" => "g",
"г" => "g",
"Д" => "d",
"д" => "d",
"Е" => "e",
"е" => "e",
"Ё" => "yo",
"ё" => "yo",
"Ж" => "zh",
"ж" => "zh",
"З" => "z",
"з" => "z",
"И" => "i",
"и" => "i",
"Й" => "j",
"й" => "j",
"К" => "k",
"к" => "k",
"Л" => "l",
"л" => "l",
"М" => "m",
"м" => "m",
"Н" => "n",
"н" => "n",
"О" => "o",
"о" => "o",
"П" => "p",
"п" => "p",
"Р" => "r",
"р" => "r",
"С" => "s",
"с" => "s",
"Т" => "t",
"т" => "t",
"У" => "u",
"у" => "u",
"Ф" => "f",
"ф" => "f",
"Х" => "h",
"х" => "h",
"Ц" => "c",
"ц" => "c",
"Ч" => "ch",
"ч" => "ch",
"Ш" => "sh",
"ш" => "sh",
"Щ" => "sch",
"щ" => "sch",
"Ъ" => "",
"ъ" => "",
"Ы" => "i",
"ы" => "i",
"Ь" => "'",
"ь" => "'",
"Э" => "e",
"э" => "e",
"Ю" => "yu",
"ю" => "yu",
"Я" => "ya",
"я" => "ya",
//russian 1251 encoded alphabet (lower and upper cases)
"а" => "a",
"А" => "a",
"б" => "b",
"Б" => "b",
"в" => "v",
"В" => "v",
"г" => "g",
"Г" => "g",
"д" => "d",
"Д" => "d",
"е" => "e",
"Е" => "e",
"ё" => "yo",
"Ё" => "yo",
"ж" => "zh",
"Ж" => "zh",
"з" => "z",
"З" => "z",
"и" => "i",
"И" => "i",
"й" => "j",
"Й" => "j",
"к" => "k",
"К" => "k",
"л" => "l",
"Л" => "l",
"м" => "m",
"М" => "m",
"н" => "n",
"Н" => "n",
"о" => "o",
"О" => "o",
"п" => "p",
"П" => "p",
"р" => "r",
"Р" => "r",
"с" => "s",
"С" => "s",
"т" => "t",
"Т" => "t",
"у" => "u",
"У" => "u",
"ф" => "f",
"Ф" => "f",
"х" => "h",
"Х" => "h",
"ц" => "c",
"Ц" => "c",
"ч" => "ch",
"Ч" => "ch",
"ш" => "sh",
"Ш" => "sh",
"щ" => "sch",
"Щ" => "sch",
"ъ" => "",
"Ъ" => "",
"ы" => "i",
"Ы" => "i",
"ь" => "'",
"Ь" => "'",
"э" => "e",
"Э" => "e",
"ю" => "yu",
"Ю" => "yu",
"я" => "ya",
"Я" => "ya",
"/" => "",
"&" => "-",
"№" => "",
"," => "-",
"°" => "",
"\"" => "",
"і" => "i", //ukranian i
"ї" => "i", //ukranian ї
"є" => "e", //ukranian є
"«" => "",
"»" => "",
)));
}
?>
-
hi AntiNSA2,
this is because google.php is using [Mod] Search Engine Friendly URLs aka Short URLs
here are changes which i did for [MOD] Google Friendly Urls For 4images Best Seo Mod
replace with
# Print URLs
$categories = mysql_query('SELECT cat_id, cat_name FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
$catname = strtr($category['cat_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
if ($shortURL == 1) {
$cat_url = $gallery_url.'cat-'.$catname.'-'.$catid.'.html';
}else {
$cat_url = $gallery_url.'categories.php?cat_id='.$catid;
}
print_xml($cat_url,$prio_cat,$lastmod,$freq_cat);
}
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images');
while ($image = mysql_fetch_array($images))
{
if ($image['image_active'] == 1) {
$imgid = $image['image_id'];
$imgname = strtr($image['image_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
$date = $image['image_date'];
$lastmod = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
if ($shortURL == 1) {
$img_url = $gallery_url.'img-'.$imgname.'-'.$imgid.'.html';
}else{
$img_url = $gallery_url.'details.php?image_id='.$imgid;
}
print_xml($img_url,$prio_img,$lastmod,$freq_img);
}
}
in my original google.php i added more replacement chars
hi. i paste this code of yours into my google.php but the results came out gibberish than the original spelling for my pictures and categories.
examples category - arakawa under the bridge
it became : -krakawa under the bridge-2.html
more example below - anime , bakemonogatari , ore no imouto
it changed into gibberish font ? how do i fix this. thanks
http://av.dakenso.com/cat-knime-1.html 0.8 daily http://av.dakenso.com/cat-krakawa under the bridge-2.html 0.8 daily
http://av.dakenso.com/cat-u-on-3.html 0.8 daily http://av.dakenso.com/cat-ove xo tikan-4.html 0.8 daily
http://av.dakenso.com/cat-lakemonogatari-5.html 0.8 daily http://av.dakenso.com/cat-yre no smouto ga uonnani uawaii Wake ga xai-6.html 0.8 daily
http://av.dakenso.com/cat-The World qod ynly unows-7.html 0.8 daily http://av.dakenso.com/cat-melebrities-8.html 0.8 daily
http://av.dakenso.com/cat-Signatures-9.html 0.8 daily http://av.dakenso.com/cat-Wallpaper-10.html 0.8 daily
http://av.dakenso.com/img-kyase-1.html 0.5 2010-11-05T11:01:19+00:00 yearly http://av.dakenso.com/img-xino-2.html 0.5 2010-11-05T11:01:49+00:00 yearly
http://av.dakenso.com/img-arakawa under the bridge-3.html 0.5 2010-11-05T11:02:10+00:00 yearly
http://av.dakenso.com/img-Robot-4.html 0.5 2010-11-05T11:02:37+00:00 yearly
http://av.dakenso.com/img-eve no jikan-5.html 0.5 2010-11-05T11:03:02+00:00 yearly
http://av.dakenso.com/img-skeptical-6.html 0.5 2010-11-05T11:03:22+00:00 yearly
http://av.dakenso.com/img-elci-7.html 0.5 2010-11-05T11:04:30+00:00 yearly
http://av.dakenso.com/img-keima fap-8.html 0.5 2010-11-05T11:04:56+00:00 yearly
http://av.dakenso.com/img-recruit-9.html 0.5 2010-11-05T11:13:56+00:00 yearly
http://av.dakenso.com/img-123-10.html 0.5 2010-11-05T11:13:56+00:00 yearly
http://av.dakenso.com/img-senjougahara-11.html 0.5 2010-11-05T11:13:56+00:00 yearly
-
Hi, can s.o. help me... since some weeks I get by submitting my sitemap.xml in my google webmastertools an error
Redirect error: Empty redirect - HTTP Error: 302
in my .htaccess I have this lin
RewriteRule ^sitemap.xml$ google.php
what is the reason herefore? Pl.s have a look at my google.php attached!
-
1) a dot is a special character in RegEx, it must be escaped:
RewriteRule ^sitemap\.xml$ google.php
2) I think the problem is somewhere else in your .htaccess, the error means it's redirecting with a never ending loop.
-
hi v@no, thanks for your quick support. Attached you can see my current htaccess-file - can you see s.th. wrong in it?
-
kann mir bitte mal jmd. eine funktionierende sitemap (samt htaccess code) posten, die in den google webmaster tools akzeptiert wird.
bei mir kommt da weiterhin dieser Umleitungsfehler
Umleitungsfehler: Leere Weiterleitung
obwohl ich die ratschläge von v@no befolgt habe... ist das nur ein problem bei mir mit meiner sitemap oder aktuell generell mit den google webmaster tools?
EDIT: hallo zhusammen, das problem ist gelöst... der hier angegebene code passt und funktioniert wunderbar... ich hatte bei mir in der sessions.php eine ban-funktion, die den google-Bot ausgesperrt hat und somit wurden diese Umleitungsfehler dummerweise erzeugt... darauf muss man erstmal kommen!!*''§$%"§$&§$`?
-
I use [MOD] Multi-Language support for any text and [MOD] Google Friendly Urls For 4images Best Seo Mod.
I use two languages - russian(main) and english.
For create url i use multilang() .
For use multilang() in this mod i add function multilang() to the google.php. But i need to change it(or may be create two different function?) for create 2 url: one for russian and one for english languages. My php-knowledge is not very good and i can't undestand why function multilang() have so many conditions and how to change it. Could anybody help me?
Thank you.
-
Sun,
this should be the solution for you.
replace
$catname = fixname($catname);
with
$catname = fixname(multilang($catname));
and replace
$imgname = fixname ($imgname);
with
$imgname = fixname (multilang($imgname));
-
Aleksey, thank you for answer, but it's not work:
- if i didn't add function multilang into google.php then i have error "Call to undefined function multilang()"
- If i add it and use multilang() for $catname and $imgname - then i see url with russian and english parts of name. For examle, i have ...img-kosmeya-english-mexican-aster-15.htm, and i need ...img-kosmeya-15.htm and ...img-mexican-aster-15.htm. i think it becouse function didn't see some another cod for it works.
PS I try use you google.php and find little error:
print_xml($cat_url,$prio_cat,$lastmod,$freq_cat);
must be:
print_xml($cat_url,$prio_cat,'',$freq_cat);
-
multilang should be part of your /includes/functions.php
if it is not, then you will have your error... make sure you have
define('ROOT_PATH', './');
require("config.php");
include(ROOT_PATH.'global.php');
in the beginning of your google.php
I am using the multilang for my categories like this:
$categories = mysql_query('SELECT cat_id, cat_name FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
$catname = strtr($category['cat_name'], " eeeaeauoiiaaABCDEFGHIJKLMNOPQRSTUVWXYZ","-eeeaeauoiiaaabcdefghijklmnopqrstuvwxyz");
$catname = fixname(multilang($catname));
if ($shortURL == 1) {
$cat_url = $gallery_url.'cat-'.$catname.'-'.$catid.'.htm';
}else {
$cat_url = $gallery_url.'categories.php?cat_id='.$catid;
}
print_xml($cat_url,$prio_cat,'',$freq_cat);
}
so if it does not work for you please post your google.php here and check that the functions multilang in /includes/functions.php is like this:
//multinang mod
function multilang($text, $show_first = 0, $remove = 0){
global $config;
preg_match("#\[".$config['language_dir']."\](.*)(\[\/?".$config['language_list']."\]|$)#iDUs", $text, $match);
if (!empty($match[1])) {
return $match[1];
}
preg_match("#^(.*)\[".$config['language_list']."\]#iDUs", $text, $match);
if (!empty($match[1])) {
return $match[1];
}
preg_match("#\[".$config['language_dir_default']."\](.*)(\[\/?".$config['language_list']."\]|$)#iDUs", $text, $match);
if (!empty($match[1])) {
return $match[1];
}
if ($show_first) {
preg_match("#\[".$config['language_list']."\](.*)(\[\/?".$config['language_list']."\]|$)#iDUs", $text, $match);
if (!empty($match[2])) {
return $match[2];
}
}
if ($remove) {
return preg_replace("#\[".$config['language_list']."\](.*)#iDs", "", $text);
}
return $text;
}
function multilang_tag_remove($text){
global $config;
return preg_replace("#\[\/?".$config['language_list']."\]#iDUs", " ", $text);
}
thanks for the sharp eyes and fixing the error in the code ))
-
if it is not, then you will have your error... make sure you have
Now i add this :oops:. Thank you.
I am using the multilang for my categories like this:
If i use your categories, then i have cat-gortenziya-51.htm and did not have cat-hydrangea-51.htm . Do you have urls only for one language? Or you use your google.php several times (with add information about language, for example, for english - google.php?l=english) ? Or somthing else?
-
If i use your categories, then i have cat-gortenziya-51.htm and did not have cat-hydrangea-51.htm . Do you have urls only for one language? Or you use your google.php several times (with add information about language, for example, for english - google.php?l=english) ? Or somthing else?
yep. I only list categories in the sitemap in my default language...
I think to do both, you will need to add two custom functions just for that purpose. I would specify 2 lang directories manually (the easiest solution) in those functions.
unless 4images gurus can suggest an elegant php way to cycle through all languages available in your 4images installation.
-
Google have tag's for pictures (<image:image>, <image:loc> etc.). Is anybody use it?
I don't like that Google want image location (for example, http://example.com/image.jpg), becouse i want that users see photo in gallery, but not in http://example.com/image.jpg . Do you know how Google use image location?
-
Alexsey, you use this sitemap only for Google or for Yandex and etc. too?
-
Alexsey, you use this sitemap only for Google or for Yandex and etc. too?
Yandex as well as Google use this sitemap just great.
-
Hello,
I just made the last update, and I have this error:
Fatal error: Call to undefined function: date_default_timezone_set() in /homez.93/fondecra/www/config.php on line 25
Can you help me?
Thank you
-
...Can you help me?
...
update your Gallery to V1.7.10
-
I just did, and I have this error:)
-
I just did, and I have this error:)
ok..
http://www.4homepages.de/forum/index.php?topic=27939.0
-
I just did, and I have this error:)
ok..
http://www.4homepages.de/forum/index.php?topic=27939.0
Thanks ! :)
If it helps someone else:
if you have this error:
Fatal error: Call to undefined function: date_default_timezone_set () in / homez.93/fondecra/www/config.php on line 25 [/ php]
must do this:
[quote author=V@no link=topic=27939.msg151217#msg151217 date=1284727924]
If after upgrade or fresh installation you are getting white page or error message:
[quote]Fatal error: call to undefined function: date_default_timezone_set() in ...[/quote]
The fix is the following:
In includes/functions.php find:
[php]?>
Insert above :above::
if (!function_exists("date_default_timezone_set"))
{
function date_default_timezone_set($timezone)
{
return true;
}
}
Then open config.php if you find a line with date_default_timezone_set then insert above :above::
if (function_exists("date_default_timezone_set"))
[/quote]
-
Hi,
I made this mod. But I still get the error message from Google: "Es wurde ein ungültiges Datum gefunden. Berichtigen Sie bitte das Datum bzw. dessen Formatierung, bevor Sie Ihre Daten erneut einreichen."
Which means - wrong Date.
I made already this modification:
I just did, and I have this error:)
ok..
http://www.4homepages.de/forum/index.php?topic=27939.0
Thanks ! :)
If it helps someone else:
if you have this error:
Fatal error: Call to undefined function: date_default_timezone_set () in / homez.93/fondecra/www/config.php on line 25 [/ php]
must do this:
[quote author=V@no link=topic=27939.msg151217#msg151217 date=1284727924]
If after upgrade or fresh installation you are getting white page or error message:
[quote]Fatal error: call to undefined function: date_default_timezone_set() in ...[/quote]
The fix is the following:
In includes/functions.php find:
[php]?>
Insert above :above::
if (!function_exists("date_default_timezone_set"))
{
function date_default_timezone_set($timezone)
{
return true;
}
}
Then open config.php if you find a line with date_default_timezone_set then insert above :above::
if (function_exists("date_default_timezone_set"))
[/quote]
But still the same error message from google.
I have the version 1. 7. 10
Any ideas.
Thanks
-
I get this error on google webmaster
When we tested a sample of the URLs from your Sitemap, we found that some URLs were not accessible to Googlebot due to an HTTP status error. All accessible URLs will still be submitted.
-
4images version of this plugin will be great!
http://wordpress.org/extend/plugins/google-image-sitemap/
any ideas to create it?
-
Hello!
Tell me, please, how to do that in this Sitemap have a "category paging"?
Now this mod takes into sitemap.xml only the first page of the category, without &page=2 etc.
For example, I want:
<url>
<loc>http://www.mysite/gallery/categories.php?cat_id=123&page=2</loc>
<priority>0.8</priority>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.mysite/gallery/categories.php?cat_id=123&page=3</loc>
<priority>0.8</priority>
<changefreq>daily</changefreq>
</url>
I think it would also be interesting to other users...
-
Google show error
Errors
Invalid URL
This is not a valid URL. Please correct it and resubmit.
3
URL:
1
May 14, 2012
URL: <?xml version='1.0' encoding='UTF-8'?>
2
May 14, 2012
URL: <urlset xmlns="http://www.google.com/schemas/sitemap/0.84"
-
I am getting error as: An invalid date was found. Please fix the date or formatting before resubmitting.
Please Help....
-
Enormous increase in 404 not found in Google webmaster
Sample URL:
http://pukhtoogle.com/gallery/postcard.img707.htm
Kindly send an entry for .htaccess to avoid these error.
-
I am using om6acw version of the script with the tweak done by Vano to fix up the brackets and spaces. Works great. Thanks.\
Two Questions:
1. Anyone know how to include adhoc pages as well == Example to add pages like http://example.com/index.php?template=about
2. Anyone have a clever way of including the video sitemap as mentioned in google http://support.google.com/webmasters/bin/answer.py?hl=en&answer=80472
I am looking at including something like this (See the bold highlights)
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url>
<loc>http://www.example.com/videos/some_video_landing_page.html</loc>
<video:video>
<video:thumbnail_loc> This will be the image Thumbnail </video:thumbnail_loc>
<video:title> This will be the image name </video:title>
<video:description> Trailer to the new film "image name" </video:description>
<video:player_loc allow_embed="yes" autoplay="ap=1"> http://www.youtube.com/v/ywAGVfuFzxA.swf </video:player_loc>
<video:expiration_date>2009-11-05T19:20:30+08:00</video:expiration_date>
<video:publication_date>2007-11-05T19:20:30+08:00</video:publication_date>
<video:family_friendly>yes</video:family_friendly>
<video:restriction relationship="allow">IE GB US CA</video:restriction>
</video:video>
</url>
</urlset>
-
Hello!
Tell me, please, how to do that in this Sitemap have a "category paging"?
Now this mod takes into sitemap.xml only the first page of the category, without &page=2 etc.
For example, I want:
<url>
<loc>http://www.mysite/gallery/categories.php?cat_id=123&page=2</loc>
<priority>0.8</priority>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.mysite/gallery/categories.php?cat_id=123&page=3</loc>
<priority>0.8</priority>
<changefreq>daily</changefreq>
</url>
I think it would also be interesting to other users...
Also, I'm curious about how to achieve this effect.
How can I add more to the sitemap Search for keywords:
http://www.mysite/search.php?search_keywords=xxx
-
A little update for this mod.
Looks like the old schema validation did not work.
here is a good site to validate your sitemap
http://www.xmlcheck.com/
Here is my google.php (with my conversion from win1251 to utf-8)
<?
# Create Google Sitemap for 4images
# Created by Mai Minh (minh@maingo.com http://www.vna2z.com)
# Modified by Oliver van der Werf (info@flash-webdesign.de http://www.flash-webdesign.de)
# Date: 28/11/2006 | 02.01.2007
# You can send ping to Google with this request: http://www.google.com/webmasters/sitemaps/ping?sitemap=URL_TO_YOUR_SITEMAP
#---------------------------------
define('ROOT_PATH', './');
require("config.php");
include(ROOT_PATH.'global.php');
$link=mysql_connect("$db_host","$db_user","$db_password");
mysql_select_db("$db_name") or die ("Cannot connect database!");
# 4images top page (with trailing slash)
$gallery_url = 'http://www.fotodvor.com/';
# Priotity
//select between 0.0 and 1.0
//0.0 identifies the lowest priority page(s) on your website
//1.0 identifies the highest priority page(s) on your website
$prio_img = 0.5;
$prio_cat = 0.8;
$prio_profile = 0.1;
# Frequency
//"always", "hourly", "daily", "weekly", "monthly", "yearly" or "never"
$freq_img = 'daily';
$freq_cat = 'daily';
$freq_profile = 'monthly';
# Use Short URLs
$shortURL = 1; // 0 or 1
# Print XML header
xml_head();
# Print URLs
$categories = mysql_query('SELECT cat_id, cat_name FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
$catname = strtr($category['cat_name'], " eeeaeauoiiaaABCDEFGHIJKLMNOPQRSTUVWXYZ","-eeeaeauoiiaaabcdefghijklmnopqrstuvwxyz");
$catname = fixname(multilang($catname));
if ($shortURL == 1) {
$cat_url = $gallery_url.'cat-'.$catname.'-'.$catid.'.htm';
}else {
$cat_url = $gallery_url.'categories.php?cat_id='.$catid;
}
print_xml($cat_url,$prio_cat,$lastmod,$freq_cat);
}
$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images');
while ($image = mysql_fetch_array($images))
{
if ($image['image_active'] == 1) {
$imgid = $image['image_id'];
$imgname = strtr($image['image_name'], ", eeeaeauoiiaaABCDEFGHIJKLMNOPQRSTUVWXYZ","--eeeaeauoiiaaabcdefghijklmnopqrstuvwxyz");
$imgname = fixname ($imgname);
$date = $image['image_date'];
$lastmod = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
if ($shortURL == 1) {
$img_url = $gallery_url.'img-'.$imgname.'-'.$imgid.'.htm';
}else{
$img_url = $gallery_url.'details.php?image_id='.$imgid;
}
print_xml($img_url,$prio_img,$lastmod,$freq_img);
}
}
$profiles = mysql_query('SELECT user_id, user_lastaction FROM ' . $table_prefix . 'users WHERE user_id >= "1"');
while ($profile = mysql_fetch_array($profiles))
{
$profileid = $profile['user_id'];
$date = $profile['user_lastaction'];
if ($date == 0) {
$date_ = time();
$date = date("Y-m-d",$date_)."T".date("H:i:s",$date_)."+00:00";
} else {
$date = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
}
$profile_url = $gallery_url.'member.php?action=showprofile&user_id='.$profileid;
print_xml($profile_url,$prio_profile,$date,$freq_profile);
}
# Print XML footer
xml_foot();
function xml_head() {
$freq = 'daily';
$priority = '1.0';
$mod = date("Y-m-d")."T".date("H:i:s")."+00:00";
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">";
}
#-----------------------------------------------
# xml_foot
#-----------------------------------------------
function xml_foot() {
echo "
</urlset>";
}
#-----------------------------------------------
# print_xml
#-----------------------------------------------
function print_xml($url,$priority,$lastmod,$changefreq) {
$temp = "<url>
<loc>$url</loc>";
if ($lastmod != '') {
$temp .=" <lastmod>$lastmod</lastmod>";
}
$temp .= " <changefreq>$changefreq</changefreq>";
$temp .= " <priority>$priority</priority>
</url>";
echo $temp;
}
function fixname($text)
{
return strtolower(strtr(
$text,
array(
"e" => "e",
"e" => "e",
"e" => "e",
"a" => "a",
"e" => "e",
"a" => "a",
"u" => "a",
"o" => "o",
"i" => "i",
"a" => "a",
//russian UTF8 encoded alphabet (lower and upper cases)
"А" => "a",
"а" => "a",
"Б" => "b",
"б" => "b",
"В" => "v",
"в" => "v",
"Г" => "g",
"г" => "g",
"Д" => "d",
"д" => "d",
"Е" => "e",
"е" => "e",
"Ё" => "yo",
"ё" => "yo",
"Ж" => "zh",
"ж" => "zh",
"З" => "z",
"з" => "z",
"И" => "i",
"и" => "i",
"Й" => "j",
"й" => "j",
"К" => "k",
"к" => "k",
"Л" => "l",
"л" => "l",
"М" => "m",
"м" => "m",
"Н" => "n",
"н" => "n",
"О" => "o",
"о" => "o",
"П" => "p",
"п" => "p",
"Р" => "r",
"р" => "r",
"С" => "s",
"с" => "s",
"Т" => "t",
"т" => "t",
"У" => "u",
"у" => "u",
"Ф" => "f",
"ф" => "f",
"Х" => "h",
"х" => "h",
"Ц" => "c",
"ц" => "c",
"Ч" => "ch",
"ч" => "ch",
"Ш" => "sh",
"ш" => "sh",
"Щ" => "sch",
"щ" => "sch",
"Ъ" => "",
"ъ" => "",
"Ы" => "i",
"ы" => "i",
"Ь" => "'",
"ь" => "'",
"Э" => "e",
"э" => "e",
"Ю" => "yu",
"ю" => "yu",
"Я" => "ya",
"я" => "ya",
//russian 1251 encoded alphabet (lower and upper cases)
"а" => "a",
"А" => "a",
"б" => "b",
"Б" => "b",
"в" => "v",
"В" => "v",
"г" => "g",
"Г" => "g",
"д" => "d",
"Д" => "d",
"е" => "e",
"Е" => "e",
"ё" => "yo",
"Ё" => "yo",
"ж" => "zh",
"Ж" => "zh",
"з" => "z",
"З" => "z",
"и" => "i",
"И" => "i",
"й" => "j",
"Й" => "j",
"к" => "k",
"К" => "k",
"л" => "l",
"Л" => "l",
"м" => "m",
"М" => "m",
"н" => "n",
"Н" => "n",
"о" => "o",
"О" => "o",
"п" => "p",
"П" => "p",
"р" => "r",
"Р" => "r",
"с" => "s",
"С" => "s",
"т" => "t",
"Т" => "t",
"у" => "u",
"У" => "u",
"ф" => "f",
"Ф" => "f",
"х" => "h",
"Х" => "h",
"ц" => "c",
"Ц" => "c",
"ч" => "ch",
"Ч" => "ch",
"ш" => "sh",
"Ш" => "sh",
"щ" => "sch",
"Щ" => "sch",
"ъ" => "",
"Ъ" => "",
"ы" => "i",
"Ы" => "i",
"ь" => "'",
"Ь" => "'",
"э" => "e",
"Э" => "e",
"ю" => "yu",
"Ю" => "yu",
"я" => "ya",
"Я" => "ya",
"/" => "",
"&" => "-",
"№" => "",
"," => "-",
"°" => "",
"\"" => "",
"?" => "",
"і" => "i", //ukranian i
"І" => "i", //ukranian i
"ї" => "i", //ukranian ї
"є" => "e", //ukranian є
"«" => "",
"»" => "",
"*" => "",
"?" => "",
"!" => "",
")" => "",
"(" => "",
"=" => "",
"." => "",
"#" => "",
"%" => "",
"–" => ""
)));
}
?>