Category Archives: Technical

Top 10 Most Common Mistakes That Java Developers Make – guest post

Dominant in many ways, Java offers a lot for developers: strict object-oriented paradigm, architecturally agnostic virtual machine, garbage collection – all are there to aid developers. However, like any other programming language, it is still susceptible to developer mistakes.In this article Toptal freelance software engineer Mikhail Selivanov discusses ten common mistakes that Java developers make and how to avoid them.

Read more: Top 10 Most Common Mistakes That Java Developers Make | Toptal

Security Fix for Joomla

Source: Security hotfixes for Joomla EOL versions – Joomla! Documentation

joomla34graphicThe Joomla project has just released Joomla 3.4.6 to address a Critical Vulnerability.

The vulnerability is also present in discontinued Joomla 2.5 and 1.5 series (Joomla 1.0 is ok). If you still have sites running off these old Joomla versions you must patch them appropriately.

For these old versions, a simply file replacement is all that is needed.

https://docs.joomla.org/Security_hotfixes_for_Joomla_EOL_versions

2020Media will happily undertake this replacement for any Joomla user, whether they are a customer or not. Please let us know if we can help by contacting us.

Drupal 8.0.0 will be released on November 19, 2015

Based on our experience with our successful release candidates, we are confident to announce that Drupal 8.0.0 will be released on November 19, 2015!

Any customers using Drupal 7, who’d like a development area for working on Drupal 8, can get one free of charge from 2020Media.

Please send us your request at https://pfs.2020media.com/my-messages.html

We can copy your existing site, or give you a clean Drupal 8 install.

Source: Drupal 8.0.0 will be released on November 19, 2015 | Drupal.org

PHP File Directory Script with folder sizes

A new resource for customers – the Website File Explorer. Here’s how it came about.

What it does

The item lists the files and folders in a customers webspace, giving information such as file size, modification time, folder structure and size, all in a responsive, attractive layout.

Based on the script created by Hal Gatewood at http://halgatewood.com/free/file-directory-list/ we made a modification to show the folder sizes and give a total for the space used entirely.

screenshot of Free PHP File Directory Script showing Folder content size
Free PHP File Directory Script showing Folder content size

The single-file script can be placed in a web directory and loaded in a browser. It uses scandir to locate all the contents recursively, then filesize to get the properties of each item.

Responsive, Dynamic, Modern

The script also displays a nice icon for each type of file, and the last modified timestamp.

Folders are shown initially closed but a simple click expands them dynamically to reveal the contents.

Putting the Customer in Control

The script is used as a report for our web hosting customers, to give them more information about their accounts.

Most hosting control panels show disk quota and usage, but we were asked by customers to break down the usage in detail, so that they could get an idea where the space was being used. From personal experience we know webspace gets used over time for all sorts of random things – obsolete projects, testing space, a handy spot to dump that file you need to transfer one time only….

We had been providing this information manually, using the linux du‘ command. This has useful parameters such as –human-readable and –max-depth which made it ideal. However translating this function into a customer-facing tool in a safe and secure way meant a different approach – in our case using PHP.

We continue to use ‘du’ “under the hood” to provide a daily report to customers via our customer portal. Automatic warnings are generated in case a customers is getting close to their quota.

How big is that Folder in the Window?

One interesting thing we found is the different ways that file and folder sizes are calculated. There is also some differences in parameters for du (apparent sizes, rather than disk usage) that had to be taken into account when comparing PHP’s method of calculating file space usage with Linux’s (and our FTP server software).

We display the results in human-friendly units based on one Kilobyte being 1024 bytes.

Download Script

Download the script here: file-directory-size.php.txt

Remove the .txt extension and upload to your webserver.

Caution: This script will display the names (at least) of all files in your site. Therefore caution should be used before putting it in a public location. Our use of this script is tightly locked down so that it is safe and secure to use.

We would not recommend this script is used at all where register_globals is active (e.g. older php versions).


With thanks to the original creator, Hal Gatewood and user khanvani on fiverr.com

New Features in CiviCRM

The creators of open-source CRM software CiviCRM have released details of the new features coming in the next release of the free software.

2020Media is a leading UK web hosting provider of CiviCRM – details about our hosting service can be found at http://www.2020media.com/shared-hosting/civcrm-hosting

CiviCRM 4.7 Planned Features

  • Form Builder – First phase implementation of a new forms framework which will be designed to allow for easy customization of core forms.
  • Administrator Status Page – Provide CiviCRM site administrators with a single place to check for configuration problems including cron status, file permissions, MySQL permissions, invalid or sub-optimal PHP settings, etc. These statuses can also be queried via API to allow for automated status checks.
  • Administer Settings improvements – Provides a unified and searchable administrative interface for all configurable settings. Makes it easier for extensions to add settings to this interface.
  • Installer improvements – Streamlined install process for WordPress sites. Initialize newly installed sites with localization settings (language, currency, etc.) based on the users locale. 2020Media provide pre-installed CiviCRM so we’ll take care of this for you!
  • Payment processing improvements
  • Webform CiviCase integration enhancements (sponsored by Compucorp Ltd.) – Add case roles to a case in webforms and allow users to specify a case when creating an activity.
  • CiviMail Inline (pending code contribution from Veda Consulting) – Improves usability when composing and editing mailings based on templates by allowing the designer to create editable and non-editable regions.
  • Offline recurring payments (pending code contribution from Veda Consulting and API from JMA Consulting) – Manage recurring contributions that are initiated outside of CiviCRM.  Ensures that these Direct Debit or Standing Order payments are allocated to the correct contacts, and that the recurring details are fully accessible to CRM administrators.
  • Navigation / Menu Improvements (pending collaboration with Compucorp Ltd.) – Modernize the main navigation menu, provide vertical side-bar display options, include icons.

The target date for a stable release is Early October 2015.