About opening of links in new tabs or browser windows (Features)
Hello,
Currently, one has the choice to open a link in a new tab or to leave the side by clicking the link. So, the different is, that I make the decision and not the software.
I thought about your argument and think, it's valid. On the other side there is obvoiusly a demand for several people to be able to open links in other windows, tabs or – to mention the case of ChristianForum – by breaking out of a frame/iframe.
Because of that I changed my intention to a two step solution.
1. Make the forum wide setting a named setting (as you proposed in the PR-discussion) _parent
or _top
. This would make it possible to provide a dedicated name of a frame/window or the keywords that are relevant for frame handling. Default value would be NULL
, keywords (_blank
and _self
) would get ignored.
2. Add a user setting that activates the value _blank
(the other possible keywords makes IMHO no sense in this context).
This would make it possible to handle the forum in a frameset (case 1) and to offer the opening of links in other tabs or windows only for the interested audience (case 2). But – and that's a big but – I have no clue how to inject the user setting into the relevant functions. Injecting the forum settings is easy, add global $settings;
and you are done. But user settings are optional because not every visitor is a logged in user and therefore I can't use global
for it. On the other hand I don't know how to add the user setting to the parameter list of the relevant functions. These functions get called only in the functions html_format
and signature_format
where the bbcode class gets configured for these special cases.
It would be possible to make the setting an optional paremeter for html_format
and signature_format
and provide it inside these functions for the calls of do_bbcode_url
(Next question is how to commit it to these functions?). But this solution looks not really nearly elegant.
Does my thoughts lead to anywhere?
Tschö, Auge
--
Trenne niemals Müll, denn er hat nur eine Silbe!