本文整理汇总了PHP中BBProfile函数的典型用法代码示例。如果您正苦于以下问题:PHP BBProfile函数的具体用法?PHP BBProfile怎么用?PHP BBProfile使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了BBProfile函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load
function load()
{
global $db, $scache, $config, $bbcode;
if ($this->exists() == true) {
$this->import();
} else {
$categories_obj = $scache->load('categories');
$cat_cache = $categories_obj->get();
$result = $db->query("\n\t\t\tSELECT id, name, parent, position, description, topics, replies, opt, optvalue, forumzahl, topiczahl, prefix, invisible, readonly, auto_status, active_topic, count_posts, reply_notification, topic_notification, message_active, message_title, message_text\n\t\t\tFROM {$db->pre}forums\n\t\t\t", __LINE__, __FILE__);
$this->data = array();
while ($row = $db->fetch_assoc($result)) {
$row['bid'] = $cat_cache[$row['parent']]['parent'];
$emails = preg_split('/[\\r\\n]+/', $row['topic_notification'], -1, PREG_SPLIT_NO_EMPTY);
$row['topic_notification'] = array();
foreach ($emails as $email) {
if (check_mail($email)) {
$row['topic_notification'][] = $email;
}
}
$emails = preg_split('/[\\r\\n]+/', $row['reply_notification'], -1, PREG_SPLIT_NO_EMPTY);
$row['reply_notification'] = array();
foreach ($emails as $email) {
if (check_mail($email)) {
$row['reply_notification'][] = $email;
}
}
BBProfile($bbcode);
$bbcode->setReplace($config['wordstatus']);
$row['message_text'] = $bbcode->parse($row['message_text']);
$this->data[$row['id']] = $row;
}
$this->export();
}
}
示例2: DocCodeParser
function DocCodeParser($syntax, $parser = 1)
{
global $bbcode;
if ($parser == 2) {
ob_start();
$code = str_replace('<' . '?php', '<' . '?', $syntax);
$code = '?' . '>' . trim($code) . '<' . '?';
extract($GLOBALS, EXTR_SKIP);
eval($code);
$syntax = ob_get_contents();
ob_end_clean();
} elseif ($parser == 3) {
BBProfile($bbcode);
$syntax = $bbcode->parse($syntax);
} elseif ($parser == 0) {
$syntax = htmlspecialchars($syntax, ENT_NOQUOTES);
}
return $syntax;
}
示例3: array
$topic = array();
while ($row = $gpc->prepare($db->fetch_assoc($result))) {
if ($row['guest'] == 1) {
$row['uid'] = 0;
$row['uname'] = $row['name'];
$row['umail'] = $row['email'];
}
$posts[$row['id']] = $row;
$author[$row['id']] = $row['uname'];
$topic[$row['id']] = $row['topic'];
$comment[$row['id']] = $row['comment'];
}
$author = array_unique($author);
$topic = array_unique($topic);
$comment = array_unique($comment);
BBProfile($bbcode);
($code = $plugins->load('managetopic_pmerge_prepared')) ? eval($code) : null;
echo $tpl->parse("admin/topic/post_merge");
} elseif ($action == "pmerge2") {
$ids = $gpc->get('ids', arr_int);
$iids = implode(',', $ids);
$author = $gpc->get('author', int);
$error = array();
if (count($ids) < 2) {
$error[] = $lang->phrase('no_data_selected');
}
if (empty($author)) {
$error[] = $lang->phrase('name_too_short');
}
if (empty($_POST['topic_id'])) {
$error[] = $lang->phrase('title_too_short');
示例4: xmail
function xmail($to, $from = array(), $topic, $comment, $type = 'plain', $attachment = array())
{
global $config, $my, $lang, $bbcode;
require_once "classes/mail/class.phpmailer.php";
require_once 'classes/mail/extended.phpmailer.php';
$mail = new PHPMailer();
$mail->CharSet = $lang->phrase('charset');
// Added Check_mail for better security
// Now it is not possible to add various headers to the mail
if (!isset($from['mail']) || !check_mail($from['mail'])) {
$mail->From = $config['forenmail'];
} else {
$mail->From = $from['mail'];
}
if (!isset($from['name'])) {
$mail->FromName = $config['fname'];
} else {
$mail->FromName = $from['name'];
}
if ($config['smtp'] == 1) {
$mail->Mailer = "smtp";
$mail->IsSMTP();
$mail->Host = $config['smtp_host'];
if ($config['smtp_auth'] == 1) {
$mail->SMTPAuth = TRUE;
$mail->Username = $config['smtp_username'];
$mail->Password = $config['smtp_password'];
}
} elseif ($config['sendmail'] == 1) {
$mail->IsSendmail();
$mail->Mailer = "sendmail";
$mail->Sendmail = $config['sendmail_host'];
} else {
$mail->IsMail();
}
$mail->Subject = $topic;
if (!is_array($to)) {
$to = array('0' => array('mail' => $to));
}
$i = 0;
foreach ($to as $email) {
if ($type == 'bb') {
BBProfile($bbcode);
$bbcode->setSmileys(0);
$bbcode->setReplace($config['wordstatus']);
$row->comment = $row->comment;
$mail->IsHTML(TRUE);
$mail->Body = $bbcode->parse($comment);
$mail->AltBody = $bbcode->parse($comment, 'plain');
} elseif ($type == 'html') {
$mail->IsHTML(TRUE);
$mail->Body = $comment;
$mail->AltBody = html_entity_decode(strip_tags($comment));
} else {
$mail->Body = html_entity_decode($comment);
}
if (isset($email['name'])) {
$mail->AddAddress($email['mail'], $email['name']);
} else {
$mail->AddAddress($email['mail']);
}
foreach ($attachment as $file) {
if ($file['type'] == 'string') {
$mail->AddStringAttachment($file['file'], $file['name']);
} else {
$mail->AddAttachment($file['file'], $file['name']);
}
}
if ($mail->Send()) {
$i++;
}
$mail->ClearAddresses();
$mail->ClearAttachments();
}
return $i;
}
示例5: gmdate
$row->regdate = gmdate($lang->phrase('dformat2'), times($row->regdate));
if ($row->lastvisit > 0) {
$row->lastvisit = str_date($lang->phrase('dformat1'), times($row->lastvisit));
}
else {
$row->lastvisit = $lang->phrase('profile_never');
}
BBProfile($bbcode);
$bbcode->setSmileys(1);
$bbcode->setReplace(0);
$bbcode->setAuthor($row->id);
$row->about = $bbcode->parse($row->about);
BBProfile($bbcode, 'signature');
$row->signature = $bbcode->parse($row->signature);
// Set the instant-messengers
if ($row->jabber || $row->icq > 0 || $row->aol || $row->msn || $row->yahoo || $row->skype) {
$imanz = 1;
}
else {
$imanz = 0;
}
if ($row->gender == 'm') {
$gender = $lang->phrase('gender_m');
}
elseif ($row->gender == 'w') {
$gender = $lang->phrase('gender_w');