XenScripts WordPress to XenForo Bridge [Paid] [Deleted]

this add-on is no longer support. It waste me 2 weeks to make it work but no luck. Have emailed the author but waste of time. I don't ask for refund but please Xenforo delete it out of here.
 
Can anybody help me with this problem?

http://xenforo.com/community/threads/login-bar-on-wordpress-pages.46881/

Thanks in advance.

There are HowTo explanations on my site which might help you out with matching WP and XF styles. But the work will take time.

As you will see on my site, I heavily modified the navigation and navigation.css in XenForo and moved information to a header fieldset. The header code I use on the WP side has been posted a few times but I never wrote up my instructions on the XenForo side. Sorry - maybe I'll do that when I have time.

Hope this information helps. Modify the WP child theme header.php file. Add the following code below the body tag:

PHP:
<fieldset id="header_bar">
    <div class="pageWidth">
        <div class="pageContent">
     
            <?php
                if ( is_user_logged_in() ) {
 
                    global $current_user, $XF;
                    get_currentuserinfo();
                 
                    echo '
                        <span id="member" class="loggedIn_menu_class"><a href="/community/conversations/">Inbox</a>  <strong class="itemCount">' . $XF->visitor->get('conversations_unread') . ' </strong>
                        <a href="/community/account/alerts">Alerts</a> <strong class="itemCount">' . $XF->visitor->get('alerts_unread') . ' </strong>
                        <a href="/community/logout">Log Out</a></span>
                        ';
 
                    echo '
                        <span id="member" class="loggedIn_menu_class">
                        ';
                 
                    echo '
                     
                        <a href="/community/members/' . strtolower($XF->visitor->get('username')) . '.' . $XF->visitor->get('user_id') .'"> '. $current_user->display_name .'</a></span>
                        ';
                 
                 
                        if ( $site_admins = array ( 'List your admins' ) ){
                            echo '
                                <span id="member" class="admin"><a href="/wp-admin">WordPress Admin Panel</a>
                                <a href="/wp-admin/post-new.php">WordPress Add New Blog Post</a>
                                <a href="/community/admin.php">XenForo Admin Panel</a></span>
                                ';
                        }
               
                 
                 
                } else {
 
                    echo '
                        <script>XenForo.LoginBar = function(a){};</script>
                   
                        ';
                     
                        if ($_SERVER['HTTP_HOST'] == 'tuxnotes.tuxreportsnetwork.com') {
                         
                            echo '<span id="member" class="logIn_menu_class"><a href="http://www.tuxreportsnetwork.com/community/login" class="OverlayTrigger inner">Log In or Sign Up</a></span>';
                         
                        } else {
                     
                     
                        echo '<span id="member" class="logIn_menu_class"><a href="/community/login" class="OverlayTrigger inner">Log In or Sign Up</a></span>
                    ';
                } }                ?>
        </div>
    </div> 
</fieldset>

You will want to clean up some of the if statements to match your needs.
 
There are HowTo explanations on my site which might help you out with matching WP and XF styles. But the work will take time.

As you will see on my site, I heavily modified the navigation and navigation.css in XenForo and moved information to a header fieldset. The header code I use on the WP side has been posted a few times but I never wrote up my instructions on the XenForo side. Sorry - maybe I'll do that when I have time.

Hope this information helps. Modify the WP child theme header.php file. Add the following code below the body tag:

PHP:
<fieldset id="header_bar">
    <div class="pageWidth">
        <div class="pageContent">
   
            <?php
                if ( is_user_logged_in() ) {
 
                    global $current_user, $XF;
                    get_currentuserinfo();
               
                    echo '
                        <span id="member" class="loggedIn_menu_class"><a href="/community/conversations/">Inbox</a>  <strong class="itemCount">' . $XF->visitor->get('conversations_unread') . ' </strong>
                        <a href="/community/account/alerts">Alerts</a> <strong class="itemCount">' . $XF->visitor->get('alerts_unread') . ' </strong>
                        <a href="/community/logout">Log Out</a></span>
                        ';
 
                    echo '
                        <span id="member" class="loggedIn_menu_class">
                        ';
               
                    echo '
                   
                        <a href="/community/members/' . strtolower($XF->visitor->get('username')) . '.' . $XF->visitor->get('user_id') .'"> '. $current_user->display_name .'</a></span>
                        ';
               
               
                        if ( $site_admins = array ( 'List your admins' ) ){
                            echo '
                                <span id="member" class="admin"><a href="/wp-admin">WordPress Admin Panel</a>
                                <a href="/wp-admin/post-new.php">WordPress Add New Blog Post</a>
                                <a href="/community/admin.php">XenForo Admin Panel</a></span>
                                ';
                        }
             
               
               
                } else {
 
                    echo '
                        <script>XenForo.LoginBar = function(a){};</script>
                 
                        ';
                   
                        if ($_SERVER['HTTP_HOST'] == 'tuxnotes.tuxreportsnetwork.com') {
                       
                            echo '<span id="member" class="logIn_menu_class"><a href="http://www.tuxreportsnetwork.com/community/login" class="OverlayTrigger inner">Log In or Sign Up</a></span>';
                       
                        } else {
                   
                   
                        echo '<span id="member" class="logIn_menu_class"><a href="/community/login" class="OverlayTrigger inner">Log In or Sign Up</a></span>
                    ';
                } }                ?>
        </div>
    </div>
</fieldset>

You will want to clean up some of the if statements to match your needs.


Well, first of all thanks for your help. I have that bad feeling that you're way more active than the author itself.
But I just noticed, that the bridge doesn't promote the blog posts anymore. (It's not the first time, that I have problems like this.)

I think I'll switch to this plugin http://xenforo.com/community/resources/xf-wordpress-bridge.1833/ as soon as it support promoting threads.

I really liked this plugin. The promoting feature was great and it had everything I wanted. (Except the Login Bar on Wordpress) But it seems like it doesn't go well anymore. Furthermore, I'm not the only one with this problems. :/
 
Well, first of all thanks for your help. I have that bad feeling that you're way more active than the author itself.

No problem. I have not been around for the past few months. Life happens :)

But I just noticed, that the bridge doesn't promote the blog posts anymore. (It's not the first time, that I have problems like this.)

Interesting. Did you make a configuration change? Did you upgrade a different plugin? Did you try to disable every plugin then enable only XenScripts to see if it would post to the forums?
 
Hi it looks like this plugin has a few bugs that have to be resolved manually, does anyone know if a new version will be released soon with these bugs fixed?
 
So you working again on it? Nice to hear. Maybe I'll reinstall it in that case. But I guess it still isn't compatible with W3TC, right?

Actually, would you try to add this code into the plugin/include/xf_replacement_user_functions.php file:

PHP:
if ( function_exists('w3tc_pgcache_flush') ) {
  w3tc_pgcache_flush();
} else if ( function_exists('wp_cache_clear_cache') ) {
  wp_cache_clear_cache();
}

Enable W3TC and please report back .... :)

Update: I guess the flush should be much more powerful.

PHP:
      if ( function_exists( 'w3tc_pgcache_flush' ) )
         w3tc_pgcache_flush();

       if ( function_exists( 'w3tc_dbcache_flush' ) )
         w3tc_dbcache_flush();

       if ( function_exists( 'w3tc_minify_flush' ) )
         w3tc_minify_flush();

       if ( function_exists( 'w3tc_objectcache_flush' ) )
         w3tc_objectcache_flush();

       if ( function_exists( 'wp_cache_clear_cache' ) )
         wp_cache_clear_cache();
 
Last edited:
This is just a teaser for the new admin panel in XenScripts 1.3 sitting on my local test environment.

Please realize there is no timeline and Jamie has the ultimate say for when code is ready to be released .... but he's already stated 1.2 is soon.

Enjoy the sneak peek.


XenScripts 1.3 alpha.webp
 
Actually, would you try to add this code into the plugin/include/xf_replacement_user_functions.php file:

PHP:
if ( function_exists('w3tc_pgcache_flush') ) {
  w3tc_pgcache_flush();
} else if ( function_exists('wp_cache_clear_cache') ) {
  wp_cache_clear_cache();
}

Enable W3TC and please report back .... :)

Update: I guess the flush should be much more powerful.

PHP:
      if ( function_exists( 'w3tc_pgcache_flush' ) )
        w3tc_pgcache_flush();

      if ( function_exists( 'w3tc_dbcache_flush' ) )
        w3tc_dbcache_flush();

      if ( function_exists( 'w3tc_minify_flush' ) )
        w3tc_minify_flush();

      if ( function_exists( 'w3tc_objectcache_flush' ) )
        w3tc_objectcache_flush();

      if ( function_exists( 'wp_cache_clear_cache' ) )
        wp_cache_clear_cache();

Sorry, can't test it right now, since I don't use it atm. I'll wait for the new version and test it than. Thanks for your great work. :)
 
Sorry, can't test it right now, since I don't use it atm. I'll wait for the new version and test it than. Thanks for your great work. :)

Please realize that this will not be put in a new version until it is tested. Since I do not use caching plugins then maybe someone else will test.
 
Please realize that this will not be put in a new version until it is tested. Since I do not use caching plugins then maybe someone else will test.

Uhm okay. If there's nobody who's still using the pugin and W3TC I'll do it ofc. I'll give you some feedback today or tomorrow okay?

Just to be sure; I'll add this

Code:
      if ( function_exists( 'w3tc_pgcache_flush' ) )
        w3tc_pgcache_flush();

      if ( function_exists( 'w3tc_dbcache_flush' ) )
        w3tc_dbcache_flush();
      if ( function_exists( 'w3tc_minify_flush' ) )
        w3tc_minify_flush();
      if ( function_exists( 'w3tc_objectcache_flush' ) )
        w3tc_objectcache_flush();
      if ( function_exists( 'wp_cache_clear_cache' ) )
        wp_cache_clear_cache();

into
plugin/include/xf_replacement_user_functions.php
Where doesn't matter, right?
 
@lph - can you help me out with something I am trying to achieve. Since after the integration the WP profile is inaccessible, I am not able to insert the author google plus profile into their posts. Would it be possible to save this URL into XF and then call it from the user posts?

Or any other suggestions to do this?
 
@lph - can you help me out with something I am trying to achieve. Since after the integration the WP profile is inaccessible, I am not able to insert the author google plus profile into their posts. Would it be possible to save this URL into XF and then call it from the user posts?

Or any other suggestions to do this?

Showcase and a few other add-ons that I own add fields to the xf_user database. I do not know how to do this but it makes sense that custom fields such as google profile need to be added to this bridge. I'll put it on the "to do" list but this is out of my scope of knowledge. Jamie might have some ideas.

Update: After thinking a moment, I know how to add a field to a database because this script adds a thread_id to the WP database. My initial thought was ... there might be an alternative way. Jamie has a php comment in that area to support WP profile information available in the future.
 
Last edited:
With Wordpress 3.6 on the horizon, future versions should be tested against the current beta.

Version 1.2 is uploaded to the Amazon server with the following changes:

Updated user functions to be compatible with WP 3.5.1
Removed duplicate files in /include
Cleaned up code in select files for future features
Added PHPDoc style page-level DocBlocks to files
New code to TRIM WordPress blog postings placed in the XenForo Community
Changed function xenforo_thread_url
Changed get_currentuserinfo()

I have version 1.3 alpha on my local server with the following changes:

Updated functions to be compatible with WP 3.6
Changed coding style to match WordPress PHP Coding Standards
New XenScripts WordPress Admin panel
Changed location of XenScripts options to /admin folder
Added /images to hold png files for Admin panel
Added defined( 'ABSPATH' ) OR exit; to files
Renamed XF_User_Data.php to xf_user_data.php
Created xf_branding_footer.php
Changed Plugin Name to better find plugin in WP admin panel
Added Capabilities: create_product, delete_themes, export, manage_network, manage_sites, manage_network_users, manage_network_themes, manage_network_options

Version 1.3 alpha is running on WordPress 3.6-beta3-24432.

I'll look into canonical link support.
 
Top Bottom