1 daniel Aug 06, 2007 09:12
3 daniel Aug 06, 2007 22:15
Perfect again... that solves exactly my problem! Thank you very much!
4 cslepage Aug 08, 2007 19:42
Will this work for 1.10.02 as well?
EDIT: never mind, it does, once I properly read the directions!
5 jjrivard Nov 07, 2007 06:43
function b2evoInsertLink(myField, i, defaultValue) {
if (!defaultValue) {
defaultValue = 'http://';
}
if (!b2evoCheckOpenTags(i)) {
var URL = prompt('<?php echo T_('URL') ?>:' ,defaultValue);
if (URL) {
b2evoButtons[i].tagStart = '<a href="' + URL + '" target="_top">';
b2evoInsertTag(myField, i);
I'm using "Navy Pier". My file looks like the above (it already has the _top). Problem is, when I add a link and save it it does not put the target into the link and I have to go back in and manually add it. What gives?, shouldn't it be there on all my links?
-Joel
6 afwas Nov 07, 2007 14:33
hi Joel,
Looks like this is going to work in 2.0.2. Do you have the plugin installed and active?
Good luck
7 drox Jan 27, 2008 00:04
it took me quite a bit of searching on the forums but this thread just made my day :D
i wonder if the b2evo team could consider making some sort of "on/off" button or setting acceseble from the backoffice for external linking.
8 sims Mar 15, 2008 01:24
That's great, how can you do the same for links entered in the "Link to url:" field whilst posting?
Thanks in advance.
9 sims Mar 29, 2008 20:44
¥åßßå wrote:
2) I add a class="ext" to all my external links, that way they can be styled differently
¥
I am interested in applying this method.
I just wondered how you go about it. Do you manually add the class to the string whilst posting or is it automatic?
I guess you make a new class in your CSS file but is there anything else you need to do? Does the post know if the link is internal or external? if so how?
10 waltercruz Mar 30, 2008 23:40
Hi! I have a plugin to replace the bundled blogroll, adding xfn rel tags that can be setted to open the linkroll links on new windows. You can just add the rel="external" to your links and it will work!
11 cslepage Apr 10, 2008 05:44
Walter, I'm a little lost on this. I installed the plugin/widget, and added the "js" line to my html header file, but I don't see where to put the "rel" line.
12 waltercruz Apr 10, 2008 12:21
Hi cslepage!
Well, the widget is a drop-in replacement for the linkblog. Have you added the linkblog provided by the widget?
Although, I think that I can provide a plugin for _blank and another for the linkblog.
After that, add to your links:
<a href="link" rel="external">External Link</a>
13 cslepage Apr 10, 2008 12:50
Walter wrote:
Hi cslepage!
Well, the widget is a drop-in replacement for the linkblog. Have you added the linkblog provided by the widget?
Yes, and so far, it's identical the "normal" linkblog. Thought I'm assuming that's because I'm lacking the "rel" portion.
Although, I think that I can provide a plugin for _blank and another for the linkblog.
After that, add to your links:
<a href="link" rel="external">External Link</a>
Instead of just putting "http://www....."?
14 waltercruz Apr 10, 2008 21:23
Yes, identical, but a little different:
- Id the widget settings, you can configure it to don't show categories on the linkblog
- You can configure the links to open on a new window.
- You can use tags in the linkblog posts as xfn relations.
- And you can open another links on new windows :) just add rel="external" to href
You just publish your linkblog posts as you have done until today :)
and, if you want another link to open on a external window, just do:
<a href="http://b2evolution.net" rel="external">b2evolution</a>
Allright?
15 cslepage Apr 10, 2008 21:26
Okay, now I see, these are two different activities.
So, the "rel" is for links I place in a blog post? And I would have to manually add the "rel" to each link?
16 waltercruz Apr 10, 2008 21:29
Well, yes, it had to be done manually :(
Except for the links on the linkblog, if you set the widget to open the linkblog links on a new windows, it works automatically.
Do you want to make this automatic for all the links on your site?
I think that I could do a plugin for that.
17 cslepage Apr 10, 2008 21:30
That would be great. To be honest, I could add "target=blank" manually to each tag if I wanted to. Though I suppose I could go back and alter the quicktags.php file like I did in my old skin.
18 waltercruz Apr 10, 2008 21:38
Well, I can work on the plugin by the weekend, I think. :D
19 cslepage Apr 10, 2008 21:39
I look forward to testing it!
20 waltercruz Apr 10, 2008 22:29
I will try to implement this on my plugin!
21 karl_kelman Apr 04, 2010 04:25
Isn't target=blank deprecated? I use onclick="window.open(this.href); return false; to validate and get the same effect
22 yabba Apr 04, 2010 12:03
Please don't dig up 2 year old posts
¥
1) crack open plugins/quicktags.php and change this bit to add the target="_blank" ( this will add it to all links )
2) I add a class="ext" to all my external links, that way they can be styled differently
¥