1
2
Chit Chat / Re: Tips for Bots
Last post by ahrasis -Quote from: "shawnb61" – you can then block it via .htaccess.
3
Chit Chat / Re: Tips for Bots
Last post by shawnb61 -Quote from: nwsw – The session_start on every GET request, combined with db session storage, has a dramatic impact on the server. As an immediate mitigation, I forced sessions to use cookies:Code: [Select]sources/Session.php:
@ini_set('session.use_only_cookies', true);
I then configured nginx to no longer serve requests that contain the session id. This only helps until the bots stop including the session id in their requests.
I'll probably move the session management to a ramdisk until I can figure out how to lean out the need for sessions by unregistered guests.
Note that PHP is deprecating the passing of PHPSESSID via URL in 8.x, and it will be removed in 9.0.
That particular setting, 'use_only_cookies', will be retired soon - mainly because setting it to false is soon to be disallowed. More here:
https://wiki.php.net/rfc/deprecate-get-post-sessions
So... The idea is good - don't use PHPSESSID, and, since you're not generating it anymore, you can then block it via .htaccess.
SMF implementation: https://github.com/SimpleMachines/SMF/pull/8394
One part of the SMF implementation, this commit, can save a LOT of resources. It's causing some issues for forums that have guest-browsing disabled, though... Those issues are currently being addressed.:
https://github.com/SimpleMachines/SMF/pull/8394/changes/2f2a5e0ae404fd1adb408b87896ce00cca1715ec
The basic idea is that, since you cannot pass by URL, you MUST pass by cookie. So... When cookies are disabled, there is no way to pass the session. At all... So, don't even bother writing it. Note certain classes of bots either block cookies or don't use them, or pass their own PHPSESSID... All these variants cause more session writes.
These changes will be a hard requirement before PHP 9.0.
You are effectively giving bots total control over your DB writes... One step further, since they can flood you with writes, they can overwhelm your undo/redo logs. Which can further lead to issues with backups. Which can cause performance issues & even bring your site down...
So stop that...
The savings can border on the ridiculous:
In addition, this note outlines even further savings. The goal is to avoid driving up CPU during bot storms. I've been testing these on my site. Check out the CPU charts before/after:
https://www.simplemachines.org/community/index.php?msg=4199062
The more broad notes found here might also help:
https://www.simplemachines.org/community/index.php?topic=593895.0
4
Chit Chat / Re: Tips for Bots
Last post by ahrasis -5
Chit Chat / Re: Tips for Bots
Last post by nwsw -Code: [Select]
sources/Session.php:
@ini_set('session.use_only_cookies', true);
I then configured nginx to no longer serve requests that contain the session id. This only helps until the bots stop including the session id in their requests.
I'll probably move the session management to a ramdisk until I can figure out how to lean out the need for sessions by unregistered guests.
6
Addons / [Addon] Topic Preview
Last post by vbgamer45 -Description:
Shows a styled popup preview when hovering over topic titles in the message index (board view). The popup displays the topic title, author name, post time, a preview of the first post body, and reply/view counts.
Compatibility:
- ElkArte 1.1.x
Features:
- Hover popup with topic preview on message index pages
- Shows first post body text (truncated), author, time, reply and view counts
- Smooth show/hide with configurable delay (no flicker)
- Viewport-aware positioning (stays within screen bounds)
- Admin settings panel to enable/disable and set preview length
- Graceful fallback: when disabled, original tooltip behavior is restored
Installation:
Install via the ElkArte Package Manager (Admin > Packages > Install).
Settings:
After installation, go to Admin > Configuration > Addon Settings > General to find Topic Preview settings:
- Enable Topic Preview popup - Turn the mod on or off
- Preview text length - Number of characters to show in the preview (default: 256)
Uninstallation:
Uninstall via the ElkArte Package Manager. All file changes will be reversed and mod files removed.
Author:
vbgamer45 - ElkArte Mods
License:
BSD 3-Clause License
7
Addons / Re: [Addon] Related Topics
Last post by Burke Knight -Quote from: "ahrasis" – I was hoping for that too, but it says 1.1.x, but may be it could work on 2.0 beta 1 as well?
8
Addons / Re: [Addon] Related Topics
Last post by ahrasis -Quote from: Burke Knight –Quote from: Spuds – Going to give this one a try !Here on the site, I hope!
9
Addons / Re: [Addon] Related Topics
Last post by Burke Knight -Quote from: Spuds – Going to give this one a try !
10
Addons / [Addon] Custom Board Icons
Last post by vbgamer45 -Version: 1.0
Author: vbgamer45
Website: https://www.elkartemods.com
Compatible with: ElkArte 1.1 - 1.1.99
Description
Custom Board Icons allows forum administrators to upload a custom icon image for each board, replacing the default CSS status icons on the board index. Upload any image (JPG, PNG, GIF, WebP, or SVG) through a simple drag-and-drop interface on the board edit page.
When a board has a custom icon, a small animated badge dot can optionally overlay the icon to indicate new/unread posts. Boards without a custom icon continue to use the default ElkArte status icons.
Features
- Per-board custom icon images on the board index
- Drag-and-drop upload UI in Admin > Boards > Modify Board
- AJAX upload with instant preview - no page reload needed
- Optional new post badge overlay (green pulsing dot) on custom icons
- Badge toggle in Admin > Configuration >Add-on Settings
- Supports JPG, PNG, GIF, WebP, and SVG formats (max 512KB)
- Clean uninstall removes all files and database changes
Installation
1. Upload the package via Admin > Packages > Upload a Package.
2. Click Install and follow the prompts.
3. The mod will add a board_icon column to the boards table and create a board_icons/ upload directory in your forum root.
Usage
Adding an icon to a board:
1. Go to Admin > Boards > Modify Board (click the modify link next to any board).
2. Scroll down to the "Board Icon" section at the bottom of the settings.
3. Drag and drop an image onto the drop zone, or click it to browse for a file.
4. The image will upload immediately and show a preview.
5. Click "Modify" to save the board settings.
Removing an icon:
1. Edit the board in Admin > Boards.
2. Click "Remove icon" next to the current icon preview.
3. Click "Modify" to save.
New post badge setting:
1. Go to Admin > Configuration > Addon Settings.
2. Under "Custom Board Icons", toggle "Show new post badge on custom board icons".
3. When enabled (default), a small green pulsing dot appears on custom icons when the board has unread posts.
Notes
- Icons can only be added when editing an existing board. Create the board first, then add the icon.
- Icons are displayed at 40x40 pixels on the board index. For best results, use square images.
- Uploaded files are stored in the board_icons/ directory in your forum root.
- If JavaScript is disabled, boards with custom icons will show the default CSS icons as a fallback.
Uninstallation
1. Go to Admin > Packages > Installed Modifications.
2. Click Uninstall next to Custom Board Icons.
3. All uploaded icon files, the upload directory, and the database column will be removed.
Support
For support, questions, or bug reports visit https://www.elkartemods.com.