Knowledgebase
View categorized listing of all common frequently asked questions.
Video Tutorials (jReviews 2.0)
Create a Movie & TV Show review website.
Customize the jReviews themes.
Review user profiles with the Everywhere addon.
Forum
Community forum
Submit a Ticket
Use your client area email to access the ticket system.
Downloads
Guides, modules and more...
CSV Import for Joomla and jReviews
 
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 07:09:44 PM
21713 Posts in 4960 Topics by 2843 Members
Latest Member: per4mer
News: Do not post any jReviews files or large amounts of code in the forums please. Only template files and code are allowed.
 
jReviews Support Forum  |  Feature requests  |  Feature requests  |  rewards programs « previous next »
Pages: [1] 2
Author Topic: rewards programs  (Read 4840 times)
andreasa
Hero Member
*****
Offline Offline

Posts: 271



WWW
« on: October 30, 2006, 09:21:12 AM »

Ok, we have a nice site, a fantastic reviews component, in some case we have also a good level of visitor per day…. It’s all fantastic but how to increase the number of reviews?

My idea is to create a rewards programs to incentive the user with gadget or something similar.

Very easy:
5 point each review
10 point if the reviews is on a product never revieved
5 additional point if the reviews have more of xx words
etc etc

When an user have XXXX point he receive the gadget.

What do you think: a nice idea or stupid think?
Alejandro, do you think could be possible do it with jreviews?

Of course we need a system to calculate the point and where set the number of point for each situation, a menu where the user can see the personal “point” situation, a menu where the admin ca see the global situation. A maybe something more….. so a big work! :-)

For the other jreviews user: please reply if you like the idea.  Wink
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8613


« Reply #1 on: October 30, 2006, 10:15:09 AM »

Of course it's possible, the good thing is that it can be done outside of jReviews because you can just read the db tables. This would be a long-term thing in my list given that there are already so many requests, so if anyone wants to develop this go for it!
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
travisdh
Sr. Member
****
Offline Offline

Posts: 138


WWW
« Reply #2 on: November 07, 2007, 04:32:29 AM »

Bear with me on this one. In the progress of something that should nearly be done based on karma, i use community builder on my site and it rewards members with x points for registration, x points for content submission and link submission, it will award x points for review submission and works with fireboard forum so far, and also has a few custom code points where it should be pretty easy to include into other components since its a simple include and calling a function.

Next on the list is working on a payment plugin for VirtueMart so points can be redeemed for goods / downloads etc.

Im hoping it shouldn' be to hard to include with jReviews, that is getting it working, the only thing is unless a hook or something is made it will require you to insert code into the jReviews code, which means with future updates you will have to re-add it.
Logged

Cheers - Trav Hale (Skype Travis.mobile)

Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8613


« Reply #3 on: November 07, 2007, 05:57:00 AM »

There's already a 'after save review' hook in the code which you can use. For the code below you need to create  a file named: 

/components/com_jreviewscom_rewards/j000005jreviewscom_rewards.class.php

And insert into the jos_components table an entry for the component: com_jreviewscom_rewards

Code:
<?php
// no direct access
defined'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

class 
j000005jreviewscom_rewards {

function j000005jreviewscom_rewards($row$avg_rating$void '') {

            
//$row contains the review array
            // Your code goes here

}

}
?>

Good luck!
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
travisdh
Sr. Member
****
Offline Offline

Posts: 138


WWW
« Reply #4 on: November 08, 2007, 03:14:16 AM »

with the hook, i am pretty new to programming and joomla in general so i am trying to work my way through it all, but if you have any pointers that would be most appreciated.

I have made the entry to the components table, do i just need to include the name of the component com_jreviewscom_rewards, and an id, or do i need to set the parent to jReviews as well.

Also i have got the code and put that in so it looks like this so far,

<?php
// no direct access
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

class j000005jreviewscom_rewards {

   function j000005jreviewscom_rewards($row, $avg_rating, $void = '') {

            //$row contains the review array
       
require_once( $mosConfig_absolute_path .
'/components/com_karma/karma.class.php' );
$points = CLASS_karma::getConfig("review");
CLASS_karma::addPoints($my->id, $points, "Review Submission");


   }

}
?>

It is pretty simple, but is there any way to specify new reviews or does it only call on save. Hopefully this will do it, i will try and upload the karma component soon or put it on my site so you can get it and have a play if you want, adding points is really simple, its just a case of calling the component, and there are 2 functions, one for adding reviews, another for removing reviews. and they just include the userid, how many points are being awarded, and a description for a log in the component.

Hopefully it should work..
Logged

Cheers - Trav Hale (Skype Travis.mobile)

travisdh
Sr. Member
****
Offline Offline

Posts: 138


WWW
« Reply #5 on: November 08, 2007, 03:30:49 AM »

the other question i had, and its probobly a silly one but how do i know if it has been called or not, im having trouble having points being added but to be honest i don't know where the problem is, or if i have labeled one of the components wrong and its not being called.
Logged

Cheers - Trav Hale (Skype Travis.mobile)

Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8613


« Reply #6 on: November 08, 2007, 07:32:42 AM »

I am not sure now if you can check if the review is new or not although it's a valid point. It could be added to the 3rd parameter which is not being used ($void).

There are a few problems with your code. You need to define the $my and $mosConfig_absolute_path as globals before using them.

Code:
global $mosConfig_absolute_path,$my;

and it's not a good idea to use $mosConfig_absolute_path as a global, so better to do:

Code:
global $mainframe,$my;

and replace  $mosConfig_absolute_path with $mainframe->getCfg('absolute_path');

Code:
global $mainframe,$my;
require_once( $mainframe->getCfg('absolute_path') . '/components/com_karma/karma.class.php' );
$points = CLASS_karma::getConfig("review");
CLASS_karma::addPoints($my->id, $points, "Review Submission");

I'ts actually complicated to debug the code, because it's run in an ajax call.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
MindArchr
Newbie
*
Offline Offline

Posts: 2


WWW
« Reply #7 on: December 02, 2007, 06:26:22 AM »

Bear with me on this one. In the progress of something that should nearly be done based on karma, i use community builder on my site and it rewards members with x points for registration, x points for content submission and link submission, it will award x points for review submission and works with fireboard forum so far, and also has a few custom code points where it should be pretty easy to include into other components since its a simple include and calling a function.

Next on the list is working on a payment plugin for VirtueMart so points can be redeemed for goods / downloads etc.

Im hoping it shouldn' be to hard to include with jReviews, that is getting it working, the only thing is unless a hook or something is made it will require you to insert code into the jReviews code, which means with future updates you will have to re-add it.


Can you please tell me the name of the Community Builder rewards system you are using, and if it possible if you could send me a copy or tell me where I might be able to find it? This would be greatly appreciated. Thank You.
Logged

Vows made in storms are forgotten in calm.
travisdh
Sr. Member
****
Offline Offline

Posts: 138


WWW
« Reply #8 on: December 17, 2007, 04:08:26 AM »

its a custom modification of the karma system made by marc galang.

at the moment it is not intergrated with jReviews, but to do so should either be putting the code into the submit call, or doing the hook component, its on my list but way down the bottom so i havent had the chance to look at it. anyways i will attach it here so you can have a look and play on a development site, i think i put some instructions in there somewhere...
Logged

Cheers - Trav Hale (Skype Travis.mobile)

MindArchr
Newbie
*
Offline Offline

Posts: 2


WWW
« Reply #9 on: December 17, 2007, 04:26:07 AM »

Thank you very, very much!
Logged

Vows made in storms are forgotten in calm.
tipsogtriks
Newbie
*
Offline Offline

Posts: 7


« Reply #10 on: January 08, 2008, 01:04:15 PM »

Hi, I'm pretty new to Joomla, and PHP and MySQl are not my strongest areas. That's because I learn with trial/error and so far so good. The thing is that I did everything explained about the com_jreviewscom_rewards, but I think I didn't do the table entry correctly.

I have actually no idea in how you do it. So can either someone explain to me how I do this right, or make a install package for the com_jreviewscom_rewards component (that would be great) or point me into right direction so I can make it myself.

But do not mistake me, I do very rarely ask people to do something for me,. Usually I prefer to do it myself and share my solutions with the community.

I am currently making a jReviews template optimized for Community Builder based on the new MediaMogul template from RT. And if a make it stable, I will share it with anyone willing to accept it Smiley

I am more of a Web Designer than web developer.

One other thing, I am also trying my best to develop this Karma component to fit with other Joomla extensions like groupjive, com_poll, jom_comment and UHP2. This would be my first extension though, if I made it. So any help would be appreciated. And pointing me into the right direction for learning more about this, and mastering what I need to pull this one through would be great Grin

One last thing, just to be straight. I'm not burning to develop this to earn any money. But I think that this is something that Joomla really miss. And that will unite the different extensions for joomla better, so the users feel like they are on the same website all the time. And in a long term, a combination of the karma component and jAwards would be fantastic! Imagine how much more contribution your users would do!

Enough from me, I didn't intended to make a long thread, I just got carried away Roll Eyes
Logged
russellcj
Newbie
*
Offline Offline

Posts: 5


« Reply #11 on: May 11, 2008, 09:39:11 AM »

I'm also interested in integrating a points system with jReviews. It would be a really welcome addition to joomla and an especially beneficial component for community-driven websites. Did anyone have any adding jReviews to the com_karma component Travisdh uploaded?
Logged
travisdh
Sr. Member
****
Offline Offline

Posts: 138


WWW
« Reply #12 on: May 11, 2008, 10:39:19 PM »

Hi Guys,

My Apologies on the lack of progress with the component, i currently changed my job and with the extra load due to that (as well as getting Married In May) ment that i have not really had awhole lot of time to devote to this component, which is sad because i would love to see it working.

For the best part it does work, just as some noted it really isin't intergrated into jReviews, yet, and i say yet because i don't believe it is a hard thing to do, the sad thing is i really don't have the time or skills to devote to getting it working yet. I might see how i go at having a play around with it again but realistically it will be a fair while before i can devote some serious time to it. So in the inbetween anyone is welcome to have a play around with it.

There are two ways that the component can work, which some will notice when they browse around the code. For the most part it is a little bit of a detection system, there is a mambot in there that looks at the even onsubmit i think it was, and when it detects that event, it tries to verify that an entry was created, and check the db to see how many points are assigned to that task, and then checks the userid, and awards those points to that user.

In addition to that, the component also has a call code, so you can actually call to award or subtract points based on this call, which is in the readme file of the component. And basically i thought that was the best way for jReviews to intergrate with it. Again due to lack of time i didn't really understand the hook feature, but if it was to work i think it would be a case of inserting the call into the Hook, so that when a review is submitted, the hook calls the addpoint class, checks the points to be awarded for that task, and adds them on, as well as enters a description for the task being done.

The other way that this could be done it to enter it directly into the jReviews code itself, the problem with this is however changes are lost on upgrades so it would be best to work it into the hook somehow.

If anyone has any suggestions feel free to shout out, or even have a play around with it. From memory Fireboard was intergrated, so was weblinks, and maybe content but not sure. CB was, so you could be assigned points on signup, as well as changing profiles (however no verification on profile updates, so that one needs work).. In terms of the other components, there again is two ways of doing it, speaking with them about how mambots run if they are used, to determine what url / event means something was added / submitted, and after that maybe finding the points in the respective components and adding them so that the class is called each time a task is done. For some things this may not be so hard, for example GroupJive can be intergrated with Fireboard, in which case the fireboard part should already be done, its just joining and contributing to the group... NOT forum needs to be looked at.

Good luck with it all guys, i have managed to bring it a little further, and hopefully with the help of the bright community we can look at progressing this even further. I believe as a concept its a great one, as we can reward users for contributing and helping out sites grow, in exchange for things like "Exclusive VIP Site Members Access", Prizes, and maybe even intergrate with Virtuemart and other shop solutions.

The sky is really the limit, it just a case of having the knowledge to achieve the goal, which sadly at present i do not Sad.... but progressivly in the huge workload of my site, and my life i am getting there. Just don't be afraid to have a play with it, if you can better it, in the spirit of furthering the component, go ahead!
Logged

Cheers - Trav Hale (Skype Travis.mobile)

ailema
Newbie
*
Offline Offline

Posts: 2


« Reply #13 on: June 30, 2008, 11:54:40 PM »

its really good to have rewards programs to keep us going
Logged

quiglag
Full Member
***
Offline Offline

Posts: 52


WWW
« Reply #14 on: July 27, 2008, 11:57:55 PM »

Another vote for a rewards/points system. It would be better to have a separate component that will work with more then just jreviews. I am kind of shocked one doesn't exist yet.
Logged

Pages: [1] 2
« previous next »
    Jump to: