Category: My Tutorial


Add the following line in functions.php

function custom_init_method() {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js');
wp_enqueue_script( 'jquery' );
}

add_action('init', 'custom_init_method');

and add the following line on header.php before wp_head();

wp_enqueue_script('jquery');

Copy and Paste in PuTTY?

How does this work?
First, highlight a chunk of text in any application, then open a new application and middle-click the mouse. The highlighted text will automatically get pasted into the active application — bypassing the clipboard altogether! In fact, this method will not disturb the existing contents of the clipboard in any way.
This method works fine for Putty …

Find and Replace String @ SQL : Mysql

Sometimes we need find and replace string/text in mysql tables. Here is the sql i use and find works

UPDATE mysql_table_name SET mysql_column_nam= REPLACE(mysql_column_name, ‘string_to_find’, ‘string_to_replace’);

Introduction

TCPView is a Windows program that will show you detailed listings of all TCP and UDP endpoints on your system, including the local and remote addresses and state of TCP connections. On Windows Server 2008, Vista, and XP, TCPView also reports the name of the process that owns the endpoint. TCPView provides a more informative and conveniently presented subset of the Netstat program that ships with Windows. The TCPView download includes Tcpvcon, a command-line version with the same functionality.

Using TCPView

When you start TCPView it will enumerate all active TCP and UDP endpoints, resolving all IP addresses to their domain name versions. You can use a toolbar button or menu item to toggle the display of resolved names. On Windows XP systems, TCPView shows the name of the process that owns each endpoint.

By default, TCPView updates every second, but you can use the Options|Refresh Rate menu item to change the rate. Endpoints that change state from one update to the next are highlighted in yellow; those that are deleted are shown in red, and new endpoints are shown in green.

You can close established TCP/IP connections (those labeled with a state of ESTABLISHED) by selecting File|Close Connections, or by right-clicking on a connection and choosing Close Connections from the resulting context menu.

You can save TCPView’s output window to a file using the Save menu item.

More info …http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx

By default, WordPress category permalinks are displayed that way:

http://www.omasters.com/blog/category/categorytitle

As you can see, the category in the url is pretty useless. Here’s how to remove it:
First backup your .htaccess file. Then, open it and append the following line:
RewriteRule ^category/(.+)$ http://www.yoursite.com/$1 [R=301,L]
Once saved, your categories pages will be displayed like this:

http://www.catswhocode.com/blog/wordpress

Better, Solution You can simply use plugin to solve the issue

The Top Level Categories plugin allows you to remove the prefix before the URL to your category page. For example, instead of http://fortes.com/category/work, I use http://fortes.com/work for the address my “work” category. WordPress doesn’t allow you to have a blank prefix for categories (they insert category/ before the name), this plugin works around that restriction.

Download Top Level Categories Plugin

More details ( More )

I tried oDesk / Elance / RAC /Freelancer All works for Us Bangladeshi people. oDesk is best to me, for some reason, on oDesk if you pass more then 4jobs you got 20job apply point each week, but on the other hand Elance free version offer monthly only 10points to apply and also for < $500 jobs Elance need 1credit to apply, for > $500 Elance need 2credit to apply, But this is for serious providers,,.. so that on Elance jobs you will not find junk application. … cause provider think twice before apply on a job…. but on oDesk provider have more then he needs sometimes and then what he/she do just search and apply that makes buyer confused who is serious more…thus Elance is good for serious providers on oDesk project can be < $50 but on Elance i think cant apply < $50…Elance also offer hourly jobs, but for hourly jobs oDesk is the Boss :) Success on oDesk for beginner is much more easy then Elance … i apply on Elance more then 2years and then i got 2jobs and the buyer continue repeat jobs…this is what i got on elance but on oDesk buyers are not for long relationship…but there are few big buyers …you need a good luck to catch them :) your life will change if you find one on odesk/elance … RAC allow apply unlimited jobs i think that makes user give a chance to get start…on rent a coder there are buyers who wish to hire for weekly/monthly like fixed jobs @office On Freelancer.com i am not able to get a jobs yet but i found many of my friends get jobs and repeated jobs on Freelancer.com … I love oDesk the most…second choose Elance… on Elance / RAC/ Freelancer they show your bid $ and message that’s too disgusting for me …on oDesk the payment and message is private, i love oDesk way who how many developer apply on jobs… RAC/oDesk/Elance/Freelancer all support Payoneer master card and work for Bangladesh. But Master card is little expensive …while withdraw from ATM. oDesk/Freelancer support Moneybookers and Moneybookers is the low cost service to transfer money from your site to Bangladeshi Banks :) No monthly maintain FEE. For Bangladeshi idle friends i want say please open oDesk+Elance+RAC+Freelancer profile and spacially try oDesk and Elance if you want earn some money from home and believe me if you got only one big buyer your life will completely changed.. There are so many jobs on oDesk/Elancer/freelancer jobs sites…why not use your brain earn money and increase Bangladeshi IT sector success rate… I think we people dont help each other here in Bangladesh, and i found so many indian co-worker who help their friends and they all do is marketing themself more then they do …and it works so the whole world know India as Freelancer country…why not we ? please try and keeep trying and believe me you will get some works this is for sure :) oDesk is CooL for beginner … Elance is CooL but need more patient …starting is bit difficult but onece you can start your engine your success boat will cross the river :)

phpMyAdmin Mysql overhead :: optimize

We use phpmyadmin many times and in structure tab, we see the table

Size and Overhead

This overhead in phpmyadmin reports in tables, is when you have deleted large chuncks from an myisam table. The myisam row get a bit shorter, creating space in the table/datafile which is used next time there will be an insert/etc (handy for speed and performance). This is not really a problem, and you can easily ‘fix’ this by doing an optimize on the table.

run sql command if Table_name is our mysql table

optimize table Table_name

or simply use phpmyadmin, select the table and at bottom of the With Selected Dropdown select Optimize table, and it will minimize your table size… :)

Magento Module Tutorial

This tutorial is taken from http://blog.baobaz.com/en/blog/magento-module-create-your-own-controller, So please go there if you want see more info i just makes my own backup :)

Magento is based on MVC model. This model helps for defining models, view (layout + templates) and controllers. Despite big amount of modules available by default in Magento and on Magento Connect, you may want to create your own module and define your controller for you Magento website. No problem, this tutorial will explain you how to create your own controller and how to make it respect its authoritah to layouts and templates.

Purpose of this example controller will be to give result of two integers multiplication (very useful if you lost your calculator). Integers will be provided through a basic form. Result will be displayed in a Magento notification.

Before starting creation of your module, please turn off the cache management in order to see immediately every change.

Creating your module

Our extension will be named arithmetic. Folders needed for this extension are created.

$ mkdir -p app/code/local/Baobaz/Arithmetic/controllers
$ mkdir -p app/code/local/Baobaz/Arithmetic/etc

We create file app/code/local/Baobaz/Arithmetic/etc/config.xml, in order to register this extension

<?xml version=“1.0″ encoding=“UTF-8″?>
<config>
    <modules>
        <baobaz_arithmetic>
            <version>0.0.1</version>
        </baobaz_arithmetic>
    </modules>
</config>

And a file app/etc/modules/Baobaz_Arithmetic.xml for its activation:

<?xml version=“1.0″ encoding=“UTF-8″?>
<config>
    <modules>
        <Baobaz_Arithmetic>
            <active>true</active>
            <codePool>local</codePool>
        </Baobaz_Arithmetic>
    </modules>
</config>

For more informations about creation of a new extension, please check Wojtek‘s post “Developing module for Magento Tutorial – Where to Begin [Part 1]“.

Creating a controller

You need now to create file app/code/local/Baobaz/Arithmetic/controllers/IntegerController.php and write method that will be used for multiplication.

Controller files must always follow pattern xxxxxController.php (xxxxx will be used after in url for calling this controller) and put in controllers folder.
Controllers methods names must follow pattern yyyyyAction (yyyyy will also be used in url for calling this controller). For the moment content of our file is:

class Baobaz_Arithmetic_IntegerController extends Mage_Core_Controller_Front_Action
{
    public function multiplyAction(){
    }
}

We need to indicate now that some controllers are available in Arithmetic modules. For doing that, we add the following content in app/code/local/Baobaz/Arithmetic/etc/config.xml file:

<config>
    …
    <frontend>
        <routers>
            <arithmetic>
                <use>standard</use>
                <args>
                    <module>Baobaz_Arithmetic</module>
                    <frontName>arithmetic</frontName>
                </args>
            </arithmetic>
        </routers>  
    </frontend>
</config>

Let see how this router declaration works:

  • indicates that router will be use in front part of website
  • is where you declare all your routers
  • is identifier of this router
  • standard can take value standard (for front part) or admin (for admin part).
  • Baobaz_Arithmetic indicates which module contain controller that handles this router
  • arithmetic is router name that will be used in url

We can now modify multiplyAction method for making it displaying a message:

public function multiplyAction(){
    echo “Respect my authoritah”;
}

When you call now url http://monsitemagento/arithmetic/integer/multiply message “Respect my authoritah” will be displayed. Let dissect this url:

  • arithmetic tells that controller is in Baobaz_Arithmetic module
  • integer tells that controllers/integerController.php file must be cehcked
  • multiply tells that multiplyAction method must be chosen in this file

Displaying a template

We define which layout file will be used in the module:

<config>
    …
    <frontend>
        …
        <layout>
            <updates>
                <arithmetic>
                    <file>arithmetic.xml</file>
                </arithmetic>
            </updates>
        </layout>
    </frontend>
</config>

We create app/design/frontend/default/default/layout/arithmetic.xml file in order to define which blocks will be used for controller that was just made.

<?xml version=“1.0″ encoding=“UTF-8″?>
<layout version=“0.1.0″>
    <arithmetic_integer_multiply>
        <reference name=“root”>
            <action method=“setTemplate”>
                <template>page/1column.phtml</template>
            </action>
        </reference>
        <reference name=“content”>
            <block type=“core/template” name=“arithmetic_integer_multiply” template=“arithmetic/integer/multiply.phtml”></block>
        </reference>
    </arithmetic_integer_multiply>
</layout>

Main template used by arithmetic/integer/multiply is page/1column.phtml. For “content” part of this template, only arithmetic_integer_multiply block will be displayed. This block does not need any particular management. It is then set with core/template type that is default type. Template file used will be arithmetic/integer/multiply.phtml.

Our template is defined, app/design/frontend/default/default/template/arithmetic/integer/multiply.phtml must then be created. This file will be empty for the moment..

For displaying correctly layout, it must be loaded in controller

public function multiplyAction(){
    $this->loadLayout();
    $this->renderLayout();
}

Interaction between template and controller

Our template will just have a basic form for providing integers to multiply

<form action=” method=”post”>
    <fieldset>
        <ul>
            <li>
                <label for=“int1″>Integer 1</label>
                <input type=“text” id=“int1″ name=“int1″ />
            </li>
            <li>
                <label for=“int2″>Integer 2</label>
                <input type=“text” id=“int2″ name=“int2″ />
            </li>
            <li><input type=“submit” value=“Multiply” /></li>
        </ul>
    </fieldset>
</form>

Action form url is again arithmetic/integer/multiply. Controller action must then be modified in order to manage data from form and to give result.

public function multiplyAction(){
    if ($this->getRequest()->isPost()){
        $int1 = $this->getRequest()->getPost(‘int1′);
        $int2 = $this->getRequest()->getPost(‘int2′);
        $result = $int1 * $int2;
    Mage::getSingleton(‘customer/session’)->addSuccess($int1 * $int2 = $result);
    }
    $this->loadLayout();
    $this->_initLayoutMessages(‘customer/session’);
    $this->renderLayout();
}

In order to know if controller is called after using form, following instruction is used:

$this->getRequest()->isPost()

Result is put in ‘customer/session’ session. For being able to display this result in template, message template must be loaded in multiplyAction method:

$this->_initLayoutMessages(‘customer/session’);

Add then in you template the following line where you want to display the result

echo $this->getMessagesBlock()->getGroupedHtml();

And here we are: we have now a new controller that displays result of a multiplication.

while development is ongoing @ magento developer need to see what’s going wrong …while we see Exception printing is disabled by default for security reasons. … such message.

to enable this error display follow

1. Go MagentoRoot/errors/

2. Copy local.xml.sample – and create local.xml @ MagentoRoot/errors/local.xml

Now the error message will show and you can easy debug the system. Very easy :) hah

Basic Joomla! template

Check this link http://docs.joomla.org/Tutorial:Creating_a_basic_Joomla!_template

DocType header – HTML

For more information see http://www.w3.org/QA/2002/04/Web-Quality

http://www.ning.com
Try this …I do believe you like this…

Visit http://ilovemybangladesh.ning.com for bangladeshi lovers social network created by me.

WordPress Coding Standards

WordPress Coding Standards

Some legacy parts of the WordPress code structure for PHP markup are inconsistent in their style. WordPress is working to gradually improve this by helping users maintain a consistent style so the code can remain clean and easy to read at a glance.
View full article »

Firefox extentions ..?

  • Web Developer - The absolute must-have extension for anyone who
    builds web sites, no matter how small or few and far between.
  • MeasureIt - No more eyeballing
    pixel widths!
  • ColorZilla – I shudder to
    think back on the huge PITA of getting hex codes for colors before this lovely extension… taking a screenshot,
    pasting it into Photoshop, using the eyedropper tool… how much time have I saved because of it? (Answer: lots.)
  • FireBug – As mentioned on The Javascript
    Weblog
    ; just darn useful.
  • IE View – All the maddening
    bugs of IE without actually having to launch the browser. (With the caveat that it doesn’t do me much good on my Mac at
    work, where I don’t have IE/Mac installed.)

You design website… may b you need the following link??

http://www.communitymx.com/content/article.cfm?cid=C37E0

http://www.hongkiat.com/blog/making-png-image-transparency-work-in-internet-explorer/
http://homepage.ntlworld.com/bobosola/index.htm
Other best solution…

/*

Use in <HEAD> with DEFER keyword wrapped in conditional comments:
<!--[if lt IE 7]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->

*/

//////////////////////  pngfix.js ////////////////////////////

var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

if ((version >= 5.5) && (document.body.filters))
{
   for(var i=0; i<document.images.length; i++)
   {
      var img = document.images[i]
      var imgName = img.src.toUpperCase()
      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
      {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText
         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
         var strNewHTML = "<span " + imgID + imgClass + imgTitle
         + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
         + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
         img.outerHTML = strNewHTML
         i = i-1
      }
   }

}

Hey ….you still there without registering your email on moneybookers ….. like paypal moneybookers support many countries including Bangladesh for international payment system….moneybookers going very nice….i use moneybookers services and i am too happy with their services…

I work for freelance and i am from Bangladesh and you know Paypal not support in Bangladesh till now….so i was worry how do i get online payment …then once i got moneybookers and i send address varification..from moneybookers…i was not sure about their service ….then one day i got roal mail from moneybookers …and i start…

Now till date i use all my transaction with moneybookers and i am really happy. Thanks to moneybookers for their great support…

All right …visitor…i think you also can use moneybookers…i think they are simply great..

================================ Way to activate Moneybookers ==============================
1. Signup moneybookers
2. Put your Local Address there – They will send a mail to your address with a verification code print on the mail. You will need to verify this CODE once you got the mail. This takes some time (For Bangladesh : 20~30days) depends on Country mail service. If you dont get any mail then contact your post-office and inform your post master you will have a mail from UK.
3. Once you verify the address you can put the bank details – SWIFT code , bank address, bank account Number.
a. SWIFT – Please contact your bank branch to know what’s their SWIFT code.
b. Use Full Account Number – Some bank use prefix account number like DBBL use 101 , which is branch code…you should include this total account number. Check your checkbook for full account number.
c. Try browse your bank online website to find this info. Most of the bank has online info.
4. Once you done all this, you can try send some ($15 ~ $30) as a test transaction and wait for few days to get the money on your account.
a. Depends on your bank this money come to your Bank account range from (2days to 15days) .
b. Try some bank which has Online Internet banking ( Brac, DBBL, SCB, HSBC..Etc) so you can check if your money is there.
c. Don’t panic, wait and see if its not come in 15days then go your bank account and asked if they have some remittance from MB ? if no then login to your MB account and look at left sidebar for “Email support” , put a email support request on MB. There is an options you can submit – i don’t get money to my bank account. then they will send you a Tracking code which you can use to detect your money from your bank branch.
5. Sometimes some bank call/asked to fill up a “Form C” – which is a remittance tracking form introduce by Bangladesh bank .. its not a big issue. Just sing in and fill the _________ info input there.
6. Sometimes MB will asked for some paper to verify bank account,your identity. To solve this Go your bank branch and asked for the remittance docs. Print a Bank Statement and scan all this and email to MB via { Login MB-> Email Support->Docs you asked for} . Wait for 1~2days MB will reply you and reactivate your account if your suspended.

So far i face all this issues and solved. So i think this will help you :)

You think how….yes i was also..then www.oDesk.com…Make that true..i refer my friends to oDesk and then they earn money at oDesk and oDesk referral program give me $$$. Its really like…getting some free $$$ by your friends…so do start it right now and start refer all your friends who are great to work online and you know who can earn money fast on oDesk…Its really simple ..you can just signup and start working by your self too….

We have lots of friends …like facebooks/myspace/hi5 etc we have lots of friends…so if we try then we can do a better network with oDesk and our friends….we all want to earn at the same times…as you know we are friends and friendship is the great relation in this world….a true friends can do a lot for you…

All right…i am going to refer …..one of my friends right now…so i have no time to write more on this post….hahahaha….c ya later post…

Bye
Thanks
Regards
shahin

Outsource to Freelancers, IT Companies, Programmers, Web Designers from India, Russia, USA, and more Certified Professionals. Verified Work.

oDesk My Office/Heaven

Hi,
I work at oDesk…you see i got a heaven at earth? :( don’t you believe me..???? ok just signup and test oDesk …i swear if you have little patient and if you interested to earn from home…test heaven happyness then .:) believe me…signup and start apply oDesk job. Give oDesk tests to increase your job quota.

Ohh You want to post a job….No worry…you come at right place …oDesk is the best place where you can get the planet best service from a 10000000000million talents at this planet…you confuse????Oh ok man just go to odesk and post a job….and dont forgot to email me…if i am right…

The On Demand Global Workforce - oDesk

Oh…you want to hire me…all right …just click me

The On Demand Global Workforce - oDesk

I would like you see at odesk soon….

Thanks

shahin

shahinbdboy@gmail/yahoo.com

Photoshop icon tutorial

http://9tutorials.com/2007/06/26/cool-glassy-icon-creation.html

Cool RSS icon tutorial with glossy look.

Follow

Get every new post delivered to your Inbox.