rss

About Me

My Photo
irnanto dwi saputra
View my complete profile

24 September 2011

Using the Echo or Print

Hello, this time I will try to discuss two functions that we often use, ie, echo and print, we made dizzy sometimes between two options, using echo or print when you want to display the contents of a variable, or just display as plain text alerts of a process that has been done. Echo or Print? Echo or Print? Echo or Print? and so on ... A little confused indeed.

In addition to print php echo and also provides many alternatives for the syntax of another, different function but the task remains the same, plus dizziness, more confused.

The author himself is quite confused to choose one of them, echo or print? echo or print? but after studying the various existing CMS like joomla, drupal, wordpress, it turns out they are the web developers tend to use echo rather than print, then what is the reason?

Let us go into. Php language a developer ever do the testing, and the result is the echo is 15% faster process than the print function (in millisecond). And it is common knowledge that if the print is a function that returns the value in it (returning value). And there is another reason why most developers prefer to use echo rather than print, another reason is, time efficiency, because the echo was only requires 4 letters to be typed, while the print it has 5 letters to be typed. But this is reality. A lazy programmer to write the letter 't'. And this has become a natural human instinct, choose a shorter. Still the same.

Okay, for further efficiency is the use of:
echo "$ variable1 and". "$ Variable2 to be displayed". "Put here";

it takes a lot of resources, because the dot has a function to mengadd / add the contents of a variable, instead of connecting or forwarding. The difference between adding a forward is like this:

Adding it to have meaning, opening up a new variable and then add the contents into the variable, then closes the variable. While the connect or continue to have meaning, its variable was content to continue living variablenya opened. Adding consists of three processes, while connecting or meneruskaan just doing one process.

Good use of echo is as follows:
echo $ variable, "and", $ variable2, "which will be displayed", "put here";

I separate each word here only as a simulation of actual cases. Echo is good it's not use a dot to connect each variable, or display text, but use a comma. So the process is faster, and fewer and fewer resources required.

Read more.....

23 September 2011

Create a JQuery Slide show Recent Post

Salam blogger, before I would berterimakasi to visitors and lovers of bloggers in particular sekalin shabat - blogger friend, on the occasion tonight I'll share one for a simple trick, simple but fun hehe, how to install was very easy.

OK, the trick that I will give is how to create a "Recent Post JQuery Slide Show" with the name "Recent Post Slide Show"

this blog we will be more beautiful and interesting, hopefully our visitors were also felt at home.

OK, since I do not want to talk at length because it is still much to do, simply:

1. As usual Log into your Blogger account, select "Layout" then "Page Elements", 2. Click the "Add a Gadget" (whatever okay), then select "HTML / JavaScript", 3. Copy-paste the code below:
<script src="https://sites.google.com/site/efekefek/file-js/recentpostslide.js" type="text/javascript"></script>
<style type="text/css" media="screen">
<!--

#spylist {
overflow:hidden;
margin-top:5px;
padding:0px 0px;
height:350px;
}
#spylist ul{
width:220px;
overflow:hidden;
list-style-type: none;
padding: 0px 0px;
margin:0px 0px;
}
#spylist li {
width:208px;
padding: 5px 5px;
margin:0px 0px 5px 0px;
list-style-type:none;
float:none;
height:70px;
overflow: hidden;
background:#fff url(http://i879.photobucket.com/albums/ab351/bloggerblogimage/blogger/post.jpg) repeat-x;
border:1px solid #ddd;
}

#spylist li a {
text-decoration:none;
color:#4B545B;
font-size:11px;
height:18px;
overflow:hidden;
margin:0px 0px;
padding:0px 0px 2px 0px;
}
#spylist li img {
float:left;
margin-right:5px;
background:#EFEFEF;
border:0;
}
.spydate{
overflow:hidden;
font-size:10px;
color:#0284C2;
padding:2px 0px;
margin:1px 0px 0px 0px;
height:15px;
font-family:Tahoma,Arial,verdana, sans-serif;
}

.spycomment{
overflow:hidden;
font-family:Tahoma,Arial,verdana, sans-serif;
font-size:10px;
color:#262B2F;
padding:0px 0px;
margin:0px 0px;
}

-->
</style>

<script language='javascript'>

imgr = new Array();

imgr[0] = "http://i43.tinypic.com/orpg0m.jpg";

imgr[1] = "http://i43.tinypic.com/orpg0m.jpg";

imgr[2] = "http://i43.tinypic.com/orpg0m.jpg";

imgr[3] = "http://i43.tinypic.com/orpg0m.jpg";

imgr[4] = "http://i43.tinypic.com/orpg0m.jpg";
showRandomImg = true;

boxwidth = 255;

cellspacing = 6;

borderColor = "#232c35";

bgTD = "#000000";

thumbwidth = 70;

thumbheight = 70;

fntsize = 12;

acolor = "#666";

aBold = true;

icon = " ";

text = "comments";

showPostDate = true;

summaryPost = 40;

summaryFontsize = 10;

summaryColor = "#666";

icon2 = " ";

numposts = 10;

home_page = "http://weblearning27.blogspot.com/";

limitspy=4
intervalspy=4000

</script>

<div id="spylist">
<script src=https://sites.google.com/site/efekefek/file-js/recentpostslide2.js' type='text/javascript'></script>
</div>

CAUTION

Replace the red code with your link address, OK.

After all the measures passed, the store and see the results!

Read more.....

22 September 2011

How to Create a Slideshow With Jquery Cycle Plug In

jQuery Cycle Plugin is a Plug In Slideshow light and pretty awesome. This plugin provides a method of calling in cycles that are involved in a container element, in which each element of the container into a slide.

If you are interested in using jquery slideshow with the cycle plugin for bloggers in particular friend or website please follow the steps below.

1. As usual my friend must log in first to blogger

2. select design

3. Then select Edit HTML

4. check the Expand Widget Templates and backup first your templete (to avoid the event of any errors)

5. Copy the code below and paste the code above </ head> or below the code ]]></ b: skin>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"> </script>
<script type="text/javascript" src="http://my-slideshow.googlecode.com/files/jquery.cycle.all.min.js"> </script>
<script type="text/javascript">
$(document).ready(function(){
$('#myslides').cycle({
fx: 'cover',
speed: 500,
timeout: 2000
});
});
</script>

6. For the CSS code below, copy and paste this code above ]]></ b: skin>

#myslides {
width: 370px;
height: 220px;
padding: 0;
margin: 0 auto;
}

#myslides img {
padding: 10px;
border: 1px solid rgb(100,100,100);
background-color: rgb(230,230,230);
width: 350px;
height: 200px;
top: 0;
left: 0
}

CAUTION

You can edit the CSS code above in accordance with the width you want for example (width slidshow / image) and height (height slideshow / images)

7. The last step is to install the HTML code below where you want to put SlidShow by adding gadgets.

<div id="myslides">
<img src="http://weblearning27.blogspot.com/files/water.jpg" />
<img src="http://weblearning27.blogspot.com/files/fire.jpg" />
<img src="http://weblearning27.blogspot.com/files/air.jpg" />
<img src="http://weblearning27.blogspot.com/files/ground.jpg" />
<img src="http://weblearning27.blogspot.com/files/lightning.jpg" />
</div>

CAUTION

code yellow is the address of the image. Please change the address of your image.

Read more.....

11 June 2011

Optimizing your Blog With SEO 2

Search Engine Optimization, are steps / tips to the optimization problem in this case the Search Engine. Matter how good a site, if it can not be recorded / captured / in the index by search engines, as well as create a site for personal / self.

With indexed search engine, chances are your site will be viewed by all people in the world will be even greater. Many of us have encountered a good blog, but less optimal index tips in his lawyer.

Below is one of the steps putting meta tags for search engine indexes:

This code you simply place it under <head> code.


<meta content='your name' name='Author'/>
<meta content='Write a description of the Blogs' name='description'/>
<meta content='Write a Blog Keywords' name='keywords'/>
<meta content='follow, all' name='robots'/>


There are also some tricks that can improve SEO

As for the steps, you see below:

  1. Use a blog name that is not too long.
  2. Use code <h1> the beginning of the article.
  3. If you put the pictures do not forget to write the code alt = "your blog's name". (example: <img src =" http://weblearning.jpg "alt =" name your blog ">
  4. Add your URL to AltaVista, AlltheWeb, MSN, Yahoo and other submitter.
  5. Expand friends blogs to put our blog links.
  6. Berkomentarlah in the comment box of a blog that is quite famous.
  7. Make Blogroll leading blogs.
  8. If necessary begging other bloggers to link it links us.
  9. Chat, attach your blog address, because the farther the reach of the IP of a visitor, will increase our PageRank.
  10. Make SiteMap
  11. Updates always.
  12. Give a Bold / Font thick on every word that relates to
    name your blog.
  13. Surfinglah in EasyHits4U, you'll earn credits which will be used to advertise your blog / website / banner / links you have, and in EasyHits4U also you will be paid $ 0.3 for every 1000 sites viewed.

Hopefully, a little above steps can help you to be indexed by search engines.

Read more.....

10 June 2011

Create Avatar Comments on Custom Template

Questioned about the new features of the avatar comment blogger who can not appear on some templates or custom templates derived not from the templates provided on the dashboard of blogger, so I'll share my little experience about how to make a comment avatar.

For those of you who commented yet appeared avatars, maybe your template does not yet support for these new features, but of course do not worry because with a little touch of modifications on your template, blogger avatar will appear, which are important amenities already provided by the blogger.

Ok, we just peraktekkan. Please follow lankah follows:

  1. Login to blogger with your ID.
  2. Click Layout.
  3. Click the Edit HTML tab
  4. Click "Download Full Template", please backup your template first (just in case).
  5. Put a tick in a small box beside the words "Expand Widget Templates"
    expand template widget weblearning27.blogspot.com

    Copy and paste the following code above the code ]]></ b: skin>
    .Avatar-image-container img {
    background: transparent url (http://i33.tinypic.com/24b9na8.jpg) no-repeat;
    height: 35px;
    width: 35px;
    }
  6. Find the following code in your template:

    <dl id='comments-block'>

    Or sometimes will be using code like this:

    <div id='comments-block'>

  7. Replace the code with the following code:

    <dl expr:class='data:post.avatarIndentClass' id='comments-block'>

    If your template code includes code that uses a div then changed to:

    <div expr:class='data:post.avatarIndentClass' id='comments-block'>

  8. Find the following code:
    <a expr:name='data:comment.anchorName'/>
  9. Remove the code and then replace with the following code:
    <b:if cond='data:comment.favicon'>
    <img expr:src='data:comment.favicon' height='35px' style='margin-bottom:-2px;' width='35px'/>
    </b: if>
    <a expr:name='data:comment.anchorName'/>
    <b:if cond='data:blog.enabledCommentProfileImages'>
    <data:comment.authorAvatarImage/>
    </b: if>
  10. Click Save Template button.
  11. Done.

The steps above may not be suitable for all existing custom templates, chances are you have to do some modification to the template you have the maximum.

Read more.....
 

Site Info

Google Pagerank Powered by  MyPagerank.Net My Ping in TotalPing.com TopOfBlogs My Zimbio Blog Directory