• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

XenForo 2 XenWord Pro 2017 Notes

LPH

Flight Director
Flight Instructor
Ugh. I spent most of the day working through why the xenword-admin.css will not load as well as the conflicts with other XenForo add-ons and styles. The admin style still doesn't load. I literally copy code from the XF2 bridge which works into the legacy file and it will not work. :p

The XF1 legacy bridge code is now cleaned up and most of the classes are being loaded by Composer. This fixed the dashboard problem but not the widgets which do not load properly on this site (but do on the local development site).
 

LPH

Flight Director
Flight Instructor
Here is information on the version running on this server:

( 12 ) 2017.11.06 - November 6, 2017
Tested with WordPress 4.9-RC1-42115 (XenWord now works with Gutenberg)
Updated Redux Framework to 3.6.7.9
Common CSS and images between XF1 and XF2 bridge files
XF1 Added legacy/ to namespace and rebuilt legacy files (Huge change)
XF1 Removed branding and using XF2 code
XF2 Refactored members system
XF2 Added text option for the online widget
XF2 Comment system files are present but not functional
Bug Fix: Fixed Thread link in legacy all post page.
Bug Fix: Undefined Index for Redux Framework options.

The conflict between certain widgets and certain XenForo add-ons remains. Currently the UI.X Addon and XenWord Pro 2017 do not cooperate.
 

LPH

Flight Director
Flight Instructor
I'm calling it a night. Here are today's changes.

( 13 ) 2017.11.07 - November 7, 2017
Tested with XenForo 2 RC1
XF2 Comment counts are now pulled from XenForo 2
XF2 Wrapped conditionals for enabling / disabling XenWord systems
XF2 Added Author files but they are not connected
Bug Fix: XF1 Conflict with declaring certain XF addons
Bug Fix: XF2 Line 26 in Groups.php

Comments, authors, and widgets are incomplete. Once done then XenWord Pro 2017 will move to cleaning up the options available for posting threads.

Everyone's help has been greatly appreciated.
 

LPH

Flight Director
Flight Instructor
This is the last alpha:

( 13 ) 2017.11.10 - November 10, 2017
Tested with XenForo 2 RC1
XF2 Comment counts are now pulled from XenForo 2
XF2 Comments from WordPress are posted to XenForo 2
XF2 Thread replies are posted to WordPress Comments
XF2 Author files are connected and functional
XF2 Wrapped conditionals for enabling / disabling XenWord systems
XF2 Top Posters Widget functional
Bug Fix: XF1 Conflict with declaring certain XF addons
Bug Fix: XF2 Line 26 in Groups.php
 

LPH

Flight Director
Flight Instructor
This weekend was almost a complete bust until Mike pointed out something which turned out to be pretty obvious. Up to this point, any HTML in a WordPress post would not be changed to BBCode. Code in Post.php now appears to be working. Here are two screenshots: one from the WordPress side and the other from the XenForo 2 side.

HTML WP Side.png


HTML in XF 2.png
 

LPH

Flight Director
Flight Instructor
Widget work continues on the XF2 side of the bridge. I decided to organize the widgets for easier display as well as coding. There are now 7 directories for the proper placement of the widgets.

In terms of coding, creating the directories has allowed me to see which widget areas need attention. Currently, the threads widgets are in terrible disarray; that is, different descriptions for similar concepts, etc.

XenWord 2017.12.18 Widgets.png


This might not look like tons of work but it took about 8 hours to organize, re-organize, and fix little details. In fact, I see one glaring issue in the XF Threads - All Forums (Sidebar) because it should be XF Threads - Latest (Sidebar). Ah details.
 

LPH

Flight Director
Flight Instructor
( 15 ) 2017.12.18 - December 18, 2017
Removed throw exceptions in xenword.php
Restructured Widgets in Legacy and XF2 portion of the bridge
Added Prefixes Metabox to post-new - can now choose the prefix from a select option drop down list.
Added Notices, Latest Threads in specified forum
Added Prefixes and Username to Latest Threads widget
Added options for Latest Threads widget to show Latest, Unread, and Watched
Added CSS Labels for Thread Prefixes
Bug Fix: Post WordPress article to XenForo now supports BBCode.

Screen Shot 2017-12-19 at 9.28.37 PM.png


XenWord 2017.12.19 Widget Prefixes and Username.png
 

LPH

Flight Director
Flight Instructor
Worked on fixing some silly bugs from my coding and finally spent much needed time on the Community Statistics Wide Widget. The icons are not in the table but this will give a feel for the direction.

XenWord Pro 2017.12.21 Wide Stat Widget.png
 

LPH

Flight Director
Flight Instructor
The wide widget is now complete. Thank you for all of the feedback and suggestions.

XenWord Pro 2017.12.22 Wide Widget.png

Next up ... adding the options for WordPress posting to XenForo 2 threads. This should get the bridge parity to the XF1 portion of the bridge and allow a release candidate to be available.
 

LPH

Flight Director
Flight Instructor
Featured Image and excerpt lengths are now supported in XenWord Pro 2017.12.28. This completes the post/edit portion of the bridge.

I've hinted for months that XenWord Pro 2017 is a joy to code because of the way methods are broken down to single responsibilities. Here is an example:

Code:
/**
* Build message using: $featuredImage $prefix $message $postfix
*
* @param $post
*
* @return string
*/
public function getMessage( $post ) {

   // $featuredImage
   $featuredImage = $this->getFeaturedImage( $post );

   // $prefix
   $submissionText = $this->getThreadSubmissionText();
   $author = $this->getAuthor( $post );
   $prefix  = $author . $submissionText . "\n";

   // $message
   $message = $this->getMessageContent( $post );
   $message = BbCode::renderFromHtml( nl2br( $message ) );

   // $postfix
   $continueText = $this->getThreadContinueText();
   $postfix = "\n[URL='" . esc_url( get_permalink( $post->ID ) ) . "']" . $continueText . "[/URL]\n";

   // Build $message
   $message = $featuredImage . "\n" . $prefix . '[QUOTE]' . $message . '[/QUOTE]' . "\n" . $postfix;

   return $message;
}

In my opinion, the code above is slick.

Here is an image of a post made to XenForo 2. The post includes the featured image, is trimmed to excerpt, and links back to the blog post.

XenWord Pro 2017 Featured Image.png
 

LPH

Flight Director
Flight Instructor
The bad gateway errors being submitted by sites has had me concerned over the past few weeks. Removal of a portion of the login form appears to suggest code from XenForo 1 is not necessary for XenForo 2 login.

Feel free to test this code:

Go to line 126+ in src/Includes/Widgets/Users/Login.php

Comment out the hidden portion of the form.

Code:
<?php
/**
<input type="hidden" name="cookie_check" value="0"/>
<input type="hidden" name="redirect" value="<?php echo $redirect ?>"/>
<input type="hidden" name="_xfToken" value=""/>
* */
?>
 

LPH

Flight Director
Flight Instructor
Release Candidate 3 contains a notification bar to help people who are new to the installation process. The backend has also been significantly reorganized, sporting a new "install settings" group.

( 23 ) 2018.06.10 - June 10, 2018
Rearrange the order of ini for backend; created "installation settings" group
Touch up of the faqs.txt by specifying virtual server must be the same.
Rearrange the readme.txt.
Change CSS for notification bar to use position:sticky instead of position:fixed
Change CSS for Login Widget -- margin-bottom: 5em;
Bug Fix: Wrong hook for notification bar
Bug Fix: Community statistics widget default title

PS. Yes. I haven't been posting. My job became very demanding, with four different courses . including being responsible for AP Physics 1. @Gracie asked for a way to stop the same questions being repeatedly asked after someone purchases the bridge. The notification bar and rearrangement of the settings might do the trick.
 

Attachments

  • XenWord Pro README File.png
    XenWord Pro README File.png
    770.1 KB · Views: 119

LPH

Flight Director
Flight Instructor
This widget snuck in late tonight. Let's keep this one a secret. ;)

Community Poll Widget.png


It's unfinished -- needing the question linked to the poll. There probably should be a voting link.
 

LPH

Flight Director
Flight Instructor
This is a look at the process -- sometimes people think that coding is sitting and creating. Many times it is coding, thinking something is working, check it, and it blows up in your face. Here is a perfect example.

After spending the morning, and an hour in the afternoon, the init file was split between loading XenForo 1 options and XenForo 2 options. See for yourself.


Work continues later today after a stretch break.
 

LPH

Flight Director
Flight Instructor
( 24 ) 2018.06.11 - June 11, 2018
Created Poll widget
Split the init file
Added WP Blog Entries in Community Statistics
Added ResourceItem Count in Community Statistics

I'm tired for the day. Today was at least 10 hours of mistakes and successes.

The split of the init file is working well on the XF2 side. I haven't tried it on the XF1 side.
 

LPH

Flight Director
Flight Instructor
I know. I was going to sleep about 2 hours ago when something hit me. It was an idea from about 3.5 years ago -- give or take a half a year. The idea was for the absolute path to XenForo to be determined by XenWord.


It needs a ton of cleanup work -- but the basic idea appears to work. OK. Let's call it a "proof of concept."
 

LPH

Flight Director
Flight Instructor
The new alignment instructions in the XenWord Settings Panel.

The new page includes a quick introduction, a short video showing phpMyAdmin, and a link to the full documentation on alignment.

XenWord Pro 2018 Alignment Page.png
 

LPH

Flight Director
Flight Instructor
This XenForo 1 option is now available for XenForo 2 side of the bridge. Splitting the init file has led to several advantages. One being able to get this plugin feature equivalent on both sides of the bridge.

threadViewCount.png
 

LPH

Flight Director
Flight Instructor
New option added for WordPress trim versus XenForo trim.

Gold is rapidly approaching. I can smell it and it is sweet.

( 25 ) 2018.06.14 - June 14, 2018
The threadView option is now available for each WordPress post
Total Online Count and option now in Community Statistics widget
Added Excerpt option for WordPress trim rather than XenForo trim
Bug Fix: get_avatar filter when $email
 
Top