Wiki Landmines with PHP and the DATE function

I have written about landmines to remember projects and about the general adaptability of idea collections, especially wikis (e.g., with graphics & functions or via frames and JavaScript for easy text entry). I use a wiki as my idea collection — no matter whether it is a private project or for work. My wiki contains every article I have ever written, every conference submission, current projects I’m working on, everything — and I use it every day. So I thought about combining landmines with my wiki and tried to use it for some things I’d like to review every weekend until they become natural for me (habits are hard to break).

I use DokuWiki which is able to interpret PHP code (if it is turned on in the settings) so using the following PHP code:

<php>
$today = getdate();
if (($today[weekday] == “Saturday“) or ($today[weekday] == “Sunday“)) {
echo ‘
<h2>For Saturday and Sunday</h2>
<ul><li><a href=”http://localhost/username/wiki/doku.php?id=PAGENAME1″>PAGENAME1</a></li>
<ul><li><a href=”http://localhost/username/wiki/doku.php?id=PAGENAME2″>PAGENAME2</a></li>
<ul><li><a href=”http://localhost/username/wiki/doku.php?id=PAGENAME3″>PAGENAME3</a></li>
<ul><li><a href=”http://localhost/username/wiki/doku.php?id=PAGENAME4”>PAGENAME4</a></li>
</ul>’;
};
</php>

on the main page of my wiki displays the links only on Saturday and Sunday. This way my main wiki page changes without my doing and this change becomes instantly noticeable when it happens.

This example shows only the principle, there are probably better ways to remember central projects or other stuff you want to review every week. It would be easy to

  • use random numbers to display different central projects (or one per (week)day),
  • use graphics (much more noticeable),
  • display the content of wiki pages (via PHP file functions) in a 43-folder-like fashion,
  • or even change the whole start page of the wiki.

Of course, it will not open automatically and it will only show the changes when you reload the main page (e.g., by returning to it when you are navigating in your wiki). But given that I use my wiki every day because it is the start page of my browser this is bound to happen.

As always, life is easier if you focus on the infrastructure and invest some time to make it work for you and your habit and not against.

Be the first to comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.