https://github.com/webitproff/forumspostsuser-cotonti
This plugin displays user messages posted on the forum in two formats: a separate page with a list of their own messages and a separate tab in the user's profile with a list of their posts. Plugin for Cotonti 0.9.26, PHP 8.4+
https://github.com/webitproff/forumspostsuser-cotonti
Last synced: 5 months ago
JSON representation
This plugin displays user messages posted on the forum in two formats: a separate page with a list of their own messages and a separate tab in the user's profile with a list of their posts. Plugin for Cotonti 0.9.26, PHP 8.4+
- Host: GitHub
- URL: https://github.com/webitproff/forumspostsuser-cotonti
- Owner: webitproff
- License: bsd-3-clause
- Created: 2026-01-17T13:45:35.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-01-17T13:56:02.000Z (5 months ago)
- Last Synced: 2026-01-18T00:11:59.972Z (5 months ago)
- Language: PHP
- Homepage: https://abuyfile.com/en/market/cotonti/plugs/forumspostsuser
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# forumspostsuser-cotonti
This plugin displays user messages posted on the forum in two formats: a separate page with a list of their own messages and a separate tab in the user's profile with a list of their posts. Plugin for Cotonti 0.9.26, PHP 8.4+
# Forum Posts User
Plugin for Cotonti CMS that displays forum posts authored by a user, both as a standalone page for the current user and as a tab in the user profile.

---
## Description
**Forum Posts User** extends the standard Cotonti forums and users modules by adding functionality to list forum posts created by a specific user.
The plugin provides:
- a standalone page showing **posts of the currently authorized user**;
- a **profile tab** in `users.details` showing posts of any user (subject to access permissions);
- pagination, post text truncation, and permission-aware output.
The plugin does not introduce new database tables and relies entirely on existing forum structures.
---
## Requirements
- Cotonti Siena `0.9.26+`
- PHP `8.4+`
- Active **forums** module
- Standard Cotonti users module
---
## Installation
1. Copy the plugin directory `forumspostsuser` into:
plugins/forumspostsuser/
2. Install the plugin via the Cotonti administration panel:
Administration → Extensions → Forum Posts User → Install
3. Ensure the **forums** module is installed and enabled.
---
## Plugin Structure
```
forumspostsuser/
├── forumspostsuser.php
├── forumspostsuser.global.php
├── forumspostsuser.functions.php
├── forumspostsuser.users.details.php
├── forumspostsuser.setup.php
├── lang/
├── forumspostsuser.en.lang.php
├── forumspostsuser.ru.lang.php
├── tpl/
├── forumspostsuser.tpl
└── forumspostsuser.users.details.tpl
```
---
## Configuration
Available plugin configuration options:
- **showpostsinlist**
Number of posts displayed per page.
- **postscutinlist**
Maximum number of characters shown per post (after stripping markup).
Configuration is available via:
Administration → Extensions → Forum Posts User → Configuration
---
## Frontend Usage
### Standalone page (authorized user only)
The plugin exposes a standalone page accessible via:
```
cot_url('plug', 'e=forumspostsuser')
```
Access rules:
user must be authorized;
only the current user's posts are shown;
posts are sorted by last update date (DESC).
Pagination is handled using Cotonti standard pagination helpers.
Menu integration example
Example of adding a menu item for authorized users:
```
{PHP.L.forumspostsuser_title_my}
```
User Profile Integration
The plugin hooks into:
users.details.tags
and provides the following template tags:
{FORUMSPOSTSUSER_TAB}
{USERS_DETAILS_FORUMSPOSTSUSER_URL}
{USERS_DETAILS_FORUMSPOSTSUSER_COUNT}
Tab link example
```
{PHP.L.forumspostsuser_title} ({USERS_DETAILS_FORUMSPOSTSUSER_COUNT})
```
Tab content example
```
{FORUMSPOSTSUSER_TAB}
```
Server-Side Logic Overview
Data sources
The plugin works directly with:
forum posts table
forum topics table
forum structure
No additional tables are created.
Core logic
determines target user ID (current user or profile owner);
verifies user existence;
checks forum read permissions per post category;
counts total posts for pagination;
fetches posts with LIMIT and OFFSET;
parses post text using forum markup settings;
strips HTML and truncates content;
builds post URLs pointing directly to forum posts.
Permissions Handling
Forum read permissions are checked using:
cot_auth('forums', $category, 'R')
Posts from inaccessible categories are excluded.
If the forums module is disabled, the plugin does nothing.
If the requested user does not exist, profile tab output is disabled.
Templates
forumspostsuser.tpl
Used for the standalone page showing the current user’s posts.
Features:
breadcrumb navigation;
paginated list of posts;
topic title, post excerpt, date, category;
empty state message if no posts exist.
forumspostsuser.users.details.tpl
Used for the profile tab.
Features:
embedded output inside user profile;
pagination support;
access-aware post listing;
post count display.
Localization
Language strings are loaded via:
cot_langfile('forumspostsuser', 'plug')
All user-facing text is localized.
Multilingual environments are supported out of the box.
Hooks Used
- global
- standalone
- users.details.tags
Limitations
Only forum posts are supported.
No filtering by category or topic.
No caching layer.
No moderation or edit actions included.
Compatibility
Uses only Cotonti core APIs.
Compatible with standard forum markup settings.
Safe for custom themes (template-based output).
License BSD License
Date: Jan 17Th, 2026
Author: webitproff https://github.com/webitproff