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

Blogs

Blogs statistics

Categories
7
Blogs
4
Blog entries
48
Series
9
Views
106,293
Comments
29
Ratings
2
Reviews
2
LPH
Views
7K
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...
PHP development eventually requires the programmer to understand and use Composer. XenWord 3 does not use the package dependency manager; however, the newest XenWord version is being developed to use the Composer autoload feature. The current working alpha relies on namespaces. At this point...
LPH
Views
3K
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...
PHP development is best done in an Integrated Development Environment (IDE). I prefer PhpStorm. Updating to PhpStorm 2017.1 added parameter hints. In particular, it's easy to start typing and type the word parameters. This loads the parameters needed for calling a method. This was used while...
LPH
Views
3K
Reaction score
1
Comments
1
General
This week has been all about trial-and-error, reading, watching tutorials, and finally asking why code is failing. It turned out to be a silly error in not using the Fully Qualified Name (FQN) in a conditional. And now I'm sitting relaxed, smiling, and gleefully looking at the horizon. It's...
LPH
Views
2K
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
1
General
The last released version of XenWord included a new checkbox option, replacing the use of "allow comments" as the conditional. This works well for people who rely on promoting threads. This morning, I was exchanging forum posts with someone who was explaining the default off position made...
LPH
Views
2K
Reaction score
1
Comments
1
General
Members may have noticed a few changes were made last night and this morning to the categories pages of XenForo. In particular, five recent articles from WordPress which match the category are now shown. This is accomplished with a callback to a PHP file which uses the wp_get_recent_posts...
LPH
Views
3K
Reaction score
1
General
XenForo 2 includes a means to call widgets from an external PHP page. The key is the templater() method. $templater = $app->templater(); /** @var \XF\Widget\WidgetRenderer $widgetRenderer */ $widgetRenderer = $templater->renderWidget('forum_overview_new_posts', [])...
The new documentation for XenForo 2 includes an explanation for building an add-on. I'm walking through the process right now and plan to update this post as new items are learned. Adding the add-on through the terminal was painless. It was simply a matter of answering questions and the...
LPH
Updated
Views
3K
Reaction score
1
General
In XF1, several lines were required to bridge. In XF2, only four lines are required. Create a file named connectXenForo2.php and add the following contents. <?php /** @var $fileDir */ $fileDir = '/Users/layneheiny/Documents/Sites/xf2'; require($fileDir . '/src/XF.php')...
LPH
Updated
Views
2K
Reaction score
1
General
There are many ways to replace the front end of a XenForo driven website. To learn more about developing add-ons for XenForo, I've been playing around with a simple add-on with its own templates. The add-on is far from complete. Below the five WordPress posts will be the latest threads. Below...
LPH
Views
609
Reaction score
1
General
A new widget was developed for XenWord 3.3.3 which shows the comments of a WordPress post sorted by the number of likes. I couldn't figure out a way to do this with a model, therefore, a replies queries was created and used to fetch all of the values. These replies were sent through a simple...
LPH
Views
2K
Reaction score
3
Comments
1
General
Early versions of XenWord automatically created a thread. Some customers asked for the allow comments to be used as a conditional for creating the thread. If unchecked then XenWord would not create the thread. This created confusion for some people who simply wanted an option available to...
LPH
Views
2K
Reaction score
1
General
There are days in which coding becomes a series of starts and stops. Create or Edit Thread What seemed like a simple idea has turned into doubt about the need for such an option. Adding a checkbox to decide whether to create or edit a thread started out fine last week. I was able to get the...
LPH
Views
2K
Reaction score
1
General
XenLate is a simple addon to show WordPress posts in the sidebar of XenForo. The first release simply added a listener to the model. A template did a xen:callback. Everything was very basic and the model was actually jammed with HTML as well as PHP code. Nothing was clean but it moved the idea...
In the first two parts to this beginner's series I started with a way to read and interact with XenForo code then did a quick breakdown of the index file. Part 3 looks at the directory structure. In my view, reading XenForo code is an important first step to building a simple or complex XenForo...
Top