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 aMember Pro Customer

    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.

Share This Page