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.

modavastyl.ro - relaunched on Drupal

I've just relaunched www.modavastyl.ro on Drupal. Fairly simple website, the owners wanted to have the ability to add news, pages and products easily. Also SEO features that are great in Drupal.

Jaluzele verticale ModavaStyl preview

2012 - One bad script, bad-ass CGI

I just saw 2012 movie last night and I was terribly dissapointed by the script. The special effects were nice, best planetary distruction to date, I think, but the script is horrible.

Some great actors with cheezy lines, full of stereotypes: the scientist, the president (Danny Glover was not a good choice here), the everydarnormallifeguythattriestorecoverhisfamily type of hero, the crazy man who knows the secret. And some corny-ass speeches. C'mon people... Really?

And again the US to lead the pack in saving the world...

And mistakes after mistakes during the film, I don't think nobody researched stuff for this film.

I have to talk about a couple that pissed me off.

First is the particle that "mutates"... I thought cells do that.

The small plane in the ash cloud after erruption. I will just quote from Wikipedia here:

Several eruptions have seriously endangered aircraft which have encountered the eruption column. In two separate incidents in 1982, an airliner flew into the upper reaches of an eruption column generated by Mount Galunggung, and the ash severely damaged both aircraft. Particular hazards were the ingestion of ash stopping the engines, the sandblasting of the cockpit windows rendering them largely opaque and the contamination of fuel through the ingestion of ash through pressurisation ducts. The damage to engines is a particular problem since temperatures inside a gas turbine are sufficiently high that volcanic ash is melted in the combustion chamber, and forms a glass coating on components further downstream of it, for example on turbine blades.

In one case, the aircraft lost power on all four engines, and in the other, three of the four engines failed. In both cases, engines were successfully restarted but the aircraft were forced make emergency landings in Jakarta. See British Airways Flight 9

Similar damage to aircraft occurred due to an eruption column over Redoubt volcano in Alaska in 1989. Following the eruption of Mount Pinatubo in 1991, aircraft were diverted to avoid the eruption column, but nonetheless, ash dispersing over a wide area caused damage to 16 aircraft, some as far as 1000 km from the volcano.

The Antonov. Where the f*** they would get an Antonov, there's only one in use and it has a crew of 6. How the hell does a bodyguard/secretlover/weekend pilot know how to pilot an Antonov. Just because is russian?

Antonov engines failing. Yep, they fail two at the time... And why did they fail? They were working fine till than and didn't hit anything.

Antonov landing in mountains. Now, this is just ridiculous... moving on.

The archs. Somehow they managed to build the archs in less then 3 years, all with base... Really? Planning, testing include, all in 3 years? Can anybody tell me why they have the mammels on board, when we could have the DNA samples instead? You can rebuild a specie from just a male and female. Nobody thought about gene pool here.

And one that I'm not sure of. If we put aside the build-a-dam-as-a-coverup, wouldn't have been easier to build the ships in open waters where the tidal waves would be smaller? Tidal waves grow in height when they reach coasts, I think they are smaller in open waters (a couple of meters, one meter?).

Day 1, year 001, I guess it's cooler to have the year in binary form, heh? :)

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.

Kamelancien - T'étais où ?

I really like this song. Thanks Ioana for sending me the link ;)

Made me wanna read in french again :)

T'etait ou quand j'etais en hass quand j'etais seul a la tess
a me debatre de la tristesse
t'etais ou quand j'avais pas de tunes ( ouai )
t'etais ou quand j'avais des lacunes
pour ecrire mes textes t'etais ou quand j avais pas de themes
pas d'inspiration innonder par les problemes
t'etais ou quand je trouvais pas le sommeil
quand dans ma vie il y avait meme pas un brin de soleil
t'etais ou quand tout le monde me fermais les porte
quand personne croyait en moi j'ai du redoubler d'effort
t'etais ou quand personne voulait poser avec moi
hamdoulah j'ai jamais supplier qui que ce soit
t'etais ou quand j'avais besoin de parler
quand j'avais besoin d'entendre je t'aime refre
t'etais ou quand avec ceux qui m'enterrais
mais c'est dieu qui donne la mort moi je veux toujours esperers

Refrain

Je veux oublier mon etoile je compte sur personne ( personne je compte sur personne )
les erreur passer au aaaaaaa pris
on peut compter sur personne ( personne je compte sur personne )

Depuis j'ai perseverer comme tout les chanteur dans ma chambre j'revais
je sortais jamais sa ma aider a me preserver
depuis comme un chien je bossais des nuit entiere des journer entiere
dure qui m'on transformer en pierre
depuis a la recherche d'un style un truc original un truc venere un truc qui fais mal
une ecriture pas comme les autres je voulais attirer l'attention ne pas faire partis des autre
depuis handicapé par ma timidité par le regard des gens j'ai du longment medité
depuis j'ai du me battre contre moi meme me faire une raison faire abstraction de tout ce qui me gene
depuis je suis passer par des moments douloureux qui m'on vite rendu malheureu
depuis il y a que moi qui croyait en moi j'ai jamais baisser ma garde je suis toujours rester droit

Refrain

Le travail paye faut jamais lacher l'affaire
n'ecoute pas les lache qui veule te la faire (tchiki)
crois en ce que tu fais et tu reussira
n'abandonne pas non tu n'a pas le droit (tchiki)
fais le pour toi calcule pas les gens
le talent ne s'achete pas le don vaut mieu que l'argent (tchiki)
c'est juste une question de mental faut en vouloir dans cette vie de chacal (tchiki)
faut souffrir pour savourer la reussite va jusqu'au bout faut pas que t'hesite non (tchiki)
personne me ramene le pain sur ma planche personne me renmplit ma feuille blanche
personne m'a pris par la main pour me guider j 'etais seule avec mes ambition mon stylo et mes idées (tchiki)
tout ce qui m'arrive est merité frere (tchiki) j'ai taffer dure trop dure pour exister

Refrain

.ninja

Got this from a friend, Marian:

.ninja { color: black; visibility: hidden; }

 

What are you?

Quoting a teacher "Some of us are catholics, some are orthodox, some are jewish and some of us are ok".

I'm ok :))

Give 100% at Work

"You should always give 100% at work.12% Monday; 23% Tuesday;40% Wednesday; 20% Thursday; 5% Friday."

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).

Toyota does not fire people