jReviews Support Forum

Feature requests => Feature requests => Topic started by: andreasa on October 30, 2006, 09:21:12 AM



Title: rewards programs
Post by: andreasa 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.  ;)


Title: Re: rewards programs
Post by: Alejandro 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!


Title: Re: rewards programs
Post by: travisdh 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.


Title: Re: rewards programs
Post by: Alejandro 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!


Title: Re: rewards programs
Post by: travisdh 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..


Title: Re: rewards programs
Post by: travisdh 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.


Title: Re: rewards programs
Post by: Alejandro 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.


Title: Re: rewards programs
Post by: MindArchr 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.


Title: Re: rewards programs
Post by: travisdh 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...


Title: Re: rewards programs
Post by: MindArchr on December 17, 2007, 04:26:07 AM
Thank you very, very much!


Title: Re: rewards programs
Post by: tipsogtriks 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 :)

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 ;D

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


Title: Re: rewards programs
Post by: russellcj 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?


Title: Re: rewards programs
Post by: travisdh 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 :(.... 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!


Title: Re: rewards programs
Post by: ailema on June 30, 2008, 11:54:40 PM
its really good to have rewards programs to keep us going


Title: Re: rewards programs
Post by: quiglag 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.


Title: Re: rewards programs
Post by: jasperli on September 02, 2008, 02:53:45 PM
Hello,

Did anybody mananged to get the Jreviews / com_karma implementation working already?
If yes, would you like to share it with me?
Thanks in advance.

Jasper


Title: Re: rewards programs
Post by: mobz on September 14, 2008, 10:55:47 AM
Hey guys,

I've been looking high and low for a rewards component  for my site as well. I've found this new component from alphaplug which looks very promising if it can be integrated with jreviews (and cb and fireboard for me).

http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,5949/Itemid,35/

Perhaps Alejendro and anyone who has the skills can take a look and see if it can be integrated with jreviews. If possible, it would be awesome.




Title: Re: rewards programs
Post by: quiglag on September 18, 2008, 02:56:45 AM
Wow that looks like the answer we have all been looking for. I would install it and test right now, but I am still on joomla 1.0  I hope to see jReviews integration in the future.


Title: Re: rewards programs
Post by: jasperli on November 06, 2008, 01:20:14 PM
I got the JReviews and Karma 2 working on my site now... thnx to the posts of Alejandro and Travendish.
If you would like to have instructions you can PM me, but it is quite clear 'how-to' in this forum post.

Jasper


Title: Re: rewards programs
Post by: Squintz on November 18, 2008, 11:09:16 AM
jasperli,
 I was going to PM you and ask you for your site name so I could check out how tightly the integration is. However, it seems that I am not allowed to send PM messages and your e-mail is blocked. Do you mind sharing your site with us as a demo?


Title: Re: rewards programs
Post by: jasperli on November 18, 2008, 05:42:35 PM
Send me an email on info [at] skileraar.info and i'll help you further  8)

Jasper


Title: Re: rewards programs
Post by: Tony Lindskog on December 21, 2008, 05:31:09 AM
Send me an email on info [at] skileraar.info and i'll help you further  8)

Hi Jasper,

do you have a sample url to show what you have done.. I am very interested in this as well.

Kind Regards,

--Tone


Title: Re: rewards programs
Post by: jasperli on December 21, 2008, 07:50:07 AM
The live site is under: http://www.skileraar.info
Reward points expl. under: http://www.skileraar.info/index.php?option=com_content&task=view&id=25&Itemid=151

You may check my profile at http://www.skileraar.info/jasper/?Itemid=0 (right side stands the amount of points i've earned by participation)

Jasperr


Title: Re: rewards programs
Post by: Tony Lindskog on December 21, 2008, 08:04:50 AM
Jasper,

That is very (!) impressive - really professional site and I love the point system a lot!

Thanks for sharing!

--Tone


Title: Re: rewards programs
Post by: jasperli on December 21, 2008, 08:09:08 AM
If you would like some integration code, let me know.

Jasper


Title: Re: rewards programs
Post by: Tony Lindskog on December 25, 2008, 10:04:20 AM
Is CB a requirement or is it possible to use the reward program that you have set up without CB?

Thank you,

--Tone


Title: Re: rewards programs
Post by: jasperli on December 25, 2008, 10:16:31 AM
As far as i know it can work without CB.
Check their website: http://www1.reviewyou.com.au/test/

Jasper


Title: Re: rewards programs
Post by: Tony Lindskog on December 25, 2008, 10:21:13 AM
but it is only available for Joomla 1.0x right? :/

Is your site 1.0x as well?

--Tone


Title: Re: rewards programs
Post by: jasperli on December 25, 2008, 11:01:58 AM
Yes and Yes. If you have the skills and can make it a 1.5 component a lot of people would be very happy :-)

Jasper


Title: Re: rewards programs
Post by: Tony Lindskog on December 25, 2008, 12:20:53 PM
I wish I did...  I am by far not a programmer.

Is that an actively supported extension or has the author stopped at 1.0x compatibility?  Seems like a great extension and very useful!

--Tone


Title: Re: rewards programs
Post by: jasperli on December 25, 2008, 05:54:03 PM
Tone,

The component is not really progressing hard but it's working now for 1.0.x
It suited me by the time J1.5 wasn't stable yet and i was just preparing the "going live" of my site when i added it. It's pretty nice. I do also wait the component to become 1.5 so i can upgrade the complete site at once (some more components aren't J1.5 yet).
Hopefully someone finds the time and effort to upgrade it.
Well gonna stop now here because this discussion is far from JReviews.... :-)

Jasper