Reader
  • Home
  • About
  • Deals
  • Services
  • Contact
You are here: Home / Archives for 2009

Archives for 2009

Extract Colors from Images and Make Color Schemes: ColorSuckr

Last updated on December 30th, 2009 by Gabriel Livan

ColorSuckr, a project by Paul Burgess, is useful to create color schemes based on photos for use in your artwork & designs. The application extracts the most common 12 colors from the submitted image and also gives you the option to see the color scheme for each one. You can drag and drop the color results around the page, click on the color strip, hold and drag, let go to drop. The color text can also be shown and hidden by clicking the small grey dot next to the strip. ColorSuckr has also a nice feature: if you enter the URL to a web page, all the images that are found in that page are retrieved so you can choose which one would be parsed. Things can get even easier with the ColorSuckr Add-on for the FireFox browser. After you install the add-on, you can simply right click any image on a webpage and choose ‘Extract Image Colors’.

colorsuckr

  • Source: http://colorsuckr.com/

Filed Under: Design

Creating iPhone-style Checkboxes with jQuery and Prototype

Last updated on January 9th, 2016 by Gabriel Livan

iPhone-style Checkboxes is a progressive enhancement for standard HTML checkboxes which transforms them into the beautiful iPhone toggle switches. The change is purely visual as the underlying checkbox is not touched. The usage of the iphone-style-checkboxes library is very simple. Unzip the downloaded package, place the JavaScript, images and stylesheet where you please. Make sure to update the stylesheet to point to the new location of your images, if they have changed relative to the stylesheet.

Read more from this entry…

Filed Under: JavaScript, jQuery Tagged With: iphone, skin form elements

Encrypt the POST-GET Data when you Submit a Form: jCryption

Last updated on December 30th, 2009 by Gabriel Livan

jCryption is a JavaScript HTML-Form Encryption JQuery Plugin, which encrypts the POST/GET-Data that is sent when a form is submitted. For the calculation it uses the Multiple-precision and Barrett modular reduction libraries and JQuery. The data is encrypted on the client side (JavaScript) and decrypted on the server (PHP).

jcryption

Features include:

  • It is easy to install, use and extend
  • RSA form data encryption up to 2048 bit
  • AjaxSubmit supported
  • no SSL required
  • Does not block the browser on calculations

jCryption first serializes the form, converts the string into hexadecimal values which is required to encrypt it. When the keypair was generated on the server, the script receives it, encrypts the string with the public key and sends it to the sever where the string will be decrypted. When this is done you have your original serialized string back which is equal to a normal form submit (GET or POST).

  • Tested in: Internet Explorer 6 +, Mozilla Firefox 3+, Safari 3, Opera 9+, Google Chrome
  • Source: http://www.jcryption.org/
  • Demo: http://www.jcryption.org/demo/

Filed Under: JavaScript

How to Replace and Modify Content Between Two Delimiters in PHP

Last updated on January 9th, 2016 by Gabriel Livan

A while ago I have written a short tutorial of how you can write a short PHP function to extract content from specific delimiters. I has come to my attention that many people are looking for a way to replace and even modify content between 2 delimiters. Therefore I have decided to write a script that can help them with this endeavor. Uses regular expressions to find and parse the matched content.

Replace all the content found between the delimiters

function replace_content_inside_delimiters($start, $end, $new, $source) {
return preg_replace('#('.preg_quote($start).')(.*?)('.preg_quote($end).')#si', '$1'.$new.'$3', $source);
}

As you can see the function uses 4 arguments. The first 2 two are the delimiters (the beginning and the ending one), the 3d is the replacement string and the last one is the main source that is parsed.

$data = '<body><div class="wrap"><div class="inside">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div></div></body>';

$start = '<div class="inside">';
$end =  '</div>';

$replace_with = 'PHP: Hypertext Preprocessor';

$str = replace_content_inside_delimiters($start, $end, 'PHP: Hypertext Preprocessor', $data);

echo $str;

// Result: <body><div class="wrap"><div class="inside">PHP: Hypertext Preprocessor</div></div></body>'

Filter the content found between the delimiters

In case you need to modify the text between the delimiters here’s how you can do it:

$source = '<div class="subtitle">PHP is a widely-used general-purpose scripting language for web development.</div>';

$start = '<div class="subtitle">';
$end = '</div>';

$data = preg_replace('#('.preg_quote($start).')(.*?)('.preg_quote($end).')#si', '$1'.parse_content($new).'$3', $source);

function parse_content($content) {
$words = array('PHP', 'scripting', 'development'); // Let's bold some words!

foreach($words as $word) {
$content = str_replace($word, '<strong>'.$word.'</strong>', $content);
}

return $content;
}

How it works?

The regex uses the \s and the \i modifiers. The former (aka: DOTALL) makes dot a special character that matches newlines too. The later matches the characters in insensitive mode.

Filed Under: PHP Tagged With: delimiters

Simple and Easy to Customize XML based CMS: GetSimple

Last updated on March 14th, 2010 by Gabriel Livan

If you are looking for a way to manage a small business site, GetSimple, a XML based lite Content Management System, is the simplest way to do that. It doesn’t use MySQL to store the information. Instead it depends on the speed and accuracy of XML. This way you can stay away from an extra layer of slowness and complexity associated with connecting to a MySQL database. The application is very simple to install and easy to customize.

Features include:

  • XML based data storage
  • Best-in-Class User Interface
  • ‘Undo’ protection & backups
  • Easy to theme
  • Great documentation

getsimple-cms

Designed For the Small-Site Market
This is one of the reasons GetSimple uses XML rather than a robust database such as mySQL. For most small businesses, their only real need is to be able to easily update their site without the need of a ton of extraneous rarely used features. GetSimple’s goal is to manage small websites efficiently and effectively.

  • Requirements: Unix/Linux host with PHP 5.1.3+
  • Source: http://get-simple.info/
  • Download: http://get-simple.info/download

Filed Under: PHP

« Previous Page
Next Page »

About Me

Gabriel LivanHey, there! I'm Gabriel Livan, Web Developer, Blogger and Internet Marketer. I love making fast, secure and scalable web applications, running and travelling around the world. I blog about WordPress, site speed & security and quality tools for web professionals. Read more

What are you looking for?

Categories

  • AJAX (22)
  • Deals (10)
  • Design (30)
  • eBooks (2)
  • Flash (19)
  • Freebies (11)
  • General (62)
  • Giveaways (1)
  • Graphics (27)
  • HTML & CSS (35)
    • Frameworks (9)
  • JavaScript (160)
    • Frameworks (8)
    • jQuery (89)
    • MooTools (14)
  • Page Loading Speed (2)
  • Photoshop (3)
  • PHP (113)
  • Reviews (8)
  • SEO (6)
  • Statistics (2)
  • Web Tools (13)
  • WordPress (27)
    • Plugins (15)
    • Snippets (4)
    • Tools (2)
    • Tutorials (6)

Copyright © 2026 · BitRepository.com - All Rights Reserved

  • Home
  • About
  • Contact