Posts RSS Comments RSS 133 Posts and 258 Comments till now

SODEVE’s WP-Translate, Blogger Edition

Larry Keiler asked me whether the Sodeve’s WP-Translate works on Blogger. The answer is no. This is because Blogger doesn’t use PHP (frankly, I’m don’t know. My hunch tells me it’s running on Python.)

I actually have written the JavaScript version of the plugin. You could see it running here.

Basically it consists of two parts, the JavaScript, and HTML. You could host the images in your own blogs, but it would be tedious to add the flags one by one. So I put them up at PhotoBucket. This way you can just copy and paste into your Blogger layout.

Javascript Part:


HTML Part:

Back to English English to German English to Spanish English to French English to Italian English to Portuguese
English to Dutch English to Greek English to Nippon English to Korean English to Russian English to Simplified Chinese

So now how to add it to Blogger? Please follow this steps:

  1. Login to Blogger
  2. Go to Dashboard, then click Layout
    Blogger's Dashboard
  3. At the sidebar location. Click “Add a Page Element”
     Blogger - Add a Page Element
  4. A new window will pop-up. Select ‘HTML/Javascript’, click ‘Add to Blog’
  5. You now will have a text box and a text area. Leave the title blank. Copy the code described in the ‘Javascript Part’, then paste it in the text area. Then copy the code from ‘HTML Part’, and paste it also in the text area. Inside the text area, separate the Javascript and the HTML with one line.

You are good to go. If you like this tips, I would be grateful if you link-back to this blog. Thanks.

Good luck with your Blogger (^_^)/

List of Bloggers that use Sodeve’s WP-Translate, Blogger Edition:

  1. My Demo Site
  2. Your Blog?
 

CSS Font-Size Illustrated

After frustated unable to get my source codes displayed smaller, I decided to play around with CSS’ font-size for our amusement.

font-family font-size Target
Testing Font
Possible value:
Verdana
Arial
Helvetica
Sans-Serif
.. any font installed on your system
Possible values:
pixel, example: 10px 8px
point, example: 8pt
old-school HTML, example: 1 2 3 … 8
ems, example: 0.8em 1em
 

 

Done using Javascript:

<script language="javascript">

function UpdateFont()
{
    var objTarget = document.getElementById('divtarget'); // a div
    var objSourceFont = document.getElementById('txbFont'); // a textbox
    var objSourceSize = document.getElementById('txbSize'); // a textbox
    if (objTarget != null && objSourceFont != null && objSourceSize != null)
   {
       objTarget.style.fontSize = objSourceSize.value;
       objTarget.style.fontFamily = objSourceFont.value;
   }
}

  </script>

 

Resources:
W3C Standard
W3School Tutorial
 

An Even Better Quote of The Day for Your Website

To celebrate April’s Fools Day, I decided to create yet another Quote of the Day :-). The additional feature is a link to the Wikipedia article of the person quoted will be included. You also make it reload different quote every specified time. And it no longer forces you to link back to my Website. But I will be really grateful if you could link back to my blog :-)

Features
Link to biography/article of the author at Wikipedia.

Auto refresh. You can change how many minutes passed before the quotes is repaced with a new one.

Do you have feature-request?

Known Bugs
The CSS is broken when displayed on IE. has something to do with the DOM.

Have you found another bug?

<p style="color:#FF34FF; background-color:#EEEEEE">
  <script langugage="javascript" type="text/javascript"></p>

/*
  Quote of The Day user Guide:
     qotd_style, a string value for CSS of the QOTD.
               Default: no CSS
               example: qotd_style =”color:#FF34FF”;

    reloadTime, an integer value to regulate how many minutes before the QOTD is refreshed.
               Default: not refreshed.
               example: reloadTime = 5; //QOTD will be refreshed every 5 minutes.

    isUsingWikipedia, a boolean value to indicate whether a link to Wikipedia.org’s related article will be included.
               Default: true.
               example: isUsingWikipedia = false; //no link to wikipedia.org

    isItalic, a boolean value to indicate whether the quotation is diplayed in italics.
               Default: false
 */
  var reloadTime = 1;
  var isItalic = true;
  var qotd_style = “color:#FF34FF; background-color:#EEEEEE”;

</script>

<script language="javascript" type="text/javascript" src="http://sodeve.net/qotd2/qotd.js" ></script><h5><a href="http://sodeve.net/quotes/">Sodeve’s QOTD</a></h5> 
</p>

If you have any problem installing the script in your website, feel free to drop a comment.

 

Here’s How to Add Quote of The Day into Your Website Instantly

I have created a free Quote of Day that can be incorporated into your website seamlessly. As a small favor, when people click the text, they will be brought to this page.

To add the QOTD anywhere in your page you can just add the following code:

Code
Explanation
To use the default font color
To specify the color to be used as background and foreground.

 

The example of below code is shown in the QOTD of this blog.

<script langugage="javascript" type="text/javascript">
var qotd_style = "font-weight:normal;font-size:12px;color:#000000;background-color:#FFFFFF";
</script>
<script language="javascript" type="text/javascript" src="http://sodeve.net/qotd/qotd.js" >  </script>

 

How to Check Whether Javascript is Enabled From Server

Sometimes we use javascript to do the data verification check on the client side. Sometimes we change the behavior of an input such as textbox to only accept numbers. To check wheter your clients using Javascript in their environment, add/adapt the following snippets into your form:

 

 


….

….

 

On the server you will need to check is the ‘javascriptCheck’ variable’s value is ‘1′. If it is, it means Javascript is enabled.

Close
E-mail It
Socialized through Gregarious 42