By Mustapha Bahassi on Wednesday, 04 December 2013
Replies 12
Likes 0
Views 1.3K
Votes 0
I bought the EasyDiscuss plugin recently, and after installing it and going through the options I noticed that the points system is lacking some major rules, for example:


* The rules about voting (on questions, replies and answers) give points only to the user that votes, not to the one that receives the vote. I don't mean to replace the current rules, just add rules to reward the users that receive the votes.
* Voting up or down are not separated into different rules
* Undoing actions that give points (like accepting a reply as an answer) does not deduct the points, so unaccepting and accepting many times grants the points many times


The rules for Komento are small XML files, which can be easily written and uploaded... is there any example of such files for EasyDiscuss? In any case, the rules use "commands", which I guess must be built in the plugin to be used, so there is no point in creating rules for commands that do not exist.

Can these commands be created by me? Or downloaded? I've searched for such things without any meaningful results, if you know of such a resource please let me know.

I don't mind creating my own commands if there is any documentation on how to do it.

------------------------------------------------------
Edit after Mark's answer:

I already know how to create the XML for a rule, I need to know how to create new commands, or if there are already more than 19 commands available (there are 19 rules by default after installing).

Thanks
Hello Mustapha,

Sure, I have attached some of the sample rules here.
·
Wednesday, 04 December 2013 09:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mark,

I think you misunderstood my question. I already know how to create the XML for a rule, I need to know how to create new commands, or if there are already more than 19 commands available (there are 19 rules by default after installing, using up all 19 available commands and it's not nearly enough).

In either case, where can I find the full "points commands" list? How can I create or install a new one?

Something like this:

<command>easydiscuss.someone.voted.my.answer.up</command>

I hope this clarifies the issue, regards
·
Wednesday, 04 December 2013 17:20
·
0 Likes
·
0 Votes
·
0 Comments
·
Hm, not too sure if I understand you here but the badges and points shares the same commands?
·
Wednesday, 04 December 2013 20:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Mark, I'll try to make it easy for you:

I want to create new commands for assigning points. In the control panel go to Points -> Manage rules.


I don't know where you are getting anything about badges, I didn't mention the badges anywhere.
·
Wednesday, 04 December 2013 20:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mustapha,

To create new rules, you need to create a custom rule file and upload the rule file through the Points > Rules area and click on the Manage Rules button http://screencast.com/t/QvWySltEV

After installing these new rules, you need to add your own php hacks into the core codes of EasyDiscuss to log these new rules
·
Wednesday, 04 December 2013 22:01
·
0 Likes
·
0 Votes
·
0 Comments
·
Mark, are you joking with me? I told you in the fisrt question that I already know how to create and upload new rules!!! This is not going to be solved with your standard set of answers.

What I need to know is how to add new commands, what you call "your own php hacks into the core codes of EasyDiscuss". Please be serious and take time to read my question and come up with a good answer, not just a link to a screenshot for something I already know how to do.

If you don't know how to do it, please let someone else answer my questions.

Please take this seriously, I am.
·
Wednesday, 04 December 2013 22:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mustapha,

Firstly, I do apologize if there was any confusions earlier. If you read your question above carefully, never did you mention anything about what you want assistance with apart from this,


The rules for Komento are small XML files, which can be easily written and uploaded... is there any example of such files for EasyDiscuss? In any case, the rules use "commands", which I guess must be built in the plugin to be used, so there is no point in creating rules for commands that do not exist.

Can these commands be created by me? Or downloaded? I've searched for such things without any meaningful results, if you know of such a resource please let me know.


If you are referring to how to add the hacks, this is how one would add / log a command on the system.


DiscussHelper::getHelper( 'Points' )->assign( 'your.custom.command' , $userId );


As to where to place these codes,


The rules about voting (on questions, replies and answers) give points only to the user that votes, not to the one that receives the vote. I don't mean to replace the current rules, just add rules to reward the users that receive the votes.

/components/com_easydiscuss/views/post/view.ajax.php


* Voting up or down are not separated into different rules

/components/com_easydiscuss/views/votes/view.ajax.php


* Undoing actions that give points (like accepting a reply as an answer) does not deduct the points, so unaccepting and accepting many times grants the points many times

/components/com_easydiscuss/views/post/view.ajax.php
·
Wednesday, 04 December 2013 23:17
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you Mark, this is much closer to what I was looking for.

Can you please post an example of an existing command, so I know how to create one?

Is there any place to download more commands?

Thanks
·
Wednesday, 04 December 2013 23:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mustapha,

I think you need to start re-phrasing your term because "existing command" is really misleading. It should really just be as simple as "sample codes".

Writing the code is really as simple as the following,


DiscussHelper::getHelper( 'Points' )->assign( 'your.custom.command' , $userId );


To see an example, take a look at the file /components/com_easydiscuss/views/post/view.ajax.php and at line 728 you should see something like this,


DiscussHelper::getHelper( 'Points' )->assign( 'easydiscuss.resolved.discussion' , $my->id );


Where the first argument is the "command" and the second argument is the user id that you want to assign the points to.
·
Thursday, 05 December 2013 01:41
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mark,

I found in the view.ajax.php file that you mention the sample codes, for example easydiscuss.resolved.discussion.

I can add in that file a lot of lines like:
DiscussHelper::getHelper( 'Points' )->assign( 'easydiscuss.resolved.discussion' , $my->id );

This is clear and is not the key point of my question.

The key point is the following:

I want to create a new "command" argument that is not present in the sample code. How can I do this?
I would like to know what the definition is for easydiscuss.resolved.discussion and where to find it, so I can add my custom commands in the same place and call them inside the view.ajax.php file.

What I need in the end is to add new behaviors beside the existing ones after installation.

I don't know how to explain it better, please try to get to the point. Remember that I am the paying customer, you should be the one doing the effort to understand my needs.

Thanks
·
Thursday, 05 December 2013 04:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mustapha,

I am sorry but what you posted above does not make any sense at all. You mentioned above that you already know how to create the rule files and define the commands.

If you have already created the xml rule file and you have the command of "easydiscuss.somecustomaction.discussion", then your code needs to be like this,


DiscussHelper::getHelper( 'Points' )->assign( 'easydiscuss.somecustomaction.discussion' , $my->id );
·
Friday, 06 December 2013 09:50
·
0 Likes
·
0 Votes
·
0 Comments
·

I don't know how to explain it better, please try to get to the point. Remember that I am the paying customer, you should be the one doing the effort to understand my needs.

Sorry but I think that there are some misunderstanding here. Our support DOES NOT cover customizations as outlined in http://stackideas.com/support .
·
Friday, 06 December 2013 09:54
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post