Auteur/autrice : Salagir
-
Convert HTML into BBcode
BBcode is the syntax used in phpBB forums and some other websites with edit forms, due to it’s simple and intuitive syntax, opposed to that stupid wiki code no one ever gets. If, like me, you ever wanted to post the content of an html page, this Perl script is for you. It takes a…
-
Displaying a progress bar
Ok, it’s not really a bar. Draw something, being careful of the width of your command-line terminal, is tricky. But, you’ll get the display of the percentage of progress of the script and the time that is probably remaining. Example. You have a script doing 20,000 times about the same thing. You want to know…
-
Time Functions: Displaying rounded and international
Be careful, this is the translation of two French articles and it’s long. Today we will be writing time in a way that is comfortable for a human reader. Who want to read, « Only 0h 00mn 18s left » at the end of a count that began an hour ago? Before, strftime() was enough. Now, time…
-
Translation SQL table and translation system
This is a short, non-interesting article about a translation system. Nothing new or original here. I put here because my next article will use it and it’ll be a very long one. I a few month, I’m gonna talk a lot about translation. I’ve made many things about it, especially for automatic translations. Here, it’s…
-
List all 404 errors from a Apache server
This is not the only solution to know if your website got dead links. For example, Awstats will tell you them too, but only from on site at the time. Also, online dead link finders are you friends, like W3C Link Checker. My solution works directly on the server, and also find the errors that…
-
Rangeur de backups
Vous me croyiez mort ? C’est que vous n’avez pas beaucoup suivi mes autres sites alors… Puisque je n’ai pas fais de mise à jour ici depuis la mort soudaine de mon serveur, parlons de backups. Bon, backuper c’est super facile. En gros j’utilise trois façons : Pour une BDD : mysqldump [infos cnx] |gzip…
-
Url rewriting is your friend
Url rewriting, is to have a link to a webpage that a human can read, and a search engine can interpret as keywords. Many blogs use this, they use the title of the post in the url. Example : Good: http://toto.com/articles/eat-creme-brulee.html Bad: http://toto.com/2007/article.php?id=684 You english reader may not care about this, but the main problem…
-
Fonctions temporelles 2 : le retour
Je vous avais parlé de fonctions PHP permettant d’écrire des temps restant, soit dans plusieurs langues, soit en arrondit. Et bien j’ai craqué, j’ai fait la fonction finale, qui fait les deux en même temps, et cela grâce aux traducteurs de Multiverse. En voici son utilisation. (Cherchez le « Prochaine page dans : … ») Fonction et…
-
Delete backslashs : death to magic_quotes_gpc
Even in PHP 5, this old security params is activated by default, and I hate it. It’s Magic Quote. When this flag is On, then vars in cookies, from a form or a url, are automatically « escaped ». It means that backslashes are added before some special characters. Primary: the simple quote. Example : my script…
-
Webservice de traduction automatique
J’ai peut-être mal cherché, mais je n’ai pas trouvé de webservice de traduction. Or j’avais deux besoins, que j’ai tous deux comblé : pouvoir faire traduire ce que j’écris facilement, et pouvoir lire des flux RSS dans d’autres langues. Les moins fans d’entre vous de ma personne (qu’est ce que vous faites là ?) ignorent…
