× Joomla Facebook Connect support forum

Topic-icon JBCinvite

Active Subscriptions:

None
13 years 3 months ago #6536 by fb_1660790489
JBCinvite was created by fb_1660790489
I install jbcconnect but i cant find way to jbcinvite look like on yours demo page.I building big free download portal you can see online-hdd.com
I try to put in jomsocial component but i cant.How can in joomla you can fix module to open in separate page same how is on your demo page ?
Thx.
Danijel
The topic has been locked.
Support Specialist
13 years 3 months ago #6541 by alzander
Replied by alzander on topic JBCinvite
The way we have the invite module on it's own page is to create an Article.. title it "Invite your friends". Then, we create a menu item to that article. Then, we edit the JFBCInvite module to only show on that page's menu item. You'll need a module position available that's either above or below your main content area, depending on where you want the Invite module to show. The module positions are defined by your template, so we can't help you much there.

Hope this helps explain how we did it. If you have any questions, let us know!
The topic has been locked.
Active Subscriptions:

None
13 years 3 months ago #6545 by fb_1660790489
Replied by fb_1660790489 on topic JBCinvite
My portal work on referrals and only referral id work in alphauserpionts component.I try to redirect jfbinvie module on my invitation card but he read error on line 12 in tmpl/default.php ($postInviteActionUrl)
I update settings for jblinvite module work fine but with out referral id.I have gigya javascript on alphauser invite component and he post invitation on walls and work nice!
Can anybody help me ?It be very nice ad on for my app !
thx
Danijel
The topic has been locked.
Support Specialist
13 years 3 months ago #6549 by alzander
Replied by alzander on topic JBCinvite
I'm not completely sure what you're trying to do. Basically, insert a referral ID into the Post Invite URL? If you don't try to insert this referral ID, does it work? I'm trying to narrow down the cause of the problem. If it works without the referral ID, that would be good to know.

Also, did you modify the tmpl/default.php file at all? If so, what did you do?

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

None
13 years 3 months ago #6551 by fb_1660790489
Replied by fb_1660790489 on topic JBCinvite
Referral id do not work any were but in alphauserpoints components the code is <?php echo $this->referrer_link; ?>.
I did not try article to get jbcinvite module on single page but if i understood need to modify something in jbcinvite module ?Tell me what do i change in module to get module only on article page.
I install the module on main template he work perfect but no mining to my site.Never mind because jomsocial sign up is full of bugs.
I modify the alphauserpoint component and question is it possible to install jbcinvite module on other components?If is possible how?
I try with this:<? require_once (JPATH_ROOT.DS.'modules'.DS.'mod_jfbcinvite'.DS.'mod_jfbcinvite.php'); ?>
in alphauser comp on invite tmpl....
and i get error:
Fatal error: Call to a member function get() on a non-object in /home/onlin173/public_html/modules/mod_jfbcinvite/tmpl/default.php on line 12
The topic has been locked.
Active Subscriptions:

None
13 years 3 months ago #6618 by fb_905870441
Replied by fb_905870441 on topic JBCinvite
I think this is what Danijel is trying to do (and is what I am trying to do, too).

AlphaUserPoints allows users to get points when others join through a referral link (think of it as an affiliate link, only that "payment" is made with AUP points, not money). The link will be different for each user, as it includes a unique referralID.

I would like to modify the JFBCInvite module so the invitation link is the AUP referral link. This clearly cannot be done with the admin interface - it requires changing code. And Danijel is having trouble doing this.
The topic has been locked.
Support Specialist
13 years 3 months ago #6626 by alzander
Replied by alzander on topic JBCinvite
Let me try and help both of you. I think Danijel is also asking another question. I'm not super familiar with AUP. It's something on our high priority list to investigate, because we're planning to add support for it in a few ways to JFBConnect and PayToUpgrade.. people seem to love that thing :)

First, getting the referral link. If you have the PHP code to get the referral link, here's how you'd do it so it dynamically uses the referral link (if available) or uses the link in the parameter of the module. The code above for "$this->referral_link" will not work. $this will need to be a reference to the AUP class, whatever that is. If that's confusing, let me know.. hopefully, they have good documentation to get that link.
File to edit: /modules/mod_jfbcinvite/tmpl/default.php
At the top, you'll see a bunch of definitions for variables ($blah = $param...). At line 15, add the following (I left the top line intact).
$inviteContentUrl = $params->get('invite_content_url', ''); // This line is already there.
$aupReferralUrl = HOWEVER AUP SAYS TO GET THE URL;
if ($aupRefferalUrl != "") // check that it's not blank
  $inviteContentUrl = $aupReferralUrl; // Set the invite URL to the AUP one

Please let us know if the above makes sense. Again, we'll be investigating this soon, and can see adding this feature to the Invite module as an option, so would love your feedback.

Danijel, as for including the module on a page. You can't do require_once(...) to get any module to work. You need Joomla to load the module as it sends in some parameters first. To show the module on any page, you need to use the module manager. When you create a module, you can set it to different 'positions' as defined by your template. To see the available positions on a page, append ?tp=1 to the query string (www.mysite.com/?tp=1). Once you know the position, set the JFBCInvite module to show in that position.

The JFBCInvite module should work on any page of your site, including any component pages.

Really hope this helps, but please, let me know if it doesn't, and I can do a little more research.
The topic has been locked.
Active Subscriptions:

None
13 years 3 months ago #6670 by fb_905870441
Replied by fb_905870441 on topic JBCinvite
Thanks, Alzander! I think I got it working. I edited file modules/mod_jfbcinvite/tmpl/default.php to include the following at the beginning:
require_once (JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php');
require_once (JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helpers'.DS.'helpers.php');

$user = & JFactory::getUser(); //get current user
$referrerid = AlphaUserPointsHelper::getAnyUserReferreID($user->id); //get current user's AUP referral ID
$referrer_link = getLinkToInvite($referrerid, 'cb'); //create link. I'm using Community Builder, 'cb' is hardcoded (bad, bad programmer!)

if($referrer_link)
        {
        $postInviteActionUrl = $referrer_link;
        }
else
        {
        $postInviteActionUrl = $params->get('post_invite_action_url', '');
        }
Regards,
Bernardo.
The topic has been locked.
Support Specialist
13 years 3 months ago #6677 by alzander
Replied by alzander on topic JBCinvite
Bernardo,
Thanks so much for posting this back. I've added this to our notes for the task, and should be pretty easy to integrate in an upcoming release. Glad to hear it works for you, and glad to see our off-the-cuff code was simple enough to read and work around.

Good luck, and thanks again!
The topic has been locked.
Active Subscriptions:

None
13 years 3 months ago #6681 by fb_905870441
Replied by fb_905870441 on topic JBCinvite
You're welcome. We are almost there, but not quite. The outgoing invitation link is correct, now I would like JFBConnect to recognize it :-)
This is the way I would like it to work:
  1. User A logs in with her facebook ID(using JFBConnect).
  2. User A sends out invitations using JFBCInvite. These invitations contain the AUP referral code. This is implemented correctly in my previous post.
  3. User B receives invitation in facebook, clicks on it, and is redirected to a link like 'example.com/index.php?option=com_content...=AUPRR-4D0794F39B3C3'. This last param is the referral ID. Notice that the link is not the regular CB registration link, but an article explaining the benefits of registering.
  4. User B registers using JFBConnect: he clicks on the "login with facebook" button. Under the hood, JFBConnect should invoke the AUP registration link (something like 'index.php?option=com_comprofiler&task=registers&referrer=AUPRR-4D0794F39B3C')
  5. User A gets the referral points for B's registration.
The outgoing link is OK, but the rest of the process breaks down. What changes do I need to make in JFBConnect to make it work?

Regards,
Bernardo.
The topic has been locked.