Random Insights

Random Insights is an area of this site where we collect tidbits of information that we found useful and that we thought other people may also find useful. Some are more complete than others but they may get your heading in the right direction if you are trying to solve a problem.

Many are related to Joomla but some are general PHP or Web in general. They are broken into several categories to make it easier to find relevant articles. 

 

Recent Random Insights

  • 02 March 2017
    $Skaters is an array of objects which have one parameter skatername and this will sort the array basedon teh skatername parameter. usort($Skaters, function($a, $b)        {            return strcmp($a->ska...
  • 07 February 2017
    When moving a form from one stie to another using the backup restore functionality of RSForms, the new site went to a completely blank screen when trying to view the form. The problem was that a file that was referenced by a require_once statement wasn't present on the new machine. Make sure all req...
  • 08 December 2016
    When you have a data object that contains SimpleXMLElements they can be tricky to access because they look like objects but they aren't accessed in the same way. In this case they appeared to be objects that had the @ symbol in the object name. For example, a complex object that is used by Form.ph...
  • 07 December 2016
    This code was part of the demo on creating a joomla extension http://www.slideshare.net/TimPlummer/how-to-create-a-joomla-componet-from-scratch?next_slideshow=2 It is used to rename all of the files in the helloworld example extension so that you can create a new extension from that code more quick...
  • 06 December 2016
    The right hand menu that often appears in admin components is configured in the /com_name/helpers/name.php file. For example: public static function addSubmenu($submenu)     {        JSubMenuHelper::addEntry(         &...
  • 17 November 2016
    I was getting some data out of RSForms that wasn't structured in a way that was easy to manage, so I used the following routine to flatten all the data into a single array of variables and their values. It takes checkbox, radio button and list box selections and turns them into simpler variable. fu...
  • 14 November 2016
    If you want to add a style sheet for the Regular Labs (formerly no number) Modals pop-up to use, you need to do the following. There are three steps to using an additional style sheet for the Modals pop-up window to use. Add modals.php file to the directory of the template you're ...