Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: BigAlGeorge on June 06, 2021, 05:38:01 AM

Title: URL to new tab
Post by: BigAlGeorge on June 06, 2021, 05:38:01 AM
I have a board which goes to url.
Is there any construct to get the url to a new window?
Thanks,
Al.
Title: Re: URL to new tab
Post by: Shambles on June 06, 2021, 05:53:44 AM
Do you mean you have a "redirect board" and you want it to open in a new window?

If so, you can make the board redirect in a new tab by checking the "If you enable this option, redirected boards would be opened in a new tab" option when adding/modifying the board.
Title: Re: URL to new tab
Post by: Aleksi "Lex" Kilpinen on June 06, 2021, 06:10:35 AM
It's not a built in option, but there's a mod for it
Redirected Boards in a new Tab (http://custom.simplemachines.org/mods/index.php?mod=1565)
Title: Re: URL to new tab
Post by: Shambles on June 06, 2021, 06:26:26 AM
Quite right Lex - I forgot that I'd added that mod to give the option.
Title: Re: Board URL to new tab, Permissions based Board access (logged in users only)
Post by: BigAlGeorge on June 06, 2021, 05:01:11 PM
Quote from: Shambles on June 06, 2021, 05:53:44 AM
Do you mean you have a "redirect board" and you want it to open in a new window?

If so, you can make the board redirect in a new tab by checking the "If you enable this option, redirected boards would be opened in a new tab" option when adding/modifying the board.

The mod came up with a bunch of install error warnings so I didnt go further with that.
The function is under admin settings modify board this board has a url when clicked which needs to open a new window first.
If I had a debugger working I would have been able to follow the logic.

Note your reply 'redirect to a new tab' I cant find any such settings but this is not whats wanted its the url function within Boards.

Lastly, Ive changed the topic name as I would appreciate tip on how to set permissions so that this Board is not visible till the user is logged in.

Thank you gentlemen for your assistance.
Al.
Title: Re: URL to new tab
Post by: BigAlGeorge on June 06, 2021, 06:09:03 PM
regret the other remove board visibility should be another thread I cant modify now its too late but will start a new thread with that topic thanks.
Title: Re: URL to new tab
Post by: Aleksi "Lex" Kilpinen on June 06, 2021, 11:12:08 PM
When you modify the board, there's checkboxes in there to select who see the board. SMF does not show boards to users who can't access them.
Title: Re: URL to new tab
Post by: BigAlGeorge on June 06, 2021, 11:52:33 PM
Quote from: Aleksi "Lex" Kilpinen on June 06, 2021, 11:12:08 PM
When you modify the board, there's checkboxes in there to select who see the board. SMF does not show boards to users who can't access them.

Thanks found and done and works of course. Appreciate.

Now for the URL question?
Title: Re: URL to new tab
Post by: Aleksi "Lex" Kilpinen on June 07, 2021, 12:08:06 AM
In a post, you can try to force an url to open in the same window with [iurl][/iurl] or in a new tab/window with [url][/url].

Title: Re: URL to new tab
Post by: BigAlGeorge on June 07, 2021, 12:21:17 AM
Hi Aleksi. Thanks but the url comes from click on Board, there are no posts in the board its just a link to a videoconference which should be in a new tab.

Simple Machines is amazing; Im finding as learning curve improves, so much work has gone into it.

Regards, Al from New Zealand.
Title: Re: URL to new tab
Post by: Aleksi "Lex" Kilpinen on June 07, 2021, 12:40:35 AM
For a redirect board, this is still the answer.
Quote from: Aleksi "Lex" Kilpinen on June 06, 2021, 06:10:35 AM
It's not a built in option, but there's a mod for it
Redirected Boards in a new Tab (http://custom.simplemachines.org/mods/index.php?mod=1565)
Title: Re: URL to new tab
Post by: BigAlGeorge on June 07, 2021, 12:43:40 AM
Quote from: Aleksi "Lex" Kilpinen on June 07, 2021, 12:40:35 AM
For a redirect board, this is still the answer.
Quote from: Aleksi "Lex" Kilpinen on June 06, 2021, 06:10:35 AM
It's not a built in option, but there's a mod for it
Redirected Boards in a new Tab (http://custom.simplemachines.org/mods/index.php?mod=1565)
Yep, see my previous reply about errors on this mod.
Title: Re: URL to new tab
Post by: Aleksi "Lex" Kilpinen on June 07, 2021, 01:40:55 AM
Without knowing what errors you are getting, it's a bit difficult to offer suggestions.
Most likely it is a conflict with another mod, or something that has been slightly changed in an update after the mod was originally released.
https://wiki.simplemachines.org/smf/Error_in_mod_installation
Title: Re: URL to new tab
Post by: BigAlGeorge on June 07, 2021, 05:55:17 PM
Instead Ill make a sticky, with information about video link (the goto url) protocol.
Users wanting to use, will want to know when someone is available anyway; no point in sitting around waiting so they should post when they can be available, and others can respond then a conference will be pre-booked.

Problem solved as [url] goes to a new tab/window

Thanks gentlemen for your help.
Al.