Team Treehouse – A better way to learn technology
Last Updated on Tuesday, 22 January 2013 06:52 Written by Dan Tuesday, 22 January 2013 08:43
Access MAMP sites over Local Area Network
Last Updated on Tuesday, 22 January 2013 07:12 Written by Dan Tuesday, 22 January 2013 07:12
I spent a bit of time looking for a useful answer to this.
The problem:
I want to share a website published using MAMP on my local machine with other people in the office. I have more than one virtual host set up in MAMP so simply using the machine’s IP address and port (usually 8888) won’t work.
The solution:
- In the settings for the site, change the IP address to the local machine’s IP.
- Give it a port number that isn’t the default.
- Click Apply.
- That should be it!
- From another device on the same network type http://{MAMP machine IP}:{port number you set}
Thanks
I nearly got there with this article: http://benjaminrojas.net/view-mamp-virtual-hosts-on-your-ipad-and-iphone-over-the-local-network/ but needed to change the port number to make it work.
Create modal windows from modules in Joomla
Last Updated on Wednesday, 28 November 2012 07:50 Written by Dan Wednesday, 28 November 2012 07:50
… and more. A simple method is to add
JHTML::_('behavior.modal');
to the template then add .modal to the <a href=
If there is a default .modal style then this can be altered to div.modal to avoid affecting links in the page.
There’s a number of examples at the Spiral Scripts site: www.spiralscripts.co.uk/Joomla-Tips/using-modal-windows-with-joomla.html
Running WordPress on a dedicated server
Last Updated on Saturday, 10 November 2012 05:00 Written by Dan Saturday, 10 November 2012 05:00
One of the constant gripes about running websites which are updateable via a CMS is the issue of permissions. We should all know that it’s not good to ever have a production server running with directories CHMODed to anything like 777 – they will be found and bad code written to these directories. 755 is sufficient and 644 is OK for files. But the issue is, sometimes you can’t post a new image, via the WordPress media library because the permissions are wrong. Shared hosting generally sorts this out as the user has permission to write to the directory.
On dedicated / cloud / vps hosting the issue gets more difficult. The user could be set to www-data, but this would mean all directories are writeable by the Apache process. The user could be included in a group which has write permissions.
Or the server could be running suPHP and PHP CGI. This provides security and write access without compromising directory permissions.
There aren’t many articles on the subject, but this one by Mike Beach seems to answer the issue simply. It’s been tried and tested too.
Read more at: http://mikebeach.org/2011/03/20/wordpress-suphp-and-ubuntu-server-10-04/
New website: CJTV
Last Updated on Thursday, 25 October 2012 02:42 Written by Dan Thursday, 25 October 2012 02:42
DJA completed and launched a new WordPress website for television director, Caius Julyan. It showcases his work a director, edit producer and voice-over artist using streaming video in JW Player. There’s more details on the DJA website and the site itself can be viewed at: caiusjulyan.tv
Useful command line tips from Ubuntu
Last Updated on Tuesday, 25 September 2012 01:58 Written by Dan Tuesday, 25 September 2012 01:58
For a quick primer on using the command-line with your Ubuntu server and a terminal window, try this:
WordPress 3.4.2 update
Last Updated on Friday, 7 September 2012 03:01 Written by Dan Friday, 7 September 2012 03:00
Fixes and security updates in WordPress 3.4.2 – available today.
- Fixes some issues in the admin area where some older browsers (IE7, in particular) may slow down, lag, or freeze.
- Fixes an issue where a theme may not preview correctly, or its screenshot may not be displayed.
- Fixes the use of multiple trackback URLs in a post.
- Prevents improperly sized images from being uploaded as headers from the customizer.
- Ensures proper error messages can be shown to PHP4 installs. (WordPress requires PHP 5.2.4 or later.)
- Fixes handling of oEmbed providers that only return XML responses.
- Addresses pagination problems with some category permalink structures.
- Adds more fields to be returned from the XML-RPC wp.getPost method.
- Avoids errors when updating automatically from very old versions of WordPress (pre-3.0).
- Fixes problems with the visual editor when working with captions.
Additionally: Version 3.4.2 fixes a few security issues and contains some security hardening. These issues were discovered and addressed by the WordPress security team:
- Fix unfiltered HTML capabilities in multisite.
- Fix possible privilege escalation in the Atom Publishing Protocol endpoint.
- Allow operations on network plugins only through the network admin.
- Hardening: Simplify error messages when uploads fail.
- Hardening: Validate a parameter passed to wp_get_object_terms().
More here: http://codex.wordpress.org/Version_3.4.2
Adding Ubuntu to SD card for Raspberry Pi
Last Updated on Tuesday, 28 August 2012 05:21 Written by Dan Tuesday, 28 August 2012 05:21
The issue: need to add a Linux install to an SD card that will be read by a Raspberry Pi computer
Solution: Mount the card in Ubuntu and use the Startup Disk Creator to add the Ubuntu 12.04 image to the card.
Further issue: Mounting the SD Card from VMWare 5 running Ubuntu running on Mac OS X Mountain Lion
Solution: Use the built in VMWare tool, under Virtual Machine > USB & Bluetooth to mount Apple Internal Memory Card Reader.
Result: An SD card with a bootable Ubuntu installation
I have a 16Gb card so have partitioned it for 4Gb for the OS (more than enough) and the remainder for data.
Using JW Player in WordPress
Last Updated on Thursday, 16 August 2012 05:39 Written by Dan Thursday, 16 August 2012 05:39
A very versatile video player, JWPlayer can be added as a plugin in WordPress.
There are numerous skins and it’s possible to create a custom thumbnail for the front frame when the video is loaded but not started.
More instructions here: http://www.longtailvideo.com/support/addons/jw-player-plugin-for-wordpress/14276/jw-player-plugin-for-wordpress-media-management
WordPress Error: You do not have sufficient permissions to access this page.
Last Updated on Friday, 25 May 2012 03:01 Written by Dan Friday, 25 May 2012 03:01
Usually setting up a new WordPress you get the option to create tables with a custom prefix, ie not wp_ But if the database already exists then you need to rename table prefixes manually. On top of which, it can produce anĀ error about not having sufficient permissions when trying to login. This is due to a few options listed within the database.
To avoid a few headaches and searching try:
In wp_usermeta or { prefix }_usermeta
Change the following prefix of wp to { prefix }
wp_capabilities
wp_user_level
wp_dashboard_quick_press_last_post_id
wp_user-settings
wp_user-settings-time
also in wp_options or { prefix }_options
I changed the following prefix of wp to { prefix }
wp_user_roles
Thanks to bhanu2217 here:






