Welcome to Geeklog, Anonymous Saturday, November 30 2024 @ 02:32 am EST

Geeklog Forums

Visitors Are Escaping!


Status: offline

Super_Collector

Forum User
Newbie
Registered: 12/26/02
Posts: 12
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?
Star Wars... Is there anything else?
Read my book... I'm telling you, I'm FAMOUS!
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
 Quote

Status: offline

Senja

Forum User
Junior
Registered: 01/23/05
Posts: 22
Hallo , I tried this but is not working:
strong>{link_name} ({link_hits}) {link_edit}

{link_descriptio

Why not ??
 Quote

Status: offline

lokki

Forum User
Chatty
Registered: 03/19/05
Posts: 59
In linkdetails.thtml you have a line that says:
Text Formatted Code
<a href="{link_url}" title="{link_actual_url}">{link_name}</a>
 

change it to say:
Text Formatted Code
<a href="{link_url}" title="{link_actual_url}" target="_blank">{link_name}</a>
 
 Quote

Status: offline

beewee

Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
For a better SERP you should perhaps change it to:
Text Formatted Code
<a href="{link_url}" title="{link_name}" target="_blank">{link_name}</a>
 

Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
 Quote

Status: offline

James Fryer

Forum User
Junior
Registered: 08/06/02
Posts: 17
I did some work on this, 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.
 Quote

Lex

Anonymous
Quote by lokki: In linkdetails.thtml you have a line that says:
Text Formatted Code
<a href="{link_url}" title="{link_actual_url}">{link_name}</a>

 

change it to say:
Text Formatted Code
<a href="{link_url}" title="{link_actual_url}" target="_blank">{link_name}</a>

 



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

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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.

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
 Quote

Lex

Anonymous
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.
 Quote

pwr

Anonymous
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.

 Quote

pwr

Anonymous
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.


 Quote

pwr

Anonymous
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.
 Quote

Lex

Anonymous
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)
 Quote

Status: offline

markf

Forum User
Newbie
Registered: 07/25/05
Posts: 13
Location:Appleton
caffeinated
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)

http://www.wi-ski.com/
http://www.ustomas.com/
http://www.newbayanihan.org/
BTW the shortness & pudginess in my pic is exagerated by scaling!
 Quote

All times are EST. The time is now 02:32 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content