Greenguy's Board


Go Back   Greenguy's Board > Blogs and Blogging
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2006-06-02, 12:15 AM   #1
Erick G
Look maah I moved out and got my own space:)
 
Join Date: Jun 2005
Posts: 555
Send a message via ICQ to Erick G
target="_blank" on main index links

Hey
Can someone tell if there is a way to set links and thumbs in the main index posts to target="_blank" so I dont have to do it manually on each post.

thanks
__________________

Exclusive Feeds
Erick G is offline   Reply With Quote
Old 2006-06-02, 01:39 AM   #2
QuickDraw
Heh Heh Heh! Lisa! Vampires are make believe, just like elves and gremlins and eskimos!
 
Join Date: Jan 2006
Posts: 72
... for a specific script? I'm not following you here...
QuickDraw is offline   Reply With Quote
Old 2006-06-02, 02:25 AM   #3
Erick G
Look maah I moved out and got my own space:)
 
Join Date: Jun 2005
Posts: 555
Send a message via ICQ to Erick G
Im using wordpress and I want my mains links and thumbnails to open in a new window. I can add the code manually for each post, but would rather have it done automaticly to all my links.
__________________

Exclusive Feeds
Erick G is offline   Reply With Quote
Old 2006-06-02, 05:28 AM   #4
ronnie
Wheither you think you can or you think you can't, Your right.
 
Join Date: Jun 2004
Location: midwest
Posts: 2,274
Send a message via ICQ to ronnie
Think you'd have to dig into the code, edit how the script builds the links.

ronnie
ronnie is offline   Reply With Quote
Old 2006-06-02, 07:39 AM   #5
tickler
If there is nobody out there, that's a lot of real estate going to waste!
 
tickler's Avatar
 
Join Date: Dec 2003
Posts: 2,177
You could use <base target="_blank" /> which would open all links on the page in a new window.
http://wordpress.org/support/topic/449
__________________
Latina Twins, Solo, NN, Hardcore
Latin Teen Cash
tickler is offline   Reply With Quote
Old 2006-06-02, 11:03 AM   #6
Erick G
Look maah I moved out and got my own space:)
 
Join Date: Jun 2005
Posts: 555
Send a message via ICQ to Erick G
thanks
__________________

Exclusive Feeds
Erick G is offline   Reply With Quote
Old 2006-06-02, 02:04 PM   #7
virgohippy
Madness is like gravity. All it takes is a little... push.
 
virgohippy's Avatar
 
Join Date: Feb 2006
Location: California
Posts: 1,679
If you do that ALL links open in new windows... even your navigation links.

If you're using WP it could be a bigger pain in the ass then to dig up the way it handles the content.

Maybe you could write a quick little script which writes all the code for you, and all you do is input the thumb url, the link url, and whetever, then take the output and pop it into your entry.
__________________
~Warm and Fuzzy.
virgohippy is offline   Reply With Quote
Old 2006-06-02, 02:44 PM   #8
walrus
Oh no, I'm sweating like Roger Ebert
 
walrus's Avatar
 
Join Date: May 2005
Location: Los Angeles
Posts: 1,773
Send a message via ICQ to walrus Send a message via Yahoo to walrus
Quote:
Originally Posted by Erick G
Hey
Can someone tell if there is a way to set links and thumbs in the main index posts to target="_blank" so I dont have to do it manually on each post.

thanks
If I understand you want the links in your posts to open in a new window and not all your links to do that.

You could edit "The Loop" which starts here
Code:
<?php define('WP_USE_THEMES', false); get_header(); ?>
adding <base target="_blank" /> after that line. Then before the end of the loop, which looks something like this
Code:
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
you could set the base target back to self.

At least in theory, I think this should work but you may have to play with the exact location of the base target self code so that if you allow comments they don't open in a new window.

If your talking about links in a sidebar, there is a button on the bottom of the add link page that will allow you to set the link for blank
__________________
Naked Girlfriend Porn TGP
free partner account
walrus is offline   Reply With Quote
Old 2006-06-14, 12:06 PM   #9
Erick G
Look maah I moved out and got my own space:)
 
Join Date: Jun 2005
Posts: 555
Send a message via ICQ to Erick G
thanks walrus i think this will work.
__________________

Exclusive Feeds
Erick G is offline   Reply With Quote
Old 2006-06-17, 06:05 PM   #10
oast
With $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!
 
oast's Avatar
 
Join Date: May 2004
Location: UK
Posts: 316
Are you writing the posts, adding links and then having to manually add the target="_blank"?

If so:
In your 'wp-includes/js' directory is a file called "quicktags.js"

On line 371 is the code that handles the 'link' quicktag.
Code:
edButtons[i].tagStart = '<a href="' + URL + '">';
My altered code:
Code:
edButtons[i].tagStart = '<a href="' + URL + '" rel="external">';
Replace the rel="external" with target="_blank" (I use the 'rel' tag with some js, because 'target' is not a valid xhtml tag.)

If not:
How are you getting the posts on your blog? There will be a way to alter the post automagically

http://adultweblogger.com
__________________
Playboy Webmasters - The name says it all! $35 per signup or 60% revshare.
oast is offline   Reply With Quote
Reply


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


All times are GMT -4. The time now is 03:45 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc