Topic-icon Display AUP message after Facebook Requests

Active Subscriptions:

None
10 years 3 days ago #43195 by sortby
Hi there,
I am setting Alpha User Points message after user action and point earned, I have a problem in displaying the message after Facebook Request acted from Jfbconnect.
It seems the system message (where is usually displayed AUP message) doesn't appear after closing the FB external page request.
I have already imported rules from plugins rules, and the points attribution works, but message does not!
Do you have a suggestion how to tune AUP to Message display?


Thanks
Frank
The topic has been locked.
Support Specialist
9 years 11 months ago #43311 by alzander
Frank,
Very sorry for the delays. This one took a bit of investigation. Fortunately, there's a simple code change which should get you going. Please edit the /components/com_jfbconnect/controllers/request.php file. At the very bottom, you'll see:
$app = JFactory::getApplication();
        $app->close();
Update that to:
$app = JFactory::getApplication();
        $queue = $app->getMessageQueue();
        $session = JFactory::getSession();
        $session->set('application.queue', $queue);
        $app->close();
That change should properly save whatever is in the message queue from AUP and display it on redirect. You could also add your own message there with the following code:
$app = JFactory::getApplication();
        $app->enqueueMessage("Thanks for inviting your friends!");
        $queue = $app->getMessageQueue();
        $session = JFactory::getSession();
        $session->set('application.queue', $queue);
        $app->close();
I hope that helps, but if you run into any issues or have any questions, just let me know!

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
9 years 11 months ago #43317 by sortby
Alex, Don't worr about delay in reply!
I have tried your code and it works like a charm! Nice shot
When user confirm social invitations (n.3) after redirect they can see the message :
Message
We have added you 1 point!
We have added you 1 point!
We have added you 1 point!


The only problem is that it will show multiple lines for every invitation performed....and it should be a little confusing for user.
Is there a way to display the total of points earned with the last invitations or the total points in general?

Nice shot Alex, hope this could help also other users, think about to include that on future release of JFBC! :)

Thanks
Frank
The topic has been locked.
Support Specialist
9 years 11 months ago #43360 by alzander
The system messages are generated by AUP itself. I'm not sure of any way to batch-award points for each of the invitations. We simply call the "award points" function in AUP for each user that's been invited... and they generate that message.

If you know of some way that we can group those all together, we gladly will.. but I don't know of any way to do that. It could be in their documentation or by contacting support from them.

Just let us know, and we'll gladly help however we can.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
9 years 11 months ago #43371 by sortby
Hello Alex,
ok, I have just forwarded the issue to the AUP forum.
As soon as I have news I will let you know!

See you soon
Thanks for the guidance! ;)
The topic has been locked.
Support Specialist
9 years 11 months ago #43375 by alzander
No problem. If they do have some method we can call for batch awarding of points, just let us know!

Best of luck, and should you need anything else from us, you'll know where to find us.

Thanks,
Alex
The topic has been locked.