Tag Archives: php

Download Verve Meta Boxes

Verve Meta Boxes used to be available from avenueverve.com at their website – http://www.avenueverve.com/verve-meta-boxes/ The plugin has disappeared from that site as well as from the WordPress plugin repository. The latest version of the plugin, I believe, was Version: 1.2.9 You can download this version from my blog at verve-meta-boxes.zip. Happy WordPressing! Verve Meta Boxes Screenshots

Posted in Tech Tips, Web Development | Tagged , , , | Leave a comment

array_search case insensitive

PHP’s array_search claims that it suppors a case insensitive search, well, sort of, with this message: If needle is a string, the comparison is done in a case-sensitive manner. user says: for case insensitive array_search you could use: function array_search_i($str,$array){ foreach($array as $key => $value) { if(stristr($str,$value)) return $key; } return false; } stefano says: for searching case insensitive better this: array_search(strtolower($element),array_map(‘strtolower’,$array));

Posted in Tech Tips, Web Development | Tagged , , | Leave a comment

strtotime examples

Here are some example strtotime syntaxes for PHP. Leave a comment with an example if you like. strtotime(‘today 14:00’); strtotime(‘tomorrow 14:00’); strtotime(‘tomorrow 2:00pm’); strtotime(‘now +2 hours’); strtotime(‘now +2 minutes’); strtotime(‘now +24 hours’); strtotime(‘now +12 hours’); strtotime(‘today +3 days’); strtotime(‘now +5 days’); A Quick reference of accepted input: Numeric steps (+1, -1 …) Numeric date/time (Y-m-d, H:i:s) Ordinal names / numbers [first – twelfth = 1 – 12] * Special ordinal name / numbers (last = -1, this = 0, next = 1) Special words (tomorrow, yesterday, ago, fortnight, now, today, day, week, month, year, hour, minute, min, second, sec) ** Days / months [sunday – saterday, sun – sat, January – December, Jan – Dec] Timezones (TZ=”…”) * second is reserved for seconds in time notation, therefore is not allowed here ** plurals are also allowed by adding an ‘s’ via php manual

Posted in Tech Tips, Web Development | Tagged , | Leave a comment

List of PHP Frameworks

Here’s a list of recent and popular PHP frameworks as of 2012: Kohana: The Swift PHP Framework Laravel – A Clean & Classy PHP Framework Getting Started with the Fuel PHP Framework | Nettuts+ FUEL — A simple, flexible, community driven PHP5.3 framework. › A simple, flexible, community driven PHP5.3 framework.  Underscore.php

Posted in Linux, Web Development | Tagged , | 1 Comment

iPower: The server encountered an unexpected condition which prevented it from fulfilling the request.

iPower: The server encountered an unexpected condition which prevented it from fulfilling the request. If you’re getting this error on iPower you need to enable CGI / scripts. Sometimes your account will show you that this is enabled, even if it is not. Contact iPower support to get them to resolve it for you. Even if in your control panel homepage CGI / PHP is showing up as active, click on the server configuration tab and you probably will see that CGI is in fact inactive:

Posted in Server Admin, Server Administration, Web Development | Tagged , , , , , , | Leave a comment

Fix “Post Types Order” plugin error with HTTPS

The WordPress Plugin Post Types Order by NSP CODE is helpful in as it allows you to Order Posts and Post Types Objects using a Drag and Drop Sortable javascript capability But unfortunately the plugin does not work with wordpress HTTPS / SSL admin – or at least not without errors: But the good news is that there is an easy fix with changing just a few lines of code: At the top of the post-types-order.php page there are two constant definitions: define(‘CPTPATH’, ABSPATH.’wp-content/plugins/post-types-order’); define(‘CPTURL’, get_option(‘siteurl’).’/wp-content/plugins/post-types-order’); And the second one needs to use the plugins_url() function that WordPress recommends instead: define(‘CPTPATH’, ABSPATH.’wp-content/plugins/post-types-order’); define(‘CPTURL’, plugins_url().’/post-types-order’); After that you should stop receiving the HTTPS error for some insecure content when you are in the WP administration interface.

Posted in Tech Tips, Web Development | Tagged , , , , , | Leave a comment

PHP Auto Generate Status Header: function

Posted in Web Development | Tagged , , , , | Leave a comment

Fake Sendmail for Mac (linux)

Posted in Tech Tips, Web Development | Tagged , , , , | 1 Comment

Heredocs and Nowdocs in PHP

Posted in Tech Tips, Web Development | Tagged | Leave a comment

The PHP Object Expands in PHP5

Posted in Tech Tips, Web Development | Tagged , | Leave a comment