Add constants NO_USER_URL and NO_USER_COUNTRY.
If you set these to true (in project.inc)
there will be no query or display of user web site URL
and user country, respectively.
Forum messages are shown in a table: left column is sender info,
right column is the message.
The left column was fixed width (10em).
On very hi-res monitors people increase their font size.
This causes the "Send message" button to overflow the column.
Solution: don't use fixed width, and make the right column 100% width.
This makes the left column wide enough for its contents to fit, but no wider.
This solves the problem, but introduces a (minor) new one:
some users have extremely long user names,
and this makes the left column too wide,
not just for that post but for the whole thread.
Solution: in this particular place, if name is > 30 chars,
show only the first 30 chars followed by ellipsis.
(e.g. because it has too many links) show the user an explanation.
Aside: the forum code (which was written by students a long time ago)
uses a hodge-podge of return conventions.
At some point we should standardize on 0 = success, nonzero = error code
One form of spam involves putting lots of links in a post.
This lets you limit it by setting POST_MAX_LINKS in project.inc.
Limit doesn't apply to moderators.
principles:
- primary action buttons are green (btn-success)
- secondary action buttons are blue (btn-primary)
- potentially risky action buttons are yellow (btn-warning)
- if there are a lot of buttons (e.g. forum posts) use btn-xs
Principle: translatable strings should not contain HTML tags.
moderation.php was verbose, and it linked to from the wrong place:
its target audience is forum readers, not writers.
Our current translation system (Transifex) introduced a new editor feature which autodetects C-style placeholders in PO files. This wrongly detects our placeholders in the web code where a word immediately follows the digit. This leads to wrong translations if the placeholder is copied using this new transifex feature. The feature can not be globally disabled for our project. Instead every translator would need to use "raw" mode to disable it which is hard to communicate. Instead I added a space around problematic placeholders which is possing a smaller problem than wrong translations.
In messages (forum or PM) a [pre] section with a long line
would stretch the table cell,
causing that message and others to run off the edge of the window.
The solution, as Juha pointed out, is to use table-layout:fixed
for those tables, and to explicitly set the width of the other columns.
This causes the long lines to be put in boxes with a horizontal scrollbar,
and nothing overflows.
- fix display of BBcode links and menus
- change textareas to class form-control
- add color to select so they work with dark and light backgrounds
Note: I'm becoming somewhat less enamored of Bootstrap.
- fix "jump to first unread post" feature
- use <pre> for bbcode [code]
- don't use table-responsive class for tables.
It does bad/funky things, especially on small displays
- remove start_table_noborder()
Modern Browser complain if there are non-https elements in https websites. This makes sure that if the user visits via https all elements of the page are also retrieved using SSL. Furthermore it uses https urls in emails that are send to the user, if SECURE_URL_BASE is set in project/project.inc.
The only remaining places where URL_BASE is used is when it is used as master_url where it is important that it is in sync with what the scheduler uses.
BOINC lets you maintain a read-only DB replica,
and certain read-only web pages (like top_users.php)
use the replica in preferences to the master.
But it turns out that these pages aren't actually read-only
because of the too-clever forum_preferences logic.
So sometimes it would add forum_preferences records to the replica,
leading to errors it later copies the same item from the master.
Solution: skip the forum preferences logic if we're using the replica.
We could make this more bulletproof by putting in checks
in insert(), update(), delete() etc.
Because we don't use transactions, there are situations
(like if a moderator clicks "OK" repeatedly)
where decrementing thread/post counts makes them negative.
Prevent this.