By Gurdip on Monday, 14 April 2014
Posted in Technical Issues
Replies 23
Likes 0
Views 786
Votes 0
I'm running on J3.2.3, Alphauserpoints 1.9.6 and EasyDiscuss 3.2.9422

The issue i'm having involves AUP with EasyDiscuss rules. See attached image.

Everything works fine accept that AUP Rules Method is not applied.

I need it for EasyDiscuss AUP rules like view discussion (plgaup_easydiscuss_view_discussion), as I'd prefer that members are restricted to getting points for viewing discussion to only 'Once a day per user', else it's open to abuse.

Could it be due to AUP KeyReference not being referenced? Your help would be much appreciated. Thank you.
Hello Gurdip,

I am sorry for the late reply.

We are sorry but we can't exactly fix the issue since it is from the component itself.
We only provide rules for AUP and all the calculation is done by AUP.
You might want to consult the AlphaUserPoints developer about this.

Hope this will help.
Thanks.
·
Monday, 14 April 2014 13:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you for your reply. According to the developer of Alphauserpoints, these AUP methods can be accessed if the
extension checks for AUP KeyReference. This information is available in the AUP Developer Documentation meant for
Extension Developers like StackIdeas.

I noticed that there is an aup.php file in components/com_easydiscuss/helpers/ unfortunately, I don't know where
and how the following API should be added.

Below is an excerpt from AUP Developer Documentation (I have attached the Developer Documentation for
reference purposes):
Prevent from attributing points more than once for the same action
To avoid that a user would get points many times for something already done, we can add a
reference key. When calling the AlphaUserPointsHelper::newpoints function, a pre check is
done on this reference key. This method is used in the rule where a user reading an article
would give points to the author.

$api_AUP = JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php';
if ( file_exists($api_AUP))
{
require_once ($api_AUP);
$keyreference = AlphaUserPointsHelper::buildKeyreference('function_name', ‘item
id’ );
AlphaUserPointsHelper::newpoints( 'function_name', '', $keyreference);
}
·
Monday, 14 April 2014 13:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Gurdip,

Sorry for the inconvenience caused.
Can you put this line of code:
$keyreference = AlphaUserPointsHelper::buildKeyreference('plgaup_easydiscuss_' . strtolower( $rule ), $id );

in ...components/com_easydiscuss/helpers/aup.php

before:
$aup->newpoints( 'plgaup_easydiscuss_' . strtolower( $rule ) , $id , $keyreference , JText::sprintf( 'COM_EASYDISCUSS_AUP_' . strtoupper( $rule ) , $title ) );


If you can't do or this cannot solve the issue, please do give us ftp access so that we are able to assist you much faster.
Please be advise.
Thanks.
·
Monday, 14 April 2014 16:25
·
0 Likes
·
0 Votes
·
0 Comments
·
mohd nasser,

i placed the code as you said. and now i can set the method for the view discussion rule, so thanks.

unfortunately, it does not work exactly the way i wanted it to. i want the rule to apply 'once a day per user for each discussion topic'.

this is how i want it to work:
for example, lets say there are 3 discussion threads - discussion A, B and C, and i want to award 2 points for each viewing / reading. as i don't want members to abuse the system i want to limit points given for viewing a single discussion to once a day. if the user views / reads discussion threads A and C, he'll get 4 points only (2 points per view discussion), no matter how many times he visits these 2 threads that day. if he views / reads A, B and C, he'll get maximum 6 points for that entire day.

the way it is working now (with the once a day method applied), the moment a user views a discussion, lets say discussion A, he gets 2 points. but he doesn't get any more points even when he views discussion B and / or C. so 2 points is the maximum he gets even if he views / reads many other discussions. so it kind of defeats the purpose intended. i've asked aup developer, bernard gilly, in regards this issue, and he said "This must be created directly in the rules of EasyDiscuss / EasyBlog (Allows to attribs category). Try to ask developers of easyblog/easydiscuss."

is this possible? (yes, i hope to implement the same rule attribute for easyblog (read blog rule - plgaup_easyblog_read_blog) too, if a solution can be found).

again thanks so much for your quick reply.
·
Tuesday, 15 April 2014 14:46
·
0 Likes
·
0 Votes
·
0 Comments
·
hi, any update on this?
·
Friday, 18 April 2014 16:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Gurdip Singh,

I am sorry for the late reply.
We are still configuring this issues since me and my colleagues cannot replicate this issues on our local.

Is this your live site? If it is a live site, can you try create another development server and just clean install Joomla AUP and ED? Can you try it first whether the rules are working as you wanted? The reason why we ask you to create another development site because it is easier for us to debug and most importantly we dont want to mess up with your live site. So that we are able to debug freely and easier to isolate the broken plugin.

I am very sorry for the inconvenience caused and I hope that you would understand.

Please be advise.
Thanks.
·
Friday, 18 April 2014 17:45
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

Thanks for the response. This site has not been launched yet and we have made backups. So you may freely work on it. I have also provided the ftp and other info yesterday. Let me know if you need anything else. I hope you are able to fix the issue. Thank you.
·
Friday, 18 April 2014 18:34
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Gurdip Singh,

You're welcome, Thanks for your patience and understanding.
I have tried to access in your backend, now i getting this :
Message
It was noticed that one or more of your login attempts have recently failed. When trying again, you will soon be blocked. It is therefore recommended that you use the functionality to reset your password!

Warning
Username and password do not match or you do not have an account yet.

May i have another have Super administrator privilege user login access, so we can continue investigate on this issues? Please advise.
·
Saturday, 19 April 2014 01:24
·
0 Likes
·
0 Votes
·
0 Comments
·
i've just submitted a new superuser access info.

fyi, i've installed a rule from alphauserpoints (plgaup_readarticle) that gives away points when a user reads a joomla article.

it's an example how i'd prefer the view discussion / read blog to work. points are given for each article only once a day per user.

if you want to test this 'aup read joomla article rule' out, there are some articles hidden away under the menu 'sncf youth' (once there, you can find the articles under scholarship & bursary and news & articles).

thanks again, arlex.
·
Saturday, 19 April 2014 09:33
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Gurdip,

I am sorry for the late reply since we are weekend here.

I have check your site and done some configuration. Can you check for me whether this problem is still persist? Because from what I can see is now the AUP rules is working fine.

Please do update us.
Please be advise.
Thanks.
·
Monday, 21 April 2014 13:51
·
0 Likes
·
0 Votes
·
0 Comments
·
hi mohd yasser,

i took a look and did a simple test, and it is still giving me the same result as before.

for example:
if i go to view a discussion (0.5 point is given), but without leaving that discussion, i can keep on refreshing the page, and 0.5 points kept on getting added.
the 'once a day per user' is not working right now, i've noticed that you commented it in aup.php. we need the 'once a day per user' to be working to restrict users from abusing the system and gaining points simply be refreshing a discussion page / post.

when the 'once a day per user' method was working, once you view a discussion, you get 0.5 point. refreshing the page didn't give you further points for the entire day.
the issue then was, when you go to different discussion you couldn't get any point either, ie the maximum points you could get for the entire day was 0.5 points no
matter how many other discussions you viewed.

what i want is points to be given for each discussion only once day per user. ie if the user visit discussion A, he's going to get only 0.5 point for that entire day, no matter
how many times he view discussion A it.

but if he next visits discussion B, he will get another 0.5 point, cos it's a different discussion. but as in discussion A, no matter how many times he refreshes or visits discussion B, he cannot get more than 0.5 point for that entire day. so on and so forth.

according to aup developer, bernard gilly, this can be done by creating it "directly in the rules of EasyDiscuss / EasyBlog (Allows to attribs category). Try to ask developers of easyblog/easydiscuss."

i hope that makes sense. appreciate your effort.
·
Monday, 21 April 2014 14:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi again,

Use this example - it will probably be easier to understand what I am experiencing:

1. Login from the frontend.
2. Go to a discussion post.
3. On the right, take note of your userpoints.
4. Click browser refresh.
5. The userpoint now goes up by 0.5 points.
6. Click browser refresh again. The userpoint goes up by 0.5 points again!. It should add 0.5 point only once per post per day. But it keeps adding 0.5 point every time I refresh the browser. This is the error I am reporting.

Thanks.
·
Monday, 21 April 2014 14:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

Earlier I used a key reference to solve the problem - I notice that Support here has commented that out.

With that key reference, the system awarded points only once per day for reading any number of articles. So if the user reads 10 articles in one day, he only gets 0.5 points.

But what I need instead is for the user to get 0.5 points a day per article. So if he reads 10 articles, he gets 0.5 x 10 = 5 points total.

Let me know if it is not clear. Thanks.
·
Monday, 21 April 2014 15:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi, I also notice that the cover page on the profile is no longer there; login and see: http://youth.sncf.coop/youthcommunity. Do you know what happened? Was there something done by Support?
·
Monday, 21 April 2014 15:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Gurdip,

I understand the issue perfectly but from my inspection, I believe that, this rule is working correctly. Can you help me create a new user and test the user on several discussion? Here is my screenshot: http://screencast.com/t/4Ko7xgS8gs23 .

Hope this will work.
Thanks.
·
Monday, 21 April 2014 16:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

I see it works in your clip. Over here, we are testing from two totally different locations and it does not work for us on Chrome and Firefox. Strange.

May I know what browser you are using?
·
Monday, 21 April 2014 16:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Gurdip,

I have tested your site using Chrome and Firefox and it is working as it supposed to be. Have you create another account and try to view the article? If not please do so and can you please clean your browser cache and history? I believe your site is caching and it doesn't load the site properly.

I am very sorry for not able to assist you since we already tried to replicate the issue on your site but can't.

Please be advise.
Thanks.
·
Monday, 21 April 2014 18:38
·
0 Likes
·
0 Votes
·
0 Comments
·
thanks, we appreciate your efforts, mohd yasser.

unfortunately we are still experiencing the same issues.

we have done as you suggested:

1. we cleaned our browser cache and history
2. created several new accounts (about 9 to be exact)
3. tested on chrome, firefox and ie
4. tested on 3 different pc's (one of which has never been used to even visit this site before)
5. in all the above cases, we managed to keep on receiving points simply by refreshing the discussion page

btw you said that you have "done some configuration" to make it work on your end. can you tell us what configuration exactly?

also did you troubleshoot only easydiscuss or easyblog as well? (just wanted to know if you did some configuration for easyblog as well)
·
Tuesday, 22 April 2014 09:10
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Gurdip,

I am very sorry forgot to tell you what configuration does I have done. Actually, I just commented out single line in aup.php file as you stated earlier and done a js compiling in your Easydiscuss.

This is a another checking. Can you try create another development server and just clean install Joomla AUP and ED? Can you give it a try and checks the rules are working as you wanted or not?

I am very sorry for not able to assist you since we already tried to replicate the issue on your site but can't.
Please be advise.
Thanks.
·
Tuesday, 22 April 2014 10:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

>Can you try create another development server and just clean install Joomla AUP and ED?
Done as you suggested. Please see: http://youthstage.sncf.coop/index.php/discussions/congratulations-succesfully-installed-easydiscuss

I have tested this from two separate locations in Singapore and using the different popular browsers. Hitting refresh keeps adding the points. Looks like it is working only for you!
·
Friday, 25 April 2014 23:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Gurdip,

I am sorry for the late reply since it was weekend here.
We are very sorry because issues this takes a lot of your precious time and we are trying our best to assist you on this issue.
Can you provide us with backend access and ftp access to this site: http://youthstage.sncf.coop/index.php/discussions/congratulations-succesfully-installed-easydiscuss ?

Please be advise.
Thanks.
·
Monday, 28 April 2014 10:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

I have added the requested info in my earlier psot:
FTP and joomla backend
·
Tuesday, 29 April 2014 12:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Gurdip,

I am sorry for the late reply.
I have checked it working correctly. Can you check for me http://youthstage.sncf.coop/index.php/discussions/ is it working correctly?
I have create another user, registered user group:
U: stackideas
P: ******

You can create another user and check it for me if the rules working as you intended.

Please be advise.
Thanks.
·
Tuesday, 29 April 2014 12:53
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post