Damus
Random Penguin profile picture
Random Penguin
@Random Penguin
@Friendica Developers

In the Booklook theme I'm working on I've been trying to figure out how to add set-up wizards for alternate account types since it's so opaque new users can't figure out how to do that.

One wizard would be for creating an Organization page and another for a Group. I suppose I could also create one for a "News" account, though I'm not sure if that account type has much difference from an "Organization" account.

I guess the first up-front question I should ask is if it's even possible to create a new account with an account type of something other than zero? So you don't have to log into that account and go to Settings > Account > Advanced Account Types and change it to News, Organization, or Group manually.

If it's not possible to create an account with different account type I guess there'd be no point in trying to make a set-up wizard.

But if there IS a way to do it, these wizards would require creating custom template forms called by custom PHP modules/classes. I see that there is actually a "route_collection" hook "that should be used to add addon routes pointing to classes." I assume it could also be used for a theme not just an addon?

It also says "Notice: the class whose name is provided to the route handler must be reachable via auto-loader." I don't know what that means.

Actually I have no idea how you use this at all.

I've looked at the paths to modules defined in /static/routes.php but that hasn't really helped me figure out how to use this hook. The documentation could really benefit from some example code for each hook.

It would probably be easier to implement a wizard for sub-account types in the Friendica core than in a theme anyway, but I thought I'd ask before I waste too much time on it.
2
Michael 🇺🇦 · 2w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqjyfhtfwc40hrc7pxrxvp5ztve3nz4lc4yrxguq2saxpycwmre78q6m9q72 I would love to see something like this in the core, at least for groups, so that this could be called by the group widget. Could you create it for the core? If you need support for that...
Random Penguin · 2w
I poked around a bit in the code. This isn't a "wizard" like I was talking about, but it is possible to create an additional account with a specific account type. Here I've added a drop-down menu for selecting the Account Type when creating the additional account. And this drop-down, like the passw...