• Gear
  • Shots
  • Photo Craft
  • Video
  • Wide Angle
  • Support
  • New Stuff
  • More
Support SmugMug APIs, Hacks & Tricks Get rid of the same boring title on every page...

FAQtoid

Ever wanted to create an Avatar? Creating an Avatar!

Searching Dgrin with Google Searching with Google

Dgrin Challenges

Congratulations to the Winner of DSS #128 (Sunrise or Sunset), ShootingStar.

The next Dgrin Challenge DSS #129 (Silhouette Revisited ) is open for entries through May 27th, 2013 at 8:00pm PDT.

As always, we look forward to your participation but please do take a moment to read through the rules before posting your entry.

Past DSS Challenge Winners, DSS Challenge Rules, and other important DSS Challenge information is here.

Need some help with Accessories?

Tutorials

Ever find yourself wondering just how someone managed to create an image using different effects?

Here are three simple tutorials we hope will encourage you to try something new.

The Hot Seat

A lifelong interest in landscape photography has led Eyal Oren to make a study of his adopted hometown of Marblehead, MA. As you can see, his dedication is paying off!

Africa!

Dgrinners Harryb, Pathfinder, and others joined Andy Williams and Marc Muench on Safari in East Africa recently. Here are some awesome threads to check out!

 
Thread Tools Display Modes
Page 8  of  8
« First 4 5 6 7 8
Old Feb-01-2009, 10:24 AM
#141
Tomkirk23 is offline Tomkirk23
Major grins
Here is a simpler alternative approach for those with a limited number of pages...
Hi -

This approach is simpler and a bit more manual, but provides great flexibility.... This enables you to specifically title any page.

Top Javascript
function UpdatedPageTitle()
{
var baseTitle = "YOUR BASE PAGE TITLE";
var separator = " - ";
var updatedPageTitle = document.getElementById("updatedPageTitle");
if( updatedPageTitle && updatedPageTitle.innerHTML )
{document.title = baseTitle + separator + updatedPageTitle.innerHTML;}
else {document.title = baseTitle;}
}

Body Tag
<body onload="UpdatedPageTitle();">

CSS
#updatedPageTitle {display:none;}

Anywhere on a page that you want to title a specific way
<div id=updatedPageTitle>YOUR UPDATED TITLE</div>


Note: If you do NOT implement the <div id=updatedPageTitle> statement on a given page, that page will display the base title that is set in the Javascript section.


Thanks,

Tom K.
Old Feb-04-2009, 10:28 PM
#142
PixelPie is offline PixelPie
Big grins
PixelPie's Avatar
Quote:
Originally Posted by Tomkirk23
Hi -

This approach is simpler and a bit more manual, but provides great flexibility.... This enables you to specifically title any page.

Thanks,

Tom K.
Wow Tom. That works like a charm. Very easy to implement. Thank you!
__________________

[FONT=Fixedsys]PixelPie Photography[/FONT]
[FONT=Lucida Sans Unicode]Weddings | Portraits[/FONT]
[FONT=Lucida Sans Unicode]Site[/FONT] [FONT=Fixedsys]&[/FONT] [FONT=Lucida Sans Unicode]Blog[/FONT]
[FONT=Lucida Sans Unicode]heather@pixelpiephotos.com[/FONT]
Old Feb-21-2009, 03:05 PM
#143
eccentricreality is offline eccentricreality
Grinner NOOOBie
Phew
Hi All,
For the last three hours I have been working away on this trying to get it to work. I have finally managed to get one of the versions working which is:
Code:
/*
--------------------------------------------------
    ContextualizeTitle Settings
--------------------------------------------------
*/
var titleSettings = {
    separator    : ": ",    // Text to insert between parts of title.
    maxLength    : -1,      // Limits length of title (-1 == no limit).
    doPhotos     : true,    // true == append photo captions
    doAlbums     : true,    // true == append album names
    doGalleries  : true,    // true == append gallery names
    stripSmugmug : true,    // true == remove " - powered by SmugMug" from title bar text
    inverse      : true,   // true == reverse order of home/gallery/album/photo
    siteTitle    : null     // null == use normal site title. "" == suppress site title. "Any Value" == replaces normal site title.
};

/*
--------------------------------------------------
    ContextualizeTitle Class
--------------------------------------------------
*/
function ContextualizeTitle ()
{
    var pieces = new TitlePieces();
    var newTitle = "";
    if (titleSettings.inverse)
    {
        newTitle = MakeTitleBackward();
    }
    else
    {
        newTitle = MakeTitleForward();
    }
    if (titleSettings.maxLength > -1)
    {
        newTitle = newTitle.substr(0, titleSettings.maxLength);
    }
    if (titleSettings.stripSmugmug == false)
    {
        newTitle += " - powered by SmugMug";
    }
    document.title = newTitle;

    // METHODS

    function MakeTitleBackward ()
    {
        var title = "";
        title += pieces.Photo
        if (title.length > 0
            && pieces.Album.length > 0)
        {
            title += titleSettings.separator;
        }
        title += pieces.Album;
        if (title.length > 0
            && pieces.Gallery.length > 0)
        {
            title += titleSettings.separator;
        }
        title += pieces.Gallery;
        if (title.length > 0
            && pieces.Main.length > 0)
        {
            title += titleSettings.separator;
        }
        title += pieces.Main;
        return title;
    }

    function MakeTitleForward ()
    {
        var title = "";
        title += pieces.Main;
        if (title.length > 0
            && pieces.Gallery.length > 0)
        {
            title += titleSettings.separator;
        }
        title += pieces.Gallery;
        if (title.length > 0
            && pieces.Album.length > 0)
        {
            title += titleSettings.separator;
        }
        title += pieces.Album;
        if (title.length > 0
            && pieces.Photo.length > 0)
        {
            title += titleSettings.separator;
        }
        title += pieces.Photo
        return title;
    }

    // CLASSES

    function TitlePieces ()
    {
        this.Main = GetMainTitle();
        this.Gallery = GetGalleryTitle();
        this.Album = GetAlbumTitle();
        this.Photo = GetPhotoTitle();

        function GetMainTitle ()
        {
            var value = titleSettings.siteTitle;
            if (value == null)
            {
                var index = document.title.indexOf("- powered by SmugMug");
                value = document.title.substr(0, index);
            }
            return value;
        }

        function GetGalleryTitle ()
        {
            var value = "";
            if (titleSettings.doGalleries)
            {
                var element = document.getElementById("galleryTitle");
                if (element)
                {
                    value = GetTextContent(element);
                    if (value.length > 0)
                    {
                         // remove " galleries" from title
                        var index = value.indexOf(" galleries");
                        if (index > -1)
                        {
                            value = value.substr(0, index);
                        }
                    }
                }
            }
            return value;
        }

        function GetAlbumTitle ()
        {
            var value = "";
            if (titleSettings.doAlbums)
            {
                var element = document.getElementById("albumTitle");
                if (element)
                {
                    value = GetTextContent(element);
                }
            }
            return value;
        }

        function GetPhotoTitle ()
        {
            var value = "";
            if (titleSettings.doPhotos)
            {
                var element = document.getElementById("caption_bottom");
                if (!element)
                {
                    element = document.getElementById("caption_top");
                }
                if (element)
                {
                    value = GetTextContent(element);
                }
            }
            return value;
        }

    }

} // end of ContextualTitle class

/*
--------------------------------------------------
    Utility Methods
--------------------------------------------------
*/

function GetPhotoCaption()
{
    var caption = "";
    var photoTitle = document.getElementById("caption_bottom");
    if(!photoTitle)
    {
        photoTitle = document.getElementById("caption_top");
    }
    if(photoTitle)
    {
        caption = GetTextContent(photoTitle);
    }
    return caption;
}

function GetTextContent(node)
{
    var text = "";
    if(node)
    {
        if(node.children)
        {
            text = GetTextContent(node.firstChild);
        }
        else
        {
            if(node.nodeValue)
            {
                text = node.nodeValue; // IE
            }
            else
            {
                text = node.textContent; // mozilla
            }
        }
    }
    text = Trim(text);
    return text;
}

function Trim(text)
{
    var regexp = /^\s+|\s+$/g;
    text = text.replace(regexp, "");
    return text;
}

function IsHomePage()
{
    var isHomePage = false;
    // test for the "homepage" class name in the <BODY> tag
    var classStr = document.body.className;
    if (classStr && (classStr.indexOf("homepage") != -1))
    {
        isHomePage = true;
    }
    return isHomePage;
}
However on my site (http://gallery.eccentricreality.com ) none of the actual captions seem to be showing for any of the photos, only the album names. Anyone have any ideas?
Cheers
Stuart
Old Feb-28-2009, 07:05 AM
#144
Gary Glass is offline Gary Glass
Picture Reality
Gary Glass's Avatar
Quote:
For the last three hours I have been working away on this trying to get it to work. I have finally managed to get one of the versions working which is:
I'm feeling frustrated with SM's support of customer-provided hacks. I keep seeing people posting things (like you did) saying basically, "There's code all over the place. I just want to know how to make it work." I thought the wiki was a great step toward easing the pain of maintaining hacks and giving users a single place to go and get the code, together with instructions on how to use it. But now that SM no longer allows the community to edit the wiki (sort of defeats the purpose of a wiki, doesn't it?), and they haven't been doing a good job of keeping the hacks on it up to date themselves, we have this situation. If SM really wants the community to develop and support and implement customization hacks, then I think SM really needs to make it easier for us. Discussions threads are a great way to discuss hacks. But they're a terrible documentation system and a worse code repository.
__________________
[FONT="Garamond"]Gary Glass[/FONT]
[FONT="Tahoma"]ShutterGlass.com[/FONT]
[FONT="Tahoma"]OnlyBegotten.com[/FONT]
Old Mar-04-2009, 07:23 PM
#145
Nixielee is offline Nixielee
Beginner grinner
Title Bar Help
I used this method by Mohamed Ghuloom on http://www.photos.nixielee.com.
All is well exept one small bug. On the Catagories "Glitz" and "SledgeHammer" the catagory name is not displayed in the title bar. I use a different theme for these catagories could that be what is affecting the display and how so??
Many Thanks- ultimae goal examples
Nixielee Photography (Home Page)
Glitz - Nixielee Photography (Glitz Catagory)
Glitz - Blue Haven Lounge - Nixielee Photography (Blue Haven Sub Catagory)
ect...

It's not a huge deal when they are on an album the album name shows up and the Powered by Smug Mug is gone which is my main goal.

But if you have any ideas for what I may have done wrong let me know

Many Thanks!



Quote:
Originally Posted by Mohamed.Ghuloom
It toke me 14 pages to get this done, and bottom line:
Add this to your top javascript:
Code:
/*
--------------------------------------------------
    ContextualizeTitle Settings
--------------------------------------------------
*/
var titleSettings = {
    separator    : ": ",    // Text to insert between parts of title.
    maxLength    : -1,      // Limits length of title (-1 == no limit).
    doPhotos     : true,    // true == append photo captions
    doAlbums     : true,    // true == append album names
    doGalleries  : true,    // true == append gallery names
    stripSmugmug : true,    // true == remove " - powered by SmugMug" from title bar text
    inverse      : false,   // true == reverse order of home/gallery/album/photo
    siteTitle    : null     // null == use normal site title. "" == suppress site title. "Any Value" == replaces normal site title.
};
 
/*
--------------------------------------------------
    ContextualizeTitle Class
--------------------------------------------------
*/
function ContextualizeTitle ()
{
    var pieces = new TitlePieces();
    var newTitle = "";
    if (titleSettings.inverse)
    {
        newTitle = MakeTitleBackward();
    }
    else
    {
        newTitle = MakeTitleForward();
    }
    if (titleSettings.maxLength > -1)
    {
        newTitle = newTitle.substr(0, titleSettings.maxLength);
    }
    if (titleSettings.stripSmugmug == false)
    {
        newTitle += " - powered by SmugMug";
    }
    document.title = newTitle;
 
    // METHODS
 
    function MakeTitleBackward ()
    {
        var title = "";
        title += pieces.Photo
        if (title.length > 0
            && pieces.Album.length > 0)
        {
            title += titleSettings.separator;
        }
        title += pieces.Album;
        if (title.length > 0
            && pieces.Gallery.length > 0)
        {
            title += titleSettings.separator;
        }
        title += pieces.Gallery;
        if (title.length > 0
            && pieces.Main.length > 0)
        {
            title += titleSettings.separator;
        }
        title += pieces.Main;
        return title;
    }
 
    function MakeTitleForward ()
    {
        var title = "";
        title += pieces.Main;
        if (title.length > 0
            && pieces.Gallery.length > 0)
        {
            title += titleSettings.separator;
        }
        title += pieces.Gallery;
        if (title.length > 0
            && pieces.Album.length > 0)
        {
            title += titleSettings.separator;
        }
        title += pieces.Album;
        if (title.length > 0
            && pieces.Photo.length > 0)
        {
            title += titleSettings.separator;
        }
        title += pieces.Photo
        return title;
    }
 
    // CLASSES
 
    function TitlePieces ()
    {
        this.Main = GetMainTitle();
        this.Gallery = GetGalleryTitle();
        this.Album = GetAlbumTitle();
        this.Photo = GetPhotoTitle();
 
        function GetMainTitle ()
        {
            var value = titleSettings.siteTitle;
            if (value == null)
            {
                var index = document.title.indexOf("- powered by SmugMug");
                value = document.title.substr(0, index);
            }
            return value;
        }
 
        function GetGalleryTitle ()
        {
            var value = "";
            if (titleSettings.doGalleries)
            {
                var element = document.getElementById("galleryTitle");
                if (element)
                {
                    value = GetTextContent(element);
                    if (value.length > 0)
                    {
                         // remove " galleries" from title
                        var index = value.indexOf(" galleries");
                        if (index > -1)
                        {
                            value = value.substr(0, index);
                        }
                    }
                }
            }
            return value;
        }
 
        function GetAlbumTitle ()
        {
            var value = "";
            if (titleSettings.doAlbums)
            {
                var element = document.getElementById("albumTitle");
                if (element)
                {
                    value = GetTextContent(element);
                }
            }
            return value;
        }
 
        function GetPhotoTitle ()
        {
            var value = "";
            if (titleSettings.doPhotos)
            {
                var element = document.getElementById("caption_bottom");
                if (!element)
                {
                    element = document.getElementById("caption_top");
                }
                if (element)
                {
                    value = GetTextContent(element);
                }
            }
            return value;
        }
 
    }
 
} // end of ContextualTitle class
 
/*
--------------------------------------------------
    Utility Methods
--------------------------------------------------
*/
 
function GetPhotoCaption()
{
    var caption = "";
    var photoTitle = document.getElementById("caption_bottom");
    if(!photoTitle)
    {
        photoTitle = document.getElementById("caption_top");
    }
    if(photoTitle)
    {
        caption = GetTextContent(photoTitle);
    }
    return caption;
}
 
function GetTextContent(node)
{
    var text = "";
    if(node)
    {
        if(node.children)
        {
            text = GetTextContent(node.firstChild);
        }
        else
        {
            if(node.nodeValue)
            {
                text = node.nodeValue; // IE
            }
            else
            {
                text = node.textContent; // mozilla
            }
        }
    }
    text = Trim(text);
    return text;
}
 
function Trim(text)
{
    var regexp = /^\s+|\s+$/g;
    text = text.replace(regexp, "");
    return text;
}
 
function IsHomePage()
{
    var isHomePage = false;
    // test for the "homepage" class name in the <BODY> tag
    var classStr = document.body.className;
    if (classStr && (classStr.indexOf("homepage") != -1))
    {
        isHomePage = true;
    }
    return isHomePage;
}
Add this to your bottom javascript
YE.onDOMReady(ContextualizeTitle);
Old Mar-06-2009, 08:12 AM
#146
Ryan Armbrust is offline Ryan Armbrust
I like to shoot people!
Ryan Armbrust's Avatar
Quote:
Originally Posted by Mohamed.Ghuloom
It toke me 14 pages to get this done, and bottom line:
Add this to your top javascript:
Code:
/*
--------------------------------------------------
	ContextualizeTitle Settings
--------------------------------------------------
*/
var titleSettings = {
	separator    : ": ",    // Text to insert between parts of title.
	maxLength    : -1,      // Limits length of title (-1 == no limit).
	doPhotos     : true,    // true == append photo captions
	doAlbums     : true,    // true == append album names
	doGalleries  : true,    // true == append gallery names
	stripSmugmug : true,    // true == remove " - powered by SmugMug" from title bar text
	inverse      : false,   // true == reverse order of home/gallery/album/photo
	siteTitle    : null     // null == use normal site title. "" == suppress site title. "Any Value" == replaces normal site title.
};

/*
--------------------------------------------------
	ContextualizeTitle Class
--------------------------------------------------
*/
function ContextualizeTitle ()
{
	var pieces = new TitlePieces();
	var newTitle = "";
	if (titleSettings.inverse)
	{
		newTitle = MakeTitleBackward();
	}
	else
	{
		newTitle = MakeTitleForward();
	}
	if (titleSettings.maxLength > -1)
	{
		newTitle = newTitle.substr(0, titleSettings.maxLength);
	}
	if (titleSettings.stripSmugmug == false)
	{
		newTitle += " - powered by SmugMug";
	}
	document.title = newTitle;

	// METHODS

	function MakeTitleBackward ()
	{
		var title = "";
		title += pieces.Photo
		if (title.length > 0
			&& pieces.Album.length > 0)
		{
			title += titleSettings.separator;
		}
		title += pieces.Album;
		if (title.length > 0
			&& pieces.Gallery.length > 0)
		{
			title += titleSettings.separator;
		}
		title += pieces.Gallery;
		if (title.length > 0
			&& pieces.Main.length > 0)
		{
			title += titleSettings.separator;
		}
		title += pieces.Main;
		return title;
	}

	function MakeTitleForward ()
	{
		var title = "";
		title += pieces.Main;
		if (title.length > 0
			&& pieces.Gallery.length > 0)
		{
			title += titleSettings.separator;
		}
		title += pieces.Gallery;
		if (title.length > 0
			&& pieces.Album.length > 0)
		{
			title += titleSettings.separator;
		}
		title += pieces.Album;
		if (title.length > 0
			&& pieces.Photo.length > 0)
		{
			title += titleSettings.separator;
		}
		title += pieces.Photo
		return title;
	}

	// CLASSES

	function TitlePieces ()
	{
		this.Main = GetMainTitle();
		this.Gallery = GetGalleryTitle();
		this.Album = GetAlbumTitle();
		this.Photo = GetPhotoTitle();

		function GetMainTitle ()
		{
			var value = titleSettings.siteTitle;
			if (value == null)
			{
				var index = document.title.indexOf("- powered by SmugMug");
				value = document.title.substr(0, index);
			}
			return value;
		}

		function GetGalleryTitle ()
		{
			var value = "";
			if (titleSettings.doGalleries)
			{
				var element = document.getElementById("galleryTitle");
				if (element)
				{
					value = GetTextContent(element);
					if (value.length > 0)
					{
						 // remove " galleries" from title
						var index = value.indexOf(" galleries");
						if (index > -1)
						{
							value = value.substr(0, index);
						}
					}
				}
			}
			return value;
		}

		function GetAlbumTitle ()
		{
			var value = "";
			if (titleSettings.doAlbums)
			{
				var element = document.getElementById("albumTitle");
				if (element)
				{
					value = GetTextContent(element);
				}
			}
			return value;
		}

		function GetPhotoTitle ()
		{
			var value = "";
			if (titleSettings.doPhotos)
			{
				var element = document.getElementById("caption_bottom");
				if (!element)
				{
					element = document.getElementById("caption_top");
				}
				if (element)
				{
					value = GetTextContent(element);
				}
			}
			return value;
		}

	}

} // end of ContextualTitle class

/*
--------------------------------------------------
	Utility Methods
--------------------------------------------------
*/

function GetPhotoCaption()
{
	var caption = "";
	var photoTitle = document.getElementById("caption_bottom");
	if(!photoTitle)
	{
		photoTitle = document.getElementById("caption_top");
	}
	if(photoTitle)
	{
		caption = GetTextContent(photoTitle);
	}
	return caption;
}

function GetTextContent(node)
{
	var text = "";
	if(node)
	{
		if(node.children)
		{
			text = GetTextContent(node.firstChild);
		}
		else
		{
			if(node.nodeValue)
			{
				text = node.nodeValue; // IE
			}
			else
			{
				text = node.textContent; // mozilla
			}
		}
	}
	text = Trim(text);
	return text;
}

function Trim(text)
{
	var regexp = /^\s+|\s+$/g;
	text = text.replace(regexp, "");
	return text;
}

function IsHomePage()
{
	var isHomePage = false;
	// test for the "homepage" class name in the <BODY> tag
	var classStr = document.body.className;
	if (classStr && (classStr.indexOf("homepage") != -1))
	{
		isHomePage = true;
	}
	return isHomePage;
}
Add this to your bottom javascript
YE.onDOMReady(ContextualizeTitle);

Does anyone know if using this code will change the gallery titles in a google search or will they all still be the same?

Thanks
__________________
[FONT=Comic Sans MS]Sniper Photography

[/FONT]
Old Apr-17-2009, 07:58 AM
#147
rachael_ritchie is offline rachael_ritchie
Big grins
So I have been reading multiple threads and have just gone in circles over what exactly to put. I believe I have put everything that Gary has said to put, and I would just like to have someone possibly take a look at my site and see if i've goofed anything up or mixed up codes. I have put everything in my bottom Javascript instead of my top which might be causing a problem. Also, I did insert my title into the "" (that is what I was supposed to do right?) But I don't believe it is working with what I have so I messed something up for sure. Any help would be greatly appreciated!


Thank you in advance!
Rachael Ritchie

http://www.rachaelritchiephotography.com
Old Apr-17-2009, 05:53 PM
#148
Gary Glass is offline Gary Glass
Picture Reality
Gary Glass's Avatar
It doesn't look like you're actually invoking the ContextualizeTitle method anywhere. There's different ways to do it:

You can add it to your body tag:

onload="ContextualizeTitle();"

You can add an event handler anywhere in your javascript:

addEvent(window, "load", ContextualizeTitle);
__________________
[FONT="Garamond"]Gary Glass[/FONT]
[FONT="Tahoma"]ShutterGlass.com[/FONT]
[FONT="Tahoma"]OnlyBegotten.com[/FONT]
Old May-18-2009, 05:36 PM
#149
Big_D is offline Big_D
Big grins
I am new here and in need of some help

I have been following this thread for the last couple days and I can't make heads or tails out of what is happening. I don't even know if this is what I was looking for so if someone answer this I would be so greatful.

All I want to do is remove the words sub-categories, categories and galleries from the page title. Simple put I would like to see:

CategoryName not CategoryName + categories
Sub-CategoryName not Sub-CategoryName + sub-categories

Can someone please point me in the right direction?

http://www.joedecluette.smugmug.com

Thank you so much,
Old May-19-2009, 03:57 AM
#150
Gary Glass is offline Gary Glass
Picture Reality
Gary Glass's Avatar
Big_D, this hack is about modifying the text displayed in the titlebar of the browser, not what's shown on the page itself.

I understand your frustration, and again, I renew my call to Smugmug to provide a better way for all of us to maintain and document user-contributed hacks. User-contributed hacks add real value to SM. But they are not being well utilized.
__________________
[FONT="Garamond"]Gary Glass[/FONT]
[FONT="Tahoma"]ShutterGlass.com[/FONT]
[FONT="Tahoma"]OnlyBegotten.com[/FONT]
Old Aug-07-2009, 04:06 PM
#151
blackshadow is offline blackshadow
Big grins
I've been looking through this and trying to implement it but I need a real dummy's guide step by step set of instructions to get it working.

I put this code in the Top JavaScript section:

document.title = "Black Shadow Photography – Richard Sharman a photographer in Melbourne";function RelevantTitle(){ var baseTitle = " Black Shadow Photography – Richard Sharman a photographer in Melbourne"; var separator = " - "; var albumTitle = document.getElementById("albumTitle"); var galleryTitle = document.getElementById("galleryTitle"); if( albumTitle && albumTitle.textContent ) document.title = baseTitle + separator + albumTitle.textContent; else if( galleryTitle && galleryTitle.textContent ) { var galleryTitleText = galleryTitle.textContent; // Strip " sub-categories" off the end of the category text var finalPositionCategory = galleryTitleText.search(" sub-categories"); if( finalPositionCategory >= 0 ) galleryTitleText = galleryTitleText.substr( 0, finalPositionCategory ); else { // Strip " galleries" off the end of the category/sub-category text var finalPositionSubCategory = galleryTitleText.search(" galleries"); if( finalPositionSubCategory >= 0 ) galleryTitleText = galleryTitleText.substr( 0, finalPositionSubCategory ); } document.title = baseTitle + separator + galleryTitleText; } else // Not Gallery, Category, or Subcategory { // Set title on homepage document.title = baseTitle; }}

And I put this in the Body Tag section

&lt;body onload="RelevantTitle();"&gt;

But it wouldn't accept my changes.

What am I doing wrong?
Old May-27-2012, 04:05 AM
#152
Got Grins? is offline Got Grins?
Big grins
Got Grins?'s Avatar
Could someone please help me do this for my site. I am just starting out with the whole SEO thing and know I have a LONG way to go!!! Here is what I would like it to say

<script language="javascript">document.title="Got Grins Photography - Lakeland, FL Premiere Children's, Teen and Senior Portrait Photgrapher"</script>

I tried to put that in and it wouldnt let me. Thanks!

www.GotGrins.com
__________________
Got Grins? :D
www.gotgrins.com
Old May-27-2012, 04:09 AM
#153
Andy is offline Andy
panasonikon
Andy's Avatar
You don't need this technique any more. Just use NiceNames for your Galleries and Categories and we do it automagically for you.
__________________
Andy
Moon River PhotographyWorkshopsGoogle+FacebookTwitter
Old May-27-2012, 04:14 AM
#154
Got Grins? is offline Got Grins?
Big grins
Got Grins?'s Avatar
I am starting WAY at the beginning. I was just reading about keywords and BEGAN to add them.... I need to see examples of steps for SEO. It there a post that does that. Like a step by step of importance:

examples of a good caption (should they all be different?)
I think I found keyword examples
then this started with a good header title? I dont need that?
What is a nicename for a gallery? Ive never even hear of that!!

UGH! I am sorry!!!
__________________
Got Grins? :D
www.gotgrins.com
Old May-27-2012, 06:08 AM
#155
Allen is offline Allen
"tweak 'til it squeaks"
Allen's Avatar
Quote:
Originally Posted by Andy View Post
You don't need this technique any more. Just use NiceNames for your Galleries and Categories and we do it automagically for you.
I have to disagree, the length limit of niceNames severely limits this. You couldn't get remotely close to what he wants.
title="Got Grins Photography - Lakeland, FL Premiere Children's, Teen and Senior Portrait Photgrapher"
Old May-27-2012, 07:41 AM
#156
Got Grins? is offline Got Grins?
Big grins
Got Grins?'s Avatar
Could you please go to this page: http://gotgrins.smugmug.com/gallery/...7071&k=MNkfMgZ and look at my nicename etc and tell me why the url looks like that and not the way I want it to?? Im totally confused!

THANK YOU :)
__________________
Got Grins? :D
www.gotgrins.com
Old May-27-2012, 07:50 AM
#157
jfriend is online now jfriend
Scripting dude-volunteer
Quote:
Originally Posted by Got Grins? View Post
Could you please go to this page: http://gotgrins.smugmug.com/gallery/...7071&k=MNkfMgZ and look at my nicename etc and tell me why the url looks like that and not the way I want it to?? Im totally confused!

THANK YOU :)
This is the nicename URL for that gallery: http://www.gotgrins.com/LakelandFL-1/Senior-Portrait-Photographer/Senior-Portraits/23200203_frfPj8. I don't know where you got that other URL, but you should put the better one in your navbar instead of the one you have.

You could further clean up the URL by removing the subcategory (in gallery settings) and only using a category since you aren't actually showing the category/sub-category hierarchy on your site.
__________________
--John
HomepagePopular
JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
Old May-27-2012, 07:52 AM
#158
Allen is offline Allen
"tweak 'til it squeaks"
Allen's Avatar
Quote:
Originally Posted by Got Grins? View Post
Could you please go to this page: http://gotgrins.smugmug.com/gallery/23200203_frfPj8#!i=1870107071&k=MNkfMgZ and look at my nicename etc and tell me why the url looks like that and not the way I want it to?? Im totally confused!

THANK YOU :)
You used /gallery/ in the link in your nav.
<li><a href="/gallery/23200203_frfPj8">Seniors</a></li>

Change the link to this
<li><a href="/LakelandFL-1/Senior-Portrait-Photographer/Senior-Portraits/23200203_frfPj8">Seniors</a></li>

/gallery/ is normally used to hide the path for info type unlisted galleries.
Page 8  of  8
« First 4 5 6 7 8
Tell The World!  

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

Forum Jump