php

how to set stamp on photo as a watermark on php?

<?php // Load the stamp and the photo to apply the watermark to $stamp = imagecreatefrompng(‘stamp.png’); $im = imagecreatefromjpeg(‘photo.jpeg’); // Set the margins for the stamp and get the height/width of the stamp image $marge_right = 10; $marge_bottom = 10; $sx = imagesx($stamp); $sy = imagesy($stamp); // Copy the stamp image onto our photo using… Continue reading how to set stamp on photo as a watermark on php?

wordpress

How to Increase the Maximum File Upload Size in WordPress?

maximum file upload size in WordPress. Note: This is an intermediate level tutorial. It may not work with some shared hosts in which case you would have to ask your hosting service provider for support. We use HostGator, and they are more than helpful when it comes to issues like this. 1: Theme Functions File… Continue reading How to Increase the Maximum File Upload Size in WordPress?

wordpress · youtube

how to control youtube video width/height thumb with wordpress?

/******************************************************************** show any video (control width/height) ********************************************************************/ define(“YOUTUBE_TARGET”, “<object width=\”###WIDTH###\” height=\”###HEIGHT###\”><param name=\”movie\” value=\”http://www.youtube.com/v/###URL###?fs=1&amp;hl=en_US\”></param><param name=\”allowFullScreen\” value=\”true\”></param><param name=\”allowscriptaccess\” value=\”always\”></param><embed src=\”http://www.youtube.com/v/###URL###?fs=1&amp;hl=en_US\” type=\”application/x-shockwave-flash\” allowscriptaccess=\”always\” allowfullscreen=\”true\” width=\”###WIDTH###\” height=\”###HEIGHT###\”></embed></object>”); define(“YOUTUBE_IMAGE”, “<img src=\”http://img.youtube.com/vi/###URL###/hqdefault.jpg\” width=\”###WIDTH###\” height=\”###HEIGHT###\”/>”); function show_video($args,$width,$height,$showtitle,$showimage) { //’cat=37&posts_per_page=1&orderby=date&order=Desc’ query_posts($args); if( have_posts() ) { while( have_posts() ) { the_post(); $filtered_content = str_replace(‘<p>’,”,get_the_content()); $filtered_content = str_replace(‘</p>’,”,$filtered_content); $filtered_content=rtrim($filtered_content, “]”); $filtered_content=ltrim($filtered_content, “[“); if(!$showimage) $output =… Continue reading how to control youtube video width/height thumb with wordpress?

wordpress

show youtube vedio by width,heigh

/******************************************************************** show any video (control width/height) ********************************************************************/ define(“YOUTUBE_WIDTH”, 310); // default width define(“YOUTUBE_HEIGHT”, 250); // default height define(“YOUTUBE_REGEXP”, “/\]+)\]/”); define(“YOUTUBE_TARGET”, “<object width=\”###WIDTH###\” height=\”###HEIGHT###\”><param name=\”movie\” value=\”http://www.youtube.com/v/###URL###?fs=1&amp;hl=en_US\”></param><param name=\”allowFullScreen\” value=\”true\”></param><param name=\”allowscriptaccess\” value=\”always\”></param><embed src=\”http://www.youtube.com/v/###URL###?fs=1&amp;hl=en_US\” type=\”application/x-shockwave-flash\” allowscriptaccess=\”always\” allowfullscreen=\”true\” width=\”###WIDTH###\” height=\”###HEIGHT###\”></embed></object>”); function youtube_plugin_callback($match) {     //    print $match; $tag_parts = explode(” “, rtrim($match[0], “]”)); $output = YOUTUBE_TARGET; $output = str_replace(“###URL###”, $tag_parts[1], $output);… Continue reading show youtube vedio by width,heigh

wordpress

add breadcrumbs for wordpress

function dimox_breadcrumbs() { $delimiter = ‘&raquo;’; $home = ‘الرئيسية’; // text for the ‘Home’ link $before = ‘<span>’; // tag before the current crumb $after = ‘</span>’; // tag after the current crumb $you=”انت هنا فى “; echo ‘<div id=”crumbs”><span>’.$you.'</span>’; global $post; $homeLink = get_bloginfo(‘url’); echo ‘<a href=”‘ . $homeLink . ‘”>’.$home.'</a> ‘ . $delimiter… Continue reading add breadcrumbs for wordpress

wordpress

how to add subscripe to your blog at wordpress?

<form action=”?page_id=22″ method=”post”> <input type=”hidden” value=”s” name=”na”> <input type=”hidden” value=”widget” name=”nr”> <input type=”text” name=”ne” id=”Email” > <input type=”button” value=”إشترك” onclick=”if(this.form.ne.value==”) alert(‘ادخل البريد الالكترونى’); else {if(validateEmail(this.form.ne.value)) this.form.submit(); else alert(‘ادخل بريد الكنرونى بطريه صحيحة’);}” /> </form>   function validateEmail(elementValue){ var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; return emailPattern.test(elementValue); }