Optimize your website with a few linux command line tools

When optimizing your website you will notice that images, and static resources are the most delaying the load of your website. You can use numerous tool to optimize them on the fly and cache them in WordPress or Joomla cache. I personally prefer to optimize them for once and save them on the disk.

The latter is requiring some access to the Linux command line and is therefore reserved for the most tech oriented people. I am presenting here some tools: Guetzli and PNGQuant, uglifyJS but there are more available. At this point of time these tools are the best in their category.

Optimizing JPEG files

Guetzli is a Google JPEG encoder that aims for excellent compression density at high visual quality. Guetzli-generated images are typically 20-30% smaller than images of equivalent quality generated by libjpeg. Guetzli generates only sequential (non progressive) JPEG due to faster decompression speeds they offer.

Install it

apt install guetzli # linux
brew install guetzli # macos
# windows user should use binary releases https://github.com/google/guetzli/releases

It is recommended to always do a backup of the folder containing your images, just in case. (real men don’t do backup but they often cries). I run Guetzli recursively in all sub-folder using find

find . -type f -name "*.jpg" -exec guetzli {} {} \;

Optimizing PNG files

pngquant is a command-line utility and a library for lossy compression of PNG images. The conversion reduces file sizes significantly (often as much as 70%) and preserves full alpha transparency. Generated images are compatible with all web browsers and operating systems.

apt install pngquant # linux
wget https://pngquant.org/pngquant.tar.bz2 # macos
# windows user should use binary releases https://pngquant.org/pngquant-windows.zip

I use the same technique, running pngquant recursively in all sub-folder using find

find . -iname "*.png" -exec pngquant -f -ext .png --verbose {} {} \;

Optimizing JavaScript files

Warning: i do not recommend to optimize official files of WordPress or Joomla. Some build int scanner that checksum internal file may detect this changes as a security breach: new code checksum do not match official WordPress expect checksum anymore.
It can be use for plugins and your own custom JavaScript code through.

UglifyJS is a general-purpose JavaScript parser/compressor/beautifier toolkit. 

find . -maxdepth 1 -iname "*.js" -exec uglifyjs --compress --mangle -o {} -- {} \;

Joomla 3.8.7 and WTLib WinNMP 18.03

As always updating to the latest version of all your developement components is never without any issues, here is what  you need to take into consideration when upgrading Joomla 3.8.7 and WinNMP 18.03

Install WinNMp 18.03 from https://winnmp.wtriple.com/ in any directory, default is C:\WinNMP\

Unpack Joomla 3.8.7 to C:\WinNMP\WWW\dev for example

When starting WinNMP, you can click reload, to see the site appearing

 

 Now edit Nginx virtual server

 

 And cut and paste the following config (you can get it from http://winnmp.wtriple.com/nginx.php#Joomla-Nginx-configuration)

 

You can now install Joomla like you are used to, by opening a browser and pointing to http://dev.test

After the installation you’ll notice that the administrator area is broken, some CSS/Javascript can not be located (Http 404). To solve this, open with your favorite text editor joomla! configuration.php and set the live site property (was in Joomla 1.5, then removed then it appear again)

 

 Now the administrator area should work again… but you can not install any Joomla! extensions, because open_basedir = “c:/winnmp” and do not contains the temporary directory, you can safely deactivate it for development, but NOT on ANY production server.

;open_basedir = “c:/winnmp”

 Last but not least, php_uname is used by Joomla, activate it in php.ini to remove some warnings

 

 

 

 

Beyond Corp project from google

Beyond Corp project scrap the notion of a corporate network and move to a zero-trust model….

Google sees little distinction between boardrooms and bars, cubicles and coffee shops; all are untrusted under its perimeter-less security model detailed in a paper published this week. The “BeyondCorp model” under development for more than five years is a zero-trust network model where the user is king and log in location means little. Staff devices including laptops and phones are logged into a device inventory service which contains trust information and snapshots of the devices at a given time. Employees are awarded varying levels of trust provided they meet minimum criteria which authors Barclay Osborn, Justin McWilliams, Betsy Beyer, and Max Saltonst all say reduces maintenance cost and improves device usability (PDF)

White Paper 
https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/44860.pdf 

 

Joomla! 3.6 is Here

The #Joomla! Project and the Production Leadership Team are proud to announce the release of Joomla! 3.6 as the latest in the 3.x series. 
Joomla! 3.6 introduces more than 400 improvements, including many features which make administration of #Joomla! Web sites easier and more feature-rich, as well as many UX (user experience) improvements.

Joomla! 3 is the latest major release of the #Joomla! CMS, with 3.6 the seventh standard-term support release in this series. Please note that going from 3.5 to 3.6 is a one-click update and is not a migration. The same is true for any subsequent versions in the 3 series of the CMS.

What’s new in #Joomla! 3.6

Here are some highlights of the 3.6 release:

  • Joomla! Update has been improved and now allows you to reinstall #Joomla’s core files at the click of a button, overwriting any modified file(s) and reverting them back to the default.
  • Joomla! 3.6 contains a lot of UX improvements. Now you can find your modules faster, have tasks done by dropdown, improved user management and so much more…
  • With the new Sub Form Field function in #Joomla! 3.6, we added some extra additional functionality next to Repeatable fields. Now you can nest XML forms inside each other or reuse your existing forms inside your current form.
  • Create categories on the fly: It can get frustrating when you create a new item, and you realise that you haven’t created a category yet. #Joomla! 3.6 now lets you create a category on the fly for articles, contacts, newsfeeds and banners.
  • Menu type ACL: ACL in the backend did not exist at the menu level, now we have improved that. Give or block certain user groups access to a specific menu, and therefore also all menu items of that menu.
  • See what’s in your menus with All Menu Items: The new option to show all items from all menus gives you a quick overview of what is displayed where on your website. It has never been easier to spot duplicated links, missing menu items or just get an overview of every menu on your site.
  • And much more… To have a full list of the 3.6 features, please visit our GitHub Repository.

Download

Upgrade Packages:

Upgrade Packages
Joomla! 3 upgrade packages

Note: Please read the update instructions before updating.

Please remember to clear your browser’s cache after upgrading.
If you find a bug in #Joomla! Please report it on the Joomla! Issue Tracker.

GitHub project joomla-packager allow rapid application development of Joomla extensions

joomlaloveRAD

Rapid application development (RAD) is a software development methodology that uses minimal planning in favor of rapid prototyping. Something that was really slowing me a lot and making any builds or changes in my extensions a real pain to maintain was the packaging of code spread in the joomla tree. I did create numerous custom Phing builds to automate and reduce these pains (Phing is heavily derived from Apache ANT) and  2 months ago  Joomla-packager was born!

My Joomla-packager is a generic Phing build script to build any #Joomla 3rd extension, being a set of components, modules, plugins and or libraries, packages in a simple way.

Audience

Developers of 3rd party extensions for Joomla

Convention over configuration…

  • A single script to rule all your need of Joomla packaging: multi modules/ multi plugins/multi components/multi library is supported,
  • If you respect Joomla conventions, this packager will be able to create a build of any of your extensions or set of extensions,
  • just configure one file (like for example in buildCedThumbnails.xml), mainly listing what your extension is made of and run with minimal efforts,
  • Packaging #Joomla extensions will always look look the same = repeatability = convention over configuration

Usage

  1. Download https://raw.github.com/cedricwalter/joomla-packager/master/joomla-packager.xml locally
  2. Download a copy of buildCedThumbnails.xml You only need to rename and touch this file, it is self documented.
  3. Download a copy of pkg_cedthumbnails.xml You only need to update this file if you alter the structure. (later Joomla-packager will create this file on the fly)
  4. Run the main target build of buildCedThumbnails.xml

How it is working?

This script implement ALL standard Joomla conventions to perform the packaging, and offer reusable Phing targets to package any number of extensions. Here is what is implemented:

Modules

  • 1. Code is located in /modules/mod_${xxxxx} and self contained
  • 2. Languages files are optional but if they exist are located at /language/xx-yy/mod_${xxxxx}.ini /language/xx-yy/mod_${xxxxx}.sys.ini
  • 3. Media files (css,js,images) are optional but if they exist are located at /media/mod_${xxxxx}
  • 4. name of zip files as follow:
    • mod_{yourextension1}.zip

Plugins

  • 1. Code is located in /plugins/${type}/${xxxxx} and self contained
  • 2. Languages files are optional but if they exist are located at /plugins/${type}/${xxxxx}/language/ or anywhere else in directory at step 1.
  • 3. Media files (css,js,images) are optional but if they exist are located at /media/plg_${type}_${xxxxx}
  • 4. name of zip files as follow:
    • plg_${type}_{yourextension}.zip

Components

  • 1. Code is located in /administrator/components/${xxxxx} and /components/${xxxxx} and is self contained
  • 2. Languages files are optional but if they exist are located at /administrator/language/xx-yy/${xxxxx}.ini and /language/xx-yy/${xxxxx}.ini and
  • 3. Media files (css,js,images) are optional but if they exist are located at /media/${xxxxx}

Packages

  • 1. one zip file which contains 1 to n other zip file + a manifest file named pkg_{yourextension}.xml
  • 2. manifest file named pkg_{yourextension}.xml has to be written manually for now and place beside your build{yourextension}.xml
  • 4. name of zip files as follow:
    • com_{yourextension}.zip

You can browse numerous examples (for Joomla 2.5/3.0/3.1 at the project page (GitHub)

Add2Home 1.7.5 for J2.5 / J3.0 / J3.1 Released

This small plugin for #Joomla! add a message inviting iPhone/iPad users to add the web application to the home screen.

Add2Home has been updated to version 1.7.5 correct 1 bugs for #Joomla 2.5 /3.0 / 3.1. For existing users the update will display in the Extensions Manager under Updates. If you do not have this currently installed, you can click the link below and install as normal via the Extensions Manager.

New ideas/features/bugs are always welcomed either through forums or by using feedback

This release contains the Last code update: 2013.08.17 – v2.0.8 of Add To Home Screen

NEW iOS 7  Support
NEW Improved CSS
NEW new installer build and packaged with my Joomla RAD packager (GitHub)
Bug Portuguese translation correction

See in action on your iOS device at  http://demo-joomla-2.5.waltercedric.com or http://demo-joomla-3.0.waltercedric.com/

Schema Validation for Joomla 3.1 Extensions

joomlalovexsd

Full support for Joomla 3.1 has been added to the project “Schema Validation for #Joomla Extensions” (GitHub), tested with all 113 manifests of Joomla 3.1.5! (components, modules, plugins and templates)

Without them, #Joomla accept any entry in manifest xml and never complains about

  • Mistyping, like a valid xml but that the #Joomla installer do not understand or only partially,
  • Wrong constructs, xml tag child misplaced,
  • Invalid data type, like a path not being a valid path, an expected integer being a text and so on…

Joomla just silently die during install or install only partially extensions. These days are over and all developers with any decent IDE will be able to

  • Validate while typing,
  • Enjoy auto completion.
  • Have an up to date documentation of all possibilities in #Joomla’s manifest.

What’s new

see https://github.com/cedricwalter/joomla-xsd/commit/8b315332e8c0fa515da19f15a4c547f446850024

component / module / plugins

  • add in <menu> support for attribute value img="class:banners">
  • add in <menu> support for attribute value view="anyString"
  • add in <menu> support for attribute value alt="anyString"
  • add to type="cmsVersionType" version 3.1
  • add support for <menu link="option=com_finder">COM_FINDER</menu> (finder.xml)
  • In <extension> attribute valuemethod="" is now optional
  • add new <help key="ANY_STRING" />
  • add in <field> support for attribute value first="anyNumber"
  • add in <field> support for attribute value last="anyNumber"
  • add in <field> support for attribute value step="anyNumber"
  • add in <field> support for attribute value published="" (mod_articles_category.xml)
  • add in <field> support for attribute value format="%Y-%m-%d %H:%M:%S"
  • add in <field> support for attribute value disable="separator" (mod_login.xml)
  • add in <fields> support for attribute value addfieldpath="validPath" (mod_finder.xml)
  • in <field> validate css class names class="btn-group" or class="btn-group btn1 blue" orclass=""
  • Allow empty without fieldset (vote.xml) <fields name="params"> </fields>
  • In <authorEmail> consider N/A as a valid email
  • Attribute 'label' now optional on element 'field'. <field name="spacer3" type="spacer" hr="true" />
  • Support for validate <field> type="url" (sef.xml)
  • in <fieldset> allow Attribute value label="" to appear in element (debug.xml)
  • allow <field> to have type attribute value category (contactcreator.xml)
  • allow <field> to have new attribute extension=com_* (contactcreator.xml)
  • In <media> attribute destination value is now optional
  • In <fieldset> add optionaladdfieldpath="" and validate that it is a valid path
  • In “`<option value="" empty values are now allowed
  • <updateservers> is now available in plugins manifests
  • In <field> type now support type="modal_article" or from enum (using xsd union)

Plugins only

  • in <file plugin="weblinks">weblinks.php</file>

Template only

  • In <extension> attribute value method="" is now optionnal
  • In <extension> addattribute value client=""
  • add <languages></languages>

These files will be hopefully soon merged into Joomla CMS  (GitHub project) and officialy supported by #Joomla

CedThumbnails 2.6.4 for Joomla 2.5/3.x available

cedThumbnails has been updated to version 2.6.4 for #Joomla 2.5/3.0/3.1. For existing users the update will display in the Extensions Manager under Updates. If you do not have this currently installed, you can click the link below and install as normal via the Extensions Manager.

New ideas/features/bugs are always welcomed either through forums or by using feedback

Continue reading CedThumbnails 2.6.4 for Joomla 2.5/3.x available

SocialSharingLive 3.1.5 for Joomla 2.5/3.x Released

SocialSharingLive has been updated to version 3.1.5 correct increase compatibility and contains five new important feature for both #Joomla 2.5  and #Joomla 3.x. For existing users the update will display in the Extensions Manager under Updates. If you do not have this currently installed, you can click the link below and install as normal via the Extensions Manager.

SocialSharingLive  add automatically to any article a set of social icons that let your reader increase your social ranking. It support: Twitter, Facebook, Google +,Digg, Xing, StumbleUpon  and LinkedIn

You can see this extension in action on this blog on the left side of this site.

Continue reading SocialSharingLive 3.1.5 for Joomla 2.5/3.x Released

How to migrate from cedtag to joomla 3.1.x Internal Tag extension

Why you may consider migrating away from cedTag?

Joomla 3.1.x has a better build in internal tags solution that differ from cedTag:

  • Joomla com_tags support multi languages,
  • Joomla com_tags support tags hierarchy,
  • Joomla is build in #Joomla core which mean a clear roadmap and better support.

It still miss some nice features of cedTag, but the may be added by me or somebody else in the future!

In order to move away from cedTag and import all your cedTag tags into #Joomla 3.1.x you can follow these steps, continue reading the how to in my wiki