Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

Hyperlinks in News

Aloittaja gaz12321, toukokuu 27, 2011, 01:30:17 AP

« edellinen - seuraava »

gaz12321

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

breitlingwatch


Illori


kat

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.


Illori

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.

kat

Works at my place, so... ;)

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

See the news ("Admin wittering")?

Click "Click Me".

gaz12321

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

Illori

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?

kat

Is html checked in Admin> Posts and Topics>Bulletin Board Code?

gaz12321

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


smartblogz

I checked the button under "Enable basic HTML in posts" and the html code tag worked magic!

Thanks guys.  :D


Aleksi "Lex" Kilpinen

Also, you might want to know this - using  [url] opens a new window, but [iurl] uses the current window  :)
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: