magento calendar position in IE

11 11 2009

Calendar shows furthur up on the page. It has to show underneath the text filed.

Solution

Go to file js/calendar/calendar.js

Somewhere around line number 1459 spot the lines

if (Calendar.is_ie) {
br.y += document.body.scrollTop;
br.x += document.body.scrollLeft;
} else {
br.y += window.scrollY;
br.x += window.scrollX;
}

change this to

if (Calendar.is_ie) {
br.y += document.body.document.documentElement.scrollTop;
br.x += document.body.document.documentElement.scrollLeft;
} else {
br.y += window.scrollY;
br.x += window.scrollX;
}

Courtesy: Magento – IE hack for calendar.js positioning – ‘How do I’ Questions – eCommerce Software for Growth





Sum of two columns in 1 query MySQL

27 07 2009

select sum(column,column1) from table;





Add lead source on SugarCRM

21 05 2009
  • Signin to SugarCRM
  • Click on the link Admin to the top of the page
  • Move to the section Developer Tools and click on the link Studio
  • Click on the button Dropdown Editor
  • Choose the option lead_source_dom from the left panel
  • Add Edit or Delete the values from the right panel




import cvs through mysql console

17 04 2009

Use this command on mysql console

load data LOCAL infile 'C:/test.csv' into table table_name fields terminated by ',' lines terminated by '\n';

Courtesy : How do I import delimited data into MySQL?





close popup and redirect parent window

23 02 2009

Use the below function:

function closePopupRedirect(link)
{
opener.location.href =link;
window.close();
}





Default password for mantis

11 02 2009

Username : administrator
Password : root

Try login with these details

Courtesy : Corrupted Data Decovery — Default Password for Mantis Mantis





Dreamweaver could not properly convert the live page from the server.

17 12 2008
When i tried to view the page on “Live Data View” (Ctrl+Shift+R) i am getting an eorro popup like this one. Some pages on my project have this kind of stuff. Anyone for my help?




Convert decimal year to year, months and days

10 11 2008


/**
*  Function    : year2monthsNdays
*  Arguments    : $years float value (Ex: 42.5, 30.89, 52.00, etc..)
*  Returns        : array (year,month,days as keys)
*  Description    : Converts a given float value of years to years, months and days
*/
function year2monthsNdays($years)
{
$array    = explode(".",$years);
$year    = $array[0];
$month    = ($array[1]>9) ? $array[1]/100 : $array[1]/10;
if ($month) {
$days        = round($month*365,2);
$daysArray    = explode(".",$days);
$months        = round($daysArray[0]/30,2);
$monthArray    = explode(".",$months);
$monthInt    = $monthArray[0];
$daysInt    = round($monthArray[1]*30/100,1);
}
$returnArray['year']    = $year;
$returnArray['month']    = $monthInt;
$returnArray['days']    = $daysInt;
return $returnArray;
}





unknown toolbar item “undefined”

21 07 2008
  • Open the file fckeditor/fckconfig.js
  • Locate the line
    ['Style','FontFormat','FontName','FontSize'],
    ['TextColor','BGColor'],
    ['FitWindow','ShowBlocks','-','About',]
  • Remove the last comma(,) from the line. The new line will now become ['Style','FontFormat','FontName','FontSize'],
    ['TextColor','BGColor'],
    ['FitWindow','ShowBlocks','-','About']
  • Refresh the page (Ctrl+F5) and your problem will have solved.

Courtesy : Unknown toolbar item “undefined” : FCKeditor forum





This application has failed to start because connapi.dll was not found

13 07 2008
Solution 1 : Remove the NOKIAManager.mox file.

  • Exit Photoshop Elements.
  • Open the C:\Program Files\Adobe\Photoshop Elements 6.0\moxplugins folder.
  • Move the NOKIAManager.mox file to the Recycle Bin, or another location such as your desktop.
  • Restart your computer.
Note: The NOKIAManager.mox plug-in file is required for Adobe Photo Downloader to download photos from a Nokia mobile phone. If you use a Nokia mobile phone, use Solution 2. If you later decide to use a Nokia mobile phone, either move the NOKIAManager.mox file back to the original location or reinstall Photoshop Elements.

Solution 2: Install or reinstall the Nokia PC Suite software.

  • Start
  • Programs
  • Nokia PC Suite
  • Uninstall Nokia PC Suite
  • Repair
  • Restart your computer