'''How to Install Tiki
./lib/smarty_tiki/outputfilter.urlt.php<br /> ./lib/urlt/urltlib.php<br /> ./lib/urlt/index.php<br /> ./templates/tiki-urlt_admin.tpl<br /> ./templates/tiki-urlt_edit_in.tpl<br /> ./templates/tiki-urlt_edit_out.tpl<br /> ./tiki-urlt_admin.php<br /> ./tiki-urlt_edit_in.php<br /> ./tiki-urlt_edit_out.php<br /> ./tiki-urlt.php7
The first job is to add three tables to the database. Do this by running the tiki-urlt-regex.sql file, as follows:
mysql -u (user) -p (database) < db/tiki-urlt-regex.sql
(where (user) is the database username and (database) is the database name)
Next, visit http://yourserver/tiki-urlt-admin.php in your browser. You should see a page that has three tables on it - one for Incoming URLt, one for Outgoing and one for Non-PHP Mime Types. If the database has been installed sucessfully, you should see a few
This is implemented as a Smarty output filter. These are configured in PHP code, so edit setup_smarty.php (in the Tiki directory). You should find some lines like these at the bottom:
$smarty = new Smarty_TikiWiki($tikidomain);
$smarty->load_filter('pre', 'tr');<br /> // $smarty->load_filter('output','trimwhitespace');23
Add an extra line below the last one (before any ?> though!):
Now try fetching a Tiki page, just to make sure there are no big problems. Since no outgoing URL translation has been configured, the page you see will be exactly as it always was. We're just making sure that there are no installation problems.
This is web server specific. Any web server will do. At a minimum you need to configure the file tiki-urlt.php to be the Error Document for any pages that arn't found. For Apache, you'd do something like the following:
Try fetching a page that doesn't exist - you should see a sparse error message from
Lastly, you need to configure some URL translations. This is a very complicated subject, requiring lots of Regular Expression skills. However, here's a simple example to get you going.
On the "Edit Incoming URLt" screen, add a line that has the following in it:
10|^\/banana|/tiki/tiki-index.php| |Stop on Match||
(make sure Incoming
Now visit http://yoursite/banana - you should see your Home Page! That's because
Now try editing an outgoing
10|tiki-index.php\?page=(.*)|/$1| |Stop on Match||
Again, save your changes. As soon as you do, try hovering your mouse over a Wiki page link. You should find that it looks a little different (if you click one, you'll probably get a Page Not Found error.
If all is well, the above example should change a link to the Wiki page "HomePage" to "/HomePage" (that is, "tiki-index.php?page=HomePage" is translated to "/HomePage"). Clearly, for this to be useful, you'd have to setup a corresponding Incoming
This quick and trivial example just scratches the surface. It's possible to do some really complex translations by using the "Stop on Match" and "Continue" rule modes carefully. Also, if you're migrating an old site to a
This is a complex subject, far more so that I can really write about. If you've got some neat examples, let me know and I'll include them.