Important functions explained
bmc_Template()
Location: ./bmc/functions.php
The one and only template handler.
bmc_Template(MODE,TITLE,CONTENT,PAGE_MENU);
where MODE may be
- admin_header (Admin page's template header)
- admin_footer (Admin page's template footer)
- page_header (Header for all the pages except admin)
- page_footer (Footer for all the pages except admin)
- error_admin (Special template for displaying errors in the admin. Still uses the same header and footer as the admin)
- error_page (Special template for displaying errors except the admin. Still uses the same header and footer as the page_header & page_footer)
TITLE is the page title
CONTENT is the content that should appear on the page
and PAGE_MENU maybe
true - Will show the right panel on the default template
false - wont show the right panel on the default template
bmc_isLogged()
Location: ./bmc/functions.php
This function returns the login name of the currently logged in user or a 'false' if no used is currently logged in. (There's an alternative for this. The $bmc_vars['logged_in_user'] array. Check the HowTo's for more info)
bmc_smilify()
Location: ./bmc/functions.php
'Smilifies' an given string
eg: $string=bmc_smilify($string);
bmc_cnvAll()
Location: ./bmc/functions.php
Converts all the emails and urls in a string to clickable links.
Ignores urls that are already clickable
eg: $string=bmc_cnvAll($string);
bmc_Date()
Location: ./bmc/functions.php
Returns a formatted date according to the date string specified in the settings
eg: bmcDate(TIME_STAMP, DATE_FORMAT);
where TIME_STAMP is the unix timestamp, something like this 1097766716 and DATE_FORMAT is a date formatting string like "d-m-Y"
Leaving the TIME_STAMP empty will print the current date/time and leaving DATE_FORMAT empty will make the function use the default date string specified in Admin->Settings. It is to be noted that the date generated by this function will be based on the timezone specified in the Admin->Settings
bmc_Go()
Location: ./bmc/functions.php
Redirects to an specified location
eg: bmc_Go(LOCATION);
where LOCATION is a url or some local file.
bmc_Go uses header() and if this fails, it automatically goes for a javascript redirect
bmc_blockWords()
Location: ./bmc/functions.php
This will remove all the badwords specified in the Admin->word filter from a given string
eg: $string=bmc_blocWords($string)
If 'FOO' is a bad word, and the string passed to this function is
'WHAT IS A FOO?' , the function will return 'WHAT IS A ***?'
bmc_ShoutBox()
Location: ./bmc/functions.php
Displays the shoutbox
bmc_getCount()
Location: ./bmc/functions.php
Returns various counts
Usage : bmc_getCount(BLOG_ID,POST_ID);
This function will return an array in this form
array(
posts=25;
comments=1;
users=90;
cats=5;
blogs=2;
);
The parameters, BLOG_ID and POST_ID are optional, but if specified,
the counts will be limited to that specific blog and post
bmc_dispUser()
Location: ./bmc/functions.php
Returns a user's display name
eg: bmc_dispUser(ID); where ID is the user's NUMERICAL id
If the user has chosen to display his nick name, the function will return his nickname,
if Fullname is chosen, the function returns his fullname and so on..
bmc_wordwrap()
Location: ./bmc/functions.php
Wraps the Input text according the wrapping parameters specified in ADMIN->Settings
The function automatically recognizes html tags and special characters , thus leaving them
unotouched and processing just the text part
eg: $string=bmc_wordwrap($string)
bmc_bbCode()
Location: ./bmc/inc/users/bbcode.php
Accepts a string as the parameter and converts all bbCode tags to corresponding html tags and returns it eg: $string=bmc_bbCode($string)
bmc_htmlentities()
Location: ./bmc/functions.php
Automatically converts the html tags, special characters and entities to their html equivalents,
making it safe to be displayed. The function also converts Chinese, Arabic... characters safely
eg: $string=bmc_htmlentities($string)
bmc_Mail()
Location: ./bmc/functions.php
Sends a mail to a specified email. The headers are automatically set by the function itself.
Parameters : bmc_Mail(TO_EMAIL, SUBJECT, MESSAGE, FROM_EMAIL);
Here, TO_EMAIL is a required parameter. FROM_EMAIL is optional, if its left empty, the function will use the email specified in the Admin->Settings
bmc_show_list()
Location: ./bmc/inc/core/show.inc.php
This function is only available on pages except the admin.
It will print a list of the categories/posts/blogs/users/archive according to the input given
Usage: bmc_show_list('MODE','START_TG','END_TAG',BLOG_ID);
where MODE maybe
posts - Displays posts
cats - Displays categories
users - Displays the user list
archive - Displays the archive list
blogs - Displays the blog list
START_TAG is the html tag which appears in front of each line that is printed
END_TAG is the html tag which appears at the end of each line that is printed
BLOG_ID is the numerical id of the blog
