YUI 2

  • Posted on: 10 July 2010
  • By: brovko
My first experience with YUI I've started from the developer site. Documentation and samples YUI (current version - 2.8), this site has informative RSS. Widgets which I use frequently are: "Button", "Container", "DataTable", "TabView", and in some projects I use "TreeView". Useful non-visual YUI-components: "Connection Manager", "Element", "DataSource", "Paginator". "Button" sample:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Push Button</title>
    <!-- YUI loader -->
    <script src="http://yui.yahooapis.com/2.8.0r4/build/yuiloader/yuiloader.js"></script>
</head>
<body class="yui-skin-sam">
    <input id="btnCommit" type="button" value="Commit Info" />
<script>
<!--
var indCurModule = 0;
var loader = new YAHOO.util.YUILoader();
loader.filter = 'MIN';
loader.insert
(
{
    require:
    [
         "button"
    ]
    , base: 'http://yui.yahooapis.com/2.8.0r4/build/'
    // Configure the Get utility to timeout after 100 seconds for any given node insert
    , timeout: 100000
    , onSuccess: function(loader)
    {
        (function ()
        {
             var btnCommit = new YAHOO.widget.Button("btnCommit", { label: "Commit Info" });
             btnCommit.on
             (
                 "click"
                 , function ()
                 {
                     alert('Button Clicked');
                 }
             );
        }
        )();
    }
    , onFailure: function(err)
    {
        alert('Unable load module: ' + err['module']);
    }
    , onTimeout: function(err)
    {
        alert('Timeout reached: ' + err['module']);
    }
    , onProgress: function(state)
    {
        var countModules = 0;

        for (var m in this.required)
        {
             ++countModules;
        }

        ++indCurModule;
        var percent = parseInt(indCurModule * 100 / countModules);

        if (percent > 100)
        {
            percent = 100;
        }

        var status = document.getElementById('status');
        //alert('load module:' + YAHOO.lang.dump(state['name']));
    }
}
);
-->
</script>
</body>
</html>
http://developer.yahoo.com/yui/button/#buildingfromdatasource - this link contains information how to create "Button" with HTML (and other methods).
Tags: 

Creating email on Nokia 6120c

  • Posted on: 17 August 2009
  • By: brovko

Enter into menu [Messaging] [Mailbox].

Question "No mailbox defined. Define now?" - answer "Yes".

Push "Start". Select email type "POP3" or "IMAP4". In my choice this is "IMAP4". Push "Next" end enter email, for example "administrator@example.com". On next step enter email-server, for example "imap.example.com". After that enter smtp server, for example "smtp.example.com". Select APN (Access point in use) and make email alias name.

The Yahoo! User Interface Library (YUI)

  • Posted on: 2 August 2009
  • By: brovko

Today I present interesting AJAX-library YUI (http://developer.yahoo.com/yui/). It developed by Yahoo internet search system.

YUI has nice license - BSD License (http://developer.yahoo.com/yui/license.html).

Last library version (2009/08) - 2.7.0

YUI has maximal full documentation (API documentation, examples gallery, YUI Theater - video, Cheat Sheets).

You need have Firefox with Firebug (look at Firefox additions or http://getfirebug.com/).

Main library features will be discussed in next posts.

Sync Nokia 6120 classic with gmail.com

  • Posted on: 25 July 2009
  • By: brovko

My mobile phone was repaired and contacts were lost. Before phone was broken I had synchronized contacts with Google Mail. Contacts were restored quickly.

Prerequirements:

  • account on gmail.com, email on google (for example me@gmail.com);
  • mobile phone Nokia 6120c;
  • connected GPRS/EDGE/HSDPA (internet);

Sync setup:

  1. Enter into phone menu: [Settings] [Connectivity] [Sync], next [Options] [New sync profile].
  2. Setup profile name.
  3. Enter into [Applications] [Contacts].
  4. Setup [Include in sync] - "Yes".
  5. [Remote database] write "contacts".
  6. [Synchronization type] - "Both ways".
  7. Enter into [Connection settings] [Server ID] and write "Google".
  8. [Data bearer] - "Internet".
  9. Select [Access point].
  10. [Host address] - "https://m.google.com/syncml" (without quotes, other items must be without quotes too). Pay attention on protocol name https, not http.
  11. [Port] - "443".
  12. [User name] - email on gmail.com (for example me@gmail.com).
  13. [Password] - password to your email-account.
  14. Other items don't change.

Try to sync now:

  • Highlight the your Sync profile and select "Synchronize" from the [Options] menu to synchronize your contacts with Google.

Original you can find at here.

Problem with Google Analitycs was successfull solved

  • Posted on: 25 July 2009
  • By: brovko

Yesterday I visited to ovlad.com and saw: page was downloaded fine, but all links were unworked. Firebug (Firefox plugin) helped me. Perpetrator was div id="ga_shade" and problem was with Google Analitycs. Problem appeared after I had seen reports Google Analitycs ([Content] [Site Overlay]) and didn't close window by link "Close", which was at right-up corner. I closed page by system button in Firefox.

First solution, which I found, was very simple - delete cookies with name GASO. Later I found more right solution: must visit Google Analitycs [Content] [Site Overlay] again and close window by link "Close".

Yesterday attached to Google Analytics

  • Posted on: 23 July 2009
  • By: brovko

Yesterday attached to "Google Analytics for WordPress" to my blog and site ovlad.com.

Setup was simple.

  1. Register on Google Analytics and obtain code (javascript), which will be added to all site pages, and code, which write to plugin "Google Analytics for WordPress"
  2. Enable plugin "Google Analytics for WordPress" and setup it with code.

It's all.

Setup and configuring wordpress first time

  • Posted on: 21 July 2009
  • By: brovko

First I entered the site http://uk.wordpress.org/ - it is a Ukranian wordpress version.

I downloaded WordPress 2.8 and read setup instruction.

Unpack file which we was downloaded, copy wp-config-sample.php to wp-config.php.

Setup defines:

  • 'DB_NAME' - database name (created beforehand. You can do it with phpMyAdmin);
  • 'DB_USER' - database user;
  • 'DB_PASSWORD' - user's password - you must use password >= 8 symbols (letters, digits and special characters).
  • 'DB_HOST' - 'localhost' for most people.

Next define will be necessary if access to /tmp is denied (like it was in my case):

define('WP_TEMP_DIR', '/home/username/.../public_html/wordpress/tmp/');

WordPress setup:

  1. Create MySQL database with the help of phpMyAdmin.
  2. Create a new user and give him access to this database.
  3. Copy unpacked WordPress and wp-config.php into host.
  4. For themes installing create ftp-account with a root in http://your-site/wordpress.
  5. Create 'tmp' directory in wordpress (write full path to this directory in define 'WP_TEMP_DIR'), give rights to created directory 0777.

Open in browser http://your-site/wordpress/wp-admin/install.php

That's all.