Integration of login form - Xenforo

Discussion in 'Integration' started by alphahotel, Oct 4, 2013.

  1. alphahotel

    alphahotel New Member

    Joined:
    Sep 4, 2013
    Messages:
    1
    Hi all,

    I have been attempting to integrate the login form in to one of the templates provided in Xenforo for a few days now, with no avail.

    I have been using the following code

    PHP:
    <?php
    include "/home/usrad/public_html/amember/library/Am/Lite.php";
    echo 
    Am_Lite::getInstance()->renderLoginForm(); ?>
    and

    PHP:
    <?php
    include '/home/usrad/public_html/amember/library/Am/Lite.php';
    echo 
    Am_Lite::getInstance()->renderLoginForm(); ?>
    When using this in the Xenforo template it wasn't working and just displayed the text 'renderLoginForm(); ?>'. After a bit more research I realized that Xenforo requires a tag called 'xen:callback' to operate php commands within a template, so I proceeded to give this a go without any avail.

    I then tried to create a new template in Xenforo and use the xen:include tag to include the template, again, just the echoed text.

    I'm not great with php so not sure if 'echoing' was the right command to use however I decided to paste the aforementioned snippet of code in to a blank php file and upload it to the server, this worked instantly and showed the amember form.

    Is there anything obvious I have been missing? Am I meant to put the include above the HTML? (If so would this then load on every page?)

    Many thanks,

    Andy
  2. hans_haller

    hans_haller New Member

    Joined:
    Apr 18, 2015
    Messages:
    5
    @alphahotel
    Do you still need help with integrating the code in XenForo ?
    I had the same problem and came to an solution !
    Greetings
    caesar likes this.
  3. frybread

    frybread Member

    Joined:
    Jul 14, 2008
    Messages:
    63
  4. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    @frybread You can use Amember Redirect plugin for xenforo (included to plugin package).
    This plugin redirect default xenforo login urls to aMember urls. So you do not need to change default Xenfor login forms.

    Best Regards.
  5. sean8ing

    sean8ing New Member

    Joined:
    Dec 26, 2017
    Messages:
    9
    Where are the instructions for this? I have the plugin and its configured. The only step left is to configure xenforo and man I can't make heads or tails of their code. The XF plugin included with amember appears to be for xf1.5 and I'm running 2.0

    It would be really cool if someone stepped up and documented a step by step readme to get some of these plugins setup.

    If there's one complaint I have with amember is that a lot of the documentation is vague or dated if it exists at all.
    Last edited: Apr 15, 2018

Share This Page