Initial Base36 ( http://en.wikipedia.org/wiki/Base_36 ) support - experimental
authorHarvie <tomas@mudrunka.cz>
Sun, 28 Nov 2010 21:59:47 +0000 (22:59 +0100)
committerHarvie <tomas@mudrunka.cz>
Sun, 28 Nov 2010 21:59:47 +0000 (22:59 +0100)
apache/kyberia.conf
wwwroot/nodes.php

index 47790a71e9afb1830ab3ff7510e07d22fbad942c..3458f5420b1afe62e5be09ae6d4aedbee35b9c8c 100644 (file)
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^$ /nodes.php?node_id=1
 
+       #base36
+       RewriteCond %{REQUEST_FILENAME} !-f
+       RewriteRule ^k/([0-9a-zA-Z]+)/?$ /nodes.php?node_kid=$1 [L]
+       RewriteCond %{REQUEST_FILENAME} !-f
+       RewriteRule ^k/([0-9a-zA-Z]+)/([0-9a-zA-Z]+)/(.+)/?$ /nodes.php?node_kid=$1&template_kid=$2&magic_word=$3 [L]
+       RewriteCond %{REQUEST_FILENAME} !-f
+       RewriteRule ^k/([0-9a-zA-Z]+)/(.+)/?$ /nodes.php?node_kid=$1&template_kid=$2 [L]
+
+
        Options Indexes FollowSymLinks
        AllowOverride All #None
 
index 9a5ff1bb832ebe3462f342b389d19f49e26c0b77..5da40699896fcf9320aba1ff09bf213e8aa80bb5 100644 (file)
@@ -28,6 +28,10 @@ if ($_SESSION['debugging']) {
     print_r($_SESSION);
 }
 
+//Base36 http://en.wikipedia.org/wiki/Base_36 (Initial support only :-)
+if(isset($_GET['node_kid'])) $_GET['node_id'] = base_convert($_GET['node_kid'], 36, 10);
+if(isset($_GET['template_kid'])) $_GET['template_id'] = base_convert($_GET['template_kid'], 36, 10);
+
 //requiring main config file with path/database etc. constants
 require('config/config.inc');
 require(INCLUDE_DIR.'senate.inc');
This page took 0.098782 seconds and 4 git commands to generate.