Fediverse and database

eric redegeld Posted in General Discussion 1 week 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 2 days ago

Michael, again thank you for feedback and answering.
Learning a lot and made Github space with my first module https://github.com/compie67/clippboard And also going so shere my work so far with the fediverse connection
regards
Eric

German Michael Zülsdorff Replied 2 days ago

See the action of https://www.opensource-socialnetwork.org/component/view/7333 (1.0dev3)
on how to store extra member attributes

Dutch Eric redegeld Replied 1 week ago

Michael, great feedback. i keep on working on this

German Michael Zülsdorff Replied 1 week 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 week 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 week ago

I have 0% knowledge about Fediverse