• 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.

XenWord Development in May 2016

Status
Not open for further replies.

LPH

Flight Director
Flight Instructor
LPH submitted a new blog post

XenWord Development in May 2016

mathematics-2.jpg


This thread describes successes in developing XenWord during the month of May 2016.
Continue reading the Original Blog Post.
 
Last edited:

LPH

Flight Director
Flight Instructor
Decided authentication needed my full attention. The following video shows the last sticking point, which is the login requires a refresh.


The good news is that the WordPress cookie is being seen and caching is enabled on the development test sites.

Note for a possible Temporary fix for Login Widget:

PHP:
//cheks if ? already exists in URL
if( strpos( $redirect_to, '?' ) !== false ) {
     $redirect_to .= "&login=".rand( 1,999999999999 );
} else {
     $redirect_to .= "?login=".rand( 1,999999999999 );
}
 

LPH

Flight Director
Flight Instructor
The new authentication code seems to be holding up under different cache systems. Tonight I added a new file for author descriptions in the author box. This deprecates a complex file that caused issues with get_userdata.

Here is the code:

PHP:
function get_the_author_meta_filter( $field = '', $user_id = false ) {

   $author_id = get_the_author_meta( 'id', $user_id );

   $userModel = XenForo_Model::create( 'XenForo_Model_User' );
   $user      = $userModel->getFullUserById( $author_id );

   return $user['about'];
}

add_filter( 'get_the_author_description', 'get_the_author_meta_filter' );

Pretty straight forward code: filter the description by returning the about information in the XenForo user table. The code has been uploaded onto this server and we'll see how it works.
 

LPH

Flight Director
Flight Instructor
Started to organize the public CSS file. Each section is listed by most relevant to all sites; that is, most sites use the discuss link and the login widget. The least used is the WP Toolbar and Branding.

Most of the time was spent on the discuss link CSS since it and the PHP were messed up. It looks like corrections made in a previous version were lost. Oops.

I hope this improvement is useful.

XenWord Organizing CSS.png
 
Status
Not open for further replies.
Top