| I'm listening
Posts: 5,866 Join Date: Jan 2005 Location: Houston (Cypress), Texas, Texas Real First Name: Nathan Camera: Nikon Can Others Edit My Photos: Yes iTrader Rating: 0 LIKES Received: 15 LIKES Given: 101 | Vanity Links not working??? -
11-19-2008, 07:13 AM
Ok, I know I probably screwed up the code somewhere, but my vanity links no longer work...
Here is the code I currently have in the Top Javascript section on my Customization page: var vanityTable =
{
ashley2008: "http://photographics.smugmug.com/gallery/4569465_UD697",
autismspeaks: "http://photographics.smugmug.com/gallery/5790552_6aaSf",
2008houstonwalk: "http://www.photographicstx.com/gallery/6345548_vQgpg",
brigance: "http://photographics.smugmug.com/gallery/5172191_tWHF2"
};
function CheckRedirects()
{
if (YD.hasClass(document.body, 'homepage')) // only run this code on the home page
{
// get the path from the current URL,
// convert it to lowercase and remove the leading slash
var path = window.location.pathname.toLowerCase().substr(1);
var newURL = vanityTable[path]; // look it up in our table
// if we found it in the table && newURL is different than where we are
if (newURL && (newURL != window.location))
{
window.location.replace(newURL); // go to the new URL
}
}
}
but none of the links are working....
am I missing something else?
Last edited by ndsimm; 11-19-2008 at 07:14 AM..
Reason: title change
|
| | |