| 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? |
|
|||||||
| Register | FAQ | Shooters | Calendar | Reviews | Tutorials | Gallery | Books | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
DeColores!
Join Date: Jan 2006
Posts: 906
|
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>
|
|
|
|
|
|
#2 |
|
SmugMug COO & House Pro
Join Date: Dec 2003
Location: New York City
Posts: 52,623
|
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. |
|
|
|
|
|
#3 | |
|
Code Monkey
Join Date: Jan 2004
Posts: 1,012
|
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:
|
|
|
|
|
|
|
#4 | |
|
DeColores!
Join Date: Jan 2006
Posts: 906
|
Quote:
|
|
|
|
|
|
|
#5 | |
|
SmugMug COO & House Pro
Join Date: Dec 2003
Location: New York City
Posts: 52,623
|
Quote:
|
|
|
|
|
|
|
#6 | |
|
Here for the crosswords
Join Date: Nov 2005
Location: the Netherlands
Posts: 7,965
|
Quote:
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;
}
}
}
I used it on my site to see if it works, and it works great.
__________________
Ivar moderator: People & Go Figure usefulness: how to do most anything on Dgrin - great tutorials - gear reviews - book reviews me: www.ivarborst.nl - blog - smugmug Kinkajou: "go comment on something and spread the love!" Last edited by ivar; Apr-10-2006 at 12:44 AM. |
|
|
|
|
|
|
#8 | |
|
SmugMug COO & House Pro
Join Date: Dec 2003
Location: New York City
Posts: 52,623
|
Quote:
|
|
|
|
|
|
|
#9 | |
|
Here for the crosswords
Join Date: Nov 2005
Location: the Netherlands
Posts: 7,965
|
Quote:
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 moderator: People & Go Figure usefulness: how to do most anything on Dgrin - great tutorials - gear reviews - book reviews me: www.ivarborst.nl - blog - smugmug Kinkajou: "go comment on something and spread the love!" |
|
|
|
|
|
|
#10 | |
|
SmugMug COO & House Pro
Join Date: Dec 2003
Location: New York City
Posts: 52,623
|
Quote:
THANK YOU, IVAR Pipes gone. Wonderful. Now I can use this bit of CSS: #feeds .note {display: none;} which removes the "what are feeds?" link.
|
|
|
|
|
|
|
#11 |
|
SmugMug COO & House Pro
Join Date: Dec 2003
Location: New York City
Posts: 52,623
|
I actually didn't like it with nothing there, so I just used a dot separator instead...
· http://www.htmlcodetutorial.com/char...amsupp_69.html |
|
|
|
|
|
#12 | |
|
Here for the crosswords
Join Date: Nov 2005
Location: the Netherlands
Posts: 7,965
|
Quote:
__________________
Ivar moderator: People & Go Figure usefulness: how to do most anything on Dgrin - great tutorials - gear reviews - book reviews me: www.ivarborst.nl - blog - smugmug Kinkajou: "go comment on something and spread the love!" |
|
|
|
|
|
|
#13 |
|
SmugMug COO & House Pro
Join Date: Dec 2003
Location: New York City
Posts: 52,623
|
It only works now for the first of my three feeds boxes on my homepage
www.moonriverphotography.com anyone got a fix? |
|
|
|
|
|
#14 |
|
technicolored
Join Date: Nov 2004
Location: Melbourne, AU
Posts: 4,308
|
Hey Ivar,
I have modified your code. Read up on using regular expressions, they are much more powerful than having to loop through code multiple times. Cheers, David Code:
addEvent(window, "load", rem_pipes);
function rem_pipes () {
var objElement = document.getElementById("footer")
if (objElement != null)
{
var str_a = new String(objElement.innerHTML);
str_a = str_a.replace(/\|/g, '')
objElement.innerHTML = str_a;
}
var objElement = document.getElementById("feeds")
if (objElement != null)
{
var str_b = new String(objElement.innerHTML);
str_b = str_b.replace(/\|/g, '')
objElement.innerHTML = str_b;
}
}
|
|
|
|
|
|
#15 |
|
Here for the crosswords
Join Date: Nov 2005
Location: the Netherlands
Posts: 7,965
|
thanks David, i need to read up, i know.... I'm stuck in the oldschool stuff from years ago
__________________
Ivar moderator: People & Go Figure usefulness: how to do most anything on Dgrin - great tutorials - gear reviews - book reviews me: www.ivarborst.nl - blog - smugmug Kinkajou: "go comment on something and spread the love!" |
|
|
|
|
|
#16 |
|
SmugMug COO & House Pro
Join Date: Dec 2003
Location: New York City
Posts: 52,623
|
Neither Devs nor Ivars removes the pipes from box 2 and 3 on the homepage
|
|
|
|
|
|
#17 | |
|
Here for the crosswords
Join Date: Nov 2005
Location: the Netherlands
Posts: 7,965
|
Quote:
__________________
Ivar moderator: People & Go Figure usefulness: how to do most anything on Dgrin - great tutorials - gear reviews - book reviews me: www.ivarborst.nl - blog - smugmug Kinkajou: "go comment on something and spread the love!" |
|
|
|
|
|
|
#18 |
|
SmugMug COO & House Pro
Join Date: Dec 2003
Location: New York City
Posts: 52,623
|
Got it
I had some dupe JS (user error
)and, I added section for feedHelp Code:
// fix the pesky pipes
addEvent(window, "load", rem_pipes);
function rem_pipes () {
var objElement = document.getElementById("footer")
if (objElement != null)
{
var str_a = new String(objElement.innerHTML);
str_a = str_a.replace(/\|/g, '')
objElement.innerHTML = str_a;
}
var objElement = document.getElementById("allFeeds")
if (objElement != null)
{
var str_b = new String(objElement.innerHTML);
str_b = str_b.replace(/\|/g, '')
objElement.innerHTML = str_b;
}
var objElement = document.getElementById("feedHelp")
if (objElement != null)
{
var str_b = new String(objElement.innerHTML);
str_b = str_b.replace(/\|/g, '')
objElement.innerHTML = str_b;
}
}
|
|
|
|
|
|
#19 | |
|
Here for the crosswords
Join Date: Nov 2005
Location: the Netherlands
Posts: 7,965
|
Quote:
Lets see if i understand this correctly. Because all pipes are located in children of #cobrand_footer, can i use the following and still achieve what Andy is getting above? Code:
addEvent(window, "load", rem_pipes);
function rem_pipes () {
var objElement = document.getElementById("cobrand_footer")
if (objElement != null) {
var str = new String(objElement.innerHTML);
str = str.replace(/\|/g, '')
objElement.innerHTML = str;
}
}
__________________
Ivar moderator: People & Go Figure usefulness: how to do most anything on Dgrin - great tutorials - gear reviews - book reviews me: www.ivarborst.nl - blog - smugmug Kinkajou: "go comment on something and spread the love!" |
|
|
|
|
|
|
#20 | ||
|
Now with 10% less fail
Join Date: Aug 2005
Location: Gainesville, VA
Posts: 2,713
|
Quote:
Quote:
__________________
lose |loōz| verb
|
||
|
|
|
![]() |
| Tell The World! |
| Thread Tools | |
| Display Modes | |
|
|