Technology
TinyMCE wysiwyg and TinyBrowser file upload plugin
I'm working on an osCommerce project. I can't believe people use something like osCommerce. Installing modules means manually editing various files... Nasty. Don't like it a bit.
I had to add TinyMCE to the textarea for pages and product descriptions and needed the capability to add images and resize them, plus uploading various files.
If you're looking for the same thing, I recommend using Tinybrowser plugin. There are a few other options available, but I liked this one best.
Unzip and copy the folder in the plugins folder of your tinymce installation. Than include tiny_mce/plugins/tinybrowser/tb_tinymce.js.php along with the main tinymce js file.
Edit the config_tinybrowser.php file so that the upload directories are valid (usually /images/uploads/)
Now, you only need to edit the init js code and add tinybrowser to the list of plugins and buttons:
file_browser_callback : 'tinyBrowser',plugins: 'tinyBrowser,advimage',
Now, everything is set-up and ready to go.
If you want to link to files, click the link Icon and you will see a smal icon in the pop-up window that you can click and upload files.
IE problem from the Kickstarter generated code
I've just ran into a problem with a backend module generated with the Kickstarter extension in Typo3 4.2.9.
There is a form tag created by default on line 104
// Draw the form
$this->doc->form = '<form action="" method="post" enctype="multipart/form-data">';
This caused the divs to be rendered inside the form instead the other way around. And IE couldn't scroll the content anymore. I've removed it and everything works now.
Drupal - Views Custom Field
If you want to display a list of content types or something else in a view and want to number the items, like 1, 2, 3, 4... you get the idea, than the Views Custom Field module is what you need. It does exactly this plus more. Install it and go straight in the views to find the goodness.
Cheers to the developers!
Drupal 6
Available (views)fields:
- Markup
- Field that allows usage of custom text and the input filter system.
- PHP code
- Field that allows usage of custom PHP code (with access to view's database result)
- Rownumber
- Field containing rownumber (respects pagers).
Elance.com had a bug in sending daily reports
Today, elance.com platform had a serious bug which caused daily reports to being sent to persons outside the project. I received circa 60+ emails with the conversations between different members of the respective projects.
Check the following image to see what I mean:

Microsoft looses lawsuit - has to stop selling Word
Microsoft lost a lawsuit alleging the company violates patent #5,787,449, an 1998 XML patent held by a company called i4i. The injunction goes in effect in 60 days and the company is not allowed to sell or demonstrate Word. It also has to pay $290 million in damages.
Give it a couple of day and they will settle for a bit of cash and the Earth will keep spinning.
How to - create and extract a tar.gz archive
Create an archive
tar czf /path/to/output/folder/filename.tar.gz /path/to/folder
Extract an arhivetar -zxvf /path/to/folder/filename.tar.gz
gunzip -c /path/to/folder/filename.tar.gz
Extract one file from the archive
gunzip -c /path/to/folder/filename.tar.gz | tar -xvf - path/within/archive/filename.ext
View files in an archive
gunzip -c /path/to/folder/filename.tar.gz | tar -tvf -
Google Chrome for Mac now supports flash - well, starts to :)
If you download the latest builds of Chrome for Mac you will notice it started to support flash. Still has glitches and bugs, but you can watch Youtube, Vimeo and other videos. This makes it a lot more usable now, at least to me :)
Google Chrome Daily Build on Mac OS X Leopard
Wanna try Google Chrome? Get the lates daily build from here.
Unzip and copy to the Application folder. Runs ok and started to look good on the Mac. Waiting for the final release...
I've just installed build 20862. By the time you read this a more recent build will be available.
Here's a screenshot:
Happy browsing!
Page not found blocks/sidebars
In Drupal, when you get a 404 page all your blocks are hidden which rather sucks as it blows your theme. This function added to your theme's template.php file saves the day.
/**
* Override or insert variables into the page templates.
*
* @param $vars
* An array of variables to pass to the theme template.
* @param $hook
* The name of the template being rendered ("page" in this case.)
*/
function phptemplate_preprocess_page(&$vars, $hook) {
$vars['path'] = base_path() . path_to_theme() .'/';
Search and replace in all the files inside a directory via command line

I've had the need to search for a bunch of strings and replace them with something else in over 500 files.. I did once.. now I need to do it again (...don't ask...), so here is the command that does it for future reference:
find ./ -type f -exec sed -i ’s/string1/string2/’ {} \;

