Pinkyvision website

Date: 13th February 2008 at 11:10 pm | Filed under: portfolio | Author: Sam Burdge

Pinky - WallsPinky - SeePinky - You

Pinkyvision, the website of artist Pinky, is a WordPress theme with extensive thumbnail galleries, mailing list signup, filesharing and a PayPal store. It features a flash header with sparkly text and a talking skull! Pinky's artwork is very cool indeed...

Check out the site: www.pinkyvision.com

Leave a Comment

WP Digi Clock Plugin - Folder and file permissions

Date: 11th January 2008 at 2:27 am | Filed under: development, plugins, wordpress | Author: Sam Burdge

I have recently received emails from a couple of users of my {{post id="wp-digi-clock-plugin-10-new-version" text="WP Digi Clock Plugin"}} who have been unable to update the clock's settings via the Digi Clock options page in WordPress. Unfortunately I do not have time to give individual support for my free plugins as I am too busy building sites, earning a living etc. However, I think the reason some of you have been having trouble is due to file/folder permissions on your server. When you update the clock's options the wp-clock-params.php file for the clock is updated (this file stores your clock settings), if the permissions for the file, and the digi-clock folder itself are not set correctly it will not be able to update.

The permissions should be set as follows:

wp-digi-clock (folder) – 755
wp-clock-params.php (file) – 644

Here is a brief explanation of file and folder permissions on a unix server:

The three user types are:

  1. user - the user (the owner of the file or directory), who you are on the system is determined by username and password at login time
  2. group - a group of users, e.g.: administrators, plain users, etc.
  3. world - anyone else, e.g: anonymous users or anyone who is not the owner, or of the same group as the owner, of the file or directory

The three access types are:

  1. read - the file or directory can be read
  2. write - the file or directory can be written to, or deleted
  3. execute - the file (scripts or executables) can be run, or the directory can be entered

To set permissions, in the simplest form, you use a three digit code: the first digit represents the access given to the user, the second digit represents the access given to the group, the third digit represents the access given to the world. The values that make up each access type are:

4 = read
2 = write
1 = execute

To apply more than one type of access to a user type, simply add the values together to get access permissions of the desired types:

7 = read, write & execute (4 + 2 + 1)
6 = read & write (4 + 2)
5 = read & execute (4 + 1)
4 = read
3 = write & execute (2 + 1)
2 = write
1 = execute

Putting together these digits determines the 3-digit permission code that makes up the file's permissions.
E.g. User: read, write & execute (7) + Group: read & execute (5) + World: read & execute (5) = 755.

2 Responses to “WP Digi Clock Plugin - Folder and file permissions”

  • Comment by Harry
    Date: October 26th, 2009 at 8:18 am

    Hello,
    Thanks for the plugin. According to the document
    the code to be put in the page/post is - , but for some reason it doesn’t work for me. Looking at the code int he .php file I added ($cl_id) inside the bracket and worked perfect.

  • Comment by Vector-9
    Date: October 29th, 2010 at 6:53 pm

    Hello Sam,
    I can’t seem to figure out why I can’t find the digiclock on my blog. I’m using wordpress 3.01, and I can see the digiclock settings on the settings tab. It would be great if you could give me some ideas. Thanks.

Leave a Comment

cookies and arrays in php

Date: 20th October 2007 at 1:27 am | Filed under: development, scripts | Author: Sam Burdge

How to store and retreive arrays using cookies with php:

The first step is to turn the array into a string with each array value seperated by a delimiter. I usually choose an unusual delimiter character such as a vertical bar, as the array values are more likely to contain characters such as comma or slashes. Example:
Read on…

4 Responses to “cookies and arrays in php”

  • Comment by c-received
    Date: November 6th, 2007 at 9:54 pm

    Blend your own recipe….

    $a = array(’bg’=>’red’,'tx’=>’blue’,'lk’=>’green’);
    print_r($a);

    $b = implode(”|”,array(’red’,'blue’,'green’));
    print_r($b);

    $c = explode(”|”,$b);
    print_r($c);

  • Comment by kuberan marimuthu
    Date: September 20th, 2009 at 7:52 am

    this is an expensive solution. PHP cookies, itself supports storing arrays check this link http://www.developertutorials.com/tutorials/php/articlename-050526/page5.html

  • Comment by Steve
    Date: November 1st, 2010 at 8:58 am

    That is soooo inefficient. Use the serialize() function thus:
    setcookie(”myarray”, serialize($myArray), time()+3600);
    and to get data out:
    if(isset($_COOKIE['myarray'])) $myArray=unserialize($_COOKIE['myarray']);

  • Comment by Filip Gorczynski
    Date: November 24th, 2010 at 12:58 pm

    So, what do You think about sth like this:
    <?php
    if(isset($_COOKIE['c'])) {
    $a = unserialize($_COOKIE['c']);
    $a[] = time();
    setcookie(’c', serialize($a), time() + 1000);
    } else {
    setcookie(’c', serialize(array(time())), time() + 1000);
    }

Leave a Comment

9 London

Date: 14th October 2007 at 3:05 pm | Filed under: portfolio | Author: Sam Burdge

9 London Store9 London Cart9 London Title Page

9 London is a maternity and children's clothing store in London. The site is built in flash, with an html version to back it up. It features an online store for which I created all the scripts from scratch. Some tutorials relating to stores and e-commerce will be available on my site in the future.

Check out the site: www.9london.co.uk

Leave a Comment