Skip to main content


Postbox Add-Ons for Friendica


reshared this

in reply to Pygoscelis Papua

@Pygoscelis Papua
It would be good if you could publish the addon at git.friendi.ca/friendica/frien… so that it is published for all Friendica nodes. Are you planning to do that?

reshared this

in reply to Matthias

Well I hadn't been planning on it, but maybe?

I set up over at GitLab because I already have a work-related GitHub account and wanted to separate my personal projects and trying to manage two GitHub accounts on one computer is messy, but I also wanted to get away from Microsoft and their AI nonsense and try out GitLab as a GitHub alternative, as it seems popular with some big open-source projects. Unfortunately Friendica's repos aren't there. Which I didn't think would be an issue because I didn't originally intend to submit any of my mods to the core project.

But I found a bug in the Frio theme last night and reluctantly did set up a second GitHub account to submit my fix and a PR over there. I don't really want to move my repos to GitHub and I'd need to look into what's involved with mirroring the GitLab repos, because I definitely don't want to be trying to maintain it in two places.

@Hypolite Petovan and I have already talked about Bookface being pulled from GitLab to GitHub, so that's also possibility I guess for including the add-ons if he wants.

reshared this

in reply to Hypolite Petovan

They just look like regular posts. The <span> transfers but the class="postbox-..." gets stripped out. And even if the classname wasn't stripped Mastodon (or any other platform) would not have the stylesheet to show them as postboxes anyway. Much like the Facebook version that inspired them, they only work within this platform. People can always do what people do with the Facebook ones though, screencap them and share the images on other platforms. 😉
This entry was edited (2 weeks ago)

reshared this

in reply to Pygoscelis Papua

@Pygoscelis Papua Thanks, I didn't expect the graphics to work on Mastodon but at least the text should show like a regular post, which you confirmed. 😊

reshared this

in reply to Hypolite Petovan

Apparently Disapora has the opposite problem, it's showing the raw code:

reshared this

in reply to Hypolite Petovan

I'm guessing not a lot of people have previously made use of the [class]...[/class] BBcode or someone would've noticed a parsing error like that. Which looks like Friendica is sending it already converted to <span> but is it sending as HTML or is it sending it as &lt;span&gt; or &#60;span&#61; because I would assume Diaspora knows how to handle actual tags? But the Postboxes are coming though to Mastodon as actual <span>...</span> tags. 🤷‍♀️

reshared this

in reply to Pygoscelis Papua

Can anyone confirm what Postboxes look like when shared to various other platforms like Hubzilla, GNUsocial, Bluesky, etc.? I'm assuming all the ActivityPub platforms are handling it similarly to Mastodon but I have no way to check any others.

reshared this

in reply to Matthias

Thank you @Matthias !

Now I guess the question for the ones that are messed up is whether the problem is in how Friendica sends the post data or if it's how the platform that receives it is parsing it?

I tried looking through the Friendica code myself trying to find where post data gets processed to send to each other platform and I can't make head nor tail of it. Though I did run across a comment that [class] was "deprecated since 2021.12, left for backward-compatibility reasons" but doesn't way why it was deprecated. I hope it doesn't get removed because it's also how I'm making the "Cover Photos" work in Bookface.

reshared this

in reply to Pygoscelis Papua

@Pygoscelis Papua @Matthias It was probably deprecated because of the absence of remote system support for it. These Friendica-specific classes are at odds with a platform that intends on being as compatible as possible with other decentralized social networks,

reshared this

in reply to Hypolite Petovan

Since the BBcode is replaced with <span>...</span> shouldn't it be trivial to simply send the wrapped content without the wrapper to other platforms?

Like the difference between:
$text = preg_replace("(\[class=(.*?)\](.*?)\[\/class\])ism", '<span class="$1">$2</span>', $text); and $text = preg_replace("(\[class=(.*?)\](.*?)\[\/class\])ism", '$2', $text);

reshared this

in reply to Pygoscelis Papua

@Pygoscelis Papua @Matthias We have a specific processing for Diaspora because it expects Markdown but otherwise it's converted in HTML for all the other remote platforms.

reshared this

in reply to Hypolite Petovan

Well, still, there'd be no reason not to strip out the [class] wrapper since other platforms can't use it anyway. There isn't anything similar in Markdown so far as I know, which might be why the raw BBcode is getting through to Disapora? I'm guessing it's missing the conversion from BBcode [class] to Markdown syntax. Which should be conversion to nothing. I'd check for it myself but I have no clue where the processing for other platforms even is in the Friendica code.
This entry was edited (2 weeks ago)

reshared this

in reply to Pygoscelis Papua

reshared this