Hy,me frm mobile

After a long time I m posting something.I m posting this through my nokia handset using GPRS.Feeling well.Currently i m using following 3 software in my mobile:
1.opera mini
2.GMAIL
3.mig33
All r nice..at least when no desktop connection is available.

New job, new location

BGSL
1 july, I have joined at bakhrabad gas systems limited, a company of petrobangla as assistant engineer.Everything is fine there but the systems is till not computerized .As a CSE background student , it gives me pain while I think , I have to work as being disparse from my original profession. It’s hopeful that, within next few month IT dept will explore there as an effort of making computerized the whole systems.Time will say the rest.

Oh, next part of the title: I m going to be posted at chandpur. It’s a remote and unknown area for me..any way.I will try to be always in here..in my blog.

Thanks

Checkbox inactive but not disabled

If we want to place checkboxes on the page that is already ticked or not without allowing them to be changed ,what are the ways?

  • As a simple solution , use disabled keyword in checkbox html
  • Another solution may be use of image of checkbox .
  • Let me discribe the some point of views of above solution. Whenever we use disabled keyword against any checkbox it lost her total beatiness and looked as died.M i right? U can see from picture.
    Checkbox
    And Replacing image is the more time consumer process and may have some more limitation.

  • Besides them,Another solution is more tricky..Which I have been used in one of my reporting task before some days before where checkbox would be readonly,using little javascript
  • Now let’s see it:

    function makeReadOnly(id)
    { var chkid=id ;

    if( document.getElementById(chkid).checked==false ) //no change for already ticked
    {document.getElementById(chkid).checked= true;}
    else
    {
    document.getElementById(chkid).checked=false ; //no change for alerady unticked
    }

    }

    Invoke this javascript function from html checkbox through onload event with element id as parameter,snipt is shown below

    < input id="ch1" type="checkbox" onclick="makeReadOnly('ch1')" checked="checked" value="CH1" />
    <input id="ch2" type="checkbox" onclick="makeReadOnly('ch2')" value="CH2" />

And done..show the inactive but live checkbox.

A small hack: changing navigation in joomla

In joomla (version 1.0.x), whenever any Item displayed in details mode then the navigation of others item under same section/category shows in below format:

<< >>

If I would like to replace this simple navigation format with the title of others items under same section how it would be like?I think it would be more meaningful navigation.Any way, it’s turn to do the main things.

  • Open the /component/com_content/content.html.php
  • Find out the function named navigation() . line # 892
  • Pest the following code inside the beginning of the function.

  • /*** Link list type navigaton
    *@author : wasiur@gmail.com
    */
    global $task, $mainframe, $database, $my;
    /*Checking whether it is frontpage component or not and the task also
    we don't want to it in frontapge*/
    if(($_REQUEST["option"]!="com_frontpage") && ($_REQUEST["task"]=="view") ){
    $opt=mosGetParam($_REQUEST,'option','');
    if(eregi('content',$opt)){
    $tsk=mosGetParam($_REQUEST,'task','');
    $sid=mosGetParam($_REQUEST,'id','0');
    if(eregi('category',$tsk)){
    $row = new mosCategory( $database );
    $row->load( $sid );
    $sect=$row->section;
    }elseif (eregi('view',$tsk)){
    $row = new mosContent( $database );
    $row->load( $sid );
    $sect=$row->sectionid;
    }else{
    $sect=$sid; //$sect always contain the section id from url query string
    }
    }
    $nullDate = $database->getNullDate(); //used for published check
    $now = _CURRENT_SERVER_TIME; //ditto
    //Select query checks whether item is published, is not checked out and whether user has permission to access item
    $listque="SELECT id, title, created FROM #__content WHERE (sectionid IN (".$sect."))" //has specified id(s)
    . " AND ( '$now' <= publish_down OR publish_down = '$nullDate' AND state = 1 )" //published
    . " AND ( checked_out = 0 OR checked_out = $my->id )” //not checked out or checked out by me
    . ” AND (access <= $my->gid)” //permission to access
    . ” ORDER BY created desc”
    . ” LIMIT 5″; //limit number of items to return
    //query the DB
    $database->setQuery( $listque );
    $database->query();
    //load items into object array
    $content_list=$database->loadObjectList();
    $total=count($content_list);
    for ($i=0;$i<$total; $i++){ //showing with making link for each item $link="index.php?option=com_content&task=view&id=".$content_list[$i]->id.”&Itemid=”.$mainframe->getItemid($content_list[$i]->id); echo “

    “;
    }
    }

  • save the file and Show the list navigation

Sample output :
Sample output

Thanks

কি মজা !

বাংলা..আমাদের প্রানের ভাষা.আমাদের এই নিজস্ব ভাষায় লেখার মজাই আলাদা . হমম..আর হাসিন ভাই এই Plugin টি তৈরী করেছেন wordpress
এর জন্য

ধন্যবাদ হাসিন ভাইকে, এই চমৎকার Plugin টি তৈরী করার জন্য ।
ডাউনলোড লিংক

Rounding corners

Today I have spent little more times behind rounding corner of DIV element. I found many ways to implement it. My focus was about liquid layout. And finally I got a cool site which can assist u cordially to do the job for u as ur desired.hmm
It is here

Have a look right now.

Beauty of DIV element

Recently I have done some task using div element. It seems to me very interseting and actually it’s the real flavour of DHTML. DIV has some interesting properties which are the main for it’s beautiness. At least as a new developoer..i think so. Now let me discribe in more details.
suppose, having a list of person which is generated from db and wanna see profiles of them individually. the points that..every person has several sources of profile. Now it’s need to give a scope to select the source which one the user want to see. I have used DIV to provide that option more interectivly. I have produced div for each person using the person’s id. Then this id is available through out the div . and Finally this div keep in hidden.
Whenever user will click on the person’s name link it will show the div with the link of several sources of profile. On the DIV, close link is also available to hide it again.
Next ,I have used it as a tab. Suppose there are some sectiones for any source of profile. Then I have loaded all section once in client PC but allows only one section to display.hmm, just act as tab..just hiding and showing the DIV. However..I had to face some sort of problem..i will focus later.

Running PHP file without php extension

With Apache , if .htaccess is available, just have to add the
following line in .htaccess:
ForceType application/x-httpd-php

HTTP headers and PHP header()

Today, I have got a tutorial site for the HTTP headers and PHP header function. It is

http://www.expertsrt.com/tutorials/Matt/HTTP_headers.html

Have a look..hope helpful for beginner.

Hmm..from new hosting

Yesterday evening , One of my great mentor Hasin bhai gave me enough space under phpxperts.net and getting this blogging space I m so happy now. Thanks and God bless him.

Wasi