Download Smarty 3 CHM help file

I’ve compiled current online Smarty 3 documentation into one CHM file. Take it, use it, enjoy.

What to do if your blog was hacked by evil eval

Weird things happens. Mostly in WordPress. One morning you see that your permalinks became a something like this:

blah/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/

Or this:

/%&(%7B$%7Beval(base64_decode($_SERVER%5BHTTP_EXECCODE%5D))%7D%7D|.+)&%

Or your feed crapped like this:

error on line 22 at column 71: xmlParseEntityRef: no name wordpress

Do not panic – you’re hacked. And there is three steps to get rid of it.

1) Restore your permalinks
Go to Admin panel -> Settings -> Permalinks.
Set your permalink structure to whatever it was earlier. If you don’t even imagine what it was – you can always ask google for it – just like this: site:yourblogurl.com – and you’ll see the answer in the links to your site.

2) Kill the intruder(s)
Go to your preferred mysql administration tool (say, MySqlAdmin) and run this code in the SQL window:

SELECT * FROM `wp_usermeta`
WHERE `meta_value` LIKE '%script%'

You’ll see the list of records, write down user_ids of those guys.
Go to Admin panel -> Users -> Authors & Users, copy the edit link for any user, it’ll be somethings like:

http://yourblogurl.com/wp-admin/user-edit.php?user_id=14&wp_http_referer=%2Fwp-admin%2Fusers.php

Then paste it into address line, and change user_id=XX to the first user_id you wrote. Go.
Replace First name with whatever you want (for example “z”), insert “motherfncker@test.com” into Email field (or whatever, but remember it, you’ll need it later) and set the Role into Subscriber. Push Update user. Then repeat with the next one in your user_ids list. After you finished – just type in into the search line word “motherfncker” (or whatever you set emails to). Now – just delete bastards!

3) Defend the base
Just upgrade your wordpress. If you will do it periodically – there will be no such problems at all!

If you do not have ability to use some SQL tool – you can try to blind find bastards:
Go to Admin panel -> Users -> Authors & Users
Note the number of Admin users (right under “Users” header). One of them is you, all others – bastard ones :)
Try to find max. user_id in the list by hovering your mouse over links. Then copy the edit link of the user with topmost ID, insert it into address line, change it to next number and go. Did not work? Try the next number. Or previous one. You can even loop through all IDs not in use. And when you’ll find him – you know what to do!

Advanced Scriplaculous Sortable Demo Fix

Heh.

There is a good example of using nested Scriplaculous Sortables. With one little flaw – Scriplaculous ver 1.6.x is used, and when you try to execute the code with newer version of library – sections.each is not a function error pops up.

Here is the way to fix it – you’ll probably need it if you want to save the results :-D

Just replace “document.getElementsByClassName(‘section’);” to “$$(‘.section’);”

Before

function getGroupOrder() {
	var sections = document.getElementsByClassName('section');
	var alerttext = '';
	sections.each(function(section) {
		var sectionID = section.id;
		var order = Sortable.serialize(sectionID);
		alerttext += sectionID + ': ' + Sortable.sequence(section) + '\n';
	});
	alert(alerttext);
	return false;
}

After

function getGroupOrder() {
	var sections = $$('.section');
	var alerttext = '';
	sections.each(function(section) {
		var sectionID = section.id;
		var order = Sortable.serialize(sectionID);
		alerttext += sectionID + ': ' + Sortable.sequence(section) + '\n';
	});
	alert(alerttext);
	return false;
}

Then modify it for your needs and go on )

What was that?
Quote:

As of Prototype 1.6, document.getElementsByClassName has been deprecated since native implementations return a NodeList rather than an Array.

!T.O.O.H.!

The Obliteration of Humanity.

The old band from Czech Republic, and the good one! And the dead one. They was banded in 1990 – and was disbanded in 2006 (I think so), what a mess. I’m really in grief for them. And damn the Earache!

Guys are: Humanoid, Schizoid, Wokis and Freedom. Here they are:

!T.O.O.H.!

And – !T.O.O.H.! homepage in English.

Their swansong – Ràd a Trest (Order & Punishment) is absolutely brilliant thing! Very, very distinctive sound, evil lyrics, just good musical material – and 36:41 of pleasure. One of the best albums ever for me now. Listen to it, first time sound looks strange somehow, but you’ll love it!

Note: pleasure guaranteed only if you’re in love with good old death metal ;)

Ahsoka Tano (Star Wars: Clone Wars) Nude

Seems like all the men thinking about same thing.
And here it is!
Ahsoka Tano Nude
Yeah, yeah. Ahsoka Tano porn e Ahsoka Tano nudo.

Star Wars: Clone Wars star Ahsoka Tano poses nude :-D
Catch it – most probably i’ll remove this picture later.

Star Wars image experiment

Now I’m ready to test something.
Someone can think that picture is offensive somehow – I assure you that is not.
At first, Ahsoka isn’t child, she seems so only next to Skywalker. At second she’s a freekin cartoon character – she have no age at all.

Star Wars: Clone Wars

Ashoka - Star Wars: Clone Wars
Yeah.
Finally I realized that Star Wars: Clone Wars now is not only theatrical movie, it’s a TV series ))

Yoda - Star Wars: Clone Wars
And yeah.
Just good for me. Maybe even better than Episode I.

Now I thinking about good old trick ;) – you’ll see it soon, just little experiment.

Diablo Swing Orchestra 2009 album

Diablo Swing Orchestra

Diabloswings must be in studio now. Maybe not just now – but in two months they have to…

“All in all, we can promise a more playful album with perhaps a little more aggressive-sounding songs. Some notes on the new songs are that we make more use of brass instruments than on the previous album. Some songs will also feature a male opera singer (we’ll reveal names later) and they will be sung in English, Russian, French and Italian.

“Details regarding studio and what label who will release the album is yet to be finalized but it will probably be sorted out during the upcoming month. Pre-production will continue during the autumn and we’ll hit the studio around January-February of 2009.”

Taken from here.

Shit, I’ll wait, cause it worth it!!

WordPress Dashboard problem fix

WordPress 2.7 offsite webshot

Heh. I’ve got “dashboard problem” in admin area. For long. ))

Now it’s over.

When you see 404 page instead of your dashboard – and somethings like “admin.php?page=index.php” in your addressbar – you just need to go to your wp-content/plugins/ directory and rename index.php there to index.html

P.S. BTW WP2.7 adminpanel looks really great! Upgrade ASAP.

Crisis Santa (?)

Crisis Santa

Were you good enough in 2k8 ??

And else one BMG I Feel Love video

Instead of this one.
I love `em.

Fixed BoxOver js library

Hi there, my dear java-damned-script fans!

boxoverToday I used to find an strange bug in pretty little fine-looking-hints library, called BoxOver from here. As you know, for the chars ", [ and ] with this library you must use ", [[ and ]] to display… It works, but only once for brackets.

So, I tried to find a fix… None found. At the forum some guy gave an ugly fix with &rbr; and so on…

Shame on you guys, did you ever heard of regexp syntax? ;)

Here’s the BoxOver library with fixed [ and ] brackets display:

Download BoxOver 2.1a javascript library (28th May 2008)

BTW, when I tried to register on forum to post my fix – I can’t – because of captcha insult, and that’s why I posted it here.

Switch to our mobile site