Facebook 

SMFHacks.com - Celebrating 20 Years!

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4342
Latest: eva
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 44312
Total Topics: 7676
Most Online Today: 513
Most Online Ever: 27044
(May 30, 2026, 09:10:16 pm)
Users Online
Members: 0
Guests: 283
Total: 283

Author Topic: [Mod]ActivityPub Federation for SMF 2.1  (Read 11268 times)

0 Members and 0 Guests are viewing this topic.

[Mod]ActivityPub Federation for SMF 2.1
« on: »
ActivityPub Federation for SMF 2.1



https://www.smfhacks.com/index.php?action=downloads;sa=view;down=247

ActivityPub Federation for SMF 2.1
====================================
By: vbgamer45
https://www.smfhacks.com

This mod enables your SMF forum to federate with the fediverse (Mastodon,
Lemmy, etc.) using the ActivityPub protocol. Forum boards become Group actors
that remote users can follow and interact with.

Requirements:
- SMF 2.1.x
- PHP 7.4+ with openssl, curl, and json extensions
- HTTPS (required for federation)

Installation:
1. Upload the package via Admin > Package Manager > Upload Package
2. Install the package
3. Configure at Admin > Configuration > ActivityPub Federation

WebFinger Setup (Required for Discovery):
Your web server must route /.well-known/webfinger requests to the included
handler. Add one of these rewrite rules:

Apache (.htaccess in your forum root):
  RewriteEngine On
  RewriteRule ^\.well-known/webfinger$ well-known/webfinger.php [L,QSA]

Nginx (in your server block):
  location = /.well-known/webfinger {
      rewrite ^ /well-known/webfinger.php last;
  }

Alternatively, copy well-known/webfinger.php into your site's actual
.well-known/ directory and adjust the SSI.php path inside it.

Features:
- Boards as Group actors (FEP-1b12 standard)
- Bidirectional federation: posts flow out, replies flow in
- Per-board federation control
- Domain block/silence list
- HTTP Signature authentication
- Background delivery with exponential retry
- Admin dashboard with delivery status
« Last Edit: August 13, 2026, 04:25:53 pm by SMFHacks »
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #1 on: »
I had some questions!

Does it survive SMF updates?
Does it handle spam correctly?
What happens if a remote user sends malformed ActivityPub data?
Does it create moderation headaches?

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #2 on: »
Its a new mod. It depends on the update minor updates yes! Full new versions of SMF no.

The other questions unsure.
This is new to me, in general but built this out based on activitypub spec, so if needs tweaks let me know. 
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #3 on: »
Its a new mod. It depends on the update minor updates yes! Full new versions of SMF no.

The other questions unsure.
This is new to me, in general but built this out based on activitypub spec, so if needs tweaks let me know.
I am very new to Fediverse stuff and how it even works so wasn't quite sure on using it quite yet. I will need to do some digging on how to get all the pre requirements set up on my VPS. My idea was to just have my announcements board be federated for a test run, not the entire site itself right away.

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #4 on: »
me as well, I want to find some more test cases.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #5 on: »
Is there a public board I can look at from the Lemmy client side? I don’t see SMFHacks on Lemmy Explorer.

Also, can SMF users use their SMF accounts on Lemmy?

I’m thinking of installing this in the next week or two and will let you know how it goes.

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #6 on: »
I don't have a public board at the moment. I haven't installed on this site.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #7 on: »
No worries.

First thing I noted on SMF 2.1.7 is that I don't have admin area. "Redirect now" takes me to the Admin Panel home page and I don't have ActivityPub Federation under Configuration.

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #8 on: »
Strange sounds like it didn't install completely. I just tested the package again on my site and installed and redirected to ?action=admin;area=activitypub;sa=settings 

Any errors in your forum error log?
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #9 on: »
1.0.1
Minor bug fix when deleting topics had an error.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #10 on: »
Today's update is missing .well-known but the installer still wants it.

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #11 on: »
You are right fixed it. Delete the old package.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #12 on: »
Ok, I installed again and still no admin area. Further testing showed that the mod's integration hooks were not being installed.

I edited install.php:

Find:
Code: [Select]
db_extend('packages');
Replace:
Code: [Select]
db_extend('packages');

if (!isset($smcFunc['db_create_table']))
die('ActivityPub installer: db_create_table is NOT available');

After installation, I was able to access the admin area. Haven't tested anything else yet.

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #13 on: »
hmm what did you do to get installed. The above statement looks like a check if the database table is not created.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #14 on: »
The added code isn't checking whether an ActivityPub table exists. It's checking whether SMF's $smcFunc['db_create_table'] function is available immediately after db_extend('packages').

I added it because the installer appeared to be failing before the mod's integration hooks were being installed, and I wanted to determine whether the database functions were actually available at that point.

With the check in place, the installation proceeded and I could access the ActivityPub admin area afterward.

So the relevant observation is that db_create_table apparently wasn't available at the point the installer expected it, and adding the check changed the installation behavior. I don't know yet whether that is the root cause, but that's what I was testing.

I'm currently working on the next stage after installation. The install/admin-area issue appears to be resolved. The integration hook is now firing when a post is created. I added temporary debug logging and confirmed:
  • integrate_after_create_post is being called.
  • activitypub_create_object_from_message() is being reached.
  • The message query succeeds and retrieves the new post.
  • The ap_objects database insert succeeds.
  • The ActivityPub object serialization succeeds.
So the current failure appears to be occurring after activitypub_create_object_from_message() returns, likely in the subsequent Create/Announce activity construction or delivery/queuing code.

I'm tracing that now to try to find out where it stops.

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
6510 Views
Last post April 20, 2010, 09:31:15 am
by SMFHacks
2 Replies
6324 Views
Last post December 13, 2010, 05:11:03 pm
by G1
1 Replies
4709 Views
Last post August 28, 2011, 07:01:45 pm
by SMFHacks
1 Replies
7616 Views
Last post May 25, 2017, 01:15:53 pm
by shuban
0 Replies
13876 Views
Last post March 16, 2026, 08:16:18 pm
by SMFHacks

+- Recent Topics

Registration - anti bot pattern matching by SMFHacks
November 01, 2026, 07:20:17 pm

EZPortal 8 by davejo
October 21, 2026, 01:01:54 pm

Downloads Pro 7.0 Released by SMFHacks
October 07, 2026, 07:35:30 pm

[Mod]ActivityPub Federation for SMF 2.1 by SMFHacks
October 01, 2026, 05:03:45 pm

Newsletter Pro 4.0 Released by SMFHacks
September 23, 2026, 08:08:24 pm

Can't remove or restore any item from the recycle bin by SMFHacks
September 22, 2026, 11:01:51 am

MCP Server for SMF 2.1 - let Claude, ChatGPT or Cursor run your admin chores by SMFHacks
September 12, 2026, 02:50:45 pm

Suggestions for improvements to Ultimate Shoutbox & Chatroom by davejo
September 02, 2026, 01:35:09 am

Automatic Sorting of Categories by Kiwi
August 31, 2026, 12:36:09 am

' appears as ' in Most Viewed (and Recent Items ?) by SMFHacks
August 22, 2026, 11:01:56 pm

Powered by EzPortal