About opening of links in new tabs or browser windows (Features)

by Auge ⌂, Monday, October 19, 2020, 11:05 (1339 days ago)


After the question of ChristianForum about opening links from the entries in new tabs or windows I played around with the code. IMHO it would be absolutely no problem to change from XHTML strict to XHTML transitional (because of using (X)HTML transitional noone is enforced to write bad code). Beside from a more leger interpretation of changes in theme reworks this change would make it possible to provide the (over the years) several times requested opening of links in other tabs or windows that depends on the target attribute (which is forbidden in (X)HTML strict).

I built a similar function like described in my reply to ChristianForum with the enhancement of a setting to enable and disable the function. So far so good.

A problem that I spotted instaneously (but needed 20 minutes to find the cause) is the entries cache in the database. The cache entry gets (re)written when creating or editing an entry but not in every case when changing a setting (or introducing and testing a setting [1]). There is a checkbox for reinitialising the cache at the end of the (basic) settings form but it's not available in the enhanced settings form.

There are different solutions for this problem, I can think of.

1. Enforce the reinitialisation of the cache after every change on the settings page(s).

This would be not so nice in a forum with many entries. The cache would have to be rebuilt even the changed setting(s) do not need that. Many users would see a unnecessary low performance in the first hours or days (depending on the traffic in the forum) after every settings change.

2. Put the checkbox for reinitialisation of the entries cache also on the page of the enhanced settings.


- Putting the settings that needs a entry cache reinitialisation into the (basic) settings form.

(no numerisation to prevent the need of renumeration of the list)

Putting the relevant settings to the basic (main) settings would IMHO be questionable. Putting one setting there would be reasonable, puttin another setting to this form, would be dubious.


That would give the control over this function to the forum operators and administrators. If they know, when to use the function, the impact on the forum performance would be low as possible. On the other hand, if they don't know when to use, we would possibly see unnecessary bug reports [2].

3. Introduce an extension for handling caching issues.

That would need a fine granulated management of settings that requires a cache reinitialisation. Not only that, we would need to touch it every time we want to introduce a new setting with that dependency. An exception would be an automatism, a switch we have to set once per setting. The switch would have to be part of the settings table in the database.

4. Request the forum operator to reinitialise the entries cache.

Also here we would need a management, when to request the initialisation. But why should we annoy the forum operator/administrator when we would have a management solution and would be able to implement the automatism? But: In the case of introducing my implementation (as a single case) and possibly backporting it to the 2.4.x branch the request would be not a problem.

Solutions 1 and 2 are easy to implement but have disadvantages in their reliability. I (for myself) would prefer the third solution but as everyone knows the development of the forum has more or less stopped or at least is very slow. Number 4 would be a quick fix for a single case but no general solution.

Does anyone has additional ideas, thought, (counter)-arguments or solution approaches? Micha, Alex, Alfie, anyone else?

Tschö, Auge

[1]: During the tests of my changes I have to edit my testing entry to see the outcome of my changes. That's no problem, since I meanwhile know the reason for the not instantaneously applied changes.
[2]: To be fair, that's already possible now.

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

Complete thread:

 RSS Feed of thread