Posted on: 12/10/04 01:02am
By: ola_one
Really sorry to bother you all againl, but I went through the thread of a previous post, and I found that I needed to insert target=_blank in lib-common.php to enable new windows to open when one clicks on a link within Geeklog. Right now, when I click on a link, the new link takes over the browser, and I am out of Geeklog.
However, I am lost as to where exactly to insert the information.
I know that it is supposed to be within the following, but where exactly is the problem for me:
{
$newlinks [] = '<a href="' . $lcount . '" title="'
. $A['title'] . '">' . substr( $A['title'], 0, 16 )
. '...</a>' . LB;
}
else
{
$newlinks[] = '<a href="' . $lcount . '">'
. substr( $A['title'], 0, $itemlen ) . '</a>' . LB;
Should it be within the brackets after $newlinks, or should it be after a href or $lcount?
I am tempted to put it within the brackets but thought to ask first before messing up.
Thanks again
Ola
Clarification on New Window on a link
Posted on: 12/10/04 10:42am
By: Turias
stick it between the 'a' and the 'href' giving you
'<a target="_blank" href="'
Clarification on New Window on a link
Posted on: 12/10/04 11:36am
By: ola_one
Thanks Turias,
I have done as you said, but the window did not open in a separate page.
{
$newlinks [] = '<a target="_blank" href="' . $lcount . '" title="'
. $A['title'] . '">' . substr( $A['title'], 0, 16 )
. '...</a>' . LB;
}
else
{
$newlinks[] = '<a target="_blank" href="' . $lcount . '">'
. substr( $A['title'], 0, $itemlen ) . '</a>' . LB;
}
My linkdetails.thtml looks like the follwoing:
<li>
<strong><a href="{link_url}" target="_blank">{link_name}</a></strong> ({link_hits}) {link_edit}<br>
{link_description}
</li>
Is there something that I am missing?
Thansk
Clarification on New Window on a link
Posted on: 12/10/04 01:58pm
By: Turias
I don't even know what link you are clicking.
Clarification on New Window on a link
Posted on: 12/10/04 03:43pm
By: ola_one
Sorry about that, I am trying to click the following:
http://www.adeseyeogunlewe.com
You will see a drop down box at the right in a weather block. The weather is coming directly from Yahoo Weather. If you pick any of the towns, it takes you to yahoo weather forecast for that town, but the page overwrites the above homw page.
Thanks
Clarification on New Window on a link
Posted on: 12/10/04 03:48pm
By: Turias
You're going to have to edit the code for that dropdown. It has nothing to do with lib-common.php or any of the files involved in the hack I previously posted.
Clarification on New Window on a link
Posted on: 12/10/04 04:43pm
By: ola_one
Thanks again, but can you guide me as to what I need to include in the code for the dropdown.
Regards
Clarification on New Window on a link
Posted on: 12/10/04 04:59pm
By: Turias
function goToURL(form) {
var myindex=form.select1.selectedIndex
if(!myindex=="")
{
window.location.href=form.select1.options[myindex].value;
}
}
function goToURL2(form) {
var myindex=form.select2.selectedIndex
if(!myindex=="")
{
window.open(form.select2.options[myindex].value);
}
}
becomes
function goToURL(form) {
var myindex=form.select1.selectedIndex
if(!myindex=="")
{
window.open(form.select1.options[myindex].value);
}
}
function goToURL2(form) {
var myindex=form.select2.selectedIndex
if(!myindex=="")
{
window.open(form.select2.options[myindex].value);
}
}
Clarification on New Window on a link
Posted on: 12/10/04 06:45pm
By: ola_one
Thanks a BILLION Turias. You are the MAN!!!