SimplePortal

Support => English Support => Topic started by: enmom on September 01, 2015, 05:10:53 PM

Title: Make link open in new window
Post by: enmom on September 01, 2015, 05:10:53 PM
If this is already on here somewhere then just point me in the right direction! I've looked for a while and couldn't find anything.

I've added 'links' page and would like for each of them to open in a new window when clicked but unsure of how to do this....can it be done and if so can someone help me figure it out?

Thanks for any help I can get.
Title: Re: Make link open in new window
Post by: ccbtimewiz on September 01, 2015, 07:00:54 PM
This can be done by adding the target="_blank" to attribute tags.

Example;

Code: [Select]
<a href="http://simpleportal.net/">Simple Portal</a<
Code: [Select]
<a href="http://simpleportal.net/" target="_blank">Simple Portal</a>
Title: Re: Make link open in new window
Post by: enmom on September 03, 2015, 04:52:09 PM
Sorry, just seeing this (my email notification must not be working?) and thanks for your help! I'll give it a try.
Title: Re: Make link open in new window
Post by: ♦ Ninja ZX-10RR ♦ on September 04, 2015, 01:09:32 AM
Since I am 100% sure of the solution provided, I am marking this as solved. Feel free to reply and report any issues you may find :)
On another note... You may have forgot to update your profile, because it says you are still running SMF 2.0.6, which is old, buggy, and with some security issues. Also shows that you are not running SimplePortal, but I don't think you'd be here if that was true :P

Regards
Title: Re: Make link open in new window
Post by: adiboy on September 23, 2015, 07:52:12 PM
This can be done by adding the target="_blank" to attribute tags.

Example;

Code: [Select]
<a href="http://simpleportal.net/">Simple Portal</a<
Code: [Select]
<a href="http://simpleportal.net/" target="_blank">Simple Portal</a>

I got the above... What if i am to write it in BB Code? how do i even add alt="" attribute in BB code?
Title: Re: Make link open in new window
Post by: ♦ Ninja ZX-10RR ♦ on September 23, 2015, 08:08:40 PM
adiboy,

This should answer your question: http://wiki.simplemachines.org/smf/Url :)

Regards
Title: Re: Make link open in new window
Post by: Chen Zhen on September 23, 2015, 10:55:09 PM
I got the above... What if i am to write it in BB Code? how do i even add alt="" attribute in BB code?

alt is only used for 3 HTML tags, none of which are the hyperlink tag.
the bbcode's of url (new page) and iurl (same page) are for hyperlinks as Ninja had referenced.
Title: Re: Make link open in new window
Post by: adiboy on September 24, 2015, 04:55:17 AM
Yes Ninja ZX-10RR and Chen Zhen... I appreciate your reply. What i mean was how do i add target="_blank" to BBcode url and how do i add alt attribute to BBcode img tag? I think i question is clear now.
Title: Re: Make link open in new window
Post by: ♦ Ninja ZX-10RR ♦ on September 24, 2015, 05:46:37 AM
You don't add that to BBCode as it's HTML, please read the page I linked.
SimplePortal 2.3.8 © 2008-2024, SimplePortal