Version 1.0.1
Weblog / News Publishing Tool
Requirements - Installation - Template(s) - Query String Usage - XML-RPC (Blogging APIs) - Post Via Email - Notes
The link will help promote WordPress and is its only mean of promotion.
WordPress is the official continuation of b2, which comes from Michel V. The work has been continued by the WordPress developers. If you would like to support WordPress, please consider donating.
This document is currently beta stage, we'll be updating it extensively as WordPress matures. There is also online documentation under development, as well as a wiki.
wp-content/link-update-cache.xml
file. Point your browser to wp-admin/install-config.php. This will create a configuration file for your installation. You'll need to know your database name, username, password, and host name.
Alternately, you may open wp-config-sample.php in a text editor and insert your database name, username, password, and host name as indicated in the comments. (Comments are lines that start with /*
or //
.) Save this file as wp-config.php, and upload it.
wp-config.php
as indicated in the "5-minute install" section.For information about WordPress templates, please see our online documentation on them.
WordPress relies a lot on the query string. These variables passed with the URL (note: to pass variables in the querystring, preceed the first variable name with a '?' question mark and every other variables with a '&' sign.)
Most of the time you won't have to do anything about it, but if you want to know how it works, it's here:
How to use the query string:
index.php?m=200107 will display the month of July 2001.
index.php?m=20010701 will display all posts from July 1st, 2001.
index.php?w=20 will display the posts from the 20th week of the year, where January 1st is in the first week (according to PHP).
index.php?p=50 will display the post labeled #50 in the database.
index.php?s=blue+house will display the posts that match the search request "blue house".
here is the code for a simple search box:
<form name="searchform" action="<?php echo $PHP_SELF ?>" method="get">
<input type="text" name="s" />
<input type="submit" name="submit" value="search" />
</form>
index.php?cat=1 will display all posts that belong to category #1 (1 is the default). you can add/rename/delete categories from WordPress's interface.
index.php?author=1 will display all posts from the author #1
index.php?p=50&c=1 will display the comments and a form to add a comment below the post.
you should use this variable only with p=, example: index.php?p=50&c=1.
index.php?p=50&page=1 will display the first page of post #50. this, again, should be used only with p=, for individual entries.
You can also mix these variables, example: index.php?m=200107&s=hotdog will display the posts that match the search request "hotdog", but only in July 2001.
WordPress has an XMLRPC interface. Currently supported APIs are the Blogger API, metaWeblog API, and the MovableType API. There are talks about a new API that would cover a lot of weblog/CMS systems in the future: when it's ready, WordPress will support it.
The Blogger API has been completely emulated on WordPress, with some little differences:
If you use blogger.newPost, your post is submitted without title and in category #1.
However, you can type <title>my title</title> and/or <category>2<category> in the body of your post to make its title be 'my title' and its category be #2 (refer to your categories section to find out the ID numbers of the categories). b2 would then delete that extra info from the body of your post once it is posted.
The metaWeblog and MovableType APIs are currently supported with the following exceptions:
You can now post to your WordPress blog with tools like BlogBuddy, Bloggar, WapBlogger (post from your Wap cellphone!), Radio Userland (which means you can use Radio's email-to-blog feature), Zempt, NewzCrawler, and other tools that support the Blogging APIs! :)
Your XMLRPC server/path are as described here: if you login to WordPress on http://example.com/me/wp-login.php, then you have:
There's also a b2-specific method: b2.getCategories. Request it with 3 strings: blog_ID (use '1'), username, password. The response is an array of structs with strings categoryID and categoryName.
You can post news from an email client!
But first you'll have to edit the options on the options screen, filling the appropriate values for your POP3 email account (this interface doesn't support IMAP yet, only POP3, sorry).
Once you have edited the options, you can make your webserver execute wp-mail.php every set amount of time (depending on your host's performance, this script can be resource intensive, so don't make it run every minute or you'll be kicked).
You can do it with Cron-jobs, or if your host doesn't support it you can look into the various website-monitoring services, and make them check your wp-mail.php URL.
It is strongly advised to send your email as text-only (Outlook and Outlook Express default to 'html', which may cause problems), but HTML email could work (the script would strip all your html tags though...).
It is also advised not to use your public email address, but create a new one especially for this script. If you use your public email address and the script goes crazy posting every email on your blog and deleting all your emails, I can't take responsibility for this.
Make sure you delete any email sent to your blog in your 'Sent' folder too, just in case (you don't want someone to find your login and password in the 'Sent' folder).
The script will delete the emails that were used to post stuff on your weblog if it successfully posted your stuff. If it didn't manage to post, the email is not deleted.
Now to post something, here's how your email should look like:
Subject must start with 'blog:', or any string you set in the config file (so that the script doesn't check EVERY email in your mailbox).
Body's first line must always be login:password, else the script will just skip the email.
If you don't use '___' (or any body terminator that you set in the config file), the script will post the whole body, which is not what you want if you send email with Yahoo or Hotmail (you don't want their ads on your blog, do you ?).
Some mobile phone service providers may allow you to send email with your mobile phone or PDA, but on such devices you can't always include line breaks. In such case, you have to set use_phoneemail = true in the options, and then here's how you write the email:
You will have to append ':::' (or whatever string you set in the config file) after the subject, and after the login:password.
Some mobile phone service providers may not allow you to set a subject, and they'll make the subject be the first characters of the body, in which case you would send an email like this:
On multi-user:
New users can register with wp-register.php. Then you (as an admin) click the "+" next to their name on the Team page in admin to upgrade their level to 1 or more, so they can post. If you don't want an user to post anymore, just click "-" until their level is 0.
Note: you can now disable users registration altogether from the config file.
User Levels:
Usually, you'll want to have a team of only level 1 users except you. ;)
Note: you can modify an option on the option screens, to enable new users to post once they've registered.
If you don't want users to register on your blog at all, just delete wp-register.php once you've registered your user account.