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

XF 1.3 Import Navigation DIV wordpress?

Discussion in 'XenForo Questions and Support' started by Ablac, Aug 14, 2014.

  1. Ablac

    Ablac Active Member

    I'm trying to have an Xenforo Installation, that works with my Wordpress installation, The only thing I'm trying to get now is to somehow overlay the Xenforo Navigation (UserName, Inbox, Alerts) specifically into the Wordpress Template, is there any way to import the Xenforo Navigation into wordpress?
     
  2. Ablac

    Ablac Active Member

    I've been browsing the internet for 3 days trying to figure this out have have tried everything i could from from Iframe imports (Which look really really bad), to Ajax Imports (Which i cant quite get 100% working), Nothing has worked to my standards [​IMG]

    The setup: I have 2 websites running an Xenforo Forum, and a Wordpress Frontend. I'm trying to essentially merge the 2 together without getting an expensive bridge software for Xenforo (49.99...). The only part im worried about is the Header/Navigation within Xenforo, this includes the Logo Block, Login/Signout, Forum navigation, as well as User Navigation(Messages, Alerts, ECT).

    I'm trying to move this into a custom Wordpress Theme, I already have the location within the theme that it would need to be placed in order to fit properly.

    The header section of the Xenforo page is stored within a Div called "header", I've been looking into Div importing.

    If you need any further information let me know [​IMG]

    This is the code I'm experimenting with, if somebody could help me :)

    PHP:
        $(document).ready(function(){
            
    console.log('sending request to index.php');
            $.
    post("index.php",{},function(response){
                
                
    console.log('ajax response:');
                
    console.log(response);
        
                
    console.log('header:');
                
    console.log($(response).find('.header'));
        
                $(
    response).find('.header').each(function(){
                    
    console.log('appending html:');
                    
    console.log($(this).html());
                    $(
    '#main').append($(this).html());
                });
            });
        });
     
  3. Ablac

    Ablac Active Member

    I got the above code working, the Board needs to be active, so its importing all the DIVs and the entire Homepage Code, but now I'm running into another issue, How to display the imported code, and also how to solve a security issue.

    Code:
    Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.[Learn More]
    
    Password fields present in a form with an insecure (http://) form action. This is a security risk that allows user login credentials to be stolen.[Learn More]
    If anyone has any solutions It would be greatly appriciated, heres the entire code thats pulling Index.php.

    PHP:
    <html>
    <
    head>
    <
    script type="text/javascript" src="jquery.js"></script>
    <script>
    $(document).ready(function(){
            console.log('sending request to index.php');
            $.post("/index.php",{},function(response){
            
                console.log('ajax response:');
                console.log(response);

                console.log('navigation:');
                console.log($(response).filter('.navigation'));

                $(response).filter('.navigation').each(function(){
                    console.log('appending html:');
                    console.log($(this).html());
                    $('#main').append($(this).php());
                });
            });
        });</script>
    </head>
    <body>
        <div id="main">
        Hello...
        </div>
    </body>
    </html>
     

Share This Page