Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.9
Author Message
candy
Worker
Worker



Joined: Dec 21, 2004
Posts: 225
Location: Kansas City metro

PostPosted: Fri May 18, 2007 11:56 am Reply with quote

I have a block that contains html code and external links in it and am trying to get these external links to open in a new browser window. I have tried to use the WYSIWYG editor to select "open in a new window" and even tried the "_blank" but when i save the block, it always reverts back to opening in the same window.

I haven't experienced this before with other versions of nuke so what gives? Any help is appreciated. Thanks.
 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Fri May 18, 2007 5:59 pm Reply with quote

Try it like this using this topic url as an example..


<a href="http://www.ravenphpscripts.com/postt13459.html" target="_blank">bla bla </a>
 
View user's profile Send private message
candy







PostPosted: Fri May 18, 2007 6:53 pm Reply with quote

tried it...still opens in the same window....any other ideas?
 
hitwalker







PostPosted: Fri May 18, 2007 10:55 pm Reply with quote

do refrsh your browser...
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sat May 19, 2007 6:48 am Reply with quote

Have you (perhaps) overwritten the open new window property in your browser options?
 
View user's profile Send private message
candy







PostPosted: Sat May 19, 2007 9:32 am Reply with quote

for some reason the code always reverts back to opening in the same window. i've tried refresh and my browser options haven't been changed.
 
Raven







PostPosted: Sat May 19, 2007 12:43 pm Reply with quote

Does the code actually change? Do a View Source in the browser and see if target="_blank" is actually in the generated code.
 
candy







PostPosted: Sat May 19, 2007 3:23 pm Reply with quote

yes the code actually changes after I save the block with the "_blank" tag while in the admin cp.
 
Raven







PostPosted: Sat May 19, 2007 8:01 pm Reply with quote

Is target="_blank" the only attribute of the <a> tag you are using (other than the href attribute)? If not, then in config.php, towards the bottom of the script, you should have a line that begins similar to this:

$AllowableHTML = array("b"=>1,"i"=>1,"strike"=>1,"div"=>2,"u"=>1,"a"=>2

Note in particular the "a"=>2 setting. Try changing that to "a"=>3 or whtever number of attributes/properties you have in your <a> tag.
 
candy







PostPosted: Sun May 20, 2007 8:18 am Reply with quote

yes, it's the only attribute i am using.
 
candy







PostPosted: Mon May 21, 2007 9:47 pm Reply with quote

i still haven't figured this out. question though....how can i get my external links to open up in a new window site-wide. For example, in my Forums if i have a link to another page in one of the posts, i'd like it to open up in a new window on top.

i am using phpbb forum and can't figure out how to get it to open up in a new window. thanks.
 
CodyG
Life Cycles Becoming CPU Cycles



Joined: Jan 02, 2003
Posts: 714
Location: Vancouver Island

PostPosted: Tue May 22, 2007 8:20 pm Reply with quote

The following is from my config.php file ... and i'm having the same issue, but with TotalCalendar. The links in the event window are not opening in a new window despite my writing target="_blank" in the code. TC also uses fckeditor.

as 'a' => is an array of things, what could I try changing? the href or the target?


$AllowableHTML = array(
'a' => array('href' => 1, 'target' => 1, 'title' => array('minlen' => 4, 'maxlen' => 120)),

_________________
"We want to see if life is ubiquitous." D.Goldin 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Tue May 22, 2007 9:27 pm Reply with quote

target isn't an HTML tag, so it doesn't belong in $AllowableHTML.

Try increasing the number of modifiers for href in $AllowableHTML like:
Code:
..'href' => 2,

_________________
I search, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
kguske







PostPosted: Tue May 22, 2007 9:35 pm Reply with quote

Man, don't know WHAT I was thinking. Cody is correct. And I just tested it on nukeSEO, where I already had target attributes on the links in the recommended sites blocks, which I maintain with the WYSIWYG editor. I'll compare my $allowableHTML with the standard RN version to see if there are differences.
 
kguske







PostPosted: Tue May 22, 2007 9:41 pm Reply with quote

What's in the default config.php is virtually identical to what I have:
Code:
$AllowableHTML = array(

    'a' => array('href' => 1, 'target' => 1, 'title' => array('minlen' => 4, 'maxlen' => 120)),
    'b' => array(),
    'blockquote' => array(),
    'br' => array(),
    'center' => array(),
    'div' => array('align' => 1),
    'em' => array(),
    'font' => array('face' => 1, 'style' => 1, 'color' => 1, 'size' => array('minval' => 1, 'maxval' => 7)),
    'h1'=>array(),
    'h2'=>array(),
    'h3'=>array(),
    'h4'=>array(),
    'h5'=>array(),
    'h6'=>array(),
    'hr' => array(),
    'i' => array(),
    'img' => array('alt' => 1, 'src' => 1, 'hspace' => 1, 'vspace' => 1, 'width' => 1, 'height' => 1, 'border' => 1, 'align' => 1),
    'li' => array(),
    'ol' => array(),
    'p' => array('align' => 1),
    'pre' => array('align' => 1),
    'span' =>array('class' => 1, 'style' => array('font-family' => 1, 'color' => 1)),
    'strong' => array(),
    'strike'=>array(),
    'sub'=>array(),
    'sup'=>array(),
    'table' => array('align' => 1, 'border' => 1, 'cell' => 1, 'width' => 1, 'cellspacing' => 1, 'cellpadding' => 1),
    'td' => array('align' => 1, 'width' => 1, 'valign' => 1, 'height' => 1, 'rowspan' => 1, 'colspan' => 1 ),
    'tr' => array('align' => 1),
    'tt'=>array(),
    'u' => array(),
    'ul' => array(),
);

So the question is - what is different between the HTML source in preview and the HTML source that is saved?
 
CodyG







PostPosted: Wed May 23, 2007 7:00 am Reply with quote

It's only a firefox issue??
 
candy







PostPosted: Wed May 23, 2007 9:21 am Reply with quote

nope, for me it's in any browser.
 
sweetmail
Hangin' Around



Joined: Aug 23, 2007
Posts: 40

PostPosted: Tue Sep 04, 2007 2:56 pm Reply with quote

I am running 8.0 with patch 3.3. I am having exactly the same problem here. Did we ever find out how to fix it?

Many thanks in advance
 
View user's profile Send private message
sweetmail







PostPosted: Tue Sep 04, 2007 3:18 pm Reply with quote

I am running 8.0 patch 3.3

I added the "href"=>1 and "target"=>1 and change "a"=> from 2 to 3.

$AllowableHTML = array("img"=>2,"href"=>1, "target"=>1,"tr"=>1,"td"=>2,"table"=>2,"div"=>2,"p"=>2,"hr"=>1,"b"=>1,"i"=>1,"strike"=>1,"u"=>1,"font"=>2,"a"=>3,"em"=>1,
"br"=>1,"strong"=>1,"blockquote"=>1,"tt"=>1,"li"=>1,"ol"=>1,"ul"=>1,"center"=>1);

It is still NOT working. I cannot open new window!!!
 
Raven







PostPosted: Tue Sep 04, 2007 3:59 pm Reply with quote

sweetmail, Please do not double post. This is being addressed in your other thread.
 
sweetmail







PostPosted: Tue Sep 04, 2007 6:05 pm Reply with quote

Sorry Raven.

I have just came across this thread today and see that it is exactly what I am experience. I just want to see if Candy has resolved that already.

Thank you for letting me know that I have made a mistake.
 
candy







PostPosted: Sat Sep 15, 2007 6:54 pm Reply with quote

any ideas on this issue? i still cannot open links in new window even when manually typing in the "target="_blank""command.

nuke is somehow changing my code as i just made a test block to see if it worked and it doesn't. thanks.
 
Raven







PostPosted: Sat Sep 15, 2007 7:04 pm Reply with quote

Is this issue unique to your nuke installation or can you not open up new windows at all?


Last edited by Raven on Sat Sep 15, 2007 8:09 pm; edited 1 time in total 
candy







PostPosted: Sat Sep 15, 2007 7:40 pm Reply with quote

i can't open up new windows using the "_blank" code anywhere in nuke.
 
Raven







PostPosted: Sat Sep 15, 2007 8:14 pm Reply with quote

Are you using NukeSentinel(tm)? If so, what version?

Are you sure you don't have a pop-up blocker issue for your site's url?
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.9

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©