Sunday, November 29, 2009

Problem in Starting Zend Studio

Whenever you find the problem in Starting Zend Studio , and it is not giving any error then just do 3 simple steps

  1. Close ZDE.
  2. Locate the fileTypes directory under
    {your user home directory}\ZDE\config_X.Y\fileTypes and delete it.(Where X.Y are Zend Studio version numbers,for versions of Zend Studio older than 3.5.x this directory is named:{Your user home directory}\ZDE\config\fileTypes)
  3.  Start ZDE again.

Monday, November 23, 2009

Admin category sidewide to wordpressmu

To add the sidewide categery to your wordpressmu site download the plugin from


http://wpmudev.org/project/Add-default-categories-to-all-new-blogs/download

Extract to the mu-plugins folder

With this plugin you will be able to create a list of categories that will be created in every new blog created

Wednesday, October 14, 2009

Add Favicon icon to drupal site

Now, to add it to drupal with a theme using the phptemplate engine is easy. Just upload the favicon.ico file to the base directory of your theme. The same directory your style.css file is in. Drupal will automatically detect it and do the work to make it display on your site.
If you are using something other than drupal than to have your favicon display will need one more step. Once the file is uploaded to the sever, the following piece of code needs to be up on your web pages in the
<head/>
:
<link rel="shortcut icon" href="/path/to/favicon.ico" type="image/x-icon" />
Just change the /path/to to the path to your favicon.ico file and your all set.

Add Front page to Drupal's home page

1. Within your theme, copy the file named page.tpl.php to page-front.tpl.php.
2. Note that the name page-front.tpl.php conforms to Drupal's naming standards, so Drupal will realize you want this to be the theme page for your front page.
3. Modify page-front.tpl.php to make your front page look the way you want it to. This page is really just a combination of HTML, CSS, PHP, and possibly JavaScript, so if you're comfortable working with these tools, this page can easily be modified.

Integrate tinyMCE with IMCE

# add this function to your current theme's template.php file.(create it if you don't have it.& put it into php clause )

/<?php
function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {

static $access, $integrated;



if (!isset($access)) {

$access = function_exists('imce_access') && imce_access();

}



$init = theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running);



if ($init && $access) {

$init['file_browser_callback'] = 'imceImageBrowser';

if (!isset($integrated)) {

$integrated = TRUE;

drupal_add_js("function imceImageBrowser(fid, url, type, win) {win.open(Drupal.settings.basePath +'?q=imce&app=TinyMCE|url@'+ fid, '', 'width=760,height=560,resizable=1');}", 'inline');

}

}

return $init;

}?/>


# Go to admin/settings/performance and Clear cached data (at the bottom).
# Make sure your users have access to IMCE (admin/settings/imce)
# Clear your browser's cache and start testing.

Wednesday, September 23, 2009

Steps to Install Google Chrome in Ubuntu

sudo gedit /etc/apt/sources.list

For Ubuntu 9.04

deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main


Then,update the source list and install chromium

sudo apt-get update
sudo apt-get install chromium-browser

After installation you can open up the browser at Applications–>Internet–>Chromium Web Browser,right click on it and select “add this launcher to panel”

Friday, August 28, 2009

Java Script Validator .........

The JavaScript Code Quality Tool is very good reference link used for validating/finding error of your javascript code go for it

Saturday, June 6, 2009

Image Format Convertor : Script

To Covert all images from one folder from one format to another format

Create file test.sh
Add following line to that file

for i in *png

do
echo $i
temp=$(echo $i | sed -e 's|\.png||')
convert -resize 640x200 $i $temp.gif
done

Save file
Chmod +x test.sh
Run File : ./test.sh


Here I have used .png and .gif. We can try with other .jpg, .jpeg, tif, ttf, bmp etc.

Friday, May 29, 2009

mogrify : ImageMagic

Install ImageMagic :

apt-get install imagemagick

mogrify - With the use of resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. Mogrify overwrites the original image file, whereas, convert(1) writes to a different image file

e.g Let's resize images

mogrify -resize 500x300 Test/*.png

Thursday, April 23, 2009

Unpack/Decompress Java Script

For better security of code you can compress your javascript using PACKER
  1. Copy the script to http://dean.edwards.name/packer/
  2. Check the both option
  3. Paste to original place and save that script

And to Decompress that script Simply follow two steps :
  1. Put Eval = alert on the top of your script (In Opera browser :))
  2. Select all that output of script and paste that code to :http://jsbeautifier.org/

Wednesday, April 22, 2009

Change FCKEditor font size listing in Numeric value

Find the file fckconfig.js in FCKEditor fckconfig.js

Change the line

FCKConfig.FontSizes = 'smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large' ;

with

FCKConfig.FontSizes = '1/5;2/6;3/7;4/8;5/9;6/10;7/11;8/12;9/14;10/16;11/18;12/20;13/24;14/28;15/30;16/60;17/90' ;


And you will get Numeric list in your FCKEditor instead of String.

Open uploaded pdf files in other browser tab with drupal

As in MAC OS and Linux the uploaded file in drupal site is default open with Save As Dialog box, but where as in Windows the pdf file is open in current browser window.

To Open that pdf in other window

In the core upload module of Drupal go to modules/upload/upload.module is where you will find the function theme_upload_attachments() as follows:

function theme_upload_attachments($files) {
$header = array(t('Attachment'), t('Size'));
$rows = array();
foreach (
$files as $file) {
$file = (object)$file;
if (
$file->list && empty($file->remove)) {
$href = file_create_url($file->filepath);
$text = $file->description ? $file->description : $file->filename;
$rows[] = array(l($text, $href), format_size($file->filesize));
}
}
if (
count($rows)) {
return
theme('table', $header, $rows, array('id' => 'attachments'));
}
}


In this function change

$rows[] = array(l($text, $href), format_size($file->filesize));

with

$rows[] = array(l($text, $href, array('attributes' => array('target' => '_blank'))), format_size($file->filesize));


And you can get files are being open in other browser tab rather than current browser window.

Friday, April 10, 2009

Integrate Gujarati Dictionary StarDict with Linux And MAc

You have to follow some simple steps to integrate your dictionary/ your collection of data to StarDict dictionary.

Here I am giving example to integrate Gujarati dictionary

== Tools Required ==

StarDict

StarDict Tools

== Process ==

* Installation:
apt-get install stardict-tools

* Open the stardic-editor
stardict-editor

* Pass your data/text file to that editor


File Format: write the search word first, then a Tab character, and the definition. If the definition contains new line, just write \n, if contains \ character, just write \\.

* Create tab file
Tab file results Total Number of word and create
.dic and .ifo file

* Compile that file




* Then in Decompile tab pass the .ifo file and decompile and varify it


Which will create .idx file

* Zip your dictionary file:

dictzip yourfile.dic


== StarDict Dictionary ==

* Installation:
apt-get install stardict

* Create folder of your dic in /usr/shar/stardict/dic/yourdic_name
* Copy the out file .dic.dz, .ifo and .idx file to /usr/shar/stardict/dic/yourdic_name/




Here you can see Gujarati word search results in itz Gujarati meaning and english word results is gujarati meaning

Wednesday, March 4, 2009

Easy Launch/Search for applications and files in linux

I found two ways to launch application in Linux

1.Application Launcher


There is application launcher in Linux Which is accessible with keyboard shortcut ALT+F2 ,In which can find and launch application easily

2. Gnome Do

GNOME Do is a popular, free application launcher for Linux by David Siegel.It allows you to search for applications and files also allows you to specify actions to perform on search results by providing instantaneous, action-oriented search results that adapt to reflect user habits and preferences.

Nice Line - 2

મીંડાઓની દુનિયામાં એકડો થઇને જીવવું … એ અઘરૂં જરૂર છે.

જે મીંડા એકડાને અનુસરે છે તેમનું મુલ્ય આપોઆપ વધી જ જાય છે.

Tuesday, February 24, 2009

Encode Unicode character to Utf-8 in url

URLs should only contain ASCII/Unicode charachter. That character set is quite restrictive if you want to use Gujarati characters for instance, so there is some encoding needed here. So if you've got a string with a Gujarati character and you want to link to it, you need to do this:

"કળા: -> "%E0%AA%95%E0%AA%B3%E0%AA%BE"

Thankfully this can be done with a bit of Java:

java.net.URLEncoder.encode("","UTF-8");

So, whenever you need to generate something for the address bar or a direct or something like that, you must URL encode the data. You don't have to detect this as it doesn't hurt to do this for links which are just plain as they don't get changed, as you can see with the string ending

Monday, January 12, 2009

Nice line -1


તું મને પાલવનું ઇંગ્લીશ પૂછ મા

અહીં આંસુ ટિશ્યુથી લૂછાય છે.






Thursday, January 1, 2009

Welcome 2009 ...A new year resolution

A new year resolution


I think this is a good time to sit back and reflect on the things we'v done and those we hvnt,the thingz we'v done right and those we did wrong,and the times we impressed and dissapointed ourselves and others..THEN make decisions based on our thoughts.

I thought to write this year resolution that is to be SMART ( Specific, Measurable, Achievable, Realistic and Time-bound ) and listed to on my blog
HAPPY NEW YEAR EVERYONE!!
Live UR Life

Wish List

I have stared New Year with thinking and listing new resolution and wishes

Here are some......
Resolution
  1. Spend minimum 10 minute for prayer
  2. Always appreciate people who helps me
  3. Schedule each task and manage that list


Wishlist
  1. Not to spend extra money shopping
  2. Reading any kind of novel,news paper, magazine at least for half an hour daily