Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 12-24-2007 03:25:49

Perkster
Member
From: Parksville BC Canada
Registered: 10-05-2004
Posts: 349
Website

Dynamic sitemap.html for CCP6

Not sure if anyone else would find this useful but I created an HTML version of my sitemap that is wrapped in my CCP6 skin.  It displays both Product List and Category List.  I place the link to my sitemap.html at bottom of all my pages for bots to have a look at.  The sitemap.html is fully dynamic and will update every time you add a product or category.  I have wrapped it in the Ecomm skin and basically I just removed what was ever in the middle column and added my PHP code.

First you need a config.php file with DB info somewhere off webroot directory:

config.php

Code:

<?php

$s = "localhost";
$u = "dbuser";
$p = "dbpassword";
$d = "dbname";

?>

Then you need a file called sitemaphtml.php

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />

<meta name="keywords" content="linux cd, live linux cd, linux distribution, distributions, linux distro, distro, distros, mandriva, fedora core, opensuse, knoppix, debian, gentoo, slackware, red hat, ubuntu, linux mint, gos, pclinuxos, simplymepis" />

<meta name="description" content="Linux Cd Shop the /shop for Linux Distributions featuring openSUSE Linux, Mandriva Liunux, Debian Linux, gOS Linux, Ubuntu Linux and Fedora Core Linux as well as many more distros to choose from." />

<meta name="robots" content="index,follow" />

<base href="http://www.linuxcdshop.com/" />

     
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />

<link rel="stylesheet" type="text/css" media="all" href="skins/Ecom/css/all.css" />

<script type="text/javascript" src="skins/Ecom/scripts/scripts.js"></script>

<title>Linux CD Shop - Site Map</title>

</head>

     <body>


<div id="skin_wrapper">

<div id="skin_header">

<table id="skin_ht"><tr>

<td id="skin_ht_lcol">

<a href="" title="Linux CD Shop - /shop for Linux distributions"><img src="skins/Ecom/media/linuxcdshop02b.jpg" alt="Linux CD Shop - /shop for Linux distributions" width="200" height="57" /></a>

</td>

<td id="skin_ht_rcol">

<p class="strong">
<a href="" title="Home">Home</a>&nbsp;|
<a href="search/index.html" title="Search">Search</a>&nbsp;|

<a rel="nofollow" href="http://www.linuxcdshop.com/viewcart/index.html" title="Shopping Cart">Shopping Cart</a>&nbsp;|
<a rel="nofollow" href="https://www.linuxcdshop.com/index.php?app=ccp0&amp;ns=checkout&amp;portrelay=1" title="Checkout">Checkout</a>&nbsp;|
<a rel="nofollow" href="https://www.linuxcdshop.com/index.php?app=ccp0&amp;ns=login&amp;portrelay=1" title="Your Account">Your Account</a>&nbsp;|
<a rel="nofollow" href="http://www.linuxcdshop.com/contact/index.html" title="Contact">Contact</a>
</p>

<div id="skin_headacct" style="clear: both">

     <p class="inline">Login to enhance your shopping experience.</p> <a class="unfancy" href="https://www.linuxcdshop.com/index.php?app=ccp0&amp;ns=login&amp;portrelay=1" title="Login / Create Account">Login or Create an Account</a>

</div>

</td>

</tr></table>

</div>

<table id="skin_ct">

<tr>

<td id="skin_ct_lcol">

     




<div class="skin_fenavh">Great Linux Deals</div>
<div class="skin_fenavmini">
<a href="http://www.linuxcdshop.com/linux/Puppy-Linux-USB-3-0-1.html" title="Puppy Linux 1 Gig USB Key"><img src="media/ccp0/prodsm/puppyusbkey.jpg" alt="USB Key" height="61" width="100" /><br />Puppy Linux USB Key $22.95</a>
<br /></div>

<div class="skin_fenavh">We Accept</div>
<div class="skin_fenavmini">
<a rel="nofollow" href="https://www.paypal.com/us/verified/pal=sales@linuxcdshop.com" title="Verify Linux CD Shop @ PayPal"><img src="skins/Ecom/media/verification_seal.gif" alt="Linux CD Shop - Accepts PayPal" width="100" height="100" /></a></div>

<div class="skin_fenavh">Linux Web Sites</div>
<div class="skin_fenavmini">
<a href="http://www.reviewlinux.com" title="Review Linux - Linux Review Site">ReviewLinux.Com</a>
<a rel="nofollow" href="http://www.tuxmachines.org" title="Tuxmachines.org">TuxMachines.Org</a>
<a rel="nofollow" href="http://www.distrowatch.com" title="DistroWatch.Com">DistroWatch.Com</a>
<a rel="nofollow" href="http://www.linux.com" title="Linux.Com">Linux.Com</a>

<a rel="nofollow" href="http://www.linuxindex.com" title="LinuxIndex.Com">LinuxIndex.Com</a>
<a rel="nofollow" href="http://www.linuxforums.org" title="LinuxForums.Org">LinuxForums.Org</a>
<a rel="nofollow" href="http://www.linuxquestions.org" title="linuxquestions.org">LinuxQuestions.Org</a><br /></div>


</td>

<td id="skin_ct_mcol">

          <div id="skin_pgtitle">
     <p class="inline">Linux CD Shop - Site Map</p>
     </div>


<div id="skin_content"><div class="khxc_storehead">Linux CD Shop - Product List</div>


<ul>

<?php

include '/some/where/off/webroot/config.php';

mysql_connect("$s", "$u", "$p") or die(mysql_error());
mysql_select_db("$d") or die(mysql_error());

$result = mysql_query("SELECT id,name FROM ccp0_prod ORDER by id ASC" ) or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
print "<li><a href=\"linux/" . $row['id'] . ".html\" title=\"" . $row['name'] . "\">" . $row['name'] . "</a></li>";

}


?>


</ul>


<div class="khxc_storehead">Linux CD Shop - Category List</div>

<ul>

<?php

include '/some/where/off/webroot/config.php';

mysql_connect("$s", "$u", "$p") or die(mysql_error());
mysql_select_db("$d") or die(mysql_error());

$result = mysql_query("SELECT id,name FROM ccp0_cat ORDER by id ASC" ) or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
print "<li><a href=\"distro/" . $row['id'] . ".html\" title=\"" . $row['name'] . "\">" . $row['name'] . "</a></li>";

}


?>


</ul>


</div>

</td>

<td id="skin_ct_rcol">



<div class="skin_fenavh">Featured Product</div>
<div class="skin_fenavmini">

<a href="linux/Ubuntu-7-10-64-Bit-CD.html" title="Ubuntu 7.10 64 Bit CD (1 CD Set)"><img alt="" src="media/ccp0/prodsm/ubuntu.png" /><br />Ubuntu 7.10 64 Bit CD (1 CD Set)</a><br />Price: $1.75

</div>



     
<div class="skin_fenavh">Online Store Menu</div>

<div class="skin_fenav">

<ul>
     <li><a href="http://www.linuxcdshop.com/specials/index.html" title="Specials">Specials</a></li>
     <li><a href="http://www.linuxcdshop.com/new/index.html" title="New Products">New Products</a></li>

     <li><a href="http://www.linuxcdshop.com/bestsellers/index.html" title="Best Sellers">Best Sellers</a></li>
     <li><a href="http://www.linuxcdshop.com/search/index.html" title="Advanced Search">Advanced Search</a></li>
     <li><a href="http://www.linuxcdshop.com/all/index.html" title="View All Products">View All Products</a></li>
     <li><a href="http://www.linuxcdshop.com/index/index.html" title="Product Index">Product Index</a></li>
</ul>

</div>






<div class="skin_fenavh">Resources</div>

<div class="skin_fenav">

<ul>
     <li><a href="http://www.linuxcdshop.com/display/links.html" title="Top Linux Links">Top Linux Links</a></li>
     <li><a href="http://www.linuxcdshop.com/display/reviews.html" title="Top Linux Reviews">Top Linux Reviews</a></li>
</ul>

</div>




</td>

</tr>

</table>

<div id="skin_footer">
<a href="
http://www.linuxcdshop.com/policies.html" title="Store Policies">Store Policies</a> | <a href="
http://www.linuxcdshop.com/terms.html"
 title="Terms of Use">Terms of Use</a> | 

<a href="
http://www.linuxcdshop.com/privacy.html" 
title="Privacy">Privacy</a>

     
<p>Product Index: 

<a href="http://www.linuxcdshop.com/index/A.html" title="Product Index A">A</a> | <a href="http://www.linuxcdshop.com/index/B.html" title="Product Index B">B</a> | <a href="http://www.linuxcdshop.com/index/C.html" title="Product Index C">C</a> | <a href="http://www.linuxcdshop.com/index/D.html" title="Product Index D">D</a> | <a href="http://www.linuxcdshop.com/index/F.html" title="Product Index F">F</a> | <a href="http://www.linuxcdshop.com/index/G.html" title="Product Index G">G</a> | <a href="http://www.linuxcdshop.com/index/K.html" title="Product Index K">K</a> | <a href="http://www.linuxcdshop.com/index/L.html" title="Product Index L">L</a> | <a href="http://www.linuxcdshop.com/index/M.html" title="Product Index M">M</a> | <a href="http://www.linuxcdshop.com/index/O.html" title="Product Index O">O</a> | <a href="http://www.linuxcdshop.com/index/P.html" title="Product Index P">P</a> | <a href="http://www.linuxcdshop.com/index/S.html" title="Product Index S">S</a> | <a href="http://www.linuxcdshop.com/index/U.html" title="Product Index U">U</a> | <a href="http://www.linuxcdshop.com/index/X.html" title="Product Index X">X</a></p>

<p>P.O. Box 485 Parksville, British Columbia V9P 2G6 Canada</p>
<p>&copy; 2004 - 2007 Linux CD Shop. All rights reserved worldwide.</p>

</div>

</div>    

</body>

</html>

In this sitemaphtml file you will see where I placed the PHP code to call to DB.  You will have to adjust this code for your site and I use SEO = True...

In your .htaccess file add this code.

Code:

RewriteRule ^sitemap.html sitemaphtml.php [L,PT]

That will rewrite sitemap.html to the PHP file you created called sitemaphtml.php


Things to do if I knew more coding.

1. Organize all products into their respective categories.

Anyhow this is a static page as far as the skin goes so you could add anything in the side menus.

Hope you find it useful

My sitemap is here: http://www.linuxcdshop.com/sitemap.html

oh yes it is valid XHTML 1.0 Strict


Mike Perks
Linux CD Shop - /shop for Linux distributions

ReviewLinux.Com - Linux OS News & Review Site

Offline

 

#2 12-24-2007 11:01:49

ZipSkins
Member
From: United Kingdom
Registered: 01-15-2006
Posts: 822
Website

Re: Dynamic sitemap.html for CCP6

Great little mod Mike...


| Professional Quality Customisable Skins for your ClickCartPro Powered Site


-----------------------------
Certified Support Partner

Offline

 

#3 12-24-2007 12:01:04

Perkster
Member
From: Parksville BC Canada
Registered: 10-05-2004
Posts: 349
Website

Re: Dynamic sitemap.html for CCP6

Thanks it would be even better if I could figure out how to breakdown the products into their categories and display like this:

Category 1

                 - product 1
                  -product 2

Category 2

                  - product 3
                  -product 4

Last edited by Perkster (12-24-2007 12:03:04)


Mike Perks
Linux CD Shop - /shop for Linux distributions

ReviewLinux.Com - Linux OS News & Review Site

Offline

 

#4 05-27-2008 10:29:59

Lisaweb
Member
From: CA
Registered: 04-21-2003
Posts: 417

Re: Dynamic sitemap.html for CCP6

This is an absolutely FANTASTIC MOD!  I am soo glad I happened to stumble upon it.  It saves me having to crawl the site and upload a new sitemap every time we add a product.  Yay!

Now, one question - is their any disadvantage to using this instead of a standard Google sitemap?  Google will be just as happy with it, right?

Offline

 

#5 05-27-2008 10:40:50

Perkster
Member
From: Parksville BC Canada
Registered: 10-05-2004
Posts: 349
Website

Re: Dynamic sitemap.html for CCP6

It just creates a html page that hopefully your vusitors will find handy plus google should crawl it.. smile  Glad you enjoyed this hack..:


Mike Perks
Linux CD Shop - /shop for Linux distributions

ReviewLinux.Com - Linux OS News & Review Site

Offline

 

#6 05-27-2008 10:52:57

Lisaweb
Member
From: CA
Registered: 04-21-2003
Posts: 417

Re: Dynamic sitemap.html for CCP6

I spoke too soon.  :-(

Submitted this new sitemap to Google Webmaster tools, got this error:


Your Sitemap does not appear to be in a supported format. Please ensure it meets our Sitemap guidelines and resubmit.


Any ideas on how to edit the format so that it is acceptable to Google?  Meanwhile, I'll do research and see what Google wants, maybe I can figure out what is missing so as to get it accepted.

Thanks!

Offline

 

#7 05-27-2008 11:01:46

Perkster
Member
From: Parksville BC Canada
Registered: 10-05-2004
Posts: 349
Website

Re: Dynamic sitemap.html for CCP6

I think you are wanting a sitemap.xml rather than an html sitemap which cant be submitted in google webmaster tools I believe.  Getting names mixed up.

This code above is only for visitors to see your products in a "SiteMap" wide page.  Only benefits is it is easy to look at plus Google will crawl it as a html page..

A sitemap you want is sitemap.xml where you eneter it in Webmaster tools.  I did a bit of a script for that one too.

https://forum.kryptronic.com/viewtopic.php?id=19542


Mike Perks
Linux CD Shop - /shop for Linux distributions

ReviewLinux.Com - Linux OS News & Review Site

Offline

 

#8 05-27-2008 11:41:37

Lisaweb
Member
From: CA
Registered: 04-21-2003
Posts: 417

Re: Dynamic sitemap.html for CCP6

Wonderful!  Thanks for pointing me in the right direction.  I'll hop over to that thread and work on implementing it.

Thanks again for sharing these scripts, honestly, very generous of you.  smile

Offline

 

#9 05-27-2008 13:44:02

Perkster
Member
From: Parksville BC Canada
Registered: 10-05-2004
Posts: 349
Website

Re: Dynamic sitemap.html for CCP6

Well I actually over the years have gotten many ideas from this forum.  These scripts I have hacked out work for now but hopefully down the road ccp61 will actually add them into the release in a way more professional way.. smile


Mike Perks
Linux CD Shop - /shop for Linux distributions

ReviewLinux.Com - Linux OS News & Review Site

Offline

 

Board footer