BETA VERSION. module works, but CSS still not working
The Clipboard module is an extension for the Open Source Social Network (OSSN) that allows users to generate an overview of their activity on the platform, including:
Timeline Posts: A list of posts made by the user, including any attached images and comments.
Comments: Comments on posts are displayed separately and structured.
Blogs: An overview of blogs written by the user, including links to the original blog posts.
Download Functionality: Users can download their data as a text file for personal archiving or backup purposes.
This module is ideal for users who want to maintain an archive of their social media activity and easily download it for personal use.
Changelog for Clipboard Module - Version 2.0
Release Date: November 28, 2024
New Features:
Profile Tab Integration
Added a new tab under "Edit Profile" to provide users with a dedicated interface to access their Clipboard data directly from their account settings.
Introduced a profile_tab.php file for rendering the interface with buttons to view or download user data.
Improved User Data Download
Enhanced the download functionality to include timeline posts and their associated comments.
Added error handling to gracefully skip comments with invalid GUIDs.
Role-based Data Access
Ensured that:
Regular users can only view or download their own data.
Admin users can view and download data for any user.
Added access checks to prevent unauthorized access.
Changes:
Modularized CSS
Updated Clipboard/css/clipboard.php to improve style consistency across the module.
Menu and Navigation Updates
Removed the Clipboard link from the top and left navigation bar.
Added a contextual menu item under "Edit Profile" using the ossnaddhook system. conform GPDR
Enhanced Logging
Added debug logs for invalid comments and other potential data inconsistencies during download.
Bug Fixes:
Fixed issues with comments not being displayed correctly during data download.
Resolved errors when fetching user data without proper validation.
Upgrade Instructions:
Replace the existing ossncom.php with the new version.
Add the profiletab.php file to the plugins/default/clipboard directory.
Ensure the CSS file clipboard.php is updated in Clipboard/css/.
Known Issues:
Some comments with missing GUIDs may still trigger warnings in error logs.
Additional error handling improvements planned for future releases.
Contributors:
Special thanks to Michael Zülsdorff for feedback and testing, ensuring this release meets user needs effectively.
Mischael, great feedback
think i got it working
Next I'd suggest to surround that line like
if (ossn_isAdminLoggedin()) {
$user = $username ? ossn_user_by_username($username) : ossn_loggedin_user();
} else {
$user = ossn_loggedin_user();
}
because otherwise any user may collect any user's data ;)
And since all this belongs to the member's personal data anyway, I would make it part of the "Edit Profile" page like
(The GDPR component shows which way to create an entry like that)
Some changes ... just having a first brief look ...
define('__CLIPBOARD__', ossn_route()->com . 'Clipboard/');
remember that Unix file and directory names are case-sensitive
and your component gets installed as Clipboard - not clipboard
ossn_extend_view('css/ossn.default', 'clipboard/css/clipboard');
Ossn expects css files included like this to be PHP executables (allowing to use some vars) - so rename it to clipboard.php
/*
echo ossn_set_page_layout('contents', array(
'content' => $content,
'title' => $title,
));
*/
Have a look into themes/goblue/plugins/default/theme/page/layout/contents.php:
It's dealing with content only, thus it makes no sense to pass a title parameter. And if you don't want a standalone page but include it (as shown in the screenshot) the complete change is:
$page = ossn_set_page_layout('contents', array(
'content' => $content,
));
echo ossn_view_page($title, $page);
Great!!! Like said feedback about working css would be great. But this looks great
Really useful. Thanks Eric!
Ready for testing. This was a lot of fun and took weeks, but I finally have something to show.
Inspired by exploring the Wall, Blog, and Feedback code, I created this module.
The result is an overview of all your posts and reactions.
In this version, the post limit is set to 1000:
// Fetch timeline posts
$wall = new OssnWall();
$userposts = $wall->GetUserPosts($user, array('pagelimit' => 1000));
In the next version, this will be set to false for unlimited posts.
Enjoy using it, and please provide feedback!
I’m still struggling with the CSS, so any help is welcome.