68 Classifieds Forums

google sitemap

This is a discussion on google sitemap within the v3.0 Questions & Support forums, part of the v3.0.x Help & Support category; Here is a sitemap file you can point google at to take advantage of their sitemap service. The only thing ...


Go Back   68 Classifieds Forums > Archives > v3.0.x Help & Support > v3.0 Questions & Support

 
 
LinkBack Thread Tools Display Modes
  #1  
Old 03-30-2006, 07:52 PM
Lhotch's Avatar
Moderator
 
Join Date: Mar 2006
Posts: 3,654
Rep Power: 90
Lhotch is just really niceLhotch is just really nice
Default google sitemap

Here is a sitemap file you can point google at to take advantage of their sitemap service.

The only thing you will need to do to get this file to work is add your own time zone to the listing section which is lines 5- to 60 and looks like this.

PHP Code:
//now the listings
$sSQL "SELECT id,dateadded FROM ".PREFIX."products WHERE expiration > NOW() AND display='Y'";
$result mysql_query($sSQL) or print(mysql_error());
while(
$rs=mysql_fetch_array($result)){
    if(
$modrewrite=="Y"){
        echo 
"<url>\n<loc>".$url."/view/".urlencode($rs['id'])."</loc>\n<lastmod>".str_replace(" ","T",$rs['dateadded'])."-06:00</lastmod>\n<changefreq>monthly</changefreq>\n<priority>.5</priority>\n</url>\n";    
    }else{
        echo 
"<url>\n<loc>".$url."/viewlisting.php?view=".urlencode($rs['id'])."</loc>\n<lastmod>".str_replace(" ","T",$rs['dateadded'])."-06:00</lastmod>\n<changefreq>monthly</changefreq>\n<priority>.5</priority>\n</url>\n";
    }
}
mysql_free_result($result); 
there are 2 spots above, just after $rs['dateadded'] where I have -06:00 this is my timezone, you can change it to your own if desired or it will work fine with mine as well.

Attached Files
File Type: zip sitemap.zip (1.1 KB, 24 views)
  #2  
Old 03-30-2006, 11:20 PM
civ's Avatar
civ civ is offline
Senior Member
 
Join Date: Mar 2006
Location: Greer, SC
Posts: 664
Rep Power: 25
civ will become famous soon enough
Default

Thanks Larry, just what I was looking for.
  #3  
Old 05-09-2006, 07:04 PM
civ's Avatar
civ civ is offline
Senior Member
 
Join Date: Mar 2006
Location: Greer, SC
Posts: 664
Rep Power: 25
civ will become famous soon enough
Default

Can anyone confirm that this still works on a 3.1 installation?
  #4  
Old 06-15-2006, 10:17 AM
Lhotch's Avatar
Moderator
 
Join Date: Mar 2006
Posts: 3,654
Rep Power: 90
Lhotch is just really niceLhotch is just really nice
Default

Quote:
Originally Posted by civ
Can anyone confirm that this still works on a 3.1 installation?
I was afraid this got lost in the crash, I will take a look at it and see what I can do to make it compatable with v3.1.x
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
  #5  
Old 06-15-2006, 11:01 AM
Lhotch's Avatar
Moderator
 
Join Date: Mar 2006
Posts: 3,654
Rep Power: 90
Lhotch is just really niceLhotch is just really nice
Default

Ok the sitemap in the 1st post seems to work fine with one minor change. At approx line 16 we have the following line....

require_once(FILESYSTEM_PATH .'includes/init.php');

change it to

require_once('includes/init.php');
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
  #6  
Old 06-15-2006, 01:52 PM
CB CB is offline
Senior Member
 
Join Date: May 2006
Posts: 392
Rep Power: 18
CB is on a distinguished road
Default

Larry, does google accept sitemaps with a php extention, I thought they only crawled .xml. I'm submitting this threw my google webmaster account, is that how you do it too? Also, www.classifords.com/sitemap.php whats up with that, is that you on the left haha
  #7  
Old 06-15-2006, 02:18 PM
Lhotch's Avatar
Moderator
 
Join Date: Mar 2006
Posts: 3,654
Rep Power: 90
Lhotch is just really niceLhotch is just really nice
Default

Quote:
Originally Posted by CB
Larry, does google accept sitemaps with a php extention, I thought they only crawled .xml. I'm submitting this threw my google webmaster account, is that how you do it too? Also, www.classifords.com/sitemap.php whats up with that, is that you on the left haha
Yea, they will accept a file with a php exctension. The file name is irrelevent its what the spider sees that matters and in this case the sitemap builds xml.

My classifieds are in a subdire of the domain so it would be www.classifords.com/ads/sitemap.php, what your seeing above is just a test alternate 404 page not found error.
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
  #8  
Old 06-15-2006, 02:24 PM
calaf6's Avatar
Senior Member
 
Join Date: Mar 2006
Location: UK
Posts: 333
Rep Power: 18
calaf6 is on a distinguished road
Default

Quote:
Also, www.classifords.com/sitemap.php whats up with that, is that you on the left haha
Euk!!

And NO, its not me on the right
  #9  
Old 06-16-2006, 03:12 AM
CB CB is offline
Senior Member
 
Join Date: May 2006
Posts: 392
Rep Power: 18
CB is on a distinguished road
Default

Larry looks good, urls like: /ads/category.php?type=10 google won't accept, i've been trying and it rejects any url with a session id or dynamic ?type= I installed the SEO module, does this work with the SEO and does it pull the friendly url. Thanks Larry.
  #10  
Old 06-16-2006, 07:09 AM
juven14's Avatar
Moderator
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,132
Rep Power: 57
juven14 is a jewel in the rough
Send a message via Skype™ to juven14
Default

Thanks Larry, I'm using it too.
__________________
Regards,

John


“By perseverance, study, and eternal desire, any man can become great.” George S. Patton
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Google indexing unused templates calaf6 v3.1 Questions & Support 3 12-07-2006 11:30 AM
About Google SkGold Off Topic 1 10-13-2006 07:02 PM
The New Google Desktop Tool lbrown13 Off Topic 7 05-19-2006 10:47 PM
Google Juice fjarabeck Site Marketing 0 04-27-2006 02:40 PM


All times are GMT -4. The time now is 03:41 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22