Monthly Archives: February 2012

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 … Continue reading

Posted in wordpress | Tagged

get category by it’s name at wordpress

$array_data= array(36,37,38,39); $cat_id=get_cat_ID( single_cat_title(”,false) );

Posted in Uncategorized

how to use .htaccess to block access images folder except myown domain

SetEnvIf Referer http://slmanchair.com/ localreferer <FilesMatch \.(jpe?g|png|gif)$> Order deny,allow Deny from all Allow from env=localreferer </FilesMatch>

Posted in Uncategorized | Tagged

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() ) … Continue reading

Posted in wordpress, youtube

How to get thumbnail of YouTube video link using YouTube API?

Each YouTube video has 4 generated images. They are predictably formatted as follows: http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg The first one in the list is a full size image and others are thumbnail images. The default thumbnail image (ie. one of 1.jpg, 2.jpg, 3.jpg) … Continue reading

Posted in youtube

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 … Continue reading

Posted in wordpress | Tagged

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>’; … Continue reading

Posted in wordpress | Tagged