Lurk all you'd like, but why not register and post some pics? Registering also makes it easier to find the good stuff. Need help?

Go Back   Digital Grin Photography Forum > Support > SmugMug Customization
Dgrinner
Password
Register FAQ Shooters Calendar Reviews Tutorials Gallery Books Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb-26-2006, 12:27 PM   #1
wellman
DeColores!
 
wellman's Avatar
 
Join Date: Jan 2006
Posts: 887
Getting rid of those pesky pipes

Well after receiving so much help on this forum, I thought I could contribute a VERY small nugget of wisdom. I don't know about anyone else, but I hate it when pipe (|) separators are on the end of a line. This ends up happening if you have camera info enabled for your galleries. To turn this off, place the following snippet into your customization footer.

Code:
<script type="text/javascript"> // Remove trailing pipe (|) from "other sizes" var objElement = document.getElementById("exifOtherSizes") if (objElement != null) { var str = new String(objElement.innerHTML); str = str.replace('|', '') objElement.innerHTML = str; } </script>

The example above removes the pipe from the "exifOtherSizes" element of the camera info. Use the FF Webdeveloper Extension to get the IDs of other elements you want to clean up.
__________________
Greg Wellman
WellmanHouse.net | Blog | AlbumFetcher | SmugShowBuilder
wellman is offline   Reply With Quote
Old Feb-26-2006, 07:21 PM   #2
Andy
Hold the meat
 
Andy's Avatar
 
Join Date: Dec 2003
Location: New York City
Posts: 49,109
This is great, Greg - but I can't seem to make it work on the pipe on the footer .... I'm not sure if JT blocks that or not.

A.
Andy is offline   Reply With Quote
Old Feb-27-2006, 07:34 AM   #3
{JT}
Code Monkey
 
{JT}'s Avatar
 
Join Date: Jan 2004
Posts: 987
I will have an easier solution for this soon ;)

But - most people don't have this problem with because their "other sizes" is not the last thing in the list. Normally it is keywords or something else.


Quote:
Originally Posted by Andy
This is great, Greg - but I can't seem to make it work on the pipe on the footer .... I'm not sure if JT blocks that or not.

A.
{JT} is offline   Reply With Quote
Old Feb-27-2006, 10:24 AM   #4
wellman
DeColores!
 
wellman's Avatar
 
Join Date: Jan 2006
Posts: 887
Quote:
Originally Posted by {JT}
But - most people don't have this problem with because their "other sizes" is not the last thing in the list. Normally it is keywords or something else.

Good point.
__________________
Greg Wellman
WellmanHouse.net | Blog | AlbumFetcher | SmugShowBuilder
wellman is offline   Reply With Quote
Old Apr-09-2006, 08:20 PM   #5
Andy
Hold the meat
 
Andy's Avatar
 
Join Date: Dec 2003
Location: New York City
Posts: 49,109
Quote:
Originally Posted by wellman
Well after receiving so much help on this forum, I thought I could contribute a VERY small nugget of wisdom. I don't know about anyone else, but I hate it when pipe (|) separators are on the end of a line. This ends up happening if you have camera info enabled for your galleries. To turn this off, place the following snippet into your customization footer.

Code:
<script type="text/javascript"> // Remove trailing pipe (|) from "other sizes" var objElement = document.getElementById("exifOtherSizes") if (objElement != null) { var str = new String(objElement.innerHTML); str = str.replace('|', '') objElement.innerHTML = str; } </script>

The example above removes the pipe from the "exifOtherSizes" element of the camera info. Use the FF Webdeveloper Extension to get the IDs of other elements you want to clean up.

I want to go "pipeless" in my footer - but no joy. Any ideas?
Andy is offline   Reply With Quote
Old Apr-10-2006, 01:23 AM   #6
ivar
pilotographer
 
ivar's Avatar
 
Join Date: Nov 2005
Location: the Netherlands
Posts: 6,955
Quote:
Originally Posted by Andy
I want to go "pipeless" in my footer - but no joy. Any ideas?
Andy, add this to your Javascript.
Code:
addEvent(window, "load", rem_pipes); function rem_pipes () { for (var i = 0; i<3; i++) { var objElement = document.getElementById("footer") if (objElement != null) { var str = new String(objElement.innerHTML); str = str.replace('|', '') objElement.innerHTML = str; } } }
It's for your footer only, not for your feeds. Normally, the code is read only once, so only the first pipe is removed. I put a loop in there for you, so it takes out all of the pipes. I assumed you just wanted the pipes removed, but you can also replace them by something else

I used it on my site to see if it works, and it works great.

Last edited by ivar : Apr-10-2006 at 01:44 AM.
ivar is offline   Reply With Quote
Old Apr-10-2006, 03:46 AM   #7
wellman
DeColores!
 
wellman's Avatar
 
Join Date: Jan 2006
Posts: 887
Quote:
Originally Posted by ivar
I used it on my site to see if it works, and it works great.

Nice!
__________________
Greg Wellman
WellmanHouse.net | Blog | AlbumFetcher | SmugShowBuilder
wellman is offline   Reply With Quote
Old Apr-10-2006, 04:19 AM   #8
Andy
Hold the meat
 
Andy's Avatar
 
Join Date: Dec 2003
Location: New York City
Posts: 49,109
Quote:
Originally Posted by ivar
Andy, add this to your Javascript.

Thanks, Ivar! OK It's gone from my homepage but not from the #feeds part.
Andy is offline   Reply With Quote
Old Apr-10-2006, 04:23 AM   #9
ivar
pilotographer
 
ivar's Avatar
 
Join Date: Nov 2005
Location: the Netherlands
Posts: 6,955
Quote:
Originally Posted by Andy
Thanks, Ivar! OK It's gone from my homepage but not from the #feeds part.
Yep, by design, but that is easy enough to change.
Code:
addEvent(window, "load", rem_pipes); function rem_pipes () { for (var i = 0; i<3; i++) { var objElement = document.getElementById("footer") if (objElement != null) { var str_a = new String(objElement.innerHTML); str_a = str_a.replace('|', '') objElement.innerHTML = str_a; } var objElement = document.getElementById("feeds") if (objElement != null) { var str_b = new String(objElement.innerHTML); str_b = str_b.replace('|', '') objElement.innerHTML = str_b; } } }
ivar is offline   Reply With Quote
Old Apr-10-2006, 05:21 AM   #10
Andy
Hold the meat
 
Andy's Avatar
 
Join Date: Dec 2003
Location: New York City
Posts: 49,109
Quote:
Originally Posted by ivar
Yep, by design, but that is easy enough to change.
Code:
addEvent(window, "load", rem_pipes); function rem_pipes () { for (var i = 0; i<3; i++) { var objElement = document.getElementById("footer") if (objElement != null) { var str_a = new String(objElement.innerHTML); str_a = str_a.replace('|', '') objElement.innerHTML = str_a; } var objElement = document.getElementById("feeds") if (objElement != null) { var str_b = new String(objElement.innerHTML); str_b = str_b.replace('|', '') objElement.innerHTML = str_b; } } }


THANK YOU, IVAR Wonderful, wonderful....

Pipes gone. Wonderful. Now I can use this bit of CSS:

#feeds .note {display: none;}

which removes the "what are feeds?" link.

Andy is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Dgrin Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Times are GMT -8.   It's 11:52 PM.


Powered by vBulletin Version 3.5.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.