Multiple Instances of Portable Firefox

Tutorials          Trackback

In my everyday work I’m using Portable Firefox which I’m carrying around on my usb stick. Nice thing with Firefox is that it allows you to have multiple profiles. I have regular Firefox installed on my machine and I’m using it for regular browsing (so I don’t need web developing extensions). Problem was that I couldn’t run Firefox Portable and regular Firefox at the same time. But I found solution and here it is. All you have to do is:

  1. Find a file named FirefoxPortable.ini (located in FirefoxPortable\Other\Source)
  2. Copy that file to your FirefoxPortable folder (one that has FirefoxPortable.exe in it)
  3. Edit that FirefoxPortable.ini file, change AllowMultipleInstances to true

and that’s it. You can now run multiple instances of Firefox (either Portable or regular one)


Can’t see FLV files or FLV files not working

Tutorials          Trackback

I just spent few hours trying to make Flash Player to stream FLV files (Flash videos). Everything worked on testing server but not on the other one. As you may guess, the other server was Microsoft IIS, and SWF files were playing ok, but not FLV. Problem is that Microsoft IIS 6.0 requires a MIME type to recognize that FLV files are streamed media. And all you have to do to fix that is to add new MIME Type:

Associated Extension: .FLV
MIME Type:flv-application/octet-stream

And that’s it. Everything is working now.


Simple PHP breadcrumb navigation

PHP,Tutorials          Trackback

I was working on one application this morning and I needed breadcrumb links on the top. First thought that came to me was: ‘recursion’. That’s scary word, for memory eating functions, but at the same time that is easiest way to create breadcrumbs navigation. All you have to do is to create MySQL table, with these fields: (category_id, parent_id, category_name)
Top categories must have parent_id set to 0. And here goes that simple recursive printbreadcrumb function:

function printbreadcrumb($category_id) {
	$sql = "SELECT category_id, parent_id, category_name
				FROM categories
				WHERE category_id=$category_id";
	$result	= mysql_query($sql) or die('something is wrong here');
	$row = mysql_fetch_array($result);
	if ($row['parent_id']) { // if this node has parent
		printbreadcrumb($row['parent_id']); // make recursive call to this function
	echo $row['categories_name'].' > '; // print nodes one by one

You are calling this function like this: printbreadcrumb($category_id)

Some would say that this is slow script, because you’ll have same number of sql calls, as you have levels. What you can do is to change this function to work with arrays and to load that complete table in one array.


Learn HTML with HTML Playground

Tutorials          Trackback

If you are not familiar with HTML there is one fun place to start learning it. It is HTML playground, where you can learn everything you ever wanted to know about HTML tags. By selecting a tag from the list, you can see description of the selected tag. You will also see sample code which you can modify, and check the code result.

This is also good quick reference for all of you who already know HTML

HTML playground screenshot