Loading...
 
Development

Development


international URLs

posts: 4

Is it possible to change URL to /wiki/Something in Tiki wiki pages ?

My site contains pages in russian language and URLs of this pages looks like this : ...tiki-index.php?page=%D0%9D%D0%...

I want to change my URLs to something like :/wiki/Text.....

Such URLs are shown with normal letters in browsers (not encoded with ugly UTF-8)

This feature is available with bitweaver. Is it possible to incorporate this into TikiWiki?

posts: 4656 Japan
Maybe this is involved: in ja.wikipedia.org's index page, the html tag includes this string:
Copy to clipboard
xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja" dir="ltr"
while Tiki's html tag doesn't contain anything additional. You could try experimenting with the Russian equivalent (in the templates/header.tpl file).


I suppose because Tiki is intended to be international/multilingual, with language options for visitors, it isn't appropriate to specify a language in the html tag by default. But local sites could specify if that's appropriate for them. (I don't know if adding the string will enable non-ascii characters in IRLs or not, but just noticed that difference.)

-- Gary


posts: 4

The difference is not in the xml headers

mediawiki uses the following format of internal links : /wiki/BlahBlah
Such links are showed unencoded in address bar of most browsers.

TikiWiki uses links in format : /tiki-index.php?page=XX
They are shown UTF-8 encoded when title contain international letters.

Is it possible to change format of Tiki links to mediawiki variant ?

I've tried to dig source code, but didn't find where are links processed.

Thank you.

posts: 4656 Japan

> The difference is not in the xml headers

Well, they are different, with mediawiki's specifying a non-ascii language character set, which suggests to me they could be a factor.

> mediawiki uses the following format of internal links : /wiki/BlahBlah
> Such links are showed unencoded in address bar of most browsers.
>
> TikiWiki uses links in format : /tiki-index.php?page=XX
> They are shown UTF-8 encoded when title contain international letters.
>
> Is it possible to change format of Tiki links to mediawiki variant ?

Sure, just rename the _htaccess file in the Tiki root to .htaccess and Apache URL rewriting is activated, as at this site. But I'm afraid that doesn't stop international page names from being encoded. (See http://zukakakina.com/???. Page name and thus URL contain Japanese kanji for "nihongo". Page name is displayed correctly on the page and but encoded in the URL. When accessing that address, the URL is displayed correctly in my browser address gadget, but I get a page not found error indicating the URL wasn't correctly correlated to a page name.)

-- gary_c

posts: 4

> > mediawiki uses the following format of internal links : /wiki/BlahBlah
> > Such links are showed unencoded in address bar of most browsers.
> >
> > TikiWiki uses links in format : /tiki-index.php?page=XX
> > They are shown UTF-8 encoded when title contain international letters.
> >
> > Is it possible to change format of Tiki links to mediawiki variant ?
>
> Sure, just rename the _htaccess file in the Tiki root to .htaccess and Apache URL rewriting is activated, as at this site. But I'm afraid that doesn't stop international page names from being encoded. (See http://zukakakina.com/???. Page name and thus URL contain Japanese kanji for "nihongo". Page name is displayed correctly on the page and but encoded in the URL. When accessing that address, the URL is displayed correctly in my browser address gadget, but I get a page not found error indicating the URL wasn't correctly correlated to a page name.)

I've already tried to activate _htaccess before starting this thread.

There are following rules for wiki pages in _htaccess

RewriteRule
(-_\+A-Za-z0-9+)$ tiki-index.php?page=$1 QSA,L

  1. for multi-byte char support use
RewriteRule
/(^a-z+)(^\/+)(^tki-+)(.*^.js+)(~?)(.*)$ tiki-index.php?page=$1$2$3$4$5$6$7$8$9 QSA,L


As I suggest, they should rewrite urls like www.org/Text to www.org/tiki-index.php?page=text

BUT, Tiki _wiki_ parser still continue to generate URLs like a "/tiki-index.php?page=BlahBlah",
and not like a "/BlahBlah", so we return to "/tiki-index" URL version after the first click on link.

So, I want to learn Tiki Wiki parser to parse Wiki markup to HTML code with producing of URLs like a "/BlahBlah", or "/wiki/BlahBlah" instead of "/tiki-index.php?page=BlahBlah".

Can you tell me where is file with code that parses wiki links ( something ) to html code


Thank you!

posts: 4656 Japan

...
> Can you tell me where is file with code that parses wiki links ( something ) to html code
>
>
> Thank you!

Probably lib/tikilib.php. PHP coding skills will be helpful. Maybe you can ask on the tikiwiki-devel mailing list. I think the changes needed might be fairly simple (considering Mediawiki and Bitweaver do it), but knowledge of what is involved exactly is necessary.

-- Gary