I calculated that I lose at least an hour a month to deal with IE related issues (that means that I lose a day of my life in two years – A DAY). So I think IE shouldn’t exist (none of them, not IE6..not IE8).
Customize HTML select boxes
I have recently made a jQuery plugin that customizes the way HTML select boxes look and act. What is different from all the other plugins is that it replaces the select with very simple HTML code and plus (by default – but can be modified by adding a parameter) it can view as a select on the iphone or ipad. So, it looks great on the computer and normal on the iphone/ipad (it can look customized on that as well, but for usability purposes I reccomend you leave it like this).
An example is here: http://www.mbe.ro/wp-content/uploads/replace_selects/
The plugin’s google code page is here: http://code.google.com/p/jqueryreplaceselects/.
And the download (from gcode) is here: http://jqueryreplaceselects.googlecode.com/files/select_replacement.zip
jQuery Slide Bug / Fix
In IE the jquery slide effect does not work so well. So I tried to make a fix (but using the jquery ui effects). I rewrote the slideUp, slideDown and slideToggle (and all of them work like a charm in all browsers):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | $.fn.slideToggle = function (_speed,_function) { $(this).toggle('slide',{direction:'up'},_speed,_function); } $.fn.slideUp = function (_speed,_function) { if (!$(this).is(':hidden')) { $(this).hide('slide',{direction:'up'},_speed,_function); } else { if (_function) _function.call(); } } $.fn.slideDown = function (_speed,_function) { if ($(this).is(':hidden')) { $(this).show('slide',{direction:'up'},_speed,_function); } else { if (_function) _function.call(); } } |
Another way to add custom fonts to HTML
While surfing I stumbled upon this . It’s a new way, no javascript, just CSS. (this is actually better because, this way custom fonts could be covered even for people that don’t have javascript enabled).
Check it out. I think it’s very good. I haven’t tried it myself yet but from what I read it’s actually cross-browser (even on mobile phones) and it’s fast. Another advantage to using this method (I think, haven’t tested actual facts) is you can use custom fonts on really long texts without your browser running slow, or loading time to be slow.
Thanks snook.ca for that.
HTML 2 Array – faster and better – v1.02
I’ve improved the class a lot and I’m still working on making it better. Now, it recovers the single tags (like img and meta and so on) and the rest the same time the other recovered without the single tags.
You have the option of ignoring the single tags. It’s actually much better (the algorithm is improved).
Anyway.. You can download it and view more on the google code page: http://code.google.com/p/php-html2array/
Fast and easy PHP MySQL Class
I will share my best PHP class to help you connect to MySQL. It is easy to use (easier than the classic way). It is fast and it helps you if you forget to escape some strings before inserting or things like those.
If you use it please reference me, this site and my email address (as a comment in the code is fine
)
Read more…
CakePHP 1.2.4.8284 Session Component Bug
I just had a rather idiot error in CakePHP: I have a page with an ajax loaded area. In the webpage the session variables were not recognized but in the ajax loaded area they were (no matter how many refreshes of the page).
I did not find the source of the problem, however I have a fix (I don’t know how to reproduce the bug, I just know it happened and so it could happen again). To whoever might need it: If you have the app_controller created, if not, create it yourself, or whatever, make sure you have the following:
1 2 3 4 5 6 7 | <?php class AppController extends Controller { function beforeFilter () { parent::beforeFilter(); if (!isset($_SESSION)) session_start(); //cakephp dumb fix } } |
Another stupid IE fact
Yet another dumb IE fact: Internet Explorer adds margin to the <form> tag.
So everytime you start a CSS you must enter (besides other):
1 2 3 | form { margin: 0; } |
One more time… Thank you Microsoft for the great product that is Internet Explorer, NOT.
Alternative to SIFR and FLIR
Pretty good one too, very fast and very nice. It’s called Cufon. A friend of mine has discovered it and I’m sharing it. This blog, itself, is an example of the script (as I am using it for the titles).
Use it wisely.
The link to About Cufon: http://wiki.github.com/sorccu/cufon/about
and the link to Cufon Usage: http://wiki.github.com/sorccu/cufon/usage
PayPal Development – DirectPayment function
Lately I have been working with Paypal Developing. I stumbled upon the wizard and it gave me step by step instructions but when I tested the script, the script said that the function “DirectPayment” is undefined. They forgot to include the function. So I googled and googled but nothing. So I made the function myself. For all of you that need it, here it is: Read more…

