Fediverse and database

eric redegeld Posted in General Discussion 1 year ago

Hi there. now working on my second module. Interaction from ossn to and from ActivityPub

Got stuck on writing to database, Is er an sample module that makes sql tabels after activating
Even chatGPT keep me going back and forward still with no good solution.

regards
Eric

Replies
Dutch Eric redegeld Replied 1 year ago

Michael, great feedback. i keep on working on this

German Michael Zülsdorff Replied 1 year ago

There are several callbacks triggered on installing/enabling/etc... a component.
See https://www.opensource-socialnetwork.org/documentation/list/callback?offset=5

Code for creating new tables can be found in the installation directory.

Think twice if this is really necessary and cannot be accomplished by using OssnEntities/Metadata pairs instead like

    class YourFediConnector extends OssnEntities {
        public function dosomefediwork() {
        ....
        }
     }

and access that new class from your component (see blog component for example)

Dutch Eric redegeld Replied 1 year ago

lol, no problem.
I just want to discover how module can write to the database.
Thats is where i got stuck now

Indonesian Arsalan Shah Replied 1 year ago

I have 0% knowledge about Fediverse

Premium Version

Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.

$199 (Life Time)
Learn More

Other Questions