× Joomla Facebook Connect support forum

Topic-icon Reward to the invitor of Facebook Requests

Support Specialist
12 years 2 months ago #19721 by alzander
Mac,
So sorry for not getting back to this post sooner with your code change. We looked it over, and it looks almost exactly like what we'd do. Definitely good for anyone who wants to test to try it. The only update I made was to update the point creation line to call the event something new "plgjfbconnect_like_clicked". That allows points for Requests to be different values than Likes.

In the controllers/social.php file:
$jfbcLibrary = JFBConnectFacebookLibrary::getInstance(); 
        $configModel = $jfbcLibrary->getConfigModel(); 

        $api_AUP = JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php';  // ADD THIS STARTING HERE
        if ( file_exists($api_AUP))  
        { 
            require_once ($api_AUP); 
            $aupInstalled = true; 
        } 
        else 
            $aupInstalled = false; // ADD THIS ENDING HERE

        // Javascript shouldn't be called, but check to make sure this setting is enabled. 
        if (!$configModel->getSetting('social_notification_like_enabled')) 
            exit; 

        //$commentId = JRequest::getVar('commentID'); 
        $href = JRequest::getVar('href'); 

        if ($aupInstalled) // ADD THIS
                AlphaUserPointsHelper::newpoints( 'plgjfbconnect_like_clicked', '', $href,'JFBConnect'); // ADD THIS
Thanks again for your contribution, and let us know if you need anything else. AUP stuff will definitely be more thoroughly investigated and added in the 4.2 release in a few good social areas. We really appreciate everyone's feedback on this!

Alex
The topic has been locked.
Active Subscriptions:

None
12 years 2 months ago #19819 by learnthrusong
Hi All,

Just a thought, but wouldn't it be better/cleaner to fully-integrate whatever points you want to give to your user directly into your FB application? I haven't explored this fully however this is my intention once I've completed a few other things...

Best of luck with it whichever way you do it anyway!

Gez
The topic has been locked.
Support Specialist
12 years 3 weeks ago #21113 by alzander
Gez,
Not sure how I missed your last post here..

We're in the process of adding AUP to the upcoming 4.2 release, and wanted to get more information on what you meant by "fully-integrate whatever points you want to give to your user directly into your FB application". If you could clarify more, we'd love to hear more about what you were thinking about how we could integrate awarding of points better.

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

None
12 years 2 weeks ago #21345 by lorde
HI Alex,
I'm new of JFBConnect, but I follow with very much interest this discussion about AUP. Did you have finally written a plugin/XML rule to add points for Comments and Like?
I was before using Jcomments, but I prefer to implement 100% JFBConnect, what I find really amazing.
Best,
Lorenzo
The topic has been locked.
Support Specialist
12 years 2 weeks ago #21367 by alzander
Lorenzo,
The AUP integration for Likes, Comments, and Requests will be a part of the 4.2 release coming out later this month. The XML files required to install the rules will be available then. There were a few other changes/improvements we made in addition to the above code to make the AUP integration a bit smoother and more reliable for the next release. We'd recommend simply waiting until the 4.2 version is available to start using AUP.

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

None
12 years 2 weeks ago #21369 by lorde
Hi Alex,
thank you for your prompt answer.
Let's wait then for a couple of weeks! Not so far...
Anyway I just wanna use this moment to thank you and your Team for your fantastic job!

Best,
Lorenzo
The topic has been locked.
Support Specialist
12 years 2 weeks ago #21397 by alzander
Lorenzo,
Thanks for the appreciate... and thank you for supporting us with your subscription. There's no way we could do what we do without our users! :)

Best of luck, and keep your eyes peeled for the 4.2 release in a few weeks. We'll send out a newsletter as well (usually after the release has been out for about a week).

Thanks,
Alex
The topic has been locked.