Clipboard Download version 2.1

5.0
Dutch eric redegeld 1 year ago

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.

Comments
se Sara Andersson Replied 2 weeks ago

Yes thank you Eric! This is perfect, i dont want to break the law and get a fine of 1.000.000 Euro :)

Indonesian Arsalan Shah Replied 2 weeks ago

Very nice Eric, good component! This makes GDPR component complete!

Dutch Eric redegeld Replied 2 weeks ago

Image

Dutch Harry Stok Replied 1 year ago

@eric redegeld geinstalleerd en super werkend, Zo dank je wel voor je werk!

Dutch Eric redegeld Replied 1 year ago

good advise, add this in next update

German Michael Zülsdorff Replied 1 year ago

Yeah, not very likely, but the same will happen if OssnWall is disabled.

Thus, whenever accessing a class or a function which isn't guaranteed to be available, do a check in advance like

if (com_is_active('COMPONENT_NAME_TO_BE_CHECKED')) {
           // proceed ... 
}

or if your component basically makes no sense at all without another component installed and enabled
then add that dependency to the xml file and use this hook:

ossn_add_hook('required', 'components', 'FUNCTION_TO_ADD_REQUIRED_COMS');

as done in Pinned Posts for example which needs a working wall, too.

Dutch Eric redegeld Replied 1 year ago

Thank you Dominik L for point to this error.

Changes Made
Bug Fix: Missing Blog Class Handling

Added a check in clipboard_fetch_user_data() to verify if the Blog class exists before using it.
If the Blog class is unavailable (e.g., the Blogs component is not installed), the code logs a warning and gracefully defaults to an empty list of blogs. This prevents crashes in environments without the Blogs component.
Improved Fallback Logic

Ensured that the Clipboard component remains functional even when optional dependencies, like the Blogs component, are missing.
Enhanced Debugging

Added error_log statements to provide useful debugging information when:
Posts or comments contain invalid data.
The Blog class is missing or unavailable.
Updated ossn_com.php

Improved the structure and readability of the file.
Added robust error handling for unexpected situations (e.g., missing GUIDs or invalid objects).
Updated component.xml

Bumped the component version to 2.1 to reflect the latest updates.
Enhanced the description to better communicate the component’s purpose and functionality.
Retained the MIT license, which allows free use, modification, and distribution with attribution.

Dutch Eric redegeld Replied 1 year ago

found it, it now crached on the missing blog.

testing now and when not active or present to get this line now

Blogs
The Blogs component is not installed or activated.

Dutch Eric redegeld Replied 1 year ago

Ow weird. I wil look in to this

German Dominik L Replied 1 year ago

I am getting this error, when trying to access clipboard

Error: Class "Blog" not found in /var/www/queermeet/htdocs/mrcrossii/DEVELOPER/components/Clipboard/ossn_com.php:96
Stack trace:
#0 /var/www/queermeet/htdocs/mrcrossii/DEVELOPER/components/Clipboard/ossn_com.php(74): clipboard_fetch_user_data()
#1 /var/www/queermeet/htdocs/mrcrossii/DEVELOPER/libraries/ossn.lib.page.php(79): clipboard_page_handler()
#2 /var/www/queermeet/htdocs/mrcrossii/DEVELOPER/index.php(22): ossn_load_page()
#3 {main}

Component

Developer: eric
License Expat (MIT)
Type: User admin
Requires OSSN Version : 6.6
Latest Version: version 2.1
Last Updated 1 year ago
Repository Url View Repository