1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Creating external Page using XenForo Elements

Discussion in 'Styling and Customization Questions' started by katsulynx, Aug 6, 2013.

  1. katsulynx

    katsulynx Well-Known Member

    Hey Folks,

    I'm currently working on my XenForo-Board on some new features for my users. One is going to be an external page displaying some bunch of random stuff, maybe even more than one page of this kind. The Problem: Standard XenForo pages do not allow you to use php-code. There is of course the possibility to use those callbacks but I have neither any idea how to use them nor if they would even be able to do, what I plan to.

    So what do I like to have?
    Some people maybe know the free forum software SMF. SMF allows you to access its system by including a single file on your server, called the SSI.php into your php-document. After that you got access to all features like current user session, threads, etc. For the documentation see here.

    So in SMF I was able to set up a php document by including this file, then start a simple php-querry and get the SMF header automatically included in my document, including the style of the page, all scripts in the header, etc. Then I could do my content and close with a php-inclusion of the footer.

    So this is what such a code would look like:
    PHP:
    <?php
    require_once('/path/to/SSI.php');
    $context['page_title_html_safe'] = 'Page title goes here';

    template_html_above();
      
    template_body_above();
     
    echo 
    '
      <hr />
      This would be the content sections of the page
      <hr />
      '
    ;
     
      
    template_body_below();
      
    template_html_below();
       
    ?>
    This is what I want for XenForo now. Is it possible?

    Greetings & thanks in advance.
     
    Scharesoft likes this.
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

  3. katsulynx

    katsulynx Well-Known Member

    This is exactly what I wanted. Thanks a lot!!

    Edit: It is unfortunately not working together with the Nodes as Tabs Addon v.1.2.0...
     
    Last edited: Aug 6, 2013
  4. Deepmartini

    Deepmartini Well-Known Member

    So this makes it possible to wrap xenforo around a wordpress installation?
     
  5. Jeremy

    Jeremy XenForo Moderator Staff Member

    There are several bridges; but I'm sure if you want to do quite a bit of coding on the WP side, you may be able to do it.
     

Share This Page