Archive

Archive for 2007

CodAddict: A new way to store and manage your code bookmarks/examples

August 12th, 2007 No comments

It was very difficult for me to remember all my code examples and mingle my code bookmark with my social bookmarks. So I came up with a solution to easily store and manage code examples online. The website name is http://www.codaddict.com. I have come up with this name because I am a code addict. I hope you will also like this website and use it to store your code bookmark and share your knowledge with whole world.

Main Features

  • Its FREE!!!
  • Access your code example from any end of the world
  • Store your code example from any end of the world
  • Dont go through a lengthy article when you need a line of code
  • Make you code example private if you want to.
  • Easily organize your code example
  • Retrive your code example very easily
  • Import/export your code examples with a single click
  • Share your code examples with the world
  • Get new ideas from other geek’s code example
  • Separate your code example bookmark from social bookmark
  • Built by a developer who knows what you need.
  • Takes about 1 minute to join.

Categories: Useful Tools Tags:

Flash File (.swf) is not loading in IE, works fine in FF

July 17th, 2007 33 comments

I have some video tutorial uploaded on my website. I tried it on FF and it worked perfectly but when I tried on IE, I did not get anything. I checked on google and after spending much time, I found the problem. I am explaining with example.

<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="banner"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
 border="0" width="754" height="64">
<param name="movie" value="banner.swf">
<param name="quality" value="High">
<embed src="http://www.domain.com/video/banner.swf"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" name="banner"
width="754" height="64" quality="High">
</object>

Now IE uses param movie tag to download swf file and FF uses embed src tag to download swf. Now you realized why IE is not displaying flash object. Correct code would be

<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="banner"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
border="0" width="754" height="64">
<param name="movie" value="http://www.domain.com/video/banner.swf">
<param name="quality" value="High">
<embed src="http://www.domain.com/video/banner.swf"
pluginspage="http://www.macromedia.com/go/getflashplayer"type="application/x-shockwave-flash"
name="banner" width="754" height="64" quality="High"></object>

Note: Due to some legal issues, IE had a “Click to Activate” restriction on swf and flash files. It requires the user to click on the control to load swf file. Above mentioned issue is different than this one. To learn more about the resolution visit http://www.adobe.com/devnet/activecontent/articles/devletter.html. It contains latest change and how to work around the IE restriction issue. (Thanks to Baljeet for bringing this issue up)

Categories: Tricks n Techniques Tags:

WordPress Comment Spam Even with Comments Disabled for Blog

April 27th, 2007 1 comment

I have my wordpress blog at http://diary.vishalon.net. Every day I am getting hundreds of comment spam. I had installed comment spam fight plugin and it seems like worked for few days but again I was getting spam comments. I changed the settings of blog so that only logged in user can put a comment. I even disabled comments completely but all efforts were in vein. I tried to find some information on google but couldn’t get it So I thought let me debug the application and check it out why I am getting hunderds of comments everyday. For this, in wp-comments-post.php file I wrote a code to write all parameters in a text file so I can check out what’s wrong with application. I can post my comment and see the log file but for spam, there was no log trail. It seemed to me that comments are coming from other  files. so I moved that code into config file and I found that those comments are actually trackbacks. If you want to check if the comment is trackback or not, check the Email value of comment. If you see it empty, it means it is a trackback. I disabled trackback by loggin in site > Options > Discussion and disabling trackback and pingback.

Now I am relieved of spam comments(actually trackbacks).

Categories: WordPress Tags:

php.ini changes have no effect

April 13th, 2007 2 comments

Today I tried to install PHP and MySQL on my local Windows XP Pro machine. Both were working fine individually but I couldnot connect to the MySQL from PHP code. I tried to change php.ini file but no matter what I do, changes were not reflected when I tried phpinfo() function.

It was showing Configuration File (php.ini) Path = C:\php\php.ini which is correct and I did not have any php.ini on any other location. Everytime I make changes, I was restarting the IIS Server but any how changes were not reflected. In resetting IIS what I was following is go to Control Panel > Administrative Tools > Internet Information Services > Expand [Computer Name] > Expand Website > Right Click on Default Website and press Stop button and again start it. But after sometime I found that this is NOT IIS restart. It is just Website restart. For IIS restart run the following command on Dos prompt.

iisreset /restart

And boom. I got my php correctly configured and now I can connect to MySQL from PHP code.

Categories: Troubleshooting Tags:

How to Enable Windows XP Language Toolbar?

April 12th, 2007 53 comments

I was completely frustrated with Languge toolbar as it was enabled in some computer and not enabled in other computer. I tried many methods and after some trial and error, I found few things which might help you get your Windows Language Toolbar back. This solution is given for Windows XP user.

Method 1:
Right click on the Taskbar and go to toolbars. If Language Bar option is there check it by clicking it. and you will get Language Toolbar.

Method 2:
Go to Start menu > Control Panel > Regional and Language Options > Languages Tab > Text Services and Input Languages Box> Details… > Settings Tab > Preferences Box > Language Bar…
Now tick the option “Show Language bar on desktop” and you will get Language bar on your task bar.

Make sure that Start menu > Control Panel > Regional and Language Options > Languages Tab > Text Services and Input Languages Box> Details… > Advanced Tab > System Configuration Box
Make sure that Turn off advanced text service is unchecked.

Method 3:
Language bar is a core component in Windows XP. When you are opening any Office XP application, this program starts running. Sometime, this program runs on startup. If you want to check if this program is running or not, to to task manager by clicking ctrl+Shirt + Esc or by right clicking on Taskbar and choosing Task Manager > Processes tab. Check if the process ctfmon.exe is running or not. If it is not running, go to Start > Run… Type ctfmon and press Enter. This will start the process and you will be able to see Language Bar.

Method 4:
Go to Start > Run… type regedit. This will open up registry. Browse to HKEY_CURRENT_USER\Software\Microsoft\CTF\LangBar
Here you will see
1) ExtraIconsOnMinimized = 1
2) Label = 1
3) ShowStatus = 4
4) Transparency= ff

Out of these four options, ShowStatus is very important and it is responsible for actually showing the Language Bar on Taskbar. If you dont have this option set to 4, set it 4, close regedit browser, kill the process ctfmon.exe if it is there and start it by following steps in Method 3.

I hope now you would have got your Language Toolbar.

Click here for Video Tutorial on How to Enable Language Toolbar in Windows

Categories: Tricks n Techniques Tags:

WordPress Yearly/Monthly/Weekly Post Repeater Plugin

April 8th, 2007 13 comments

Post Repeater plugin is a boon when you need to repeat a single post every year/month/week of the day. You may achieve this functionality by editing timestamp manually, but using this plugin you can automate this task. This plugin is very useful when you are blogging about weekly/monthly/yearly/historical events, famous persons etc. All the posts which needs to be repeated are listed on the top of your blog posts for that day.

Features

  • Uses custom field
  • No change required in theme
  • No cron job
  • No change in original timestamp of post

Version Supported

WordPress 2.1 and greater
WordPress Mu 1.1 and greater

Installtion Procedure:

  1. Download the plugin and unzip it
  2. Put the PostRepeater.php file into your wp-content/plugins/ directory
  3. Go to the Plugins page in your WordPress Administration area and click “Activate” for Post Repeater Plugin

So easy hmmm…….

How to repeat your post?

It is even simpler than installing your plugin. Choose the post you need to repeat and open it in edit mode. This plugin uses custom field to tag the repeater post.
Here is the custom field settings
Key = REPEATON, Value = MM/DD for yearly repeat
Key = REPEATON, Value = DD for monthly repeat
Key = REPEATON, Value = Sun/Mon/Tue/Wed/Thu/Fri/Sat for weekly repeat

Custom Field Settings Example

Key = REPEATON, Value = 04/24 will repeat the post on 24th April every year.
Key = REPEATON, Value = 09 will repeat the post on 9th of every month.
Key = REPEATON, Value = Fri will repeat the post on every friday.

Dont forget that you must have to put two digits for date and month number.

Known Issue

If your repeating post is very latest and comes on the front page of your blog, it will be repeated. (This post will be shown as a repeating post and as a regular post)

FAQ’s

1) I activated plugin but cannot see repeating post.
Check your wordpress version. It must be WP 2.1 or > or WPMU 1.1 or >. Check the custom field name and make sure that you spelled it correct. Check the custom field value is set to proper format MM/DD (with leading zero)

2) I would like to activate Sticky Post Plugin as well
Dont do that mistake. It is going to throw mysql error.

3) I got wierd mysql error
This plugin changes query for showing posts. It is possible that you have another plugin which also modifies the query and hence the resultant query is a junk query which MySQL is not recognizing. so now you have to deactivate any one of the plugin.

Categories: WordPress Tags:

WordPress Yearly Repeater Plugin

April 5th, 2007 4 comments

Update: This plugin is modified and created new Post Repeater Plugin which is capable of repeating the post yearly/monthly/weekly bases.

Yearly Repeater plugin is a boon when you need to repeat a single post every year on a particular day. You can achieve this by editing timestamp manually every year, but using this plugin you can automate this task. This plugin is very useful when you are blogging about historical events, famous persons etc. All the posts which needs to be repeated are listed on the top of your blog posts for that day.

 

Download WordPress Repeater Plugin

 

Version Supported

WordPress 2.1 and greater
WordPress Mu 1.1 and greater

 

Installtion Procedure

1) Download the plugin and unzip it
2) Put the Repeater.php file into your wp-content/plugins/ directory
3) Go to the Plugins page in your WordPress Administration area and click “Activate” for Yearly Repeater
So easy hmmm…….

 

How to repeat your post?

It is even simpler than installing your plugin. Choose the post you need to repeat every year and add custom field Key = REPEATON and Value=MM/DD, press Add Custom Field button, save the post and you are done!!!. For example, if you need to repeat the post on 24th April, set the custom field Key = REPEATON and Value = 04/24. Dont forget that you must have to put two digits for date and month.

 

Known Issue

If your yearly post is very latest and comes on the front page of your blog, it will be repeated. (This post will be shown as a repeating post and as a regular post)

 

FAQ’s

1) I activated plugin but cannot see repeating post.
Check your wordpress version. It must be WP 2.1 or greater or WPMU 1.1 or greater. Check the custom field name and make sure that you spelled it correct. Check the custom field value is set to proper format MM/DD (with leading zero)

2) I would like to activate Sticky Post plugin as well
Dont do that mistake. It is going to throw mysql error.

3) I got wierd mysql error
This plugin changes query for showing posts. It is possible that you have another plugin which also modifies the query and hence the resultant query is a junk query which MySQL is not recognizing. so now you have to deactivate any one of the plugins.

Categories: WordPress Tags:

WordPress Sticky Post Plugin

April 5th, 2007 67 comments

Sticky Post Plugin is a must have plugin in your WordPress arsenal. This plugin shows the designated post on the top of every post. There is no need to modify your current theme.

 

Download WordPress Sticky Post Plugin

 

Version Supported

WordPress 2.1 and greater
WordPress Mu 1.1 and greater

 

Installtion Procedure:

1) Download the plugin and unzip it
2) Put the StickyPost.php file into your wp-content/plugins/ directory
3) Go to the Plugins page in your WordPress Administration area and click “Activate” for Sticky Post
So easy hmmm…….

 

How to stick your post?

It is even simpler than installing your plugin. Choose the victim post to stick on the top and add custom field Key=STICKY and Value=1, press Add Custom Field button, save the post and you are done!!!.

 

Known Issue

If your sticky post is very latest and comes on the front page of your blog, it will be repeated. (This post will be shown as a sticky post and as a regular post)

 

FAQ’s

1) I activated plugin but cannot see sticky post.
Check your wordpress version. It must be WP 2.1 or greater or WPMU 1.1 or greater. Second you check the custom field name and make sure that you spelled it correct.

2) I would like to activate Yearly/Monthly/Weekly Repeater Plugin as well
Dont do that mistake. It is going to throw mysql error.

3) I got wierd mysql error
This plugin changes query for showing posts. It is possible that you have another plugin which also modifies the query and hence the resultant query is a junk query which MySQL is not recognizing. so now you have to deactivate any one of the plugins.

Categories: WordPress Tags:

Stop DTS Package Execution Conditionally Without Failure

February 22nd, 2007 10 comments

There is no straight way in DTS to stop the package on a certain condition without having it fail. Suppose in DTS package is suppose to be executed everyday at 8:00AM. This package is looking for a file c:\abc.txt. If the file has not arrived, it should gracefully stop without reporting any error. If the file has arrived then process the file and report success. This situation is handled by a bit of programming. Write down the following code in ActiveX Script Task.

Dim fso, file1Dim pkgSET pkg = DTSGlobalVariables.Parent

Set fso = CreateObject("Scripting.FileSystemObject")

IF (fso.FileExists("c:\abc.txt")) THEN	Msgbox "File exist. Continue"	pkg.Steps("DTSStep_DTSActiveScriptTask_2").DisableStep=False

	Set fso= Nothing

ELSE	Msgbox "Stop"	pkg.Steps("DTSStep_DTSActiveScriptTask_2").DisableStep=True END IFset pkg=nothingMain = DTSTaskExecResult_Success

What this does is disables the second step and hence the whole sequence of task is automatically disabled. so the Task1 will report success and DTS package execution will be completed without executing task 2 and onwards. You can download the dts package example and try to run it on your computer. It looks for file c:\abc.txt. If this file exists, it will run total 3 task with result SUCCESS. If the file is not found, it will run only Task1 with result SUCCESS.

Categories: DTS Tags: