Archive for the 'PHP' Category
Thursday, January 19th, 2006
WordPress contains a nice WYSIWYG HTML editor, but it doesn’t fit with XHTML specifications.
I found out a cool method to generate valid XHTML code on WordPress; all what you need is Nvu and Vim.
First, use Nvu to edit your HTML text, and set you markup output to XHTML transitional:
Tools - Preferences - Advanced - […]
Posted in General, WordPress, Vim, W3C, XHTML, Nvu | 1 Comment »
Thursday, January 12th, 2006
This post is generated using a PHP code!
Thanks to Mr. R’s suggestion, I looked at the WordPress plugins repository and found a script that executes PHP.
Excellent feature, it even deals with forms inside posts and pages, and keeps it valid XHTML.
Posted in General, PHP, WordPress | 3 Comments »
Tuesday, December 27th, 2005
I released a cool PHP script that generates a wish card.
You can both use it and hack on it.
For users
Point your browser to http://swobodin.fedora-tn.org/wp-content/lab/card/?from=Sender&to=Receiver
&msg=Your_Message&wish=Your_Wish, and change the following parameters:
from: your name
to: receiver name
msg: your message, eg. “Happy_New_Year_2006“
wish: your signature, eg. “Sincerely,“
Note that you should replace whitespaces by underscores ( _ ) and separator […]
Posted in General, PHP, Network, Web Server | 1 Comment »
Sunday, November 20th, 2005
I have coded a funny and buggy Feed Reader, with PHP and SQLite. So don’t be afraid if you see on the log a user-agent with a strange identity showing my URL: it means that I have added your RSS to my bookmarks
Posted in PHP, Network, XML, Databases, SQLite | No Comments »
Wednesday, November 2nd, 2005
Here’s a quick PHP function to generate a random password, usage:
genrand($password_length);
<?php
function genrand($len = 10) {
for ($i = 0; $i < 26; $i++) {
$str[$i] = chr($i+65);
}
unset($i);
for ($i = 26; $i < 52; $i++) {
$str[$i] = chr($i+71);
}
unset($i);
for ($i = 52; $i < 62; $i++) {
$str[$i] = $i-52;
}
unset($i);
mt_srand(microtime()*100000);
$retval = NULL;
for ($i = 1; $i <= $len; $i++) […]
Posted in General, Programming, PHP | No Comments »
Saturday, October 1st, 2005
Added an online Latin to Cyrillic convertor for writing Russian messages; you can use it as well, надеюсь, вам понравится:-)
My host is still amazing me! I thought that dl() function doesn’t work, but I realized that it’s enough to upload a “home compiled” extensions to work; I know, that may be insecure, but at […]
Posted in PHP, Personal, Russian, PECL | No Comments »
Sunday, September 25th, 2005
I made some quick and dirty hacks on WordPress that are useful for me:
Fixed keyword meta-tag adding categories as keywords; no need to make a file, just added to header.php the following lines:
<?php $numcats = $wpdb->get_var(”SELECT COUNT(*) FROM $wpdb->categories”); ?>
<meta name=”keywords” content=”<?php for ($i=1; $i< =$numcats;$i++) {print get_the_category_by_ID($i).’,';}?>Swobodin,blog” />
Added a plug-in that inserts images […]
Posted in PHP, WordPress, HTML | 1 Comment »
Tuesday, September 20th, 2005
It works!
I have just configured and ran my blog; after trying to develop blogs, testing others, I finally choosed WordPress for many reasons: cool design with a valid XHML, many features, customizations, easy PHP code to hack on, … did I mention it’s licensed as GPL?
I changed a bit some stylesheet, backgrounds, … and […]
Posted in Free Software, PHP, Graphics, WordPress, Personal | No Comments »