1
yasir
how to change dir for theme "rtl"
  • 2006/9/11 15:57

  • yasir

  • Not too shy to talk

  • Posts: 109

  • Since: 2005/5/16


i see very nice themes here in XOOPS 4 my mag
but the problem is they are ltr not rtl

how can i make it right to left

2
snow77
Re: how to change dir for theme "rtl"
  • 2006/9/11 18:50

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


what is ltr or rtl, related to the theme? are you talking about your language?

3
Will_H
Re: how to change dir for theme "rtl"
  • 2006/9/11 18:53

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


no hes asking how to change the direction in which the tables expand.

4
snow77
Re: how to change dir for theme "rtl"
  • 2006/9/11 19:43

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


I got curious and did some research and found these two links:

http://www.w3.org/International/geo/html-tech/tech-bidi.html#ri20030728.094313871

http://www.microsoft.com/globaldev/handson/dev/Mideast.mspx

Apparently it would be interesting if it could be managed by CSS as it seems it can be done but I haven't got the concept clear as to guide you in what to do.

seems it can be done with this in the css, maybe adding it to the table, td, th or tr class..maybe the whole body?:

direction:rtl; (or ltr or inherit)
unicode-bidi: inherit; (bidi_override, embed, or normal)

If this were possible it would be nice to have a separate CSS that would apply this structure to the themes. So people that need this just need to get the appropiate CSS with this function.

... I guess that's the more hard way.

...the easy way, maybe adding dir=rtl to all the opening table tags of your theme, just like you have in your theme now, like the example below?
<table dir=rtl cellspacing="0">
    <
tr id="header">
      <
td id="headerlogo"><a href="<{$xoops_url}>/"><img src="<{$xoops_imageurl}>logo.gif" width="150" height="80" alt="" />a>td>
      <
td id="headerbanner"><{$xoops_banner}>td>
    tr>

    <
tr>
      <
td id="headerbar" colspan="2">&nbsp;td>
    tr>
  table>

5
irmtfan
Re: how to change dir for theme "rtl"
  • 2006/9/11 20:29

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


dont touch your theme.html like that.
its all can be done with css

see the instruction here:
Right to left style

6
snow77
Re: how to change dir for theme "rtl"
  • 2006/9/11 21:17

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


that's really great irmtfan! I will want to take a look at what you have done.

please excuse my lack of knowledge of this but I see that here you have this code, that should be added to the theme:

<{if $xoops_langcode == "fa"}>

<{/if}>

my question is, besides fa... to what other languages is this valid for... the RTL?

I believe themes should be functional for every language

...would it be considered a good idea to include these files in all themes? or keep having them available as you have and let users implement the code themeselves?

7
irmtfan
Re: how to change dir for theme "rtl"
  • 2006/9/12 3:30

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


Quote:
my question is, besides fa... to what other languages is this valid for... the RTL?

there are a few RTL language Arabic, Persian ,Thai
so they can change langcode.

Quote:
would it be considered a good idea to include these files in all themes?


No this is a temporary solution just before The solution come from core.

it must be located in LOCAL like this:

XOOPS_ROOT_PATH/language/_YOURLANG/css/local.css

so it can all be done by LOCALIZATION.

also there can be more local files like
XOOPS_ROOT_PATH/language/_YOURLANG/css/local.css
XOOPS_ROOT_PATH/language/_YOURLANG/php/local.php
XOOPS_ROOT_PATH/language/_YOURLANG/js/local.js
and so on

8
snow77
Re: how to change dir for theme "rtl"
  • 2006/9/12 5:01

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


thanks for the explanation

9
yasir
Re: how to change dir for theme "rtl"
  • 2006/9/17 15:57

  • yasir

  • Not too shy to talk

  • Posts: 109

  • Since: 2005/5/16


sorry all my website is RTL
i need the shortest way

10
irmtfan
Re: how to change dir for theme "rtl"
  • 2006/9/17 18:00

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


you think upload a styleRTL.css and add some lines to theme.html is not short?
<{if $xoops_langcode == "ar"}>

<{/if}>

Login

Who's Online

442 user(s) are online (332 user(s) are browsing Support Forums)


Members: 0


Guests: 442


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits