Location via proxy:   [ UP ]   [Manage cookies]

Build a Niche Store Sitemap MOD - Complete version!

September 13, 2007

Hi All -

Before I get too involved in explaining this BANS sitemap MOD, I want to state that you should ALWAYS make a backup of your original files before attempting any modifications. I will generally rename my files with a BAK extension to have a working copy in case of emergency (ex: FrontControlBAK.php.)

The reason I created this MOD is to give website visitors and search spiders a single place to go and find all information about the store categories in one location. The sitemap will create a single page that lists all of your categories and the meta description you have completed within your store administration. At this point, I have not included the custom content pages and may not even do so. In addition, the product listings from the ebay feed are not included due to the frequency of change. The sitemap is intended to be a basic contents section, very similar to a table of contents in a book.

That being said - lets get to the BANS sitemap MOD!

Begin by downloading the BANS site MOD text files to avoid html code jacking up the copy/paste function. There is also a set of directions included in the zip file.

The files contained in this zip will enable you to include a public sitemap on your BANS store.

Before changing any of your site files - be sure to make a backup in case of emergency. Also remember that if you update your BANS store with a newer version in the future, you will have to make these changes again, which may or may not work, depending on how the new release is done.

I know for sure that this MOD works on the BANS 2.0 stores - I have not tested it on anything prior.

Files included:

stylecss-changes.txt (Changes to your style.css file located in the theme you are using)
header-changes.txt (Changes to your header.php file in the theme you are using)
frontcontrol-changes.txt (Changes to the FrontControl.php file, located in the cont folder)

Instructions:

##########################################################
Step 1
##########################################################

Go into your BANS store admin and create a new CONTENT page. At the bottom of the page, use a filename that is relevant to¼br> your niche and contains no spaces.

ex: “Myniche-Sitemap” (Replace myniche with your niche market name)
##########################################################
Step 2
##########################################################
After your page is active, open your style.css file in the appropriate editor of your choice (notepad, dreamweaver etc) and¼br> add the contents of the stylecss-changes.txt file to the bottom of the file, just above the </style> tag. Save the file and upload to your server.
##########################################################
Step 3
##########################################################
Open your FrontControl.php file and search for:

function getMainPageParent(){

DIRECTLY ABOVE that code, copy and paste the text from the frontcontrol-changes.txt file. Save your changes and upload the¼br> file to your server.
##########################################################
Step 4
##########################################################

Open your header.php file from inside the theme directory you are using. This can be done within the admin of your store or¼br> in your own favorite text editor. At the very bottom of the code, you should see:

Directly ABOVE the closing head tag (</head>) Paste the following code:

<?php
function curPageURL() {
$pageURL = ‘http’;
if ($_SERVER[”HTTPS”] == “on”) {$pageURL .= “s”;}
$pageURL .= “://”;
if ($_SERVER[”SERVER_PORT”] != “80″) {
$pageURL .= $_SERVER[”SERVER_NAME”].”:”.$_SERVER[”SERVER_PORT”].$_SERVER[”REQUEST_URI”];
} else {
$pageURL .= $_SERVER[”SERVER_NAME”].$_SERVER[”REQUEST_URI”];
}
return $pageURL;
}
?>

This will get the current page URL from the server.

Next, look for:

<div id=”content” class=”narrowcolumn”>

Directly AFTER that code, paste the code from the header-changes.txt file shown below.

<?php if (curPageURL() == “http://www.mynichedomainname.com/my-sitemap-filename“)
{{echo “<div id=sitemap><ul id=’sitemap’>”;}
{echo $front->sitemapnav();}
{echo “</ul></div>”;}}
?>

You MUST change the http:// information to reflect your own domain name and the sitemap file you created. The easy way of¼br> making sure this is exact will be to open your BANS site in a web browser and click on the menu item for your sitemap page.¼br> Once the blank page is open in front of you, highlight the entire URL in the address bar and copy/paste it into your header¼br> file section above.

After you are done - save your work and/or upload the file to your server in the same folder as your theme.

If you have any problems - feel free to email me directly at [email protected] or post to the blog or BANS forum.

Thanks and enjoy!

Mark

Comments

13 Responses to “Build a Niche Store Sitemap MOD - Complete version!”

  1. Build a Niche Store Sitemap MOD | Domain Monetization - The Project of Time on September 13th, 2007 11:28 am

    […] My Newest Build a Niche Store - Sorry for hiding! Build a Niche Store Sitemap MOD - Complete version! […]

  2. Build a Niche Store Mods | Domain Monetization - The Project of Time on September 18th, 2007 3:42 pm

    […] Add a Public Sitemap to your Build a Niche Store (Skill: 4) […]

  3. Ross on October 4th, 2007 6:38 pm

    Mark,

    My BANS site is ver. 2.0 and I updated the script with your Sitemap Mod just as you described in the text file. I am not getting any output on the content page. No errors are showing, either. Any suggestions?

    -Ross-
    www.ratrodbarn.com

  4. Mark on October 4th, 2007 6:46 pm

    Hi Ross -

    I just visited the site and see it perfectly!

    http://www.ratrodbarn.com/Rat-Rod-Sitemap

    Mark

  5. Ross on October 4th, 2007 8:20 pm

    Beats ME!!!….I could’nt get it to display today or last night. I’ve made no changes to it since the first install??

    I don’t KNOW???????????????

    It works now but I don’t know why?..Oh well I appreciate your help,regardless.

    When I get up enough courage, I will buy Wordtracker through your link.

    Thanks,

    Ross

  6. Ross on October 4th, 2007 8:27 pm

    DUH!!!!!!!

    my page name is Rat_rod-Sitemap

    my link points to Rat-Rod-SiteMap

  7. Sands 2k on October 21st, 2007 4:15 pm

    Hi Mark,

    I want to add a sitemap and link to it on my BANS.

    I downloaded the .css from the themes folder I am using.

    When I open it in DW and look at it there is no: tag anywhere.

    Nor is there a starting in the css of Template 1 Both .

  8. Mark on October 21st, 2007 6:05 pm

    The style tags are already defined in the code of the file call…

    There is no real need for opening or closing style tags.

    Mark

  9. Sands 2k on October 21st, 2007 9:57 pm

    So how do I do Step 2?

    “add the contents of the stylecss-changes.txt file to the bottom of the file, just above the tag.”

    I don’t know where just above the style tag is.

  10. Gerry on October 28th, 2007 8:52 am

    Hi Mark,
    I am trying to add the sitemap as per your instructions but I am getting the following error when I go back into my site:

    Parse error: syntax error, unexpected ‘:’ in /home/gerryp29/public_html/themes/layout-3-both/header.php on line 22

    regards

    Gerry

    PS your site has been a great resource for me as I am new to this stuff

  11. Cindy on November 2nd, 2007 12:14 am

    Hi Mark,

    I managed to get this easily installed when I was working in a test folder. Now that I have transferred all the files to the main folder, I can’t get the sitemap to work. I transferred all the files and then went into the header.php and deleted the “/test” from the URL (minus the quotes) which was the only difference. I’ve checked all the code and everything looks right.

    If I leave the /test out, then neither the test site or the live site will show the sitemap … but if I put /test back in, then the test site shows the sitemap altho the live site still doesn’t.

    Is it finicky enough that I need to delete, save, and re-add each of the steps?

    Thanks!

    Cindy

  12. Cindy on November 2nd, 2007 1:29 am

    Mark,

    You can ignore my previous note. Everything works as it should now. Based on some other comments I’ve read here and at the BANS forum, I’m thinking that for some reason some of the changes don’t happen immediately but if you wait about 30 minutes or so, the changes do show up. A little strange … but as long as it does work!

    Cindy

  13. Build a Niche Store Review www.paintballhoopla.com | The Niche Store Builder - Succeed with Build a Niche Store on November 3rd, 2007 2:57 pm

    […] myself… and prefer to make sure there is an index listed high on the site menu! By adding the Build a niche Store Sitemap you are all but assured that once that page is found by a spider, the entire site will be crawled […]

Got something to say?