tags: PHP

Action executed in 0.000

Each Tag

PHP

Common tags - number of posts

style (3), coding (2), standard (2), OpenID (1), color (1), TrickleUp (1), web (1), MySQL (1), array_map (1), Perl (1), library (1), weather (1), procedural language (1), scalar (1), software (1), Python (1), script (1), comparison (1), PostgreSQL (1), Ruby (1), webtrees (1), Smalltalk (1), Dunstan (1), family tree (1),

2 way join

PHP, coding, PHP, standard, PHP, style

3 way join

PHP, coding, standard, PHP, coding, style, PHP, standard, style

4 way join

PHP, coding, standard, style

●●●●●○○○

webtrees - Home page

webtrees logo

webtrees is the web's leading on-line collaborative genealogy application. It is open source software, and costs $ zero - yes, that means totally FREE!

It works from standard GEDCOM files, and is therefore compatible with every  major desktop application; and it aims to be efficient and effective by using the right combination of third-party tools, design techniques and open standards.

url: http://www.webtrees.net/index.php/en/

type: project, format: page

●●●●●○○○

PHP: The Right Way

There’s a lot of outdated information on the Web that leads new PHP users astray, propagating bad practices and insecure code. PHP: The Right Way is an easy-to-read, quick reference for PHP popular coding standards, links to authoritative tutorials around the Web and what the contributors consider to be best practices at the present time.

url: http://www.phptherightway.com/

type: article, format: page

●●●●●○○○

The PHP Coding Standards Fixer for PSR-1 and PSR-2

a Sensio Labs Product

The PHP Coding Standards Fixer tool fixes most issues in your code when you want to follow the PHP coding standards as defined in the PSR-1 and PSR-2 documents.

url: http://cs.sensiolabs.org/

type: project, format: page

●●●●●○○○

Scripting Languages: PHP, Perl, Python, Ruby, Smalltalk - Hyperpolyglot

a 5-way cheat sheet for the hyperpolyglot programmer; there is also a cheat sheet for Bash, Tcl, Lua, JavasScript, Io

url: http://hyperpolyglot.wikidot.com/scripting

type: none, format: none

●●●●●○○○

PL/php - WikiStart - public.commandprompt.com

Welcome to the PL/php site. PL/php is a procedural language add-on for PostgreSQL, which means you can define PHP functions that run inside a PostgreSQL server.

url: https://public.commandprompt.com/projects/plphp/wiki

type: project, format: wiki

●●●●●○○○

OpenID Enabled | Janrain

tags: OpenID, PHP, library
Janrain

Janrain maintains OpenID libraries for the developer community. Learn how to contribute. For more information about OpenID, an Internet Single-Sign-On protocol, visit wiki.openid.net.

url: http://www.janrain.com/openid-enabled

type: none, format: none

A variation on PHP array_map()

tags: PHP, array_map, scalar
Here's a variation on array_map() that: (1) passes the array key to the callback (2) passes a single scalar argument to the callback
  1. /**
  2. An array_map which takes scalar arguments.
  3. @param $cb is a callback.  It can be a simple function or an object method.
  4. @param $ara is an array to operate on.
  5. @param $args is a single argument to pass to the call back.  It can be an array.
  6. */
  7. function array_map_scalar( $cb, $ara, $args )
  8.     {
  9.     $range = array();
  10.     foreach ($ara as $k => $v)
  11.         {
  12.         $range[$k] = call_user_func( $cb, $k, $v, $args );
  13.         }
  14.     return $range;
  15.     }

Colors Based on Time

The colors on my website are now a function of time. The header background color is based on the day of the year representing the seasons and and body background color is based on the hour of the day.

I've had this idea for a very long time and finally i've implemented it. How did i do it you ask? My stylesheet is dynamically generated using PHP.

There's still some work to do. First, the color of text much change along with the background color. Second for the season colors, i need something like white for Winter, green/yellow for Spring, orange/red for Summer, and brown/gray for Autumn. The colors need to fade from one to the next. Third, other parts of the web page need to be included.

Another feature i'd like to add is modifying the colors based on the weather at the time. I've seen this done on Dunstan's Blog.