WP WIKI Plugins

 

This plugin has been tested working with WP 1.2.0 .

This WordPress plugin adds a set of features, basically allowing to use WP as CamelCase-enabled Wiki as well as standard blog engine; just type in your CamelCase words, and WP-Wiki will take care of the rest. You can find a “live” example at SmokingLife. (the engine on that site has been changed to NewsBruiser, for experiments).

Download the latest release: WP-Wiki 1.03
Note: WP-Wiki is released under GNU General Public License

Installation procedure is the standard for WP plugins: unpack the file WP-wiki.php in the subdirectory WP_ROOT_DIR/wp-content/plugins/, then log in the administration panel, click on Plugins in the main menu, and activate the plugin. The only special requirement is to add the following rule to your .htaccess:

RewriteRule ^([A-Z]+([a-z]|[0-9])+){2,}$ index.php?wikiword=$0 [QSA]

Note: if you don’t already have an .htaccess file, remember to put these other two lines above the previous rule:

RewriteEngine On

and then the Base path, that should point to your WP root, e.g. /blog

RewriteBase /

Also note that your standard WP permalink structure won’t be altered, so the permalinks generated by WP (usually put on the post title) will work as before. “Wiki” permalinks on other sites can be manually created in this way:

<a href="http://myblog.org/WikiWord"> link to that specific Wiki post</a>

ToDo:

  • Complete 1.3 support, adding automatic mod_rewrite rule management as soon as this feature will be documented
  • Add option to “wikify” comments
  • Add function to generate “wiki-links” to use in the templates
  • Add “negative markup” to block a WikiWord from being wikified
  • Add ability to track all recent updates to WikiPages
  • Implement some kind of “free for all” mode where unregistered users are allowed to change the page anyway

Bugs:

  • The first word of a sentence is never considered a valid CamelCase word, and CamelCase words ending a sentence may find that the last letter is not considered. This is a limitation of the Perl-compatible regular expression currently used to filter posts. If you have a better solution, by all means let me know ( jack AT bakerstreetsystems DOT co DOT uk)
  • CamelCase word included in extensive links (e.g.
    <a href="link.htm">my LongLink sentence</a>

    ) will be “picked up” by the filter and will break the link. Note that the filter won’t pick up a standard link with just a CamelCase word (e.g.

    <a href="page.htm">LongLink</a>

    will produce MyLink, the correct link). This might probably be solved with some kind of “negative” markup.

Changelog:

  • v.1.03
    • Fixed missing style attribute breaking validation
    • Less intrusive default style for missing CamelCase definitions
  • v.1.02
    • Improved RegEx, now it shouldn’t pick up CamelCase words “broken” or part of urls.
  • v.1.01
    • Fixed warning message when the post doesn’t contain any CamelCase word

Thanks to Kitten’s Random Post Plugin and Andrew Shi-hwa Chen’s WP-Wikify for the inspiration.

30 Comments »

The URI to TrackBack this entry is: http://www.bakerstreetsystems.co.uk/2004/08/06/wp-wiki-plugin-10/trackback/

  1. WordPress Plugin: WpWiki
    This plugin adds a set of features, basically allowing to use WP as CamelCase-enabled Wiki as well as standard blog engine; just type in your CamelCase words, and WP-Wiki will take care of the rest. You can find a “live” example at SmokingLife.Trackback by Blogging Pro – Blog News, Tools and Hacks — 8/7/2004 @ 8:22 pm
  2. Blogs en Wiki’s spannen samen
    Toch wonderlijk hoe de dingen soms ineens op hun plaats vallen. Vanochtend las ik het stukje van Pierre over een hechtere integratie van wiki en weblog. Vanmiddag leverde een kwartiertje grasduinen in Bloglines.com een splinternieuwe WordPress-Wiki…Trackback by Weblog Zonder Haast — 8/7/2004 @ 10:20 pm
  3. Hi.I’m new to WP 1.2 and I’m trying to install this plugin, I’ve followed the instructions:1-unpack the file WP-wiki.php into /wp-content/plugins/
    2-activate the pluginAnd since I didn’t have one, I’ve created a file .htaccess and add the line:RewriteRule ^([A-Z]+([a-z]|[0-9])+){2,}$ /index.php?wikiword=$0 [QSA]

    Everything seems to work fine, except, when I try to follow one of the wiki links I get this message:

    “The requested URL /blog/WiiiKiii was not found on this server.”

    and the permalink refers to /blog/index.php?p=5

    Could ypu tell what am I doing wrong??

    Thanks

    Comment by Samuel — 8/10/2004 @ 4:43 pm

  4. Yeah, don’t worry 🙂 From what I understand, you put wordpress in the subfolder /blog/, right? The .htaccess should be put there as well.
    Then remove the “/” from “/index.php?wikiword=…”. It should work then.Comment by Giacomo — 8/10/2004 @ 5:06 pm
  5. I’ve changed the .htaccess, but still not working.Now it’s looking like this:RewriteRule ^([A-Z]+([a-z]|[0-9])+){2,}$ index.php?wikiword=$0 [QSA]You can see it my test blog for yourself at http://samuel.serrado.net/blog/index.phpWhen I follow a wiki link to a nonexistent post I go to the write interface. But after when I refer to the wiki link I get the same error.

    Any sugestion??

    Cheers.

    Comment by Samuel — 8/10/2004 @ 5:36 pm

  6. Try with this:
    RewriteEngine On
    RewriteBase /blog
    RewriteRule ^([A-Z]+([a-z]|[0-9])+){2,}$ index.php?wikiword=$0 [QSA]

    I wish I was more proficient in mod_rewrite…
    PS: your URL is unreachable as now.Comment by Giacomo — 8/10/2004 @ 5:54 pm
  7. It’s Working … Great!!!I realy love this plugin.One more thing, don’t know if it’s already possible but it would be nice if could define a wiki link like this [link, name], where name is the sentence that want to show in our post instead of the link name.Thanks for the help.Regards

    Comment by Samuel — 8/10/2004 @ 6:11 pm

  8. Happy you like it 🙂
    I’ve had a few requests for an implementation not based on CamelCase but on simple markup. I’m not eager to define Yet Another Markup, I personally think that people can find this kind of features in other, better plugins (like Textile or Markdown) or software (“real”, specialised wiki). Anyway, I’ll re-evaluate this after completing my current project, the Version Control plugin.Comment by Giacomo — 8/10/2004 @ 6:30 pm
  9. The link for 1.03 seems to be broken right now. I keep getting 404s, but I’d like to have a look into that regular expression…Comment by Giulio Piancastelli — 8/10/2004 @ 8:40 pm
  10. Fixed, I did screw it before. I need to sleep…Comment by Giacomo — 8/11/2004 @ 1:13 am
  11. […] a muss ich mir jetzt eine Engine aussuchen. Allerdings gibt’s auch f�r WordPress ein Plugin, das W�rter IM Text eines Blogeintrags, wenn sie in Camel C […]Pingback by Lehrerzimmer » Camel Case — 8/13/2004 @ 8:00 am
  12. I love your Wiki plugin. I have one bug, which is probably not a big concern, but does cause any ‘wiki’ link to become disabled – and then become a deadlink.If you change the date, or time, of the ‘wiki’ post that is made to your blog after you’ve ‘wiki-fied’ the word, the link becomes dead and there is no way to fix it. Now, I imagine you could edit the db, right? What I’m suggesting is – some way to edit the URL, too, without needing to go into the db.Now, I realize you’re probably thinking – ‘dummy, why’d you change the date/time?’ … well, to see if the ‘wiki’ process was able to track any/all changes. I know, don’t beat me up about it. ;)So, where is the link located now that I’ve made it. And, how can I edit it – or fix the dead link.Thanks. It is a great plugin. Useful for any terms you may post which people will need a reference for – and that is cool!

    Robert

    Comment by Robert — 8/15/2004 @ 6:00 am

  13. Robert, what you tell me shouldn’t really happen, because the plugin doesn’t look at dates or times. What it does is, it looks up for the first post with the specified wikiword as title, and display it. What you describe might happen if you used the permalinks set up on the title by WP (something like http://myblog.com/2004/10/02/my-post-slug/ , but you can change it on the Options/Permalink panel), but this is due to WP behaviour 😉 and would happen anyway. If you want to manually link to a “wikipost”, use an URL like http://myblog.com/MyWikiWord , and that will work… at least until you change the title of the page (that’s the “classic” wiki behaviour anyway) 🙂 I probably should have specifed this in the instructions.
    I’m thinking about some big improvement for version 2 (better wikiword detection, clear wiki-permalinks, putting the wiki definition in a meta field, and comments wikification options), but first I have to fix the seriously broken Version Control plugin, and get a better job 🙂Comment by Giacomo — 8/16/2004 @ 12:20 pm
  14. Hey Giacomo,Well, I got it to work again, for a bit, and now it doesn’t work anymore – and, I promise, I didn’t change anything (that I can remember) … bummer … I just made a new ‘wiki’ entry for a word and the URL to that is here:http://www.auburnmedia.com/wordpress/PoynterOnlinebut, when I go to it – it does not work / not there?If you get a chance, would you mind looking at it? Thanks.

    Robert

    Comment by Robert — 8/28/2004 @ 2:55 am

  15. Adding Wiki Functionality
    As I mentioned [here](/archives/2004/08/29/upgrades/), I am attempting to add CamelCase Wiki functionality to this blog.For example, I could have a AsteriskiChat page!A.Trackback by Adam Sherman On-Line — 8/29/2004 @ 6:15 pm
  16. I have made something related to this; MooKitty has extended it into a WordPress plug-in.It is called LocalNames, and you use it to easily link to things with a short name. For example, if you want to be able to just type “[[WordPress]]” in your blog, and have it automatically link to http://wordpress.org/, you can use this.Once you make a list of names, anyone else can use them as well.Not only can you use the names in your blog, you can use your LocalNames in FireFox as well!It’s easy to make lists of names- there’s a web tool called my.localnames that you can use to build and maintain your name bindings.

    There’s already a tool for connecting to wiki, automatically. All MoinMoin wiki, in particular, are compatible with this tool. You can refer to (in a blog post) or jump to (with Firefox) any page in a MoinMoin wiki, just by naming it.

    Comment by Lion Kimbro — 9/2/2004 @ 6:36 am

  17. I have been playing with this and I found the code “&zwj;” Placed between each Camel‍Case word will create a zero-width joining space that will eliminate the CamelCase functionality.You probably knew this already.Comment by James — 9/6/2004 @ 5:26 am
  18. No I didn’t, thanks James for pointing it out. I’m not sure whether this should be fixed or not, it would mean we have to map those spaces in the URL-rewriting rules somehow.Robert,
    If you are sure the entry is published and with title “PoynterOnline” it’s definately a mod_rewrite issue. Check you have the correct directives in the .htaccess, should be something like
    RewriteEngine On
    RewriteBase /wordpress
    RewriteRule ^([A-Z]+([a-z]|[0-9])+){2,}$ index.php?wikiword=$0 [QSA]

    PS: you might want to move WP from the “wordpress” folder, that is a favourite spammer target; in this case, change the RewriteBase rule to reflect the new position.Comment by Giacomo — 9/6/2004 @ 9:45 am
  19. I have been recently updating my site with the ability to show the except on the home page and the full article on the resulting page. I have included some (not all of) my code.

    <?php
    if ($single)
    the_content();
    else{
    the_excerpt();
    ?>
    <?php}?>

    The thing I found was that the wiki plugin does not link to the “$single” article in this case making the user have to click the title to view the full story. Any ideas on why this is happening.

    Comment by James — 9/9/2004 @ 8:02 am

  20. James, as it is the plugin hacks the main array of posts that are supposed to be shown, making it a single-element array. I think this is why, for example, adding it to the default installation gives you pages with the post but no comments. That’s because the plugin doesn’t “follow the rules” for single-post visualizations, think of it more like an homepage with just a post.Comment by Giacomo — 9/9/2004 @ 2:31 pm
  21. […] Weblog — Shinobi @ 20:44J’avais test� la semaine derni�re le plugin WpWiki qui permet de reconnaitre les ChatMot dans les billets de WordPress et l […]Pingback by Murmures dans le cyberespace » Wikifier le blog … encore un plugin pour WordPress — 10/1/2004 @ 6:41 pm
  22. Since I’m not seeing the trackback, here’s a manual reference: Danny Ayers tried the plugin, but then deactivated it because it screws WikiWords in links. That’s due IMHO to the fact you’re not really parsing HTML, but using only a regexp to match those words. Time to tweak it again?Comment by Giulio Piancastelli — 10/8/2004 @ 7:16 pm
  23. Not really. These days, I’d rather spend my time coding YABE in Python with XMLRPC and an integrated “wikifier” plugin. I still hope someone will pick up this plugin and rewrite it, mainly adding a proper XHTML-parsing library, because I am not really interested in PHP anymore.Comment by Giacomo — 10/9/2004 @ 10:25 pm
  24. i wrote ad hoc patch for 1.3a4.53a54,55
    > global $user_level;
    > get_currentuserinfo();
    54a57
    > $targetname = preg_replace(”/\[\[(.+?)\]\]/”,”$1″, $array[0]);
    56c59
    < return ‘<a href=”‘.$wikiplugin_blog_url.’/’.$array[0].’” title=”‘.$array[0].’”>’.$array[0].’</a>’;
    ?
    > return ‘<a href=”‘.$wikiplugin_blog_url.’/index.php?pagename=’. $array[0].’” title=”‘.$targetname.’”>’.$targetname.’</a>’;
    58,61c61,67
    < return ‘<a href=”‘.$wikiplugin_blog_url.’/wp-admin/post.php?wikiword=’.$array[0].’” class=”NewWikiWord” title=”Create This WikiWord“>’.$array[0].’</a>’;
    < }
    < }
    <
    ?
    > if (0 == $user_level) {
    > return $targetname;
    > } else{
    > return ‘<a href=”‘.$wikiplugin_blog_url.’/wp-admin/edit-pages.php?wikiword=’. $array[0].’” class=”NewWikiWord” title=”Create This WikiWord“>’.$targetname.’</a>’;
    > }
    > }
    > }
    65,66c71,72
    < $regex = “/(?<![>\/”])\b([A-Z]+([a-z]|[0-9])+){2,}\b(?!<|\/)/”;
    <
    ?
    > $regex = “/(?<![>\/”])(\b([A-Z]+([a-z]|[0-9])+){2,}\b)(?!<|\/)|(\[\[.+?\]\])/”;
    >
    122c128
    < add_filter( ‘the_content’, ‘wikiplugin_filter_getWikiWords’ );
    ?
    > add_filter( ‘the_content’, ‘wikiplugin_filter_getWikiWords’,8 );
    ?>Comment by jouno — 11/6/2004 @ 1:48 pm
  25. Thanks jouno 🙂 I’ll make available a 1.3 package asap.Comment by Giacomo — 11/7/2004 @ 10:37 am
  26. […] in some way.) For now, there are also plugins that can emulate wiki-like behavior, such as WpWiki, but for some reason this still feels like a blog plugin to me—not […]Pingback by Tuesday’s Bedtime Bantering » Ups and Downs and Everything Beyond — 12/14/2004 @ 8:52 am
  27. Hmmm… I can’t seem to get this plugin going, I have exhibit installed – could that be a problem??Comment by futb0l — 12/31/2004 @ 2:21 am
  28. […] ty much stopped developing these two plugins for WordPress. In fact, I even turned off the Wiki Plugin on this site. Why? These days, I don’t have the will to work […]Pingback by BakerStreet Systems » What’s up with these plugins? — 2/4/2005 @ 9:56 am
  29. I had some trouble with this plugin on a new install of WordPress 1.5.
    It would work fine on new CamelCase words and send me to a new post window etc.However, after making the post, anytime I clicked on a WP-Wiki link it would just redirect to the front page. I noticed that the URL given by the Plugin is formed:http://www.blogaddress/post_titleI just went into the Permalink page of the WP dashboard and set the Permalink URLs to use the form %postname%Now the Wiki finds the posts as it should. Also, Any other new posts with the same CamelCase word in it also automatically links, as it should.

    This is an excellent Plugin. It’s a shame you are no longer supporting it.

    Comment by charlie — 3/9/2005 @ 3:37 pm

  30. hi folks
    this is my ht.access file below.where do i put the following line?
    RewriteRule ^([A-Z]+([a-z]|[0-9])+){2,}$ index.php?wikiword=$0 [QSA]
    alto
    =======================
    # -FrontPage-IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*order deny,allow
    deny from all
    allow from allorder deny,allow
    deny from all

    AuthName www.causeofpeace.com
    AuthUserFile /home/causeof/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/causeof/public_html/_vti_pvt/service.grp

Leave a Reply

Your email address will not be published. Required fields are marked *