Moving BACK to TWiki

Long story short, FOSwiki promised progress and updates and modern features, and they didn't deliver. Other than some nice fixes almost at launch time, they pretty much sat on things for a year. In the meantime, TWiki has gone on to add OpenID support and other nice features, and seems to be developing quickly again. So, I made the decision to migrate back.

Upgrading to 5.1.0

  • Edit templates/view.pattern.tmpl and add (use raw view to see what it should look like, twiki likes to munge it):
<div class="twikiContentFooter"></div><br><a href="/Main/LeaveComment?origin=Notes/TwikiRelated">Leave a comment</a><p></div><!-- /patternContent--> <p /> and <p /> %TMPL:DEF{"patterntopiccontents"}%<div class="twikiContentHeader"><div class="tagmetags hideInPrint"> Tags: <form name="tagmeshow" style="display:inline" action="http://notes.cheapspeech.com/bin/viewauth/Notes/TwikiRelated" method="post"><input type="hidden" name="crypttoken" value="a5983a3f0f5f98b2a3f82e99a6a59364" /> <span class="tagMeControl"><a rel="nofollow" href="http://notes.cheapspeech.com/bin/viewauth/TWiki/TagMeCreateNewTag?from=Notes.TwikiRelated">create new tag</a></span></form> <a href="/bin/view/TWiki/TagMeViewAllTags" class="twikiLink">view all tags</a> </div></div><div class="patternContent"><div class="patternTopic">%SHAREME% %TEXT% </div><!-- /patternTopic-->
  • Edit data/TWiki/TWikiRegistration.txt and add:
<table cellspacing="0" id="table1" cellpadding="0" class="twikiTable" rules="all" border="1"> <tr class="twikiTableOdd twikiTableRowdataBgSorted0 twikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="twikiTableCol0 twikiFirstCol twikiLast"> <IMG SRC="%CAPTCHAURL%"> </td> <td bgcolor="#ffffff" valign="top" class="twikiTableCol1 twikiLastCol twikiLast"> <input type="hidden" name="Twk1CaptchaHash" value="%CAPTCHAHASH%"><input type="text" name="Twk1CaptchaString" size="5"></td> <code><font color="red">**</font></code> </td> </tr> </table> &gt;<cite> | | <input type="hidden" name="rx" value='%BLACKLISTPLUGIN{ action="magic" }%' /> <input type="hidden" name="topic" value="TwikiRelated" /> <input type="hidden" name="topicparent" value="UserList" /> <input type="hidden" name="action" value="register" /> <input %NOREGISTRATION% type="submit" class="twikiSubmit" value=' Submit ' /> |</cite><br />
  • Add the Quantcast tag to template/view.tmpl

URLs to test

Things to keep in mind

  • A bit of hidden nuggetry was at: http://twiki.org/cgi-bin/view/Plugins/OpenIdRpContrib - it turns out there are a couple of LocalSite.cfg lines which must be added in order to enable the OpenID features.
  • Unfortunately, the BBcode plugin hasn't been updated for 5.0 yet.
  • Set TAGMEPLUGIN_ALLOW_TAG_CHANGE = TWikiAdminGroup needed to go into TWikiPreferences. Note that all preferences for the plugin actually need the prefix TAGMEPLUGIN_ in order to work. Not very apparent if you're just skimming quickly.

Upgrading TWiki to FOSwiki

I finally decided to make the plunge to FOSwiki. There's a bunch of crap on both sides, but the FOSwiki project looks like ultimately it'll be better supported. Seeing TWiki move to a commercial support model and the plugin authors running away, shows me that TWiki is probably going to drift more towards the big company enterprise market. The last thing we need in this world is another Confluence, chasing the magic word of "enterprise" to the exclusion of features. I'm presently of the opinion that the main barrier to entry of new authors/editors on TGW is twiki's registration system - but I could be wrong. Anyway, I guess this is the end of this topic; see FOSWikiRelated for moving forward. I shall evaluate the things in this article to see which still apply to FOSWiki and move those into the new topic.

Upgrading TWiki (4.2 from 4.0)

Tweaking NAT skin's "title" tag issue

I found it irritating as heck that I couldn't figure out a decent preference to allow me to NOT have NATskin keep doing the whole ''TheGunWiki.com - Gunwiki - {topictitle} - TWiki" thing for each topic. So I got frustrated and just edited public_html/lib/TWiki/Plugins/NatSkinPlugin.pm directly. The function to adjust was renderHtmlTitle; it seems that there's some param value that woul've done almost what I wanted - the $params->{wikitoolname} value. Had it been set to 'off', it would have eliminated the incessant "- TWiki" at the end which I wanted to kill. However, it wasn't a preferences value, and I couldn't find anywhere to set it. So, I just settled for rewriting the part that renders the title line to a much more pleasing (to me at least) "{web}: {topictitle}". Seriously, the domain name is in the title bar folks, and there's a TWiki link two clicks away from ANY page on the site... the word "TWiki" doesn't need to be there cluttering up the Google results.

Tweaking TWiki (4.0 series)

I run TheGunWiki, and have developed some tools and tweaks which I find useful. If you like the way TGW is set up, you may want to replicate what I did.

First off, it is assumed that you're running TWiki on its own domain, not a sub-directory. If it's a sub-directory, then you'll have to do some additional tweaking before these scripts will be 100% applicable to you. Next, if you want to use getsearchtarget.pl, you will have to use Apache's "combined" log format.

Scripts

Eliminating TWiki's "gmtime is the only time" Bias

  • Tweak lib/LocalSite.cfg: $TWiki::cfg{DisplayTimeValues} = 'servertime';
  • Tweak the declaration for _DATE, to include '$TWiki::cfg{DisplayTimeValues}' as the last argument on the DATE's format string.

Getting More Contributors

This is just theory here, but the default Natskin login prompt seems a bit intimidating to the users. I've adjusted it to have a big friendly register link, and the word 'free'. Users like the word free, you know.

Suggested Admin Ninjitsu

Create a 'CheckForOrphans' topic in Main, then link it from your Sidebar. The only text you really need is % FINDORPHANS{ web="whatever" }%, unless you run multiple webs. Either way, you've added some extra power to your toolbar.

Undoing Irritation in Breadcrumbs

Just add exclude="WebHome" to the BREADCRUMBS section in templates/view.nat.tmpl to eliminate the redundant webname -> Webhome stuff.

Comment Forms My Way

I added "<br><a href="/Main/LeaveComment?origin=TwikiRelated">Leave a comment</a>" to templates/view.pattern.tmpl - this took care of adding a comment link without boosting the file size being transferred.

Next, I created Main.LeaveComment. I'm not going to paste it here because you can pull it from the URL and hit 'raw' to view it.

Then, I wrote postcomment.cgi, which I will attach here eventually.

Lastly, I wrote a "landing page" for the comment plugin.

Getting the BBCode plugin to work

This is a bit of irritation. I ended up having to edit lib/TWiki/Plugins/BBCodePlugin.pm because it refused to use my BACKGROUND setting. I suspect it's being overridden by a namespace collision - TWiki plugins, in general, seem to make very poor attempts to use their own namespace and avoid configuration variable changes. TWiki configuration is an exercise in global variables at their worst. On another point, the [ IMG ] tag doesn't support the 'width' and 'height' attributes from bbcode, which caused my first BBCode user and I quite a bit of hair pulling for a bit.

-- SeanNewton - 12 Feb 2008

Edit | Attach | Watch | Print version | History: r13 < r12 < r11 < r10 < r9 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r13 - 2012-07-22 - SeanNewton
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback