forked from zuiderkwast/dokuwiki-plugin-uilanguage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rtlcss.php
27 lines (21 loc) · 1011 Bytes
/
rtlcss.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/**
* RTL StyleSheet creator
*
* Outputs a CSS with only RTL style, no matter what language is set in your configuration.
* This is useful if you have plugins that change $conf['lang'] and (thus the language direction) per page.
*/
if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../../');
if(!defined('NOSESSION')) define('NOSESSION',true); // we do not use a session or authentication here (better caching)
if(!defined('DOKU_DISABLE_GZIP_OUTPUT')) define('DOKU_DISABLE_GZIP_OUTPUT',1); // we gzip ourself here
require_once(DOKU_INC.'inc/init.php');
require_once(DOKU_INC.'inc/pageutils.php');
require_once(DOKU_INC.'inc/io.php');
require_once(DOKU_INC.'inc/confutils.php');
// This will make css_out() include the rtl stuff.
$lang['direction'] = 'rtl';
// This will make css_out() use a separate cache.
$_SERVER['SERVER_PORT'] = '00'.$_SERVER['SERVER_PORT'];
// Now let css_out() work as usual.
require_once(DOKU_INC.'lib/exe/css.php');
//Setup VIM: ex: et ts=4 enc=utf-8 :