Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: gaz12321 - toukokuu 27, 2011, 01:30:17 AP

Otsikko: Hyperlinks in News
Kirjoitti: gaz12321 - toukokuu 27, 2011, 01:30:17 AP
Hi,

I am using BB Code to make some of my news items hyperlinks to the topic where users can discuss the news, the trouble is they are opening a new window when clicked and I would like them to just go to a new page in the same window.

Any ideas where I can find the code that needs to be changed to make this happen??

If you need to see what I mean my forum is www.grassrootsforum.co.uk
Otsikko: Re: Hyperlinks in News
Kirjoitti: breitlingwatch - toukokuu 27, 2011, 02:39:33 AP
 :(why i can not
Otsikko: Re: Hyperlinks in News
Kirjoitti: Illori - toukokuu 27, 2011, 05:54:18 AP
using version emulation you might want to look into http://custom.simplemachines.org/mods/index.php?mod=980
Otsikko: Re: Hyperlinks in News
Kirjoitti: kat - toukokuu 27, 2011, 06:06:51 AP
If I've understood this, correctly, you need something like this:

[html]<a href="LINK" target="_top">LINK TEXT</a>[/html]

Obviously, you need to change "LINK" to the URL you want and "LINK TEXT" to whatever you want.

Otsikko: Re: Hyperlinks in News
Kirjoitti: Illori - toukokuu 27, 2011, 06:09:04 AP
they want a url/link that does not open in a new page.... how does your code there do that? the link i posted should work or for that matter an iurl tag should work as well.
Otsikko: Re: Hyperlinks in News
Kirjoitti: kat - toukokuu 27, 2011, 06:13:55 AP
Works at my place, so... ;)

http://www.tlakoc.org.uk/index.php

See the news ("Admin wittering")?

Click "Click Me".
Otsikko: Re: Hyperlinks in News
Kirjoitti: gaz12321 - toukokuu 27, 2011, 08:50:52 AP
Lainaus käyttäjältä: K@ - toukokuu 27, 2011, 06:06:51 AP
If I've understood this, correctly, you need something like this:

[html]<a href="LINK" target="_top">LINK TEXT</a>[/html]

Obviously, you need to change "LINK" to the URL you want and "LINK TEXT" to whatever you want.



I can't use HTML in news items though, it doesn't work.

Lainaus käyttäjältä: Illori - toukokuu 27, 2011, 05:54:18 AP
using version emulation you might want to look into http://custom.simplemachines.org/mods/index.php?mod=980

Tried this one but came up with an error
Otsikko: Re: Hyperlinks in News
Kirjoitti: Illori - toukokuu 27, 2011, 08:53:03 AP
if you use the html bbc code tag you can add html to the news, also that mod needs version emulation to use. did you try the iurl bbc code tag?
Otsikko: Re: Hyperlinks in News
Kirjoitti: kat - toukokuu 27, 2011, 08:55:15 AP
Is html checked in Admin> Posts and Topics>Bulletin Board Code?
Otsikko: Re: Hyperlinks in News
Kirjoitti: gaz12321 - toukokuu 27, 2011, 09:02:32 AP
Lainaus käyttäjältä: Illori - toukokuu 27, 2011, 08:53:03 AP
if you use the html bbc code tag you can add html to the news, also that mod needs version emulation to use. did you try the iurl bbc code tag?

The html bbc code and target="_top" works a treat.

Thanks for the help everyone.  :D
Otsikko: Re: Hyperlinks in News
Kirjoitti: kat - toukokuu 27, 2011, 09:48:28 AP
Otsikko: Re: Hyperlinks in News
Kirjoitti: smartblogz - heinäkuu 02, 2011, 05:38:49 AP
I checked the button under "Enable basic HTML in posts" and the html code tag worked magic!

Thanks guys.  :D

Otsikko: Re: Hyperlinks in News
Kirjoitti: Aleksi "Lex" Kilpinen - heinäkuu 02, 2011, 05:43:02 AP
Also, you might want to know this - using  [url] opens a new window, but [iurl] uses the current window  :)