Feed

Archive for April, 2008

Directory/File-chooser tool

admin on Apr 24th 2008


This is an open and free program.

Here is a small GUI for those old DOS command. With this program you can run programs with given file or directory input and output.

Here is how the ini file looks like:

 
[gui]
lprog=Title of the window goes here
lin= INPUT:
lout= OUTPUT:
lrun= RUN
lexit= CLOSE
lcof= Choose a output file / directory
lcif= Choose a input file / directory
lrunbox= "Done!"
lfot= Out File
lfit= Inn file
[run]
rprog = notepad.exe
rodir = 0
ridir = 0
 

rprog ::: you can choose the program to run.
rodir ::: 0=File 1=Directory
ridir ::: 0=File 1=Directory (If given file or directory dose not exist, it will be created.)

So now you can make your own windows based GUI from those good old DOS commands.

Download: Directory/File-chooser v1.0 (195.48 KB)

Filed in Apps | No responses yet

swapeCaster

admin on Apr 22nd 2008

swapeCaster is a free video/music podcasting script.
All you have to do is unzip the files in your web server, put your music/video files under the "files/" directory.
Point your podcast program (iTunes) to the place where you have the feed.php file and it will automatically generate podcast feed.

Configuration:
Just edit the lines in feed.php file to match your server address and other important stuff.

< ?php
//------ Config
$fileDirectory = "./files/"; // path to files
$webURL = "http://somewhere.com/feeds/files/"; // path to files from the web
$title = "Alireza Balouch private videoCasting"; // Title of the feed
$website = "http://www.swape.net";	// your homepage
$description = "My podcast";		// Description of the file
$authorEmail = "me@myplace.com";	// Your email adress
$copyright = "These works are licensed under a Creative Commons License (Some Rights Reserved)"; // Copyright stuff
$ttl = 1441;	// Time to live
//------
?>

Download: SwapeCaster v0.9 (4.03 KB)

Filed in Scripts | No responses yet

Checkbox value

admin on Apr 17th 2008

When you post a form with checkbox it dose not return any value when the checkbox is not ticked.
This is something that should have been fixed a long time ago.
But for now here is the solution:

 
<form action="?" method="post">
<input name="myCheckbox" type="hidden" value="0" />
<input name="myCheckbox" type="checkbox" />
</form>
 

You put an hidden input before checkbox input with the same name.
Since the last checkbox overwrite the value when it is checked, the hidden input do not return "0" but when the checkbox is not checked, the hidden input with the same name returns a "0".

So when the checkbox is checked it returns "on" and when it is not checked it returns "0"

And to make it easier to click on the ckeckbox use "label" tag around the name.

Before:

My Checkbox

After:

This way you can click on the checkbox label and make it checked.
The correct way to write an checkbox checked from the start is like this:

<label>
<input checked="checked" name="myCheckbox" type="checkbox" />
My Checkbox
</label>

Filed in Tips & Tricks | No responses yet