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

Technology

LPH
Views
6K
Reaction score
1
Comments
2
Technology
An array contains a series of information. Retrieving a single piece of information involves iterating over a loop, such as foreach or calling the index directly using the array name and the index. For example, $this->options['use_thread_system'] In several places, I use information in the...
LPH
Views
2K
Reaction score
1
Comments
1
Technology
This code has me excited. Most XenWord classes reuse the same code for calling the options in WordPress database. class Post { protected $options; /** * Post constructor. */ public function __construct() { $this->options = get_option( 'xenword_options' ); }...
A PHP array is a great way to group items together into one variable then loop through to retrieve the information. Arrays are an important tool in PHP development. A tool I've stayed away from writing in my code until recently. Let me explain. The other day I was looking at the dashboard...
LPH
Views
2K
Reaction score
1
Technology
XenForo thread prefixes were challenging to add to a widget. This is because a var_dump of the $prefixTitle was returning thread_prefix_. object(XenForo_Phrase)[255] protected '_phraseName' => string 'thread_prefix_1' (length=15) protected '_params' => array (size=0) empty...
LPH
Views
1K
Reaction score
1
Technology
I've been around technology for many decades, yet have avoided or skipped learning certain technologies. JavaScript is an example. You might be thinking that is silly because of JavaScript's importance on the web since 2004. In my defense, my attention has been on other technologies, mainly...
I'm a huge fan of PhpStorm. It's has helped me tremendously through autocompletion and showing errors in PHP code. I'm also a fan of loading XenWord into different development environments so I can see what the code looks like outside PhpStorm. Typically I use Atom or Sublime Text. Today it was...
LPH
Views
2K
Reaction score
2
Comments
1
Technology
PhpMyAdmin is a great tool. It's included with MAMP Pro and I've used it for years. However, work on the Classroom Laravel project provided me an opportunity to branch out today into Sequel Pro in order to learn more about MySQL tables.* My naive understanding is Sequel Pro can help build...
LPH
Views
3K
Reaction score
2
Comments
4
Technology
The file WPPostsWide.php was placed in the community/library/TRN/XenWord/Model directory. <?php /** * Filename: WPPostsWide.php * Author: LPH */ class TRN_XenWord_Model_WPPostsWide extends XenForo_Model { public static function getHtml() { define( 'WP_USE_THEMES', false )...
LPH
Views
2K
Reaction score
2
Technology
The get_posts function has many arguments which allow a developer to pull from the meta table. <?php $args = array( 'posts_per_page' => 5, 'offset' => 0, 'category' => '', 'category_name' => '', 'orderby' => 'date', 'order' =>...
LPH
Updated
5.00 star(s) 1 ratings
Views
2K
Reaction score
2
Comments
3
Reviews
1
Technology
The Post Ratings addon by Luke is an essential XenForo addon. Basic XenWord support for the addon was included in April 2015, release 2.5.0 ( number 78 ) and the last changes were made in March 2016. Since support has been limited to showing likes on the WordPress side then I've been trying to...
LPH
Views
2K
Reaction score
2
Comments
1
Technology
The new WordPress widget for showing the latest threads in a wide view is now included in XenWord 3.3. The widget is live on the front landing page of the website. Even though this widget was built a few days ago, I changed the coding today to respect the User permissions. If a forum is hidden...
LPH
5.00 star(s) 1 ratings
Views
1K
Reaction score
1
Reviews
1
Technology
A widget for showing the latest blog entry was added to XenWord 3.3 and is live on this site. This is the first row of the main loading page on the WordPress side. The CSS is not included in the xenword-public.css file and is very easy to add in the customizer CSS available in WordPress 4.7...
LPH
Updated
Views
2K
Technology
The setup_postdata() function confused me for a bit. The examples on the WordPress Codex page didn't seem to explain why using setup_postdata() could be useful. Specifically, there is no difference in the var_dump using $post in example 1. After running a few different tests, it became clear...
The featured thread and forum widgets have been reworked. The select dropdown is populated with information pulled from a model rather than from a direct query to the database. The parsing of the featured thread has also been changed. Several div tags were added so that the overall look of the...
A very simple XenWord widget returns a list of forums based on a selection of the forum category. The first version had too many sql queries and so I rewrote the widget today. Other widgets are on my list to also fix. The original version used two sql queries. /** @var $node_qry...
The XenWord Settings Panel, Dashboard widget, and Board Totals widget now match in sequence and options. Links to the add-ons are now included in the init.php file for the Settings Panel. These options mainly turn on the board totals and dashboard community statistics widgets. Plans are still...
There are 24 files included in the Widget System. Several have not been touched in months, others are using procedural calls, and others are using poor code to pull threads. Two files regarding XenReviews will be deprecated soon. Work on widgets continued tonight: All of the widget file names...
I started working on widgets the other day. A goal for XenWord 3.3 is for the widgets to be consistent in six key areas: Use ob_start() PHP 5.3 hook $fetchOptions and $conditions Views return $instance or 'no form' proper class naming (match file name and class name) The use of $fetchOptions...
While tinkering with new code on a test project, I asked Bob from Xen Addons for some advice and help. His answers led to more questions, however, there were several gold nuggets in the answers. Due to my reliance on var_dump, the treasure was missed until this morning when I used print_r...
The login widget included with XenWord allows webmasters to integrate Twitter, Facebook, and Google. Unfortunately the code is terrible and I've been wanting to fix it. Currently, the widget file must be opened and the Google code and secret must be modified. I'll try to pull this information...
Top