URL Parameters
This man page refers to b2evolution version: 1.6 "phoenix"
b2evolution relies a lot on the querystring, 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:
author
author number: selects posts from that author only
list of author numbers: selects posts from all listed authors only
Values must by separated by comma (,)
Starting the list with a minus (-) will select posts from all authors except the listed ones.
blog
number of the blog to be displayed. This is for RSS generation mainly.
cat
category number: selects posts from that category only
list of category numbers: selects posts from all listed categories only
Values must by separated by comma (,)
Starting the list with a minus (-) will select posts from all categories but the listed
ones.
Starting the list with an asterisk (*) will select posts wich are cetgorized simultaneously in ALL resquested categories.
This parameter can be just - or * if you combine it with catsel below.
catsel%5B%5D
if this was unencoded it would actually read catsel[] . Think this is a joke? Actually yes, PHP sometimes feels like a joke! This is the normal way of passing multiple values for a parameter in PHP!
this parameter can appear several times with a different category number
these will add up to the cat list (except if exclusion mode is used)
disp
stats: displays stats
comments: displays last comments
dstart
Starts browsing at specified date/time. Useful with 'unit=days' for example. Added in version 0.9.2.
yyyy: display specific year
yyyymm: display specific month mm of year yyyy
yyyymmdd: display specific day
yyyymmddhh: hour
yyyymmddhhmm: hour minute
yyyymmddhhmmss: hour minute second
exact
- : search words have to be included in the title or the content
- : search words or sentence have to exactly match a post title or content. (most useful in conjunction with sentence)
to be used in conjunction with s
log
login
m
yyyy: display specific year
yyyymm: display specific month mm of year yyyy
yyyymmdd: display specific day
yyyymmddhh: hour
yyyymmddhhmm: hour minute
yyyymmddhhmmss: hour minute second
order
ASC: ascending/chronological
DESC: descending/reverse chronological (default)
orderby
list of fields to order by, separated by space (requires some knowledge of the database)
p
post number: display that specific post
page
page number in post - currently unsupported
paged
page set number when posts are displayed by paged sets. (This must be activated in the options).
postend
position to end results at
to be unsed in conjunction with poststart
overrides posts
posts
number of posts or days (depending on "unit") to display on the page
poststart
position to start results at
to be unsed in conjunction with postend.
overrides posts
preview
reserved
pwd
password
s
search string: sentence or words (separate with spaces or commas) to be searched in the post titles and contents
sentence
AND: search for words, combining them with AND (default)
OR: search for words, combining them with OR
sentence: search for whole sentence
to be used in conjunction with s
title
post url title: display that specific post
skin
name of a skin folder in the /skins directory
unit
What to display: can be either 'posts' or 'days'.
Note: This param has been introduced in version 0.9.2 . Earlier version always refer to the global configuration.
w
week number: display posts of that week (to be used in conjunction with m for the year)
Note: b2evo uses MySQL's week numbering and MySQL? default if applicable. In MySQL? < 4.0.14, WEEK() always uses mode 0: Week starts on Sunday; Value range is 0 to 53; week 1 is the first week that starts in this year. See MySQL manual.
Examples
- *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:
(php)
<form name="searchform" action="<?php blogingo('blogurl') ?>" method="get">
&ly;input type="text" name="s" />
<input type="submit" name="submit" value="search" />
&tl;/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 b2's interface.
- *index.php?author=1** will display all posts from the author #1
- *index.php?p=50&c=1** will display the comments to the post #50 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&tb=1** will display the Trackbacks to the post #50.
you should use this variable only with p=, example: index.php?p=50&tb=1
- *index.php?p=50&pb=1** will display the Pingbacks to the post #50.
you should use this variable only with p=, example: index.php?p=50&pb=1
- *index.php?p=50&more=1 will display the extended entries' text. this, too, should be used only with p=**, for individual entries.
- *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.