Skip to Content Skip to Menu

User profile ratings/Karma RELEASED!!!

16 years 11 months ago #51606 by Deinticker
Replied by Deinticker on topic Re:User profile ratings/Karma RELEASED!!!
I have testet your component and installed the com and the bot for cb. I registered as a new user at my site for the testing and saw that this new user is 5x in the management of the component.The normal usertable in Cb is normal. What happened ?

Please Log in or Create an account to join the conversation.

  • mediaguru
  • mediaguru
  • OFFLINE
  • Posts: 365
  • Thanks: 1
  • Karma: 70
16 years 11 months ago #51615 by mediaguru
Replied by mediaguru on topic Re:User profile ratings/Karma RELEASED!!!
I've installed your new modified version of MY component.

:P

I started a forum thread and it automatically awarded me a karma point. Good!

I updated my profile from no wysiwyg editor to an editor and was awarded a point. Good.

I then updated my profile again and changed back to no editor and was awarded a point. BAD!

I did this a few times, updating my profile and got karma points.

So that is a way that someone could easily commit the unthinkable act of "karma fraud" which would be some seriously bad karma.

I like the progress but I have some monthly prizes which are getting valuable and someone could commit karma fraud to win them.

Any thoughts on resolving this? How is Marc doing?

CB/Joomla golf site: www.thegolfspace.com
Geek/joomla site: www.tkserver.com

Check out my Joomla/CB projects:

* LIKE thumbs up system for "liking" content items
* Karma - CB user rating system
* Golf Score Tracker
* Jitter - status update system. "What's on your mind?"
* CB Author Plug - Shows CB author link and avatar in content items. J1.5 compatible and very customizable!

Found on my web site or in the Joomlapolis Directory !

Please Log in or Create an account to join the conversation.

  • mediaguru
  • mediaguru
  • OFFLINE
  • Posts: 365
  • Thanks: 1
  • Karma: 70
16 years 11 months ago #51616 by mediaguru
Replied by mediaguru on topic Re:User profile ratings/Karma RELEASED!!!
My next question is how hard would it be to write custom bots? I'd like to award people for making blog posts in MyBlog, entering videos in syret or for entering their golf scores in my custom golf component.

Even more, how about awarding a karma point for people who send out an invitation to join the site and then awarding an extra amount of "bonus" karma points for if the people they invite sign up?

CB/Joomla golf site: www.thegolfspace.com
Geek/joomla site: www.tkserver.com

Check out my Joomla/CB projects:

* LIKE thumbs up system for "liking" content items
* Karma - CB user rating system
* Golf Score Tracker
* Jitter - status update system. "What's on your mind?"
* CB Author Plug - Shows CB author link and avatar in content items. J1.5 compatible and very customizable!

Found on my web site or in the Joomlapolis Directory !

Please Log in or Create an account to join the conversation.

  • travisdh
  • travisdh
  • OFFLINE
  • Posts: 14
  • Thanks: 0
  • Karma: 1
16 years 11 months ago #51637 by travisdh
Replied by travisdh on topic Re:User profile ratings/Karma RELEASED!!!
Its a good component your one :P lol, i liked it i just thought that it would be a giant pain in the a** to have to add points manually and that there had to be a better way to do it.

You were right about Marc, he was fantastic. I haven't spoken to him in awhile but i assume he is still good.

In regards to your questions, i have a few suggestions but don't really have much time up my sleeve today to look into them, however i will put it somewhere on my to-do list for now. If you are worried about the profile update feature, you can just set the points to 0, it means people won't get awarded for updating their profiles, but i the scheme of things for now it might not be a huge issue.

The workaround i had in my head for preventing people from updating their profile more than once was possibly to make use of the community builder profile updated field, whilst i don't know much about it i guess it would be possible to reference to it in the mambot, so for example on a conditional statement it went something like this:

If cb_profile_updated field = today then

end

else

profile point code continues here.

something like that would probably work i guess and the bonus to using the CB field is that it would put less strain on a big site as it is only a quick db lookup, the other option would be a little harder i think, and making another table in the component that logs dates, and checking to see if the date matches today, but i think the cb way is much better.

Im sorry that at the moment i don't have much time to look into it, these were just ideas i came up with whilst i was at work, with my mind somewhere else as per usual.... now jusst struggling with amazon.com concepts and the works :S.

In regards to your other question, how hard would it be to modify the mambot to award people for making blog posts, or entering videos, or in your custom golf component, it depends on the way you want to do it. As per usual there is an eas...ier way and a hard way. but the component has the custom1,2 and 3 fields in the table so you can use the code to add to other components.

Probobly the easiest way to get it to work, is annoying but is to hack the code a little bit, and find the points in each of the components where the entry is saved, after validation and to insert the add points code into that space.

In the file i have uploaded there is a readme.txt file that explains the addpoints call, but you could use the addpoints call in the component to lookup the value of say custom1, and award points. the only problem with that is that if components are updated, you need to add them into the updated components again.

The other way to do it is to have a look at the mambot codes, Marc was ingenious in his logic here, but basically the mambot looks for when content is submitted and looks to see 2 things, firstly what the component is, and secondly what the task was. If you have a look at the url in a test site with SEF turned off, you will see the component and the task. If you then looked at the components that you want to use, say myblog, you might find something like this:

index2.php?option=com_myblog&no_html=1&admin=1&task=edit&Itemid=0

in this case if you have a look at the mambot the code would be something like this... again very untested so you will have to have a play with it.

the component here would be com_myblog, and the task would be edit, im not sure if it would work but you will have to have a play with it. i have uploaded a txt file with a suggestion, however it really is just me taking the code from weblinks and changing it, removing the validation, so i have no idea if it will work, or anything like that. in regards to your custom component, since it is custom, if it shows a task great try and work it into the mambot, however if not it might just be easier to add the code directly into your custom component (the addpoints call).

Hope it points you in the right direction.... Thanks for the origional component, its nice to see a karma system for joomla that is decent, it seams to be something that is really lacking which is funny, because i would have thought that if you want a good / big community then you need to reward people for community contributions, and a karma / points system does that perfectly.

For anyone else reading too, have a play with the mambot code, that way you can customize the component to your needs, and if you get something working then why not post it to the boards here.

Wishlist:

* Get Karma system to award points for other forums, and to add points to forum karma.

*Work it so that you can 'trade' points for goods & services in Virtuemart.

*Get my site finished, seams to be the never ending story (one of these days!)

Thanks,

Trav Hale

Please Log in or Create an account to join the conversation.

  • travisdh
  • travisdh
  • OFFLINE
  • Posts: 14
  • Thanks: 0
  • Karma: 1
16 years 11 months ago #51638 by travisdh
Replied by travisdh on topic Re:User profile ratings/Karma RELEASED!!!
txt file would not upload, but this gives you a rough idea, it is pretty much a copy and paste of weblinks point award, with the weblinks validation removed, and i have tried to work out / guess the task for the component. this probobly has 1000 syntax errors and is very untested but gives you an idea on how it works i guess and hopefully others can help out...

else if($option == "com_myblog" && $task == "edit"){
//Weblinks
if ($my->gid < 1) {
return 0;


//get point equivalent
$points = getConfPoints("custom1");

$rows = getUser($my->id);
$count = count($rows);

$var = 0;
$total = 0;

if($count){
$row=$rows[0];

$var = $row->var_karma;
$total = $row->total_karma;
}

$var += $points;
$total += $points;

if($count){
$sql = "update `#__karma_tb` set `var_karma` = '$var', `total_karma` = '$total' where `user_id` = '$my->id'";
} else {
$sql = "insert into `#__karma_tb` values ('$my->id', '$var', '$total')";
}
$database->setQuery($sql);
$database->query();

//log points
logPoints($my->id, $points, "Submitted Blog");

Thanks,

Trav Hale

Please Log in or Create an account to join the conversation.

16 years 11 months ago #51665 by Deinticker
Replied by Deinticker on topic Re:User profile ratings/Karma RELEASED!!!
Iam not so good with php but iam working on it... Please let me know if there is someone who has done this with seyret

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum