News for hackers. Stuff that matters.

Show HN: A Minimal PHP Wiki

https://mindwi.se/?WikiMind

First, I'm by no mean a programmer. Second, I am reading HN for years, just registered to make this public and see if it can be useful for someone. I have nothing to gain monetary.

A while ago, I decided that no blogging system was simple enough and I looked for a small wiki to use as a CMS/blog. Found WikWiki on C2.com and I mixed it with some basic Markdown syntax, a minimal template and added password protection.

The result is a single php file, no database and no dependencies. Code is a mess, not modulable, probably wrong in so many ways, but it can probably used by some as personal notepad, wiki, CMS, blog, etc.

Any comments appreciated.

( 9 comments | 8 points | on HN )
Re:Show HN: A Minimal PHP Wiki by tallmtt on Friday September 09, 2022 @04:56PM (#32784803)
I don't understand the "anchored h3 titles" - How would I make a Table of Contents?
Re:Show HN: A Minimal PHP Wiki by mindwise on Thursday September 15, 2022 @12:46AM (#32847155)
Look at the top lines of this page: https://mindwi.se/?e=budget

All the h3 titles below (where lines start with ###) can be linked to using this format: [displayed text](#title)

Re:Show HN: A Minimal PHP Wiki by llagerlof on Saturday August 27, 2022 @09:07AM (#32618526)
Hi dev!

I am a PHP developer and love minimalistic, one file projects. I love wikis too.

My comments here is not intended to be negative, just some feedback, so you can improve the program (and maybe fix some things).

I tried to bring your wiki online at my localhost. Doesn't worked because you are using short open tags. Since many PHP installations have this Off by default, I think you should use the non-short open tag "<?php" instead just "<?".

I changed it but faced another issue. The Syntax <?php=$variable?> was giving me some render issues. I don't dive in to find why, but I changed it to <?php echo $variable; ?>

It worked! Well, so-so.

A page with a textarea rendered. I typed something and clicked on save, but the page reloaded and nothing happened. Tried filling the password too. When I click on "Wiki" link, nothing happens too.

If you need some more info to help you find why the app is having this behaviour, just tell me.

Re:Show HN: A Minimal PHP Wiki by mindwise on Sunday August 28, 2022 @12:19AM (#32625726)
Awesome feedback, thank you!

I did not really attempt to use it on any other PHP installations, so it might explain being broken easily. I use shorthands a lot, I might just change it to the default ones to avoid errors.

When you edited your first (empty) page, did you use password "admin" or you generated a new hashed password? It might have something to do with another PHP settings that doesn't allow you to create files unless you chmod the directory.

Any additional info is appreciated, I'm really looking to improve it for people to use WikiMind on their own.

Re:Show HN: A Minimal PHP Wiki by john-doe on Sunday August 28, 2022 @08:05AM (#32627743)
Following llagerlof's indications I could make it work with the default password, tested with PHP 7.4.21 and 8.0.8, chmod 755. The meta tags for charset and viewport were merged (?) so I corrected that too, here's the modified file: https://www.pastery.net/zbfwuf/

Great project, thank you. I felt a little stupid when trying to create a new page, then remembered the way of the Wiki and appended ?new-page to the URL, of course. Maybe add this info in the description?

Re:Show HN: A Minimal PHP Wiki by mindwise on Tuesday August 30, 2022 @12:45AM (#32646721)
Thank you. Based on your modification, I decided to vent the code to improve it a bit. As suggested, syntax code got added in placeholder of the textarea when a page is created. Example here (just an empty page): https://mindwi.se/?testtest

Hope it helps.

Re:Show HN: A Minimal PHP Wiki by ckhung on Saturday August 27, 2022 @09:10AM (#32618554)
i like the idea of single php file, no database and no dependencies. yet if u r looking another simple blogging system, pls check

https://github.com/casualwriter/casual-markdown-blog

in same design idea: single html + markdown. no db, no dependence.

Re:Show HN: A Minimal PHP Wiki by llagerlof on Saturday August 27, 2022 @09:54AM (#32619043)
Yeah, I saw this project yesterday. Looks very nice. Isn't real single html since grab the css and js from cdn, but that's ok.
Re:Show HN: A Minimal PHP Wiki by ckhung on Saturday August 27, 2022 @10:33AM (#32619433)
thanks. yes. it include js/css from my other repo, but can put them into real single html if necessary, but this is not the main issue. i do want to draw attention to "simple blogging" and "no dependence". even no need my project, raw github markdown is good enough if focus on content. and this PHP project is also a good try.