How texting the wiki works

Using Maker channel

Additionally, pmwiki.php's HandleEdit function must be modified as such:

--- pmwiki/pmwiki.php	2015-01-24 07:07:54.000000000 -0600
+++ pmwiki/pmwiki.php	2015-01-28 19:29:06.191940906 -0600
@@ -1936,11 +1931,16 @@
   $page = RetrieveAuthPage($pagename, $auth, true);
   if (!$page) Abort("?cannot edit $pagename"); 
   $new = $page;
+  $old = $new;
   foreach((array)$EditFields as $k) 
     if (isset($_POST[$k])) $new[$k]=str_replace("\r",'',stripmagic($_POST[$k]));
   $new['csum'] = $ChangeSummary;
   if ($ChangeSummary) $new["csum:$Now"] = $ChangeSummary;
   $EnablePost &= preg_grep('/^post/', array_keys(@$_POST));
+  # XXX
+  if (isset($_POST['prepend'])) $new['text'] = $new['text']."\n".$old['text'];
   $new['=preview'] = $new['text'];
   PCache($pagename, $new);
   UpdatePage($pagename, $page, $new);

Using WordPress channel

This method is mainly of historical interest now that IFTTT has a proper webhook channel.

  1. Text message sent to IFTTT
  2. IFTTT recipe converts from SMS to a new WordPress post with the post title as the wiki page to edit and the following post body:

    * '''{{ReceivedAt}}''' [[<<]] {{MessageNoHashtag}}

    The hashtag in the SMS chooses which namespace.
  3. IFTTT sends the WordPress post data to, a fake WordPress backend modified from ifttt-webhook
  4. runs a request on pmwiki.php with all the appropriate fields (authid and authpw are taken from the WordPress login information from the channel on IFTTT) and an additional field prepend=1.
  5. This method also requires the modifications to pmwiki.php as described above.


Last modified on 04 Jan 2016 at 12:43:07 AM EST ET