XenWord Pro

XenWord Pro [Paid] 2017

No permission to buy ($49.99)

LPH

Well-known member
#61
LPH updated XenWord with a new update entry:

New Feature - Thread ID in WordPress Admin Panel

This new feature allows administrators to see if a XenForo thread is tied to a WordPress thread.

If there is no thread_id, an administrator may go into the WordPress database and add a thread number to the thread_id field. This will tie the available XenForo thread to the WordPress article.

The following shows the thread number in the last column.

View attachment 66324
Read the rest of this update entry...
 
#62
I didn't read all the post so sorry if it was already asked but did wordpress custom post type can create XenForo threads? or is it only for page and default post?
 
#63
@LPH just making sure, but I currently have XenForo at the root directory, mysite.com, and then I have a subdomain with a wordpress install of mysite.com/blog. Would this type of setup work with XenWord? I read over the documentation and I believe it would, but just want to make sure before I purchase this plugin.
 

LPH

Well-known member
#64
I didn't read all the post so sorry if it was already asked but did wordpress custom post type can create XenForo threads? or is it only for page and default post?
Not in the current release but I might be able to add a custom post type if this was modified to your particular custom post type.

Code:
($post->post_type == 'page')
Where page would be changed to 'custom post type'.

Update: After thinking about this, it would require a new option in the settings panel. Let me see what I can do because now I'm sort of excited about adding it.

@LPH just making sure, but I currently have XenForo at the root directory, mysite.com, and then I have a subdomain with a wordpress install of mysite.com/blog. Would this type of setup work with XenWord? I read over the documentation and I believe it would, but just want to make sure before I purchase this plugin.
Yes, I suspect this would work. I was just thinking last night while working on the auto-detect that having XenForo in the root was not in the 'future' code. It was my oversight - but for now you'd be able to place a relative path in the settings.
 
Last edited:

LPH

Well-known member
#65
@epiom -- Custom Post Types now work in version 1.0.0.9 !

Thank you for the suggestion. I'm still testing the code and will release it as soon as I have done a few more tests but the posts definitely work ;)

Here is a video showing a post to a custom post type named portfolio.

 
#67
Nice Work with the custom post type! ;) After looking at the video, the next update for custom post type in the future could be an option to use multiple custom post type where we could assign different ID, since this is a really powerful option in Wordpress assigning only 1 ID can be a problem.
 

LPH

Well-known member
#68
Nice Work with the custom post type! ;) After looking at the video, the next update for custom post type in the future could be an option to use multiple custom post type where we could assign different ID, since this is a really powerful option in Wordpress assigning only 1 ID can be a problem.
Yes, I agree. I decided to go simple first to make sure custom posts would work. Once I've finished testing 1.0.0.9 then I'll redo some of the code so that there can be multiple forums chosen. I also want to get code so the author can choose at the point of publishing - but that's a distant thought.

Tonight I decided to move development to cloud9 and am setting up a development server on digital ocean - files are uploading right now :).

This will help me test more of the features under different environments: local == single; DO droplet == multisite enabled
 

LPH

Well-known member
#69
New Feature in XenWord 1.0.0.9
Added a new option for posting a WordPress post in XenForo. Administrators may choose between Full, Excerpt, or simply a Link. Full postings do not have quotes around the text.

2014-02-04_00-33-19.png
 
Last edited:

LPH

Well-known member
#70
LPH updated XenWord with a new update entry:

New Custom Post Type Support

View attachment 66533

The above image is clipped from the status panel in XenWord 1.0.0.9 and shows the support for custom post types. This support is currently for one forum and may be expanded in the next version.

This release includes several new features, some code changes, and file name changes.

New Features
  • Custom Post Type Support
  • Next Full, Excerpt, or Link options for XenForo thread creation
Code Changes
  • UPDATE statement in...
Read the rest of this update entry...
 
#72
Damn, you really are on a roll. Definitely considering purchasing this mod.
Are there any WP theme modifications needed or does it work/show the comments from the forum out of the box?
 

LPH

Well-known member
#73
Damn, you really are on a roll. Definitely considering purchasing this mod.
Thank you.

Are there any WP theme modifications needed or does it work/show the comments from the forum out of the box?
There is an option in the panel to show the comments from the forum on the WordPress side. You may end up modifying the theme to clean things up to your liking...

I'm trying to add as many options as possible but the 1.0.0.10 surprise is going to wait until I figure out why XF 1.3 Beta 2 blows up on the custom post type.
 

LPH

Well-known member
#75
XenWord 1.0.0.10 is being cleaned up.
  • New Option: Access to the WordPress Users panel
  • Over 100 lines of code have been changed.
  • New code for custom post types.

This is the last of the 1.x series. Release 2.0.0.1 will be the next release because the add-on will finally be within the boilerplate - allowing for the script to be expanded even more ;)

Here is a short video showing the new feature for access to the WordPress panel.

 

LPH

Well-known member
#77
Any news about a facelift for the latest posts widget? In 2.0 perhaps? =)
The 2.x versions will bring many new features but I'm looking over Roles and Capabilities right now. There needs to be a 'cleaner' way to match an XF usergroup to a WP role.
 

LPH

Well-known member
#78
I've spent the last few days working through permissions, the best way to work through tying the secondary group to the logged in user, and changing some procedural functions into methods with classes.

This widget was created to help diagnose Roles and Capabilities. You are welcome to add it to your plugins directory, activate, change visibility for only admins or use it on a test environment.

Screen Shot 2014-02-11 at 10.02.36 PM.png

Here is the code. Feel free to modify it and let us know if you made any changes.

Code:
<?php
/* Plugin Name: XenWord Show Current User Information
Plugin URI: tuxreports.com
Description: Shows the role the current user has. This is for diagnostics.
Version: 1.0
Author: Layne P. Heiny
Author URI: www.tuxreports.com/lph
*/

class XFUserInfo extends WP_Widget {
          function XFUserInfo() {
                    $widget_ops = array(
                    'classname' => 'XFUserInfo',
                    'description' => 'Show Current User Information'
                 );
       
                 $this->WP_Widget(
                    'XFUserInfo',
                    'Show Current User Information',
                    $widget_ops
                 );
         }

          function widget($args, $instance) { // widget sidebar output
                    extract($args, EXTR_SKIP);
                    echo $before_widget; // pre-widget code from theme

                        global $XF, $wp_roles;
                       

                        // Login or Register
                        $user_id = get_current_user_id();
                       
                        if( $user_id == 0 ) {
                           echo 'You are currently not logged in. Please <a href="';
                           bloginfo('wpurl');
                           echo '/wp-login.php">Login</a> or ';    
                           
                            if( get_option('users_can_register')); { ?>
                                    <a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=register"><?php _e('Register') ?></a>
                            <?php }                       
                       
                        } else {
                           echo 'You are logged in as user '.$user_id . '<br />';
                        }
   
                        echo '<br />';   

                       
                        // WordPress Information
                        echo '<br /><br /><strong><u>WordPress Information</u>:</strong> <br />';                       
                       
                        global $current_user;
                        get_currentuserinfo();
   
                        echo 'WP Login Username: ' . $current_user->user_login . '<br />';
                        echo 'WP User email: ' . $current_user->user_email . '<br />';
                        echo 'WP User first name: ' . $current_user->user_firstname . '<br />';
                        echo 'WP User last name: ' . $current_user->user_lastname . '<br />';
                        echo 'WP User display name: ' . $current_user->display_name . '<br />';
                        echo 'WP User registration: ' . $current_user->user_registered . '<br />';
                        echo 'WP User ID: ' . $current_user->ID . '<br />';
   
                        echo 'User Group: ' . $usergroup->title . '<br />';
                       
                        echo '<br />';
                       

                        // XenForo Information
                        echo '<br /><br /><strong><u>XenForo Information</u>:</strong> <br />';
                        echo 'XF Username: ' . $XF->visitor->get('username') . '<br />' ;
                        echo 'XF User ID ' . $XF->visitor->get('user_id') . '<br />';
                       
                        $user_groups = explode( ',', $secondary_group_ids );
                        $user_groups[] = $user_group_id;
                   
                        /**
                        * Loop through the user_roles and find the Secondary Usergroup for each
                        */
                        echo 'XF Secondary Usergroup:';
                        $user_roles = array();
                        foreach( $user_groups as $user_group ) {
                            $user_roles[] = $XF->options['xf_user_role'][$user_group];
                       
                            echo $XF->options['xf_user_role'][$user_group] . '<br />';
                           
                            echo '<br /><br />';                   
                           
                            // User Roles       
       
                            if ( current_user_can( $role ) ) {
                       
                            echo '<br /><br /><strong><u>User Role Information</u>:</strong> <br />';
                            echo 'This user has a role of ' . $role . '<br />';
                            }
                        }


                    echo $after_widget; // post-widget code from theme
                }
        }

add_action(
          'widgets_init',
          create_function('','return register_widget("XFUserInfo");')
);
 

Frode789

Well-known member
#79
I had to disable the latest post widget as it does not take into account forum permissions. Thus when I post a new thread in our staff forum, the thread title will be posted in the widget.. No crisis, but then we can't use the widget.
 

LPH

Well-known member
#80
I had to disable the latest post widget as it does not take into account forum permissions. Thus when I post a new thread in our staff forum, the thread title will be posted in the widget.. No crisis, but then we can't use the widget.
Hi

Yes, that widget needs work. Actually, I've ripped apart the plugin and am trying to piece it back together using something besides get_userdata pluggable. Currently the get_userdata is the key to assigning roles to the XF secondary usergroup. For the new code, the latest var_dump shows the role is correctly assigned but - sadly - the role is not being updated in the database. Once get_userdata is no longer used then I can clean up all types of earlier problems ... ( I hope ... Imagine being able to use WP users, membership plugins, and more ).
 
Top