WordPress shortcode – snapshot of website

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

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)

Reset password with Navicat Lite

Joomla:

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

Wordpress:

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

Drupal:

UPDATE users 
set pass= '$S$CVrRLeIr/2RlAxZgzPyu58yXbhev5OItQNCjXMrgMq9IriUKyUe.' 
WHERE uid = 1;

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

Calculating order form example

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

View Demo

Customizing WordPress Admin

Remove the Admin Bar

putting the following in functions.php:

add_filter( 'show_admin_bar', '__return_false' );


<h3>Auto-save</h3>
<p>Specify the interval that WordPress should auto-save, you just have to put a single line of code in wp-config.php:</p>

define('AUTOSAVE_INTERVAL', 300); // 60 * 5, auto-saves every 5 minutes


<p>Disable autosave:</p>

function no_autosave() {
  wp_deregister_script('autosave');
}

add_action( 'wp_print_scripts', 'no_autosave' );



<h3>Revisions</h3>
<p>Add the following to your wp-config.php file:</p>

define('WP_POST_REVISIONS', 3); // Maximum 3 revisions per post
define('WP_POST_REVISIONS', false); // Disable revisions


<h3>Trash</h3>
<p>Empty Trash Automatically,add this line to wp-config.php </p>

define('EMPTY_TRASH_DAYS', 7 ); // Empty trash every 7 days 

CSS3 3D Text + Blur Text

3D text

h1 {
font-size: 4em;
text-align:center;
text-shadow:   0 1px 0 #ccc, 
               0 2px 0 #c9c9c9,
               0 3px 0 #bbb,
               0 4px 0 #b9b9b9,
               0 5px 0 #aaa,
               0 6px 1px rgba(0,0,0,.1),
               0 0 5px rgba(0,0,0,.1),
               0 1px 3px rgba(0,0,0,.3),
               0 3px 5px rgba(0,0,0,.2),
               0 5px 10px rgba(0,0,0,.25),
               0 10px 10px rgba(0,0,0,.2),
               0 20px 20px rgba(0,0,0,.15);
}

Text Blur and no select

.blur{
color: transparent;
text-shadow: 0 0 26px rgba(0,0,0,0.8);
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
}

View Demo

Hamelin

Website Hamelin

1 pagina design voor hamelin met links nar de diversen merken.

Basis Informatie:

  • Hamelin
  • Jaar: 2011

Project Informatie:

  • Content Management – Geen
  • 1 page design
  • Jquery

Bekijk de website : www.hamelin.nl

Custom wordpress login

Make a custom login

copy the following piece of code, and paste it on your functions.php file

Of course your image will replace the original one so there is a size to respect. Your picture must have the following size: 333×85



//custom login

function my_custom_login_logo() {
    echo '<style type="text/css">
        h1 a { background-image:url('.get_bloginfo('template_directory').'/images/custom-login-logo.gif) !important; }
    </style>';
}

add_action('login_head', 'my_custom_login_logo');

//Custom Login Screen
function change_wp_login_url() {
echo bloginfo(‘url’);
}

function change_wp_login_title() {
echo get_option(‘blogname’);
}

add_filter(‘login_headerurl’, ‘change_wp_login_url’);
add_filter(‘login_headertitle’, ‘change_wp_login_title’);

//Change link from new WP login logo (default is wordpress.org)
function put_my_url(){
return "http://test.ontwerps.nl/"; // your URL here
}
add_filter(‘login_headerurl’, ‘put_my_url’);

CSS page borders

CSS example Page border

/*------------------------------------*\
	PAGEBORDERS
\*------------------------------------*/

/* Create a series of empty pseudo-elements... */
html:before,html:after,body:before,body:after{
	content:"";
	background:#acacac;
	position:fixed;
	display:block;
	z-index:5;
}

/* ...and position them! */
html:before{
	height:10px;
	left:0;
	right:0;
	top:0;
}
html:after{
	width:10px;
	top:0;
	right:0;
	bottom:0;
}
body:before{
	height:10px;
	right:0;
	bottom:0;
	left:0;
}
body:after{
	width:10px;
	top:0;
	bottom:0;
	left:0;
}


Macintosh Accent Codes

Mac Accent Codes / Mac Leestekens

Accented Vowels

For the Template, the symbol “V” means any vowel. The format is to hold the first two keys down simultaneously, release, then type the vowel you wish to be accented.
Note: You should use the French Keyboard if you need to type accents on the letter y.

ACCENT SAMPLE TEMPLATE
Acute á Á Option+E, V
Circumflex â Â Option+I, V
Grave à À Option+`, V
Umlaut ë Ë Option+U, V

Example 1: To input the lower case ó, hold down the Option key, then the E key. Release both keys then type lowercase o.
Example 2: To input the capital Ó, hold down the Option key, then the E key. Release all both keys then type capital O.

Other Characters

Consonants/Punctuation
ç Option+C
Ç Shift+Option+C
« Option+\
» Shift+Option+\
Shift+Option+2
(not on older fonts)

Accented Y in OS X

Example: For Ý, type Option+E, then capital Y.