[Plugin] Star Rating
Goto page 1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic   printer-friendly view    b2evolution Forum Index -> Plugins & Extensions
View previous topic :: View next topic  
Author Message
hugo
New Poster
New Poster

Joined: 10 Feb 2008
Posts: 2
add or subtract from this member's reputationadd or subtract from this member's reputation

PostPosted: Sun Feb 10, 2008 6:55    Post subject: [Plugin] Star Rating Reply with quote

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 the latest version



Quote:
Changelog:
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.
Back to top
View user's profile Send private message
EdB
/bb|[^b]{2}/

Joined: 05 Jan 2004
Posts: 7123
Reputation: 140.9 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 90

PostPosted: Mon Feb 25, 2008 17:25    Post subject: Reply with quote

Quote:
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.
Back to top
View user's profile Send private message
sam2kb
da ruski mafia

Joined: 02 Dec 2007
Posts: 2927
Reputation: 162.4Reputation: 162.4 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 53

PostPosted: Fri Sep 05, 2008 12:55    Post subject: Reply with quote

I fixed this issue with Starrating plugin.
Can anybody try it before I update the download?
Code:
http://evocms-plugins.svn.sourceforge.net/viewvc/evocms-plugins/starrating_plugin/trunk/_starrating.plugin.php?revision=827

_________________
Russian b2evolution | Download
Back to top
View user's profile Send private message Visit poster's website
tilqicom
Guru
Guru

Joined: 14 Nov 2007
Posts: 1624
Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 20

PostPosted: Mon Oct 13, 2008 18:34    Post subject: Reply with quote

sam2kb wrote:
I fixed this issue with Starrating plugin.
Can anybody try it before I update the download?
Code:
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
Code:
<?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


Quote:
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 :

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

_________________


.: linkback ≠ spam, yes to linkback, no to spam Shy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tilqicom
Guru
Guru

Joined: 14 Nov 2007
Posts: 1624
Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 20

PostPosted: Mon Oct 13, 2008 18:42    Post subject: Reply with quote

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

_________________


.: linkback ≠ spam, yes to linkback, no to spam Shy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sam2kb
da ruski mafia

Joined: 02 Dec 2007
Posts: 2927
Reputation: 162.4Reputation: 162.4 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 53

PostPosted: Mon Oct 13, 2008 18:42    Post subject: Reply with quote

Can you download the latest version and try again.
_________________
Russian b2evolution | Download
Back to top
View user's profile Send private message Visit poster's website
tilqicom
Guru
Guru

Joined: 14 Nov 2007
Posts: 1624
Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 20

PostPosted: Mon Oct 13, 2008 18:48    Post subject: Reply with quote

sam2kb wrote:
Can you download the latest version and try again.


yea, replaced the file and reloaded the plugin, and i ve even re-installed the plugin to make sure, still same.. you can see it at tilqi.com mainpage temporarily at the bottom of the sidebar

_________________


.: linkback ≠ spam, yes to linkback, no to spam Shy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sam2kb
da ruski mafia

Joined: 02 Dec 2007
Posts: 2927
Reputation: 162.4Reputation: 162.4 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 53

PostPosted: Mon Oct 13, 2008 18:48    Post subject: Reply with quote

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" Wink
_________________
Russian b2evolution | Download
Back to top
View user's profile Send private message Visit poster's website
sam2kb
da ruski mafia

Joined: 02 Dec 2007
Posts: 2927
Reputation: 162.4Reputation: 162.4 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 53

PostPosted: Mon Oct 13, 2008 18:51    Post subject: Reply with quote

Try to edit the line 210 to
PHP:
elseif( is_object($Item) ) 

_________________
Russian b2evolution | Download
Back to top
View user's profile Send private message Visit poster's website
tilqicom
Guru
Guru

Joined: 14 Nov 2007
Posts: 1624
Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 20

PostPosted: Mon Oct 13, 2008 18:53    Post subject: Reply with quote

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" Wink





<?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 ??

_________________


.: linkback ≠ spam, yes to linkback, no to spam Shy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tilqicom
Guru
Guru

Joined: 14 Nov 2007
Posts: 1624
Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 20

PostPosted: Mon Oct 13, 2008 18:58    Post subject: Reply with quote

sam2kb wrote:
Try to edit the line 210 to
PHP:
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

_________________


.: linkback ≠ spam, yes to linkback, no to spam Shy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sam2kb
da ruski mafia

Joined: 02 Dec 2007
Posts: 2927
Reputation: 162.4Reputation: 162.4 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 53

PostPosted: Mon Oct 13, 2008 19:00    Post subject: Reply with quote

Let me check it in IE6
_________________
Russian b2evolution | Download
Back to top
View user's profile Send private message Visit poster's website
sam2kb
da ruski mafia

Joined: 02 Dec 2007
Posts: 2927
Reputation: 162.4Reputation: 162.4 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 53

PostPosted: Mon Oct 13, 2008 19:14    Post subject: Reply with quote

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.

_________________
Russian b2evolution | Download
Back to top
View user's profile Send private message Visit poster's website
tilqicom
Guru
Guru

Joined: 14 Nov 2007
Posts: 1624
Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 20

PostPosted: Tue Oct 14, 2008 5:12    Post subject: Reply with quote

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 Neutral

_________________


.: linkback ≠ spam, yes to linkback, no to spam Shy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tilqicom
Guru
Guru

Joined: 14 Nov 2007
Posts: 1624
Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 20

PostPosted: Sat Oct 18, 2008 7:28    Post subject: Reply with quote

sam2kb wrote:
Try to edit the line 210 to
PHP:
elseif( is_object($Item) ) 


Plugin works fine after adding that however i get

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

which refers to :
Code:
WHERE id="'.$params['id'].'"');


in sidebar and in single post mode only.


_________________


.: linkback ≠ spam, yes to linkback, no to spam Shy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    b2evolution Forum Index -> Plugins & Extensions All times are GMT - 5 Hours
Goto page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
b2evolution Support Forum RSS Feed Forums powered by php Bulletin Board