RTL ACP login is styled with admincp.css
Hello everybody,How can I make the rtl ACP styled with admincp_rtl.css
Many thanks
Here is an other screenshot, this time it's not login panel, but inside the acp. I noticed that sometimes template uses admincp.css and other times uses admincp_rtl.css
as I said sometimes template is styled with admincp_rtl.css, here is a screenshot
can we do in discuz templates something like this (as with phpbb):
<!--IF RTL-->
<link rel="stylesheet" href="static/image/admincp/admincp_rtl.css" type="text/css" media="all" />
<!--ELSE-->
<link rel="stylesheet" href="static/image/admincp/admincp.css" type="text/css" media="all" />
<!--ENDIF--> One more thing: I want to change the bgimg.jpg used in the header with bgimg_rtl.jpg (I flipped the image to be more convenient for rtl styles), but it's impossible because there is no css file for RTL, there is only one file "style.css" (in template\default\style\tx\). Would you please, vot, make this possible.
Many thanks Edited by charafweb at 2012-2-23 15:31
Eureka!!!!I did the folowing:
in the file: source\function\function_admincp.php
after:
$IMGDIR = $_G['style']['imgdir']; $STYLEID = $_G['setting']['styleid']; $VERHASH = $_G['style']['verhash']; $frame = getgpc('frame') != 'no' ? 1 : 0; $charset = CHARSET; $basescript = ADMINSCRIPT;
I added
$rtl_suffix = RTLSUFFIX;
and I replaced:
<link href="static/image/admincp/admincp.css?{$_G}" rel="stylesheet" type="text/css" />
with
<link href="static/image/admincp/admincp{$rtl_suffix}.css?{$_G}" rel="stylesheet" type="text/css" />
And now the rtl acp is styled with admincp_rtl.css
thanks
I noticed that sometimes template uses admincp.css and other times uses admincp_rtl.css
This means that there is a bug: some AdminCP modules uses admincp.css instead of admincp_rtl.css.
You can help to find all the places where this is occured.
I added
$rtl_suffix = RTLSUFFIX;
This method is used already in admincp_main.php:0038: $rtl_suffix = RTLSUFFIX;
0045: <link rel="stylesheet" href="static/image/admincp/admincp{$rtl_suffix}.css?{$_G}" type="text/css" media="all" />And I agree with your suggestion,
may be the "function_admincp.php" file is more suitable place to set the $rtl_suffix !
hello vot, as you mentioned, that method is used in admincp_main.php. what i did is just copied those lines (from admincp_main.php) to function_admincp.php ;P, and that works great. and i'm happy because i understood it alone (my knowledge about php is very limited) :lol Thanx!
And I have found the same problem in admincp_login.php.
Fix:
http://code.google.com/p/discuzx-en/source/detail?r=369
Pages:
[1]