• Follow us on Twitter
  • Join our Facebook Group
  • Join me on Google Plus
  • Add me on Linkedin
  • RSS
Welcome to Ontwerps close

  • Home
  • Over
  • Diensten
  • Portfolio
  • Blog
  • Contact

Author Archive for: ontwerps

Install mcrypt and PHP upgrade to 5.3.3

0 Comments/ in Blog, Linux / by ontwerps
mei 12, 2012 On CENTOS5 upgrade php to 5.3.3 and installed mcrypt for the use of Magento. Here are the commands to install it all
sudo yum update
upgrade PHP 5.3:
php -v
list command to quickly get information:
yum list installed | grep php | cut -d' ' -f1
checked to make sure that those packages were available for php53:
yum search php53 | cut -d' ' -f1 | grep php
Stop webserver
sudo service httpd stop
remove the old PHP packages:
sudo yum remove php php-cli php-common php-devel php-gd php-mbstring \
 php-mysql php-mcrypt php-pdo php-pear php-pgsql php-xml php-xmlrpc
 
Installed the available replacement packages:
sudo yum install php53 php53-cli php53-common php53-devel php53-gd \
 php53-mbstring php53-mysql php53-pdo php53-pgsql php53-xml php53-xmlrpc
 
Install PHP mcrypt
 sudo yum install php53-devel libmcrypt-devel
 
 wget http://museum.php.net/php5/php-5.3.3.tar.gz
 
 tar xf php-5.3.3.tar.gz
 
 cd php-5.3.3/ext/mcrypt/
 
 phpize
 
 aclocal
 
 ./configure
 
 make
 
 make test
 
 sudo make install
 
Now all we have to do is set up the mcrypt.ini file so that the mcrypt extension loads with PHP. This file needs to reside at /etc/php.d/mcrypt.ini.
 echo -e "; Enable mcrypt extension module\nextension=mcrypt.so" | \
 sudo tee /etc/php.d/mcrypt.ini
 
Install PHP Pear
wget http://pear.php.net/go-pear.phar
sudo php go-pear.phar
sudo service httpd start
Problems: configure.in:8: warning: LT_AC_PROG_SED is m4_require’d but is not m4_defun’d configure.in:8: LT_AC_PROG_SED is required by… acinclude.m4:2683: PHP_CONFIG_NICE is expanded from… configure.in:8: the top level Files ltmain.sh & libtool.m4 missing from /usr/share/alocal Find the files of the server
$ find / -name ltmain.sh
result: /usr/lib/php/build/ltmain.sh
$ find / – name libtool.m4
result: /usr/lib/php/build/libtool.m4 Navigate to the alocal
cd /usr/share/alocal
Create symlinks for the found files
ln -s /usr/lib/php/build/ltmain.sh ltmain.sh
ln -s /usr/lib/php/build/libtool.m4 libtool.m4
all done Resume process with alocal command

Change Posts into Pages or Pages into Posts

0 Comments/ in Blog / by ontwerps
mei 11, 2012 SQL query through PHPMyAdmin:
UPDATE wp_posts SET post_type = 'page' WHERE post_type = 'post'
or
UPDATE wp_posts SET post_type = 'post' WHERE post_type = 'page'

WordPress SQL Snippets

0 Comments/ in Blog / by ontwerps
mei 11, 2012 Batch Deleting Spam Comments
 DELETE FROM wp_comments WHERE wp_comments.comment_approved = 'spam'; 
Batch Deleting All Unapproved Comments
 DELETE FROM wp_comments WHERE comment_approved = 0 
Disable Comments on Older Posts (edit date)
 UPDATE wp_posts SET comment_status = 'closed' WHERE post_date < '2012-01-01' AND post_status = 'publish'; 
Batch Deleting Post Revisions
 DELETE FROM wp_posts WHERE post_type = "revision"; 
Delete Post Meta
DELETE FROM wp_postmeta WHERE meta_key = 'YourMetaKey';
Changing the URL of Images
 UPDATE wp_posts
SET post_content = REPLACE (post_content, 'src=”http://www.oldurl.com', 'src=”http://www.newurl.com'); 

Photoshop Grid script

0 Comments/ in Blog, Photoshop-Illustrator / by ontwerps
april 16, 2012 Save as .jsx
// check for document
if(app.documents.length > 0){
	// get active document
	var psDoc = app.activeDocument;
	// get user input on column count
	var colWidth = parseInt( prompt("Fill in Column width", 40) );
	var docWidth = psDoc.width;
	// determine number of columns
	var colCount = docWidth / colWidth;
	// create vertical guidelines
	for(i = 0; i <= colCount; ++i){
		psDoc.guides.add(Direction.VERTICAL, i * colWidth);
	}
	var docHeight = psDoc.height;
	// determine number of rows
	var rowCount = docHeight / colWidth;
	// create horizontal rows
	for(i = 0; i <= rowCount; ++i){
		psDoc.guides.add(Direction.HORIZONTAL, i * colWidth);
	}
}

Free iPhone Business Card

0 Comments/ in Blog, Photoshop-Illustrator, Template / by ontwerps
april 16, 2012 Free Business Card Template iPhone Style

businesscard iphone 300x223 Free iPhone Business Card

Download

CSS3 Animated Price Table

0 Comments/ in Blog, CSS, HTML-HTML5 / by ontwerps
december 22, 2011

CSS3 Animated Price Table

pricetablecss3 300x213 CSS3 Animated Price Table

Example of a price table.
View source code for more details.

View Demo

WordPress shortcode – snapshot of website

0 Comments/ in Blog, Wordpress-CMS / by ontwerps
september 9, 2011

Display a snapshot of any website, and place it on your blog?
Use a shortcode.
Paste the following code into your functions.php file:

 

function wpr_snap($atts, $content = null) {
        extract(shortcode_atts(array(
			"snap" => 'http://s.wordpress.com/mshots/v1/',
			"url" => 'http://www.ontwerps.nl',
			"alt" => 'My image',
			"w" => '400', // width
			"h" => '300' // height
        ), $atts));
	$img = '<img src="' . $snap . '' . urlencode($url) . '?w=' . $w . '&h=' . $h . '" alt="' . $alt . '"/>';
        return $img;
}
add_shortcode("snap", "wpr_snap");

Usage shortcode without thw first “:

["snap url="http://test.ontwerps.nl" alt="Description" w="400" h="300"]

Example:
[snap url="http://www.google.nl" alt="google" w="400" h="300"]

Change WordPress login url

0 Comments/ in Blog, Wordpress-CMS / by ontwerps
juli 20, 2011

Edit .htaccess file and add the following code.
Before editing backup your .htaccess file

RewriteRule ^login$ http://website.com/wp-login.php [NC,L]

Password Reset for Joomla , WordPress and Joomla (new password = NEWPASS)

0 Comments/ in Blog, Tutorials / by ontwerps
juni 27, 2011 Reset password with Navicat Lite navicat lite 300x172 Password Reset for Joomla , Wordpress and Joomla (new password = NEWPASS)

Joomla:

UPDATE jos_users
SET password = MD5('NEWPASS')
WHERE username = "admin"

reset joomla 300x156 Password Reset for Joomla , Wordpress and Joomla (new password = NEWPASS)

Wordpress:

UPDATE wp_users
SET user_pass = MD5( 'NEWPASS' )
WHERE user_login = "admin";

reset wordpress 300x221 Password Reset for Joomla , Wordpress and Joomla (new password = NEWPASS)

Drupal:

UPDATE users
set pass= '$S$CVrRLeIr/2RlAxZgzPyu58yXbhev5OItQNCjXMrgMq9IriUKyUe.'
WHERE uid = 1;
reset drupal 300x221 Password Reset for Joomla , Wordpress and Joomla (new password = NEWPASS)

If you had the following message:
Sorry, there have been more than 5 failed login attempts for this account. It is temporarily blocked. Try again later or request a new password.
You can :

DELETE FROM flood

Example Form Calculate

0 Comments/ in Blog, CSS, Jquery / by ontwerps
april 27, 2011

Calculating order form example

calculate form 275x300 Example Form Calculate

Example of a order form with calculation. Also little bit of css3 styling in form.
View source code for more details.

View Demo

Page 1 of 10123›»

Categorieën

Tags

blackberry borders branding centos chrome cms color CSS css3 cycling debug font glyphs gradients hover HTML-HTML5 image import invoice iphone joomla jquery linux magento osx pattern photoshop scroll sql table Template textures twitter vcard Wordpress-CMS
© Copyright2012 - Design by ontwerps