please see www.shpadel.co.il and scroll down to the fivestar table. it looks rather nasty.
I am using drupal 5 +fivestar + NodeReview DEV with tallies patch + CCK + views + voting API

is this a theme issue? this theme is RTL , and I had the same problem with another RTL theme.

thank you

Comments

quicksketch’s picture

Fivestar does have full RTL support, but the problem is, Drupal 5 does not. You'll need to either manually include fivestar-rtl.css or use an RTL theme that does this for you. In Drupal 6, any site in RTL automatically includes these files, but in Drupal 5, you still need to do this manually.

Each star set also includes an RTL CSS file. So if you were using a star set, your HTML should include:

/sites/all/modules/fivestar/css/fivestar.css
/sites/all/modules/fivestar/css/fivestar-rtl.css
/sites/all/modules/fivestar/widgets/oxygen/oxygen.css
/sites/all/modules/fivestar/widgets/oxygen/oxygen-rtl.css

I don't think many modules provide RTL support in D5, so the approach you use to ensure the RTL files are loaded might have to vary by module. If possible, I'd highly encourage upgrading to Drupal 6 for an RTL site, where we actually have full support.

lotsahair2’s picture

thanks for your reply. for now I intend to stay in drupal 5.
can you give me some pointers as to how to make fivestar RTLed? an article, tutorial or anything of that sort would be great.

quicksketch’s picture

All you need to do is add the proper CSS files to the page. I'm not going to get into the details of how to theme in Drupal, but open up your template.php file in your theme, and in the _phptemplate_variables() function place this code:

function _phptemplate_variables($hook, $vars) {
  switch ($hook) {
    case 'page':
      $css = drupal_add_css(drupal_get_path('module', 'fivestar') .'/css/fivestar-rtl.css', 'theme');
      $vars['styles'] = drupal_get_css($css);
      break;
  }
  return $vars;
}

There should already be some code in your template.php file similar to this, so insert the drupal_add/get_css() function in the proper place.

lotsahair2’s picture

thanks for your help in this.

I have an RTL theme which doesn't have the function _phptemplate_variables.
I simply copy-pasted your code and it seems to be working with two axis ratings.

I would be happy if you could direct me to an article or tutorial on how to RTL themes and modules in drupal. I will also post this in the general forum.

quicksketch’s picture

I don't have any references other than my experience working on Drupal 6. In Drupal 6, you just make [name-of-css-file]-rtl.css for every [name-of-css-file].css you have. In that file, swap everything "left" with "right" (margin, padding, float, positioning, etc.). In D6, the addition of the -rtl.css file happens automatically.

I'm certainly no expert on RTL, but I do my best to support it in my modules. Try searching the site for RTL or on Google for "RTL Drupal".

http://groups.drupal.org/node/9004
http://drupal.org/node/142214

quicksketch’s picture

Status: Active » Closed (fixed)