0xDECAFBAD

It's all spinning wheels and self-doubt until the first pot of coffee.

TWiki + Automatic MT-Search = WeblogWithWiki

I just discovered and integrated MTSearch into DecafbadWiki by using a TWiki include to pull in a search constructed with the current wiki topic's name. It took all of 15 minutes, including the time to login and download MTSearch to my server. This, along with my MTXmlRpcFilterPlugin, completes a simple but effective automatic loop between blog and wiki. I think this pretty much satisfies my original goal of a WeblogWithWiki.

That was so much easier than I'd thought it would be. One of those things I kept thinking "Wouldn't it be nice if?" but kept procrastinating because I thought it'd be so much harder.

I'm still amazed that ItJustWorks.

shortname=ooobho

Archived Comments

  • So is this something us common folk can do? :)
  • What, I'm not common folk too? hehe.. Okay, here's what I did: 1) I installed MT-Search, which is pretty much just unpacking it and copying a few things around. 2) I made an alternate template for search results, which I stripped down to nothing but an unordered list. This basically entailed copying the default.tmpl in the search_templates directory and deleting most of the file. 3) I added this toward the bottom of my view.tmpl in TWiki: ---++ Related weblog entries %INCLUDE{"http://www.decafbad.com/mt/mt-search.cgi?Template=wikiblog&search=%TOPIC%"}% It was really easy to get going for me. I'm using MT with MySQL, so I'm not sure if the old non-MySQL installs would have a different experience installing MT-Search, but I doubt it. Hope that helps :)
  • Cool stuff got it going. Only thing weird happening is that its putting a number above and below the results, maybe some kinda word count. I can live with that, i don't have a great looking wiki anyway :) It seems to be a lot slower on my server than yours, probably my host, its slower than most. Anyway great hack!! Thanks!
  • Well i had to turn it off today. For some reason it was causing the RSS feed to render way slow, slowing down the whole site. At least that what i suspect. I know there are sepearte templates for RSS, but maybe it was reading in each topic when it displays it? I'm not sure i'll have to poke around with it some more. Once i removed the includes in the view template things were back to normal. I plan on looking into this tonight.
  • Ack, that's no good :( I'll have to look into that, since I have a referrer script call attached to the view template too. I wonder if the TWiki search functions render the view.tmpl, and if there's some conditional to throw in to not render certain things during a search. I seem to remember seeing something like that, and I seem to remember that the RSS feed uses that search. I could be completely wrong though
  • I've done some more looking around, and it doesn't appear that rendering the RSS feed makes any search calls. So i'm not exactly sure why that includes slow it down so much. It could very well just be my host. Yours seems to load just as fast as always, guess thats another reason to look at moving to a new host soon.
  • I know its been a while since we discussed this, but i just had a brain fart. Since it takes a while for it to search my blog, i'm guessing its because i have 2500+ entries, I created this link that will just let people click to searh. Should have thought of this sooner. [[http://www.10500bc.org/mt/mt-search.cgi?Template=wikiblog&search=%TOPIC%][Search Blog For More Entries]]