*
All, News, Linux, BSD, Games, Apps, Code, Security

b2 Hacks and Plugins

list_cats_posts ():
Add to b2template.functions.php. Sorts every post by their categories. Use <? list_cats_posts(0, 'All', 'id'); ?>.
code, demo

list_recentposts():
Add to b2functions.php. Nice function that gives you the ability to list posts by a selected category. $category is the ID, and $limit is the number of posts. (i.e. <? list_recentPosts(6,5) ?> )
code, demo

member_redir():
Add to b2functions.php. This function will redirect you to a page depending on your cookie. It redirects members and anonymous users to separate pages. Nice for having one memberpage where users are either sent to their account, or the register form.
code, demo

login_text():
Add to b2functions.php. Same as the above, only I replaced location("") with print("").
code, demo

the_date():
Bugfix. Add to b2template.functions.php. This fixes the problem where posts on the same date loose their the_date() value. Replace this with the original the_date() function in b2temlate.functions.php.
code

new_archive.php:
Gives a nice layout of the archive with posts listed by each category. Can be arranged descending or ascending by year, ID, date, or title. Remember to change the $pagenow value to the pagename (the PHP_SELF value, i.e. library.php).
code, demo

headlines.php:
Small script that displays the recent headlines from the database. Use <? include "headlines.php"; ?> where you want it.
code, demo



The Linux Webring: [ Home | List | Next | Prev | Random | Stats ]