WE ARE NATIONAL OF MYANMAR! WELCOME!

Wednesday 23 January 2013

how to get thumbnail image in the post on wordpress

First of all , you must open function.php in your theme directory. And then put  this codes in function.php .

<?php
add_theme_support( 'post-thumbnails' );
add_theme_support( 'post-thumbnails', array( 'post' ) );          // Posts only
add_theme_support( 'post-thumbnails', array( 'page' ) );          // Pages only
add_theme_support( 'post-thumbnails', array( 'post', 'movie' ) ); // Posts and Movies ?>

After that you can use thumbnail image by  code . you can add this code where you want to show image in template .

 the_post_thumbnail();                  // without parameter -> Thumbnail

the_post_thumbnail('thumbnail');       // Thumbnail (default 150px x 150px max)
the_post_thumbnail('medium');          // Medium resolution (default 300px x 300px max)
the_post_thumbnail('large');           // Large resolution (default 640px x 640px max)
the_post_thumbnail('full');            // Original image resolution (unmodified)

the_post_thumbnail( array(100,100) );  // Other resolutions

you must only one code line . Meaning that  .....

if you need thumbnail size , you must use  the_post_thumbnail('thumbnail');
if you need medium size , you must use  the_post_thumbnail('medium');

if you want to define custom image size  . . .

use this code ...... where you want to show image in the template ...

<?php if ( function_exists( 'add_theme_support' ) ) {
  add_theme_support( 'post-thumbnails' );
        set_post_thumbnail_size( 300, 300,true );
}?>


Set the default Post Thumnail size by resizing the image proportionally (that is, without distorting it):

set_post_thumbnail_size( 50, 50 ); // 50 pixels wide by 50 pixels tall, resize mode

Set the default Post Thumnail size by cropping the image (either from the sides, or from the top and bottom):

set_post_thumbnail_size( 50, 50, true ); // 50 pixels wide by 50 pixels tall, crop mode.


reference : wordpress.org


Sunday 10 April 2011

Auto scrolling code for blogger and wordpress

မိမိ HOME PAGE ကို AUTO SCROLLING လုပ္ခ်င္ရင္ သံုးလို့ရပါတယ္။တခ်ိဳ့က စိတ္အေနွာက္အယွက္ၿဖစ္တယ္လို ့ယူဆသလို တခ်ိဳ့ၾကၿပန္ေတာ့လဲ တမ်ိဳးဆန္း တယ္ထင္ၿပီးသံုးၾကတာေတြ ့ပါတယ္ ။ ၾကိဳက္ေသာသူ ယူေစေသာ္ဝ္ ။

AUTO SCROLLING FOR YOUR MAIN PAGE

FOR BLOGGER ►►► GO  DESIGN>>PAGE ELEMENTS >>ADD A GADGET . TAKE HTML/JAVASCRIPT WIDGET AND COPY AND PASTE  FOLLOWING CODES .

FOR WORDPRESS ►►►  GO ADMIN PANEL>>APPERANCE>>WIDGET . TAKE ONE TEXT WIDGET AND COPY AND PASTE FOLLOWING CODES.


<script type="text/javascript">// <![CDATA[
iPosition = 0;  iLength=254; bscroll = true;  function switchscroll(atag)
{
bscroll = !bscroll;  atag.innerText = bscroll ? 'Autoscroll on/off' : 'Autoscroll on/off'; return false;
}
function scrollinit()  // section below initiates the scrolling and continues the scrolling to end of page
{
scrollTo(0, 10000);  lyrics_height = document.body.scrollTop+document.body.offsetHeight; scrollTo(0,0);
}
function timer() // section below sets the timer and determines the delay and steps - you can change the values below
{
iPosition++;  setTimeout('timer()', 500);  progress = (iPosition/iLength)*100;  if (iLength > 0)
{
thissec = iPosition/iLength;  lastsec = (iPosition-1)/iLength; scrollperc = thissec-lastsec;
if (bscroll) scrollBy(0, (lyrics_height-(document.body.offsetHeight/2))*scrollperc);
}
}
setTimeout('scrollinit()', 50);setTimeout('timer()', 10000);
// ]]></script>







Friday 8 April 2011

How to create wordpress blog

First of all, you must choise one of hosting . free hosting or your own hosting site , everthing is ok . i recommend you that http://byethost.com  is good free hosting site.So i will tell you how to hosting your blog on  byethost.com.

stept 1 ------ go http://cpanel.byethost.com and login with your username and password.And then click - control panel>>database management >>mysql database . now you must create one database for your blog. you will see text box under the "create new database" text . fill your database name . for example; mydatabase007 . And then click on " create database". now finish create your database .

stept 2------- you must choose one domain .it can be either your own domain or subdomain of byethost.com .choose one and go to contorl panle>>domain . if you have own domain, click addon domains and then put your own domain . if you have't own domain , click subdomain  and put your blog name and choose your subdomain . for example , http://yourname.byethost.com, http://yourname.iblogger.org  , etc...

Thursday 7 April 2011

WP PHOTO ABLUM


If you want to put photo albums on your wordpress blog, you need to install  wp photo album plugin . First of all , you go wordpress.org and download this plugin . It is here DOWNLOAD .
After you must install plugin on your blog . you look following image . No.1 is to create photo albums and no.2 is to upload your photos on your album .

After you must copy this code that on the image and you must put where you want to keep your album on blog page or post . After you will see your album where you put .

HOW TO PUT FAVICON ON WORDPRESS

Did you saw ? , usually blogs and websites have favicon for their sites . you look my blog’s adress bar . you will see eagle icon . How to put favicon in adress bar ? .This is very easy . First of all , you must create a favicon image . you must already have one of icon maker softwares . you can free download this software  on the internet by google .And then you must create a ( .ico ) image .After finish you must upload your image on your wordpress hosting site . upload directory is like that
http://***********.com/wp-content/themes . you must upload on this location .After you must go to your admin panel of blog and you must click like that appearance>>editor .After you will see your theme editor page . It is know as style sheet css . You check right side . you will see  “header.php“   under the themes files .Click there and you  must find this code at  between <head> and </head> section on your header.php page   . <link rel=”pingback” href=”<?php bloginfo(’pingback_url’); ?>” /> . If you found this code and then you put  continue this codes . <link rel=”shorcut icon” type=”image/x-ico” href=”<?php bloginfo(’template_url’); ?>/********.ico” /> . Do you see this character ******* . It is your image name . For example , (eagle.ico ) . like that . After you click on the save or update  tag and then everything finish . you make  reload your blog main page and you will see your image on your adress  bar .

Thank for read .

Friday 25 February 2011

Moving address bar

 It is very easy to making . First of all, you must go to admin panel>>apperance>>widgets . And then you must take one text widget and copy following codes . After you must paste in the text widget . after save and then reload you blog page and you will see your address bar is moving . you can replace  some text what you like  at the  msg=”blackeagles”; . checking red color words .

NOTE :    I got this codes  from www.javascriptfreecode.com .
<SCRIPT language=javascript>
msg = “blackeagles”;
msg = “…” + msg;pos = 0;
function scrollMSG() {
document.title = msg.substring(pos, msg.length) + msg.substring(0, pos);
pos++;
if (pos >  msg.length) pos = 0
window.setTimeout(”scrollMSG()”,200);
}
scrollMSG();
</SCRIPT>

GREETING!

It is new blog of http://blackeagles.iblogger.org . Start today,we will write the post  and share of our knowledge here!!!.  Welcome ! all of friends and readers from blackeagles group(old blog).                 

                                                                   Ice-cube
                                                                   http://blackeagles.iblogger.org.