View Full Version : Open default gallery upon entering site
ToxMox
May-27-2009, 11:43 AM
I have a custom domain setup for SmugMug and would like when someone goes to portfolio.mydomain.com that smugmug opens to a specific gallery.
Anyone know how to do this?
Any help is appreciated.
denisegoldberg
May-28-2009, 04:42 AM
I have a custom domain setup for SmugMug and would like when someone goes to portfolio.mydomain.com that smugmug opens to a specific gallery.
I'm not aware of any way to have a gallery open on your home page. You could place some photos from that gallery in your bio box though, set the bio box to show and galleries to not show on your home page. You can see an example of that showing just a few photos on my home page. The layout would be up to you - if you want to go wide you will need to override the default display width of the homepage and the bio box.
--- Denise
ToxMox
May-28-2009, 04:56 AM
I figured out how to do it. I used the vanity url code and put an else statement in the javascript that if the vanity url doesn't match then it opens the gallery I want. Here is the javascript part of it:
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
}
else
{
window.location.replace("http://portfolio.mydomain.com/gallery/nnnnnnn_xxxxx");
}
}
}
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.