* User Info

Welcome, Guest. Please login or register.

* Recent Posts

Can't get RSG "Show My Galleries" to work by Dampfnudel
[February 25, 2019, 11:01:55 AM]

Change the order of uploaded images in the gallery by whazzup
[February 19, 2019, 10:37:29 PM]

Upload timeout for large galleries (500 images each) by whazzup
[February 11, 2019, 10:07:25 PM]

Greetings from Ronald Smit by whazzup
[January 06, 2019, 03:39:22 PM]

Pluign and module by whazzup
[June 08, 2018, 11:57:13 PM]

Version 4.4.1 released by whazzup
[May 31, 2018, 04:31:16 PM]

search.html.php refer to rsgsearch.css with a wrong path by whazzup
[January 13, 2018, 08:12:04 PM]

Slow Gallery with many Photos by whazzup
[September 22, 2017, 09:22:33 AM]

Author Topic: mod_rsg2_voted module shows name instead rating_star.png  (Read 2478 times)

Offline elenix

  • Newbie
  • *
  • Posts: 1
mod_rsg2_voted module shows name instead rating_star.png
« on: September 08, 2011, 07:19:42 PM »
The module does not work properly: I selected option 2 to display the votes average with joomla star rating;
the module displays the file name instead of the image, and repeats it for 'n' times.
May you help me?

this is the helper.php code

 function getImageAverage ( $item, $type )
      $votes           = $item->votes;
      $rating           = $item->rating;
      $id              = $item->id;
         $average        = $rating/$votes;
            if( $type == '1' )
                return '<tr><td align="center"><a href="index.php?option=com_rsgallery2&page=inline&id='.$id.'">Media: '.$average.'</a></td></tr>'; 
                $output = '<tr><td align="center"><a href="index.php?option=com_rsgallery2&page=inline&id='.$id.'">';
                for($i=1; $i<=$average; $i++)
                    $output .= "<img border='0' src='/images/M_images/rating_star.png' alt='rating' />";
                return $output.'</a></td></tr>';

Offline mirjam

  • Retired from Dev Team
  • Hero Member
  • ****
  • Posts: 670
Re: mod_rsg2_voted module shows name instead rating_star.png
« Reply #1 on: September 21, 2011, 01:16:57 PM »
The mod_rsg2_voted is available from, not from the RSGallery2 developer Team (but I'll contact the developer mentioned: I Kor).

I can reproduce your problem with the standard installation, and then the module setting "Display average of votes" to "as Joomla rating star": you get a thumb, the title, how many times there has been voted and then a line saying "ratingratingrating" (for three stars) or "ratingratingratingratingrating" (for five stars). This is the alt text of the image that should be showing.

Problem is that the "star" image (which in Joomla 1.5 is actually a circle/dot) is not showing. But that can be fixed  :)

Find the helper.php file (/JOOMLAROOT/modules/mod_rsg2_voted/helper.php) and line 75:
Code: [Select]
$output .= "<img border='0' src='/images/M_images/rating_star.png' alt='rating' />";change this to
Code: [Select]
$output .= "<img border='0' src='".JURI::base()."images/M_images/rating_star.png' alt='rating' />";where JURIT_SITE is added (with some periods and double quotes) and a slash (/) is removed.

The new helper.php file is attached in a zip file.

With a little boy in the house I don't spend as much time on RSG2 anymore.

I still like RSG2, if you do too, please think about how you can invest some of your time in RSG2... the one remaining coding volunteer (Whazzup) can use your help!