Category: Development

Change directory and folder permissions on mass

Change directory and folder permissions on mass

Recently, I was doing some work on the on a MediaWiki installation. For some reason I had all the permissions set up wrong.

Obviously, MediaWiki has thousands of files to change.

So first of all, in the shell, I ran the command from public_html directory:

find -xtype f |xargs chmod 644

That changed the the files. I then ran the following command from the public_html director:

find -xtype d | xargs   chmod 755

Customizing Cheeky Radio Pro

Customizing Cheeky Radio Pro

So, you have downloaded Cheeky Radio Pro, you have tested it and it works. Now it’s time to customize the App for your needs.

Thankfully, most of the hard work has been taken care of, you just need get your stream(s), change the images and the links to your station App for news and your website.

First of all, you may need to download the Apple design resources. I am using GIMP, hence I needed to download the PSD files.

Read more of this premium content
Opening an iOS app from another iOS app.

Opening an iOS app from another iOS app.

In this example, I am going to create a link from one iOS app, in this example, I am going to open the Cheeky News App with Cheeky Radio Pro.

First, open the Cheeky News app in Xcode:

Open the info.plist for the app:

Right click and add a new row and select URL types:

Over the Item 0, click on the + and select URL schemes:

In the third column, give the app a unique name, in this case CheekyNews.

Run the app.

In the app you are going to link from, the link you will use is CheekyNews//

In this example, Cheeky Radio Pro this goes in the PopUpMenuViewController.swift file:

The link in this example is called by:

@IBAction func NewsButton(_ sender: UIButton) {

        if let url = URL(string: “CheekyNews://”) {




Run the app and make sure it works. Job done. Go and get a coffee, you deserve it.

MediaWiki composer extensions

MediaWiki composer extensions

With certain extensions using MediaWiki you may need to use composer. Two examples are Semantic Compound Queries and Maps. This example is using Windows Server 2012 R2 running WAMPserver. Obviously you will need to have composer installed in the PHP version you are using.

To install this using composer open the compose.json in the root of the Wiki:

You will see a lot of code like this:

Find the line:

“mediawiki/semantic-media-wiki”: “~2.5”

In the example for Semantic Compound Queries the extension page tells you to add the code:

    "require": {
        "mediawiki/semantic-compound-queries": "~1.1"

But in reality, we are only interested adding

“mediawiki/semantic-compound-queries”: “~1.1”

Add this line above the Semantic MediaWiki line:

“mediawiki/semantic-compound-queries”: “~1.1”,

Note, we now have a comma on the end of the line, this is key:

Save and close the composer.json file.

If you have already been running commands in the command prompt, and crucially if you have set the path anywhere, close the command prompt and reopen it.

Change the directory to the root of your Wiki and run:

composer update

Then run:

composer require mediawiki/semantic-compound-queries:~1.1

Obviously replace the semantic compound queries as detailed on the extensions page on MediaWiki.

Install Semantic MediaWiki on a Windows Machine

Install Semantic MediaWiki on a Windows Machine

You can find instructions on Semantic MediaWiki site on how to install on Windows, but it is advised that Semantic MediaWiki is not supported for Windows environments. It also misses a few areas that need to be included to ensure it installs. This is how I did it:

Ensure you have composer installed and it is in the PHP version you are using.

Remove or comment out any Semantic MediaWiki lines in the LocalSettings.php

Add the line:

enableSemantics(‘localhost/wiki’); /**adjust to yours*/

Open the command prompt, change the directory to the root of your wiki and run:

composer update:

Next run:

composer require mediawiki/semantic-media-wiki “~2.5”

Verify it has installed by going to the Version page:

Job done, on the off chance things don’t go to plan, change the directory to the maintenance folder. With Windows you will need to set the path to the PHP version by running:

set path=path/to/PHP/install

Then run:

php update.php –skip-external-dependencies

Job done.

To make Semantic MediaWiki more useful you may want to install other extensions to work with it, the five I use are:

  • Page Forms
  • Semantic Compound Queries
  • Semantic Drilldown
  • Semantic Internal Objects
  • Maps

Page Forms, Semantic Drilldown and Semantic Internal objects are fairly straight forward to install, just follow the guidance on the extension page. But Semantic Compound Queries and Maps are a little more complex. They both require the use of composer.

See the MediaWiki composer extensions for more details.

Install MediaWiki

Install MediaWiki

So, I was asked to install MediaWiki on a Windows Server 2012 R2. This example shows you to install when using the server with a GUI.

You can transfer the files using your control panel if you don’t have a GUI, and in theory it should also work the same with a Linux

Read More Read More

Orange or Red on WAMP installation

Orange or Red on WAMP installation

So, for work I was provided with a Windows Server. To run the scripts I wanted I had to install WAMP. I did this on my own personal server initially for testing purposes.

But I had a small issue, it came with the error where the WAMP sign refused to change from Red or Orange to Green as it should, I was stuck with:

So what did I do to fix this? I hear you cry (sorry, couldn’t resist).

Read More Read More