4 ms·
Show HN: A Minimal PHP Wiki
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.
- tallmtt 4y agoI don't understand the "anchored h3 titles" - How would I make a Table of Contents?
- mindwise 4y agoLook at the top lines of this page: https://mindwi.se/?e=budget https://mindwi.se/?e=budget All the h3 titles below (where lines start with ###) can be linked to using this format: [displayed text](#title)
- llagerlof 4y agoHi 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.
- mindwise 4y agoAwesome 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.
- john-doe 4y agoFollowing 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/ 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?
- mindwise 4y agoThank 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 https://mindwi.se/?testtest Hope it helps.
- ckhung 4y agoi 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 https://github.com/casualwriter/casual-markdown-blog in same design idea: single html + markdown. no db, no dependence.
- llagerlof 4y agoYeah, 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.
- ckhung 4y agothanks. 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.