Posted on: 12/26/02 02:24pm
By: Super_Collector
In the Web Resources (links) area, I
would like for the link to open in a new window, instead of carrying the
visitor away from me every time they want to explore. Is there an
easy way to accomplish this?
Visitors Are Escaping!
Posted on: 12/28/02 05:25am
By: Dirk
In the file layout/YourTheme/links/linkdetails.thtml, add a target="_blank" to the link.
On a personal note: I absolutely hate it when sites open new windows. It's my browser and I will decide whether I open a link in a new window or not. While this may keep some of the visitors on your site, it's a sure way to drive others away. The best way to keep visitors on your site (and make them come back) is to provide some good and unique content ...
bye, Dirk
Visitors Are Escaping!
Posted on: 02/06/06 07:40am
By: Senja
Hallo , I tried this but is not working:
strong>
{link_name} ({link_hits}) {link_edit}
{link_descriptio
Why not ??
Visitors Are Escaping!
Posted on: 02/06/06 04:35pm
By: lokki
In linkdetails.thtml you have a line that says:
<a href="{link_url}" title="{link_actual_url}">{link_name}</a>
change it to say:
<a href="{link_url}" title="{link_actual_url}" target="_blank">{link_name}</a>
Visitors Are Escaping!
Posted on: 02/06/06 05:20pm
By: beewee
For a better SERP you should perhaps change it to:
<a href="{link_url}" title="{link_name}" target="_blank">{link_name}</a>
Visitors Are Escaping!
Posted on: 02/07/06 06:35am
By: James Fryer
I did some work on this[*1] , although it may need some adapting to work with the latest version of Geeklog. My version handles links in the What's New block as well as the Links page, and is configurable.
Visitors Are Escaping!
Posted on: 08/02/06 04:19pm
By: Anonymous (Lex)
[QUOTE BY= lokki] In linkdetails.thtml you have a line that says:
<a href="{link_url}" title="{link_actual_url}">{link_name}</a>
change it to say:
<a href="{link_url}" title="{link_actual_url}" target="_blank">{link_name}</a>
[/QUOTE]
Will this work for 1.4? It doesn't seem to be working but I'm trying to find out if it's this code or something else.
Visitors Are Escaping!
Posted on: 08/02/06 04:29pm
By: Dirk
[QUOTE BY= Lex] Will this work for 1.4? It doesn't seem to be working but I'm trying to find out if it's this code or something else.[/QUOTE]
Yep. Keep in mind that in 1.4.0 the links section is now a plugin and its template files are located in /path/to/geeklog/plugins/links/templates/
bye, Dirk
Visitors Are Escaping!
Posted on: 08/02/06 06:21pm
By: Anonymous (Lex)
Does it still work if I have url_rewrite enabled?
I'm pretty sure I followed the instructions correctly for the code hack so I'm still looking at other factors.
Visitors Are Escaping!
Posted on: 08/02/06 09:41pm
By: Anonymous (pwr)
I've been wanting this ever since I began using Geeklog on my several domains, and have been amazed that even when I type
link name into the body of a post, the {target="_blank"} doesn't show up in the page source and of course, the link doesn't open a new browser window.
The add'l info mentioned above posted into /geeklog/plugins/links/templates/linkdetails.thtml doesn't do it either.
Nothing I've tried, and I've been trying for several months, opens a new browser window. I highly desire this, and suspect others do too.
Visitors Are Escaping!
Posted on: 08/02/06 10:04pm
By: Anonymous (pwr)
well, my post above didn't come out quite as I'd intended. Where it shows "link name", I'd intended it to be the HTML for a link, followed by target="_blank"
And my interest is in having this ability in a blog post, not in a sidebar item, which is slightly different from what some others are trying to accomplish. It's very surprising that even after manually typing in the html, the target= part is being dropped upon publication. Doesn't show up in source, and if I go into edit mode to see the original entry, it's missing there too.
Visitors Are Escaping!
Posted on: 08/02/06 10:22pm
By: Anonymous (pwr)
Of course, as soon as I posted I figured out how to do it.
In /geeklog/config.php, about 80% of the way down, in the $_CONF['admin_html']: section, I added 'target' => 1 to the 'a' line. Works like a charm.
Visitors Are Escaping!
Posted on: 08/03/06 02:21am
By: Anonymous (Lex)
Yes, I've already done that for articles. That's not the same thing for links that show up in the "What's New" block. And it's a different hack for RSS links as well a hack for links in the "Links" section. There's obviously a need for this to be a part of the standard Geeklog system.
If I had my way, I'd like to see a setting that could be enabled in the config.php that automatically opens up URLs that are not on my domain in new windows.
I'm still having no luck with getting my "What's New" links to open in new windows. (although I do have it working everywhere else)
Visitors Are Escaping!
Posted on: 08/03/06 10:06am
By: markf
An important thing to remember about HTML coding in stories is that HTML is restricted to what is allowed in the config.php file.
If you find HTML code being stripped away by Geeklog just add the appropriate code to the config.php file and you are set.
Not only does the tag have to be specified so to do tag options.
For example the below will cause Geeklog to strip font tags and "target" options from links.:
$_CONF['admin_html'] = array (
'img' => array('width' => 1, 'height' => 1, 'alt' => 1, 'src' => 1),
'p' => array('class' => 1, 'id' => 1, 'align' => 1),
'a' => array('href' => 1, 'title' => 1, 'rel' => 1),
'div' => array('class' => 1, 'id' => 1),
'span' => array('class' => 1, 'id' => 1),
'table' => array('class' => 1, 'id' => 1, 'width' => 1, 'border' => 1,
'cellspacing' => 1, 'cellpadding' => 1),
'tr' => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1),
'th' => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1,
'colspan' => 1, 'rowspan' => 1),
'td' => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1,
'colspan' => 1, 'rowspan' => 1)
The below will cause font tags and target to be accepted:
$_CONF['admin_html'] = array (
'font' => array('size' =>1, 'color' => 1),
'img' => array('width' => 1, 'height' => 1, 'alt' => 1, 'src' => 1),
'p' => array('class' => 1, 'id' => 1, 'align' => 1),
'a' => array('href' => 1, 'title' => 1, 'rel' => 1, 'target' => 1),
'div' => array('class' => 1, 'id' => 1),
'span' => array('class' => 1, 'id' => 1),
'table' => array('class' => 1, 'id' => 1, 'width' => 1, 'border' => 1,
'cellspacing' => 1, 'cellpadding' => 1),
'tr' => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1),
'th' => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1,
'colspan' => 1, 'rowspan' => 1),
'td' => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1,
'colspan' => 1, 'rowspan' => 1)