# TODO

Make it perphekd!

## Do these

Convert it to polygLua.

It's all a bit too fragile, fix what I can.  Too many messes colliding.

Flock it.

Some sort of search system.

A member system, and edit / manage system for their pages.

Fix up linky conversion.  DONE, mostly.

- Need to deal with real file name versus title.  Also symlink name not matching what it points to.

Add atom feed for single page.  Alas cgit only seems to have ATOM feed on the whole repo, not individual files.

- However, once timestamps are sorted, I can use that code to generate RSS and ATOM feeds, and create page histories using diffs.
- Instead of an hourly cron job to update everything, see if I can hook
into Fos and Pm edit form's save function.  So when they save in the
original wiki, the nyaw version gets updated, diffed, and ATOMed / RSSed.
- + Actually a BFI method might do the trick, stick with doing a full scan 
and only updating the stuff that needs it, likely that's only the page that just got saved.
- Should also see if gitea can handle that, and if they want wiki content saved to git.

## Some ideas

Mostly from something chomwitt deleted.

- "collapsing headings" I guess that means click on a heading to hide / show the content under that heading.
- + 🙈
- + Should do that for the main content and the menu TOC.
- "validation", not sure exactly what that would validate.
- I'll just quote some of the rest -

~~~
    !!! co-editing
    The toolbar should contain tools that facilitate :
    * intergration (to other workflows)
    ** for example search-completion to other workflows names-tags.
~~~

- Syntax highlighting in code blocks.  The highlight package looks promising, already had it installed on my desktop.
- Allow default.template files in sub folders.
- Might be useful to automatically convert anything looking like a URL into a linky.

Automate symlinks.

- any .md.md file should be linked along with it's matching .md file if it's outside of Foswiki/ and PmWiki/.


## Try out

lua-wsapi-fcgi

https://inclusive-components.design/tooltips-toggletips/ has some ideas about the "tooltip" HTML attribute, and what to do about it.  A rabbit hole that ends in javascript, but might be useful up to that point.

htmx

cgit has Lua


## Member system

Reuse the member system from SledjChisl.

levels -

- everyone
- banned
- reader
- member
- moderator
- editor
- admin
- shell
- root

Everyone can read the pages, no need for an account.

Banned people can't do squat, except maybe pester an admin once to start the unbanning process.

When first registered, accounts are set to reader level.
Initial verification by email.
Readers can only edit their own profile.

If an existing member vouches for a reader, they get promoted to member.
Some invite system would count is vouching, but need to get secure invite credentials to someone outside the system.

Members can chat, and create their own sandboxes that might get promoted by editors / moderators to proper content.

Moderators can move things around, including to a spam/trash place.  They can ban readers and members.

Editors can edit any content, and move things around.  They can't edit the site elements itself.
So they can edit the site menu and structure of the content, but not the footer?
Certainly can't edit any admin stuff.

Admins are set by other admins.
Admins can promote / demote people and content at any time.
Admins can edit anything, including web editing of config files, and managing of modules.

shell level means you have direct access to the files that are the web
site, including configuration and modules.  Likely this is the person
that set the system up in the first place.

Admin should have access to everything that shell level has, but there's always things need tweaking at some lower level.
Built in file browser might do the trick.  Would be useful for content creators to organise the content.  Naturally should obey the permissions.

root level is whoever controls the server things are running on.  They can do anything at all.
