Recent Topics

1 Oct 19, 2008 21:52    

This plugin allows your visitors to rate your posts using star ratings. By default they can rate the posts out of five stars, but it's easy to change that value in the backoffice plugin settings. Users with JavaScript enabled can vote without reloading the page using an AJAX call.

The plugin works when JavaScript is disabled by the reader, too. By default, each vote is checked against a list of IP addresses to make sure that it's not a duplicate, but this can be disabled in the backoffice.

Download v0.8.0 for b2evolution v4.1 and later
http://www.sonorth.com/travel/download/MDJG71X830

Older versions
http://sourceforge.net/projects/evocms-plugins/files/starrating_plugin/

Changelog:
v0.8.0 - 29 June 2012
* compatible with b2evolution 4.1 and later
* various fixes and improvements

v0.7.5 - 19.10.2008
* Top rated block now works as a widget.
* Fixed pop-up notes lightbox/avatars conflict.
* Fixed layout bug in evocamp skin.
* Transparent background in infoicon.gif image.

[Plugin] Star Rating

2 Feb 25, 2008 23:25

The rating works fine, but when I add the last line:

<?php $Plugins->call_by_code( 'starrating', array('display' Arrow 'toprated', 'limit' Arrow 5 ) ); ?>

I get this error ...

my db name is b2e; my table prefix is evo_
===================================
Top Rated An unexpected error has occured!
If this error persits, please report it to the administrator.
Go back to home page Additional information about this error:
MySQL error!
Table 'b2e.t_posts' doesn't exist(Errno=1146)
Your query:
SELECT DISTINCT post_ID , post_urltitle , total_value / total_votes AS rating, total_votes
FROM ( T_posts , evo_plugin_starrating_11_ratings) INNER JOIN evo_postcats ON post_ID = postcat_post_ID INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
WHERE cat_blog_id = 4
AND evo_plugin_starrating_11_ratings.id = T_posts.post_ID
AND total_votes >= 1
ORDER BY `rating` DESC
LIMIT 5

Have you resolved this issue?

I'm pretty sure that with new plugins (v2.* generation) you pretty much don't have to add code to the skin anymore. OTOH if this plugin specifically says it is for 2.* AND it says to add code then I guess it does.

3 Sep 05, 2008 19:55

I fixed this issue with Starrating plugin.
Can anybody try it before I update the download?

http://evocms-plugins.svn.sourceforge.net/viewvc/evocms-plugins/starrating_plugin/trunk/_starrating.plugin.php?revision=827

4 Oct 14, 2008 01:34

sam2kb wrote:

I fixed this issue with Starrating plugin.
Can anybody try it before I update the download?

http://evocms-plugins.svn.sourceforge.net/viewvc/evocms-plugins/starrating_plugin/trunk/_starrating.plugin.php?revision=827

i just had the time to test this one
i ve replaced the plugin file with the one you gave,

placed

<?php $Plugins->call_by_code( 'starrating', array('display' => 'toprated', 'limit' => 5 ) ); ?> 

as usual, but it was not succesful, i ve never been able to make that Top rated posts thing work, i d be really glad if you could solve it..

i got the following error

Fatal error: Call to a member function get_renderers() on a non-object in /home/tilqi/domains/tilqi.com/public_html/plugins/starrating_plugin/_starrating.plugin.php on line 212

which refers to :

// Check to see if we want a rating for this post
		$renders = $Plugins->validate_list( $Item->get_renderers() );

5 Oct 14, 2008 01:42

important edit to above post:

i have noticed that the plugin works and displays the top rated posts, but the error i ve mentioned above persists

8 Oct 14, 2008 01:48

The error tells you that "You either use another variable as $Item in your skin or you put the code outside of the posts loop" ;)

9 Oct 14, 2008 01:51

Try to edit the line 210 to

elseif( is_object($Item) )

10 Oct 14, 2008 01:53

sam2kb wrote:

The error tells you that "You either use another variable as $Item in your skin or you put the code outside of the posts loop" ;)

<?php $Plugins->call_by_code( 'starrating', array('id' => $Item->ID ) ); ?>

this one is in the post loop currently..

<?php $Plugins->call_by_code( 'starrating', array('display' => 'toprated', 'limit' => 5 ) ); ?>

and this goes to sidebar.inc.php right ? i ve placed it right before the sidebar container..

and what do you exactly mean when you say i use another variable $Item ? of course i do, for the post id, post title etc.. $Item->ID etc etc.. shouldnt i ??

11 Oct 14, 2008 01:58

sam2kb wrote:

Try to edit the line 210 to

elseif( is_object($Item) )

that seems to solve the problem, thank you very much...

one thing though, in IE6 i get script erros at the status bar.. which i suspect the starrating plugin may cause it, as the install is fresh and i dont use much scripts else than it atm, and also AFAI remember, it was kinda faulty, and you ve fixed those script (validation) errors previously, might it be the same issue again?

it says sth like:
error: 'bm' is null or not an object
line : 3
code: 0
char: 23522

14 Oct 14, 2008 12:12

sam2kb wrote:

Here's a demo http://ru.b2evo.net/dev/2/blog1.php
I didn't change anything. No PHP errors, no js errors in IE6.

i ve figured it out after disabling everything, it was the unexpected; google ie code js was causing the error.. strange.. dunno what is wrong with it :|

15 Oct 18, 2008 14:28

sam2kb wrote:

Try to edit the line 210 to

elseif( is_object($Item) )

Plugin works fine after adding that however i get

Notice: Undefined index: id in /home/tilqi/domains/tilqi.com/public_html/plugins/starrating_plugin/_starrating.plugin.php on line 224

which refers to :

WHERE id="'.$params['id'].'"');

in sidebar and in single post mode only.

http://i35.tinypic.com/r0pevp.jpg

16 Oct 18, 2008 16:28

ok, ok.. ignore the above post.. i -dunno- somehow added a 'starrating widget' in the sidebar, that caused it apparently, removing it solved the issue

17 Oct 18, 2008 16:38

I don't see any errors now, did you fix it?

18 Oct 18, 2008 16:54

sam2kb wrote:

I don't see any errors now, did you fix it?

tilqicom wrote:

i somehow added a 'starrating widget' in the sidebar, that caused it apparently, removing it solved the issue

if you like i can re-enable it for you to see the error :P

19 Oct 18, 2008 16:57

I'll check again on my dev blog. It's strange because I can't copy your errors.

20 Oct 18, 2008 17:04

sam2kb wrote:

I'll check again on my dev blog. It's strange because I can't copy your errors.

it seems that the plugin has created a 'widget' upon install.. is this the normal behaviour ? and if so ; what is that widget supposed to do..

it's the one causing the error when inserted..

21 Oct 18, 2008 17:12

You're right. I'm now fixing it.

23 Oct 18, 2008 22:18

sam2kb wrote:

tilqicom, can you try if it works now? You should use the widget instead of skin code to display the "Top rated" block. However the code should work also.

One more fix, the 'display' => 'notice' is not required any more.

http://evocms-plugins.svn.sourceforge.net/viewvc/evocms-plugins/starrating_plugin/trunk/_starrating.plugin.php?revision=895

cool, the widget works.. i have difficulties displaying pop up info, but i believe-hope- it's a particular issue related to me, ll let you know if i find anything, thanks for the fixes

24 Oct 18, 2008 22:58

Try to remove this code from skin, and enable pop-ups in settings

<?php $Plugins->call_by_code( 'starrating', array('display' => 'notice' ) ); ?>

25 Oct 19, 2008 09:05

sam2kb wrote:

Try to remove this code from skin, and enable pop-ups in settings

<?php $Plugins->call_by_code( 'starrating', array('display' => 'notice' ) ); ?>

did remove it, no luck still. and i havent modified the script or the php file of the plugin.i will try it on another install

26 Oct 19, 2008 20:53

I fixed pop-up notices, it was a lightbox/avatars conflict.
Update the starrating.js file

function sndReq(id_num, hturl)
{
	var $ = jQuery.noConflict();
	$('#unit_long'+id_num).html('<div style="height: 20px;"><em>Loading ...</em></div>');
	$.get(hturl, function(data) {
		if(data.indexOf('|') != -1) {
            update = data.split('|');
			$('#' + update[0]).html(update[1])
            if (update[2]) disp_notice(update[3]);
            //new Effect.Highlight(update[0], {startcolor: '#ff9900', endcolor: '#EEEEEE'});
		}
	})
}

function disp_notice(text)
{
	var $ = jQuery.noConflict();
	if ($('#ratingResults').length == 0) {
		$('html').append('<div id="ratingResults" style="display:none"></div>')
	}
	$('#ratingResults').html(text)
    el = $('#ratingResults');
    var theTop = 30;
    if (window.innerHeight)	{
  		  pos = window.pageYOffset
  	} else if (document.documentElement && document.documentElement.scrollTop) {
  		pos = document.documentElement.scrollTop
  	} else if (document.body) {
  		  pos = document.body.scrollTop
  	}
  	if (pos < theTop) pos = theTop;
  	else pos += 30;
	el.css('top', pos +'px');
	el.css('opacity', 0.01)
	el.show()
	el.fadeTo('slow', 0.8)
  	setTimeout('el.fadeOut("slow")', 4000);
}


27 Oct 19, 2008 21:47

Plugin updated

Top rated block works as a widget.
Fixed pop-up notes lightbox/avatars conflict.
Fixed layout bug in evocamp skin.
Transparent background in infoicon.gif image.

28 Nov 20, 2008 09:53

Hi there,

is it possible to reprogram this star raging plugin to work with comments?

In my modified b2e i'm using comments as a main and more important part of the blog, so i need to make users able to rate separate comments, which are still connected to particullar registered users.

can annyone help?

thanx
Ben

29 Dec 03, 2008 11:59

Hi there,

I'm an extreme novice and I'm using the B2 evolution to blog my website. I've managed to download the latest Starrating plugin but it says to put some code somewhere in the "post loop"... Sorry, but I have absolutely no idea what a post loop is.

Could someone please lend me some assistance? I don't mind doing the actual work but just not up with the jargon.

Thanks,
Sabrina
www.houkura.com

30 Dec 03, 2008 16:33

Welcome to the forums.

In skin directory http://www.houkura.com/b2evolution/blogs/skins/evocamp/ edit the file posts.main.php around the line 110

<?php
	$Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs)
?>            

<h2><?php $Item->title(); ?></h2>

<div style="float:right">
<?php $Plugins->call_by_code( 'starrating', array('id' => $Item->ID ) ); ?>
</div>

You can also do the same in single.main.php and page.main.php if you need stars in single posts and pages.

31 Dec 06, 2008 02:17

Hi,

I have a couple questions about the starratings plugin.

1) How can I get the version that tilqicom has on his site. The one with the bar looking image rather than the stars?

2) I would be fine with the stars, but I want 10 stars, and when I make it ten they overlap into the next column rather than resizing to fit in its normal space.

3) when using it as a widget on the sidebar is it possible to display a thumbnail above the text link that is attached to the post. If no thumbnail, then can it leave it as it is now.

Thanks,
Gene :-)

32 Dec 06, 2008 08:40

3. If you already put the function [url=http://forums.b2evolution.net/viewtopic.php?p=84132#84132]get_File_by_item_ID[/url] in hacks.php all you need is edit the following code in _starrating.plugin.php starting on line 489

if( ($rated_item = & $ItemCacheLight->get_by_ID( $results[$i]->post_ID, false )) !== false )
{
	echo $params['item_start'];
	if( $File = & get_File_by_item_ID($rated_item->ID) )
	{   // Display the first linked image
		echo '<img src="'.$File->get_thumb_url().'" alt="" />';
	} 
	echo '<a href="'.$rated_item->get_permanent_url().'">'.$rated_item->title.'</a>';
	echo $params['before_rating'].number_format( $results[$i]->rating, 1 ).$params['after_rating'];
	echo ' <span class="notes">'.$results[$i]->total_votes.' '.$this->T_('votes').'</span>';
	echo $params['item_end'];
}

33 Dec 07, 2008 16:31

2) I would be fine with the stars, but I want 10 stars, and when I make it ten they overlap into the next column rather than resizing to fit in its normal space.

In file plugins/starrating_plugin/stars.css between lines 85 and 97 edit the following code. Change 100px to 180 or 200px.

div.stars {
    width: 100px;
    text-align: left;
  }
.unit-rating li a.starinfo, .unit-rating li a:hover.starinfo {
    display: block;
    height: 13px;
    width: 13px;
    background: url('infoicon.gif') no-repeat top right;
    position: absolute;
    left: 100px;
    top: 3px;
  }

34 Dec 07, 2008 21:04

Thanks again!

That worked perfectly.

I am curious. Could I replace the star image? I looked and it shows the three different color stars when I click view on any of the three list within my CPanel File Manager.

The image I would want to replace it with is a clear globe, a greyed globe, and a blur and green globe which I am currently working on making those three colors.

Thanks,
Gene :-)

35 Dec 08, 2008 00:36

Try this

Change star image

It's not hard to change the star image. First, download the default image and look at it. It's three stars stacked on top of each other. The top star is the empty version, the middle star is the hover version, and the bottom star is the normal one that shows the average rating. Create your new image to match this template, then upload it to the /starrating_plugin/ folder. Then, edit the stars.css file to match your new file name. If your image has a width that's different than 20px, then you'll need to edit the two lines toward the top of stars.css that set the width. Then edit _starrating.plugin.php and find "var $width = 20;" and edit the value to match your image's width.

36 Dec 08, 2008 05:45

Thanks again. It worked and looks pretty good to me.

The first time I clicked I got an error message though. After reloading it let me click. To check I had someone else go and try clicking, and they also got the error message. When they reloaded it did not let them click the next time, and gave the error again.

Here is the message:

Forbidden
You don't have permission to access /htsrv/call_plugin.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

--------------------------------------------------------------------------------

Apache/2.2.10 (Unix) mod_ssl/2.2.10 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at worldblogosphere.com Port 80

38 Dec 09, 2008 13:29

Hi!

Does anybody have an idea, where's GENERAL difference between plugin's appearance in Firefox/IE6?

I've installed it just by doc, it works&looks great with Firefox (except for ru encoding, but this comes next :) )

And there's no popup to appear in IE. Popups at b2evolution.net work fine in the same browser, so the problem is somewhere on my website.

Yep, i forgot:
- b2evo 2.4.5
- starrating 0.7.5
- firefox 3.0.4
- IE 6.0.2900.2180.xpsp_sp2_qfe.080814-1242 if it's important
:D

39 Dec 09, 2008 16:17

There's an old version of the plugin running on b2evolution.net
Can you give a link to your site?

41 Dec 09, 2008 17:57

I found a problem. Seems like you use modified _html_footer.inc.php in your skin. Put this code in your template file before the closing </body> tag.

// Trigger plugin event, which could be used e.g. by a google_analytics plugin to add the javascript snippet here:
$Plugins->trigger_event('SkinEndHtmlBody');

42 Dec 09, 2008 18:46

Hah! That was damn easy!
Great thanks, sam2kb, now it works in IE! I don't wonder why firefox understands it all better than glitchy IE :D

One more issue left, now encoding-related one.
So
1) i do (re)load a page
2) i click "i" after stars - popup shows cyrillic properly
3) i click on stars - popup appears with "broken unicode"
4) i click "i" or stars again - encoding appears broken again

sam2kb, you seem to be familiar dealing with cyrillic problems, maybe you've faced this issue already?

Well, i hope i could fill locale's _global.php file fith those terrible &#xxx; but there should be a better way :D

PS. And, yes, this affects both ff&ie browsers

44 Dec 09, 2008 19:22

To fix the message encoding try to edit the code starting on line 285 in _starrating.plugin.php

function htsrv_vote( & $params ) 
{
	global $DB;

	locale_activate( 'ru-RU' );
	init_charsets($GLOBALS['current_charset']);
	
	$T_vote = $this->T_('vote');
	$T_votes = $this->T_('votes');

45 Dec 09, 2008 19:25

Hm, i should have thought better about piorities, but i didn't check validity for that long! :-/ It seems, that's time to really rearrange something. Thanks for your time, sam2kb, i'll check all that stuff.

46 Dec 09, 2008 19:57

sam2kb wrote:

To fix the message encoding try to edit the code

This didn't help, but i really have to clear up the template code first. Thanks again :D

47 Dec 09, 2008 19:58

I fixed the above code, can you try again.

48 Dec 09, 2008 20:46

Ok, here's the final version which will be included in the plugin.

function htsrv_vote( & $params ) 
{
	global $DB, $current_charset;
	
	if( !is_logged_in() )
	{	// Use blog locale if not logged in
		$BlogCache = & get_Cache( 'BlogCache' );
		if( $Blog = & $BlogCache->get_by_ID( $params['blog'], false, false ) )
		{
			locale_activate( $Blog->locale );
			init_charsets($current_charset);
		}
	}
	
	$T_vote = $this->T_('vote');
	$T_votes = $this->T_('votes');

49 Jan 04, 2009 15:52

I get this error after install:

Fatal error: Call to undefined function: require_js() in /home/dis000459/domains/cowpoop.nl/public_html/plugins/starrating_plugin/_starrating.plugin.php on line 149

what to do?

50 Jan 04, 2009 17:48

What version of b2evo are you using?
If it's not 2.x you should upgrade.

51 Jan 05, 2009 17:23

sam2kb wrote:

What version of b2evo are you using?
If it's not 2.x you should upgrade.

No 1.10.2

can't I use an older version of the starrating?

53 Mar 26, 2009 12:35

Hello,

I have a weird js conflict with this plugin when used with gallery plugin from balupton. i get this :

$("lightboxImage").style has no properties
 $('lightboxImage').style.margin = paddingSize + 'px';

when i disable the starating plugin, the error is gone !

any chance to correct this ?

54 Mar 29, 2009 06:57

Use version 0.6 with b2evo 1.x

55 Apr 02, 2009 10:27

I'm using version O.6 with b2evolution 2.4.6 - do i have to go back ????

56 Apr 02, 2009 14:56

How can you use Gallery plugin from balupton if it only works in b2evolution 1.x ?

Use version 0.6 in b2evolution 1.x, and version 0.76 in b2evolution 2.x or 3.x

57 May 05, 2009 00:06

Hello, is it possible to amend this one to rate comments in the same way like posts - the post is given by moderator and the comments are the answers to the post, these need to be rated. Is it possible to do in some simple way using this plugin?

thnx

Ben

60 Jun 01, 2009 20:43

Okay, I can't get this plugin figured out. I downloaded, installed, and edited the plugin (checked the box to allow voting) but on the instruction page it says to enter this code

<?php $Plugins->call_by_code( 'starrating', array('id' => $Item->ID ) ); ?>

5. to the index.main.php file for any skin where you want the star ratings to be used.

Put this in the post loop inside the bSmallPrint div or just below the post title.

Except I don't see either of those two things (bSmallPrint div or the post title) in the skin I am using (Simple Zen).

Am I totally missing something? Here is my index.main.php for Simple Zen:

<?php
/**
 * This is the main/default page template.
 *
 * For a quick explanation of b2evo 2.0 skins, please start here:
 * {@link http://manual.b2evolution.net/Skins_2.0}
 *
 * The main page template is used to display the blog when no specific page template is available
 * to handle the request (based on $disp).
 *
 * @package evoskins
 * @subpackage kubrick
 *
 * @version $Id: index.main.php,v 1.3 2007/10/01 01:06:31 fplanque Exp $
 */
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );

// This is the main template; it may be used to display very different things.
// Do inits depending on current $disp:
skin_init( $disp );



// -------------------------- HTML HEADER INCLUDED HERE --------------------------
skin_include( '_html_header.inc.php' );
// Note: You can customize the default HTML header by copying the generic
// /skins/_html_header.inc.php file into the current skin folder.
// -------------------------------- END OF HEADER --------------------------------
?>



<?php
// ------------------------- BODY HEADER INCLUDED HERE --------------------------
skin_include( '_body_header.inc.php' );
// Note: You can customize the default BODY heder by copying the generic
// /skins/_body_footer.inc.php file into the current skin folder.
// ------------------------------- END OF FOOTER --------------------------------
?>



<div id="content" class="narrowcolumn">

	<?php
		// ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
		messages( array(
			'block_start' => '<div class="action_messages">',
			'block_end'   => '</div>',
		) );
		// --------------------------------- END OF MESSAGES ---------------------------------
	?>

	<?php
		// ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
		request_title( array(
				'title_before'=> '<h2>',
				'title_after' => '</h2>',
				'title_none'  => '',
				'glue'        => ' - ',
				'title_single_disp' => true,
				'format'      => 'htmlbody',
			) );
		// ------------------------------ END OF REQUEST TITLE -----------------------------
	?>

	<?php
		// -------------- MAIN CONTENT TEMPLATE INCLUDED HERE (Based on $disp) --------------
		skin_include( '$disp$', array(
			) );
		// Note: you can customize any of the sub templates included here by
		// copying the matching php file into your skin directory.
		// ------------------------- END OF MAIN CONTENT TEMPLATE ---------------------------
	?>

</div>



<?php
// ------------------------- SIDEBAR INCLUDED HERE --------------------------
skin_include( '_sidebar.inc.php' );
// Note: You can customize the default BODY footer by copying the
// _body_footer.inc.php file into the current skin folder.
// ----------------------------- END OF SIDEBAR -----------------------------
?>



<?php
// ------------------------ SIDEBAR 2 INCLUDED HERE -------------------------
skin_include( '_sidebar_2.inc.php' );
// Note: You can customize the default BODY footer by copying the
// _body_footer.inc.php file into the current skin folder.
// ----------------------------- END OF SIDEBAR -----------------------------
?>



<?php
// ------------------------- BODY FOOTER INCLUDED HERE --------------------------
skin_include( '_body_footer.inc.php' );
// Note: You can customize the default BODY footer by copying the
// _body_footer.inc.php file into the current skin folder.
// ------------------------------- END OF FOOTER --------------------------------
?>



<?php
// ------------------------- HTML FOOTER INCLUDED HERE --------------------------
skin_include( '_html_footer.inc.php' );
// Note: You can customize the default HTML footer by copying the
// _html_footer.inc.php file into the current skin folder.
// ------------------------------- END OF FOOTER --------------------------------
?>

I did add it below the title section, but I don't see any changes to my posts. The only voting option I see is if you hit comment/feedback, you can vote from "poor" to "excellent." Is this all the star rating does? Put a star rating on the comment? I want stars on the actual post so people can just click on the star (like b2evo has on their pages).

Once you have the plugin installed and the settings the way you want them, then go the write tab and create a post. If you want the post to have the rating system, then make sure that there's a check in the box next to 'Star Rating' in the 'Text renderers' section in the lower right.

I did this.

Now the stars should appear next to your post. To vote, click on the star you're voting for. If JavaScript is enabled, it will say 'Loading . . .', then display the new rating and thank you for your vote. If JavaScript is disabled, then the page will reload and the new rating will be shown.

But I don't get this. I am using Firefox and I am sure I have javascript enabled because I can vote and see starts on b2evo's pages.

I feel so stupid. What am I missing?

61 Jun 01, 2009 21:46

In Simple Zen you have to edit posts.main.php and single.main.php

You also need to update stars.css http://evocms-plugins.svn.sourceforge.net/viewvc/evocms-plugins/starrating_plugin/trunk/stars.css?revision=1123

edit

<div class="postmetadata">
<ul>

<?php
    $Item->author( array(
        'before'			=> '<li class="author">'.T_( 'By').' ',
        'after' 			=> '</li>',
    ) );
?>

to

<div class="postmetadata">
<ul>
            
<?php
    echo '<li>';
    $Plugins->call_by_code( 'starrating', array('id' => $Item->ID ) );
    echo '</li>';
?>

<?php
    $Item->author( array(
        'before'			=> '<li class="author">'.T_( 'By').' ',
        'after' 			=> '</li>',
    ) );
?>

62 Jun 01, 2009 22:08

Okay, I thought I was going nuts!

That said, I found the spot in posts.main.php, but in single.main.php it's:

<p class="postmetadata alt">

but I changed it and it seems to work.

I didn't have a stars.css so added the css to the stylesheet.css - but now I get NO stars unless I roll over them:

http://www.hudson2001.com/blogs/index.php/recipes/

Thoughts?

63 Jun 01, 2009 22:11

stars.css is in plugins/starrating_plugin directory

65 Jun 01, 2009 22:20

Eek, now I get an assortment of stars all at once! What did I screw up? :o

ETA: FIXED IT!

THANKS!! WOOHOO!!!!!!!!

ETA #2: Whoops...still no stars visible on unrated items (I am going back to each entry and checking the box to allow rating). You can see the "i" but no stars.

66 Jun 01, 2009 22:24

I gave you 5 stars for "Peanut Pudding" ;)

To enable rating for all posts select "silent" in plugin settings > rendering

68 Jun 01, 2009 22:28

I changed it to stealth and I still only get stars when rolling over [on unrated items].

69 Jun 01, 2009 22:34

change this in stars.css, line 17

background: top left repeat-x;

to

background-position: top left;
background-repeat: repeat-x;

70 Jun 01, 2009 22:36

YOU ROCK!

I tried to give you reputation points, but it said "To give reputation the same user you should spread it around." Hmmm. Other than that being very strange grammatically, I don't think I've given it to you before?!?!

72 Jun 01, 2009 22:41

It means that u cant rep the same person consecutively twice. u hv to rep any other person before repping him again.

73 Jun 01, 2009 22:42

Okay. I will try to remember. :)

That said, now I am having another issue. :(

I went back to edit my posts so I can add the star rating system (by checking the box under Text Renderers) and it no longer appears! Not even on posts I've already added the ratings to! Does this have to do with that stealth thing?

74 Jun 01, 2009 22:46

Never mind. I got it. Stealth means it shows up automatically and I don't have to check the box, right? Because all my posts on that blog have the stars there without me changing anything.

76 Jun 01, 2009 22:47

Right.

//edit: sam2kb was faster than me. ;-)

77 Jun 01, 2009 22:49

I can give you rep points in 30 minutes. :)

78 Nov 03, 2009 01:26

I have an old blog currently using the star rating plugin without any problems. I made a new blog with the Pyrmont skin, and want it to use the star rating also. It kinda works on the new blog, but doesn't load correctly, and shows duplicate sets of stars. http://web420.com/blog/multiple-realities.php.

I didn't add the code: <?php $Plugins->call_by_code( 'starrating', array('id' => $Item->ID ) ); ?> because there is no bSmallPrint div inside the index.main.php for this skin. I am not sure if I need to add it because the star rating already shows up. Is this duplicate star issue because I need to to paste the code somewhere? Where would I add the code for the Prymont skin since it doesn't have a bSmallPrint div inside the index.main.php? If that isn't the issue what else could be causing the star ratings to not load correctly?

Thanks,
Robert

79 Nov 03, 2009 02:53

You don't need to add any code because the skin you're using already has it.
Make sure you're using the latest version of the plugin. When you update the plugin, replace [u]all files[/u]

80 Mar 19, 2010 04:48

I can't get it to work at my install, tried everything... what do I do wrong?

Nothing displays, accept the error on line 212, no stars, nothing.

81 Apr 09, 2010 20:39

So I've been using the star rating plugin on my site:

http://birthdayshoes.com/store/kayakshed

But it seems as though for each instance, no matter what the rating is, it only displays one star. I updated the CSS -- I'm guessing this has something to do with the actual plugin. Anyone have any bright, starry ideas as to what might be the problem?

82 Apr 09, 2010 23:50

Your plugin doesn't add CSS styles in <head> section. Make sure you're running the latest version 0.7.7

Please post the content of your _star_rating.plugin.php

83 Apr 10, 2010 17:27

Hey sam - thanks for responding.

Definitely running the latest. Here is the php file:

<?php
/**
 * This file implements the Star Rating plugin for
 * {@link http://b2evolution.net b2evolution}.
 *
 */
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );

/**
 * 
 * TODO:
 * Antispam (and robot) hidden first option, then block
 * This is what is skewing votes low
 * Allow restricting to members
 * Record who voted for what
 * Ability to change vote
 * Ability to display main column posts in rating order
 * Remove some repetition of code
 *
 */
class starrating_plugin extends Plugin
{
	var $version = '0.7.7';
	var $priority = 50;
	var $code = 'starrating';
	var $author = 'Danny Ferguson';
	var $help_url = '';
	var $width = 20;  // Width of individual star in px.
	var $apply_rendering = 'opt-in';
	
	/**
	 * @internal
	 */
	var $disp_params = array();

	/**
	 * Set name and desc.
	 */
	function PluginInit()
	{
		$this->name = $this->T_('Star Rating');
		$this->short_desc = $this->T_('AJAX-powered star ratings for posts.');
	}

	
	function starrating_plugin()
	{
		$this->PluginInit();
	}

	
	function GetDefaultSettings()
	{
		return array(
		'outof' => array(
			'label' => $this->T_('Out of'),
			'defaultvalue' => 5,
			'note' => $this->T_('How many stars are possible?'),
			'type' => 'integer',
			'size' => '2'
		),
		'checkip' => array(
			'label' => $this->T_('Check IP'),
			'defaultvalue' => 1,
			'note' => $this->T_('Check IP to prevent multiple votes on one post from one person.'),
			'type' => 'checkbox'
		),
		'popup' => array(
			'label' => $this->T_('Pop-up info'),
			'defaultvalue' => 1,
			'note' => $this->T_('Show info and notices in pop-ups that fade in and out. Requires javascript, but does not disrupt layout. This option requires an additional skin tag, see the Readme file.'),
			'type' => 'checkbox'
		),
		'inline' => array(
			'label' => $this->T_('Inline info'),
			'defaultvalue' => 0,
			'note' => $this->T_('Show info and notices just below the stars.  Works with or without javascript enabled, but may disrupt layout.'),
			'type' => 'checkbox'
		) );
	}


	/**
	 * Create the table to store the rating votes
	 *
	 * @return array
	 */
	function GetDbLayout()
	{
		return array("CREATE TABLE ".$this->get_sql_table('ratings')." (
						`id` varchar(11) NOT NULL,
						`total_votes` int(11) NOT NULL default '0',
						`total_value` int(11) NOT NULL default '0',
						`used_ips` longtext,
						`blog_id` int(11) NOT NULL default '0', PRIMARY KEY (`id`) );");
	}

	
	function RenderItemAsHtml( & $params )
	{
		// This is not actually a renderer, 
		// we're just using the checkbox
		// to see if we should display for
		// the given post.
	}
	
	
	/**
	* Get definitions for widget specific editable params
	*
	* @see Plugin::GetDefaultSettings()
	* @param local params like 'for_editing' => true
	*/
	function get_widget_param_definitions( $params )
	{
		return array(
				'title' => array(
					'label' => $this->T_('Widget title'),
					'note' => $this->T_('Widget title displayed in skin.'),
					'defaultvalue' => $this->T_('Top Rated'),
				),
				'limit' => array(
					'label' => $this->T_('Display'),
					'note' => $this->T_('Max items to display.'),
					'size' => 3,
					'defaultvalue' => 5,
					'type' => 'integer',
				),
				'minvote' => array(
					'label' => $this->T_('Minimum votes'),
					'note' => $this->T_('Minimum number of votes required to be in the list.'),
					'size' => 3,
					'defaultvalue' => 1,
					'type' => 'integer',
				),
				'display' => array(
					'label' => $this->T_('Method'),
					'defaultvalue' => 'top_rated',
					'disabled' => 1,
				),
			);
	}
	
	
	function SkinBeginHtmlHead( & $params )
	{
		global $plugins_url;

		$outof = $this->Settings->get('outof');
		// Display the head code:
		require_js('#jquery#');		
		require_js($plugins_url.'starrating_plugin/starrating.js', false);
		require_css($plugins_url.'starrating_plugin/stars.css', false);
		
		/** echo '<style type="text/css">'."\n";
		echo '.unit-rating { width: '.$outof * $this->width.'px }'."\n";
		for( $ncount = 1; $ncount <= $outof; $ncount++ )
		{
			echo '.unit-rating a.r'.$ncount.'-unit { left: '.($ncount - 1) * $this->width.'px }'."\n";
			echo '.unit-rating a.r'.$ncount.'-unit:hover { width: '.$ncount * $this->width.'px }'."\n";
		}
		echo "</style>\n"; */
		return true;
	}
	
	
	function SkinEndHtmlBody( & $params )
	{
		if( !defined('RATING_NOTICE_ADDED') )
			echo '<div id="ratingResults" style="display:none"></div>';		
	}
	
	
	function SkinTag( $params )
	{
  		global $plugins_url, $DB, $Item, $Plugins, $blog, $Blog;
  		
		$T_vote = $this->T_('vote');
		$T_votes = $this->T_('votes');		
		$outof = $this->Settings->get('outof');
		
  		if( !isset($params['display']) ) $params['display'] = 'stars';

  		if( $params['display'] == 'notice' )
		{	// Deprecated
  			echo '<div id="ratingResults" style="display:none"></div>';
			define( 'RATING_NOTICE_ADDED', true );
  		}
		elseif( $params['display'] == 'toprated' )
		{	// Skin method (deprecated)
			$error_msg = '<div class="action_messages"><div class="log_error">';
			$error_msg .= 'This method is deprecated!<br />Use the <b>Star Rating</b> widget to display top rated posts.';
			$error_msg .= '<br /><br />You should delete the "Top Rated" code from skin.';
			$error_msg .= '</div></div>';
			
			//echo $error_msg;	// Display error
						
			$this->disp_top_rated( $params );
		}
		elseif( $params['display'] == 'top_rated' )
		{	// Widget
			$this->disp_top_rated( $params );
		}
		elseif( $params['display'] == 'stars' && is_object($Item) )
		{	// Display the rating code for an Item:
						
			// Check to see if we want a rating for this post
			$renders = $Plugins->validate_list( $Item->get_renderers() );
			
			// If the renderer checkbox is unchecked, then display nothing
			if( !in_array($this->code, $renders) ) return false;
			
			$ip = $_SERVER['REMOTE_ADDR'];
			$r = $DB->get_row('
						SELECT total_votes, total_value, used_ips
						FROM '.$this->get_sql_table('ratings').'
						WHERE id='.$DB->quote( $params['id'] ) );
			
			if( isset($r) ) $tense = ($r->total_votes == 1) ? $T_vote : $T_votes;
			?>
			
			<div id="unit_long<?php echo $Item->ID ?>">
			  <div id="rating"><h4><center>Store Rating</center></h4>
        <ul class="unit-rating">
			 
				<?php
				echo '<li class="current-rating" style="width: '.@number_format($r->total_value / $r->total_votes , 2 ) *
								$this->width.'px">'.$this->T_('Currently').' '.@number_format($r->total_value / $r->total_votes , 2 ).'/'.$outof.'</li>';
				
				for( $ncount = 1; $ncount <= $outof; $ncount++ )
				{
					// AJAX url:
					$hturl = $this->get_htsrv_url('vote', array('vote' => $ncount, 'ip' => $ip, 'id' => $Item->ID, 'blog' => $blog ) ); 
					// Url for non-JS browsers
					$current_url = $Blog->get('url');
					$hturlnojs = $this->get_htsrv_url('vote', array('vote' => $ncount, 'ip' => $ip, 'id' => $Item->ID, 'returnto' => $current_url, 'blog' => $blog ) );
					
					echo '<li><a href="'.$hturlnojs.'" title="'.$ncount.' '.$this->T_('out of').' '.$outof.'" class="r'.$ncount.'-unit"
							onclick="javascript:sndReq(\''.$Item->ID.'\', \''.$hturl.'\');return false">'.$ncount.'</a></li>'."\n";
				}
				
				$ncount=0; // resets the count 
				if( !empty($r->total_votes))
				{
					$avg = @number_format($r->total_value / $r->total_votes, 1);
					$total = $r->total_votes;
				}
				else
				{
					$avg = '0.0';
					$total = 0;
				}
				$tense = ($total == 1) ? $T_vote : $T_votes;
				
				if( $this->Settings->get('popup'))
				{
					echo '<li><a href="javascript:void(0);" onclick="disp_notice(\'&lt;p class=\\\'ratingNotes\\\'>'.
								sprintf( /*TRANS: Rating: 34 out of 50 votes cast*/ $this->T_('Rating: %s out of %d %s cast'),
								'&lt;strong>'.$avg.'&lt;/strong>', $total, $tense ).'&lt;/p>\'); return false;" class="starinfo"><span>i</span></a></li>';			
				}
				?>
                
			  </ul>
              
				<?php
				if( $this->Settings->get('inline') )
				{
					echo '<p class="ratingNotes">'.sprintf( $this->T_('Rating: %s out of %d %s cast'),
								'<strong>'.$avg.'</strong>', $total, $tense ).' </p>';
				}
				?>
                </div>
			</div>
            
			<?php
			return true;
		}
	}
	
	
	// Set the plugin up to take AJAX calls
	function GetHtsrvMethods() 
	{
		return array( 'vote' );
	}
	
	
	function htsrv_vote( & $params ) 
	{
		global $DB, $current_charset;
		
		if( !is_logged_in() )
		{	// Use blog locale if not logged in
			$BlogCache = & get_Cache( 'BlogCache' );
			if( $Blog = & $BlogCache->get_by_ID( $params['blog'], false, false ) )
			{
				locale_activate($Blog->locale);
				init_charsets($current_charset);
			}
		}
		
		$T_vote = $this->T_('vote');
		$T_votes = $this->T_('votes');
		
		$outof = $this->Settings->get('outof');
		$ip_num = $params['ip'];
		$id_sent = $params['id'];
		$vote_sent = $params['vote'];
		$blog = $params['blog'];
		$tableName = $this->get_sql_table('ratings');
		
		$r = $DB->get_row('
					SELECT total_votes, total_value, used_ips
					FROM '.$this->get_sql_table('ratings').'
					WHERE id = '.$DB->quote( $params['id'] ) );
		
		$checkIP = ( empty( $r->used_ips) ? NULL : unserialize($r->used_ips) ); 
		$count = ( empty( $r->total_votes ) ? NULL : $r->total_votes );
		$current_rating = ( empty( $r->total_value ) ? 0 : $r->total_value );
		$sum = $params['vote'] + $current_rating;
		$tense = ($count == 1) ? $this->T_('vote') : $this->T_('votes');

		//check see if this ip has voted before or not
		if( $this->Settings->get('checkip') )
		{
			$voted = $DB->get_var( 'SELECT count(*) FROM '.$tableName
								  .' WHERE used_ips LIKE '.$DB->quote( '%'.$ip_num.'%' )
								  .' AND id = '.$DB->quote( $id_sent ) );
		}
		// the above pattern match ip:suggested by Bramus! //http://www.bram.us/
		
		if( !empty($voted) )
		{
			$new_back = '<ul class="unit-rating">'."\n".
						'<li class="current-rating" style="width:'.@number_format($current_rating/$count,2) *
								$this->width .'px">'.$this->T_('Current rating').'.</li>'."\n";
			
			for( $ncount = 1; $ncount <= $outof; $ncount++ )
			{ 
				$new_back .= "<li class=\"r{$ncount}-unit\">{$ncount}</li>\n";
			}

			if( $this->Settings->get('popup'))
			{
		    	$new_back .= '<li><a href="javascript:void(0);" onclick="disp_notice(\'&lt;p class=\\\'ratingNotes\\\'>'.
						sprintf( $this->T_('Rating: %s out of %d %s cast'), '&lt;strong>'.@number_format($r->total_value / $r->total_votes, 1).'&lt;/strong>',
						$r->total_votes, $tense ).'&lt;/p>\'); return false;" class="starinfo"><span>i</span></a></li>';
			}
			$new_back .= '</ul>';
			
			// show the current value of the vote with the current numbers
			$notice = '<p class="ratingNotes">'.sprintf( $this->T_('Rating: %s out of %d %s cast'),
						'<strong>'.@number_format($current_rating/$count,1).'</strong>', $count, $tense ).
						'<br /><span class="error">'.$this->T_('You have previously voted').'!</span></p>';
		}
		else
		{
			if( $sum == 0 )
			{
				$added=0; //checking to see if the first vote has been tallied
			}
			else
			{
				$added=$count+1; //increment the current number of votes
			}

			if( is_array($checkIP) )
			{
				array_push($checkIP,$ip_num); //if it is an array i.e. already has entries the push in another value
			}
			else
			{
				$checkIP=array($ip_num); //for the first entry
			}

			$insert=serialize($checkIP);

			// see if the ID already exists
			$idexists = $DB->get_var( 'SELECT count(*) FROM '.$tableName
									 .' WHERE id='.$DB->quote( $id_sent ) ); 

			if( $idexists == true )
			{
				$DB->query( 'UPDATE '.$tableName.' SET total_votes='.$DB->quote( $added )
						   .', total_value='.$DB->quote( $sum ).', used_ips='
						   .$DB->quote( $insert ).', blog_id='.$DB->quote( $blog )
						   .' WHERE id='.$DB->quote( $id_sent ) );
			}
			else
			{
				$DB->query( 'INSERT INTO '.$tableName.' VALUES ('
						   .$DB->quote( $id_sent ).', '.$DB->quote( $added )
						   .', '.$DB->quote( $sum ).', '.$DB->quote( $insert )
						   .', '.$DB->quote( $blog ).')' );
			}

			//update the database and echo back the new stuff
			$r = $DB->get_row( 'SELECT total_votes, total_value, used_ips '
							  .'FROM '.$tableName.' WHERE id='.$DB->quote( $id_sent ) );
			
			$count = $r->total_votes; //how many votes total
			$current_rating = $r->total_value; //total number of rating added together and stored

			$new_back = '<ul class="unit-rating">'."\n".
						'<li class="current-rating" style="width:'.@number_format($current_rating/$count,2) * 
						$this->width.'px">'.$this->T_('Current rating').'.</li>'."\n";
			
			for( $ncount = 1; $ncount <= $outof; $ncount++ )
			{ 
				$new_back .= "<li class=\"r{$ncount}-unit\">{$ncount}</li>\n";
			}
			
			if( $this->Settings->get('popup') )
			{
				$new_back .= '<li><a href="javascript:void(0);" onclick="disp_notice(\'&lt;p class=\\\'ratingNotes\\\'>'.
						sprintf( $this->T_('Rating: %s out of %d %s cast'), '&lt;strong>'.@number_format($r->total_value / $r->total_votes, 1).'&lt;/strong>',
						$r->total_votes, $tense ).'&lt;/p>\'); return false;" class="starinfo"><span>i</span></a></li>';
			}
			$new_back .= '</ul>';
			
			$tense = ($count == 1) ? $T_vote : $T_votes;
			$notice = '<p class="ratingNotes">'.sprintf( $this->T_('Rating: %s out of %d %s cast'),
						'<strong>'.@number_format($sum/$added,1).'</strong>', $added, $tense ).
						'<br /><span class="success">'.$this->T_('Thank you for your vote').'!</span></p>';
		}
		
		// If JavaScript is off, then just send them back to the referer
		if( isset($params['returnto']) )
		{
			header('location: '.$params['returnto']);
		}
		else
		{
			//name of the div id to be updated | the html that needs to be changed
			//$output = "unit_long$id_sent|$new_back";
			$output = "unit_long$id_sent|$new_back";
			if( $this->Settings->get('inline') ) $output .= "$notice";
			if( $this->Settings->get('popup') ) $output .= "|ratingResults|$notice";
			echo $output;
		}
	}
	
	
	// Display the Top Rated block
	function disp_top_rated( $params )
	{
		global $DB, $blog;
		
		if( !isset($params['title'])) $params['title'] = $this->T_('Top Rated');	// Title
		if( !isset($params['before_rating'])) $params['before_rating'] = ' (';		// What comes before and after the comment count
		if( !isset($params['after_rating'])) $params['after_rating'] = ')';			// How many of the top posts to show
		if( !isset($params['limit'])) $params['limit'] = 5;							// Limit
		if( !isset($params['minvote'])) $params['minvote'] = 1;						// Minimum number of votes required to be in the list
		$this->init_display( $params );
		
		// Deprecated
		if( !isset($params['block_start'])) $params['block_start'] = '<div class="bSideItem">';
		if( !isset($params['block_end'])) $params['block_end'] = '</div>';
		if( !isset($params['block_title_start'])) $params['block_title_start'] = '<h3>';
		if( !isset($params['block_title_end'])) $params['block_title_end'] = '</h3>';
		if( !isset($params['list_start'])) $params['list_start'] = '<ol>';
		if( !isset($params['list_end'])) $params['list_end'] = '</ol>';
		if( !isset($params['item_start'])) $params['item_start'] = '<li>';
		if( !isset($params['item_end'])) $params['item_end'] = '</li>';
		
		$sql = "
			SELECT DISTINCT post_ID , total_value / total_votes AS rating, total_votes
			FROM ( T_items__item , ".$this->get_sql_table('ratings').") 
			INNER JOIN T_postcats ON post_ID = postcat_post_ID
			INNER JOIN T_categories ON postcat_cat_ID = cat_ID
			WHERE cat_blog_id = ".$blog." 
			AND ".$this->get_sql_table('ratings').".id = T_items__item.post_ID
			AND total_votes >= ".$params['minvote']."
			ORDER BY `rating` DESC
			LIMIT ".$params['limit'];
		
		$results = $DB->get_results($sql);
	
		if( empty($results) ) return;
		if( empty($results[0]->rating) ) return;
		
		$ItemCacheLight = & get_Cache( 'ItemCacheLight' );
		
		// START DISPLAY:
		echo $params['block_start'];
		echo $params['block_title_start'];
		echo $params['title'];
		echo $params['block_title_end'];
		
		echo $params['list_start'];
		for( $i = 0; $i < $params['limit']; $i++ )
		{
			// Stop the loop if you get to a post with 0 comments
			if( empty( $results[$i]->rating ) ) break;
			
			if( ($rated_item = & $ItemCacheLight->get_by_ID( $results[$i]->post_ID, false )) !== false )
			{
				echo $params['item_start'];
				echo '<a href="'.$rated_item->get_permanent_url().'">'.$rated_item->title.'</a>';
				echo $params['before_rating'].number_format( $results[$i]->rating, 1 ).$params['after_rating'];
				echo ' <span class="notes">'.$results[$i]->total_votes.' '.$this->T_('votes').'</span>';
				echo $params['item_end'];
			}
		}
		echo $params['list_end'];	
		echo $params['block_end'];
	}
	
	
	/**
	 * Sets all the display parameters
	 * these will either be the default display params
	 * or the widget display params if it's in a container
	 *
	 * @param array $params
	 */
	function init_display( $params = array() )
	{ // Merge Default settings (from this plugin) with basic widget settings into array $disp_params
		$temp = $this->get_widget_param_definitions( array() );
		foreach( $temp as $setting => $values )
			$this->disp_params[ $setting ] = ( isset( $params[ $setting ] ) ? $params[ $setting ] : $this->Settings->get( $setting ) );

		foreach( $params as $param => $value )
			$this->disp_params[ $param ] = $value;
	}
}


?>

Also, just double-checked and the CSS is being called in the header (though I probably should merge it into my main style.css sheet to reduce calls on the server and speed up the site right?).

Here is that file:

http://birthdayshoes.com/plugins/starrating_plugin/stars.css

84 Apr 10, 2010 21:48

I was talking about this bit of code, it's commented out. Just uncomment it and you should be fine.

/**
echo '<style type="text/css">'."\n";
      echo '.unit-rating { width: '.$outof * $this->width.'px }'."\n";
      for( $ncount = 1; $ncount <= $outof; $ncount++ )
      {
         echo '.unit-rating a.r'.$ncount.'-unit { left: '.($ncount - 1) * $this->width.'px }'."\n";
         echo '.unit-rating a.r'.$ncount.'-unit:hover { width: '.$ncount * $this->width.'px }'."\n";
      }
      echo "</style>\n";
*/

85 Apr 11, 2010 14:16

Ok so did that -- still not showing up for me though :( (I see the css in the head too)

86 Apr 11, 2010 19:38

Some styles in your style.css breaks the stars. I can see them if I disable style.css in FF web developer.

Try playing with styles.css, especially with styles for <li> and <ul> tags

87 Apr 12, 2010 15:10

Thanks for pointing me in the right direction -- here's what I had to do it to fix it (and I suspect this will be a problem for anyone else using an evocamp based theme).

In stars.css, find around row three or four


.unit-rating { background-image: url("star_rating.gif") }

To that, add background: none; so it looks like this:

.unit-rating { background: none; background-image: url("star_rating.gif") }

That fixed it for me (nothing like a little trial and error CSS to kick off your monday morning!)

88 Mar 12, 2012 14:59

Hello,

I installed the star rating plugin on the Floral skin (http://skins.b2evo.net/2/index.php?tempskin=Floral).

When a post has no vote is shows fine (white stars only) but when the post gets voted the starts are duplicated like there are two rows of them, one row with white starts and one with yellow stars on top of the other but a little but on the right.

On other skins (b2evo_ru for example) the plugin works fine.

Can you please give me a clue what I should modify to make it work?

Thanks in advance.
[/img]

89 Mar 12, 2012 15:21

Hello again,

Just found something using firebug in the style.css of the Floral skin:

.entry ul li,
.entry ol li,
#content ul li,
#content ol li {
margin-left: 25px;
}

if I change margin-left: 0px; the two rows of starts are perfectly align to the left and the duplicate effect disappears.
I'm not a web programmer but I think if I make this modification in the .css I might mess something else.

What is your advice ?

Thanks

90 Jun 15, 2012 01:41

Hello.

Can anyone direct me to the star rating plugin download?

Ty much :)

92 Jun 15, 2012 06:19

Thank you much! Always.

93 Jun 29, 2012 21:58

Plugin updated to v0.8.0
* compatible with b2evolution 4.1 and later
* various fixes and improvements

94 Jul 28, 2012 03:56

sam2kb wrote:

Plugin updated to v0.8.0
* compatible with b2evolution 4.1 and later
* various fixes and improvements

I have installed the latest version of the plug-in and I am seeing an issue with the plugin when you extend the number of stars pass five. The little "button" to display the vote results sits in the middle of the stars. I have been trying to figure out exactly what you did here; both in the php and the css. I see you create a li to hold this and that the <li>s are floated left but at the same time I see absolute positioning with a setting for left: for the anchor tag. I thought take the anchor out of the ul but that resulted in 123456789i running down the right of the page. I can keep trying to hack this but thought that since you wrote the plugin you can probably more quickly get this resolved or point me in the right direction.

95 Jul 28, 2012 07:18

Thanks for the info, I'll check that.

96 Aug 01, 2012 18:22

sam2kb wrote:

Thanks for the info, I'll check that.

This is a simple fix. The problem is that the location is fixed and then a left: position stated in the CSS. Move the left: out of the CSS and put that in the script and have PHP calculate what the left: position should be based on the number of stars. I have yet to implement this as I just decided to change the left: value in the CSS. However, to have it where it can be more flexible, we should calculate that position from the number of stars so that it automatically changes when a user changes the number of stars.

Thanks for your work on this star rating plugin; it is quite nice and works beautifully. :D

97 Jul 20, 2013 00:04

Hi,

I have upgraded to 5.0.4.
Earlier I used to see the star rating in the feedback form, but now after upgrading, I'm unable to get the star rating the at the feedback form.
Appreciate you help.
Link to blog: http://nerurkars.in/blogs

98 Jul 20, 2013 01:38

Turn it on in blog settings > features > comments

99 Jul 20, 2013 09:51

Thanks a lot, François. It worked.


Form is loading...