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/body.nat.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