User setting for open links (General)

by Holger @, Germany, Tuesday, August 02, 2022, 11:05 (118 days ago)

Where can I find this new setting?

- provide a user setting to make it possible for users to open links in a forum entry in a new browser window or tab

Holger

Avatar

User setting for open links

by Auge ⌂, Tuesday, August 02, 2022, 12:04 (118 days ago) @ Holger

Hello

Where can I find this new setting?

- provide a user setting to make it possible for users to open links in a forum entry in a new browser window or tab

The new setting is accessible within the users own settings. Open the settings page with a click onto your own username and scroll down to "Auto login"/"Automatisches einloggen". Below you should see a new settings block named "Should links in entries open in same or different browser windows or tabs?"/"Sollen Links in Forumseinträgen im selben oder in einem neuen Browserfenster oder -tab geöffnet werden?".

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

User setting for open links

by Holger @, Germany, Tuesday, August 02, 2022, 12:13 (118 days ago) @ Auge
edited by Holger, Tuesday, August 02, 2022, 12:24

Hi Auge,

ok, I think the problem is our modified theme. This setting is missing there.

But also in the default theme, there are only four new options without names.

Do you know, which file is used in the theme for this user settings?

Regards
Holger

Avatar

User setting for open links

by Auge ⌂, Tuesday, August 02, 2022, 12:37 (118 days ago) @ Holger

Hello

ok, I think the problem is our modified theme. This setting is missing there.

But also in the default theme, there are only four new options without names.

That's because you forgot to upload the new language files (as stated next door). 😀

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

User setting for open links

by holger, Tuesday, August 02, 2022, 12:39 (118 days ago) @ Auge

OK, because all of this I will start with a new setup ;-)

Avatar

User setting for open links

by Auge ⌂, Tuesday, August 02, 2022, 12:45 (118 days ago) @ holger

Hello

OK, because all of this I will start with a new setup ;-)

Do you really think, you are actually lost? You may have forgotten to upload all necessary script files. But the upgrade for the database structure run successfully (with the exception of the doubled e-mail-address). So you only have to upload all script files again.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Avatar

User setting for open links

by Auge ⌂, Tuesday, August 02, 2022, 13:01 (118 days ago) @ holger

Hello Holger,

I see, that you successfully reinstalled the forum, congratulations. Do you see the eye-icon in the function-icons on position two behind the speech bubble?

[image]

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

User setting for open links

by holger, Tuesday, August 02, 2022, 13:23 (118 days ago) @ Auge

Yes, everythings (up to now) is fine now.
We will test the new installation before updating the live one.

What is this new classification function?

Avatar

User setting for open links

by Auge ⌂, Tuesday, August 02, 2022, 16:38 (118 days ago) @ holger

Hello

What is this new classification function?

If you have enabled the Bayes-based spam classifier you will enlarge a data collection about the amount of occurences of words as ham (a wanted entry) or spam (an unwanted entry). With this collection the Bayes-based-service B8 tries to classify a new forum entry as ham or spam by itself. B8 will check any input against its existing list of words. If a word was classfied 30 times as ham and only 7 times as spam, the classifier will assume, that this word is harmless. It does the same weighting for all words, that are known in the list and computes a balance for the whole input.

The purpose is to make it unnecessary to use external spam protection services as i.e. Akismet. It will furthermore be possible to use those services but in terms of the visitors privacy it is IMHO desirable to prevent it where possible. And here it is possible.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

User setting for open links

by holger, Wednesday, August 10, 2022, 07:48 (110 days ago) @ Holger

Hi,

I just tested this new feature but I can't manage to get it work.

I setup my user settings to "Öffne alle Links zu anderen Websites in einem neuen Browserfenster oder -tab (abhängig von den Browsereinstellungen)"
I post a new entry:
https://mylittleforum.net/forum/index.php?id=14202

But still a klick on this link open not a new tab or browser window. I am using Firefox and other links opened in a new tab.

Avatar

User setting for open links

by Auge ⌂, Wednesday, August 10, 2022, 12:57 (110 days ago) @ holger

Hello

I just tested this new feature but I can't manage to get it work.

When (how long ago) did you tested it for the first time?

I setup my user settings to "Öffne alle Links zu anderen Websites in einem neuen Browserfenster oder -tab (abhängig von den Browsereinstellungen)"

That's also my setting in this forum.

I post a new entry:
https://mylittleforum.net/forum/index.php?id=14202

But still a klick on this link open not a new tab or browser window. I am using Firefox and other links opened in a new tab.

For me the link opens in a new tab and when I inspect the link with the developer tools, I see the target-attribute with the value `_blank`. I'm also working with the Firefox as the browser for my personal use.

What I can imagine is a caching issue because we implemented the feature in JavaScript. The setting resides in index.php?mode=js_defaults which will be generated on the fly when requesting a page but may be taken from the cache in an outdated state. If you are able to search for the link in the developer tools of Firefox, you should see the link as follows:

<a href="https://www.heise.de/" target="_blank">https://www.heise.de/</a>

The element chain, to be opened in the developer tools, is as follows.

html>body>main>article>div.wrapper>div.body>p>a

If you don't see the target-attribute, you can check the index.php?mode=js_defaults. To open it, you have to open the source view of the page with the context menu (right click on the page (not the developer tools!) => "Seitenquelltext anzeigen"). When you click the link to index.php?mode=js_defaults in the source view (one of the last script elements in the <head>-section) you should find the following code at the bottom of the source code.

 
var user_settings = new Array();
 user_settings["open_links_in_new_window"] = "EXTERNAL";
 

If you don't see it, reload the whole page of the entry from the server with the key combination [CTRL]+[F5] respective [STRG]+[F5] on a german keyboard.

Hint: you can reload the source view of index.php?mode=js_defaults in the same manner as the first step. After reloading the JS-source you should certainly see the code line user_settings["open_links_in_new_window"] = "EXTERNAL";. If the code line is present, you are able to open external links in a new window/tab, if JS is enabled in your browser.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

User setting for open links

by holger, Wednesday, August 10, 2022, 13:46 (110 days ago) @ Auge

There is a difference between the MLF-Forum and my test site.

The var user_settings is missing in my test site. Also after reloading the code.
Also the user_type is different:
On your site the user_type is = 0
On my site the user_type = 2

Perhaps because I am the admin of this site?

Avatar

User setting for open links

by Auge ⌂, Wednesday, August 10, 2022, 14:07 (110 days ago) @ holger

Hello

The var user_settings is missing in my test site. Also after reloading the code.

Hmmm. 🤔

Is tehre anything missing? Are any of the JS-files (main.js, main.min.js, posting.js, posting.min.js) not actualised during the upgrade?

Also the user_type is different:
On your site the user_type is = 0
On my site the user_type = 2

Perhaps because I am the admin of this site?

That's correct.

- user_type = NULL: unregistered visitor/not logged in user
- user_type = 0: registered user
- user_type = 1: moderator
- user_type = 2: administrator

--
Trenne niemals Müll, denn er hat nur eine Silbe!

User setting for open links

by holger, Wednesday, August 10, 2022, 14:19 (110 days ago) @ Auge

I setup a standard registered user to my site.

var user_settings is still missing. So not a question of user type.

Avatar

User setting for open links

by Auge ⌂, Wednesday, August 10, 2022, 14:54 (110 days ago) @ holger

Hello

I setup a standard registered user to my site.

var user_settings is still missing.

So not a question of user type.

No, it isn't. As far as the user type is set (not NULL/inexistent), the setting is read from the userdata. When you say, you changed the setting, we can assume, that the userdata table contains the column to store the information. If and when the scripts includes/entry.inc.php, includes/thread.inc.php and includes/thread_linear.inc.php as well as js/main.js and js/main.min.js are from the correct MLF-version, the setting will be read and will be injected into index.php?mode=js_defaults. If and when JS is enabled in your browser, the attribute should be generated.

I tried to create a user account in your testing forum (at kigges.hwolf.de). I was able to activate the account with the link from the e-mail (after correcting the URL). But it is necessary to get the account unlocked by an admin or mod. The username is FCU-Symphatisant.

I don't know, if I will be able to see, what happens but it is an attempt to have a look into the functions, that are accessible only for registered user.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

User setting for open links

by holger, Wednesday, August 10, 2022, 14:57 (110 days ago) @ Auge

Stop, because of your registration I noticed that the url for the test site ist linked to the production site. So thats causes this (and other) issues.

User setting for open links

by holger, Thursday, August 11, 2022, 08:59 (109 days ago) @ Auge

Hi Auge,

I did the upgrade this morning at the production site. It looks fine :-)

Thanks for your help.

PS: Du bist nicht am Sonntag hier?

Avatar

User setting for open links

by Auge ⌂, Thursday, August 11, 2022, 09:52 (109 days ago) @ holger

Hello

I did the upgrade this morning at the production site. It looks fine :-)

Thanks for your help.

Bitteschön.

PS: Du bist nicht am Sonntag hier?

Nein, das bin ich nicht. 😁

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

RSS Feed of thread