本文整理汇总了PHP中FSS_Helper::MaxLineLength方法的典型用法代码示例。如果您正苦于以下问题:PHP FSS_Helper::MaxLineLength方法的具体用法?PHP FSS_Helper::MaxLineLength怎么用?PHP FSS_Helper::MaxLineLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FSS_Helper
的用法示例。
在下文中一共展示了FSS_Helper::MaxLineLength方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: trim
//.........这里部分代码省略.........
if ($status->userdisp) {
$text = $status->userdisp;
}
$vars[] = self::BuildVar('status', $text);
} else {
$vars[] = self::BuildVar('status', self::GetStatus($ticket['ticket_status_id']));
}
$vars[] = self::BuildVar('priority', self::GetPriority($ticket['ticket_pri_id']));
$vars[] = self::BuildVar('category', self::GetCategory($ticket['ticket_cat_id']));
$vars[] = self::BuildVar('department', self::GetDepartment($ticket['ticket_dept_id']));
$vars[] = self::BuildVar('department_desc', strip_tags(self::GetDepartment($ticket['ticket_dept_id'], 'description')));
$vars[] = self::BuildVar('department_desc_html', self::GetDepartment($ticket['ticket_dept_id'], 'description'));
$vars[] = self::BuildVar('product', self::GetProduct($ticket['prod_id']));
$vars[] = self::BuildVar('product_desc', strip_tags(self::GetProduct($ticket['prod_id'], 'description')));
$vars[] = self::BuildVar('product_desc_html', self::GetProduct($ticket['prod_id'], 'description'));
if (strpos($template['body'], "{messagehistory}") > 0) {
$messages = self::GetMessageHist($ticket['id']);
$text = self::ParseMessageRows($messages, $ishtml, $foruser);
$vars[] = self::BuildVar('messagehistory', $text);
}
$uri = JURI::getInstance();
$baseUrl = FSS_Settings::get('support_email_no_domain') ? "" : $uri->toString(array('scheme', 'host', 'port'));
if (in_array(FSS_Settings::get('support_unreg_type'), array(0, 1))) {
$vars[] = self::BuildVar('haspassword', 1);
} else {
$vars[] = self::BuildVar('haspassword', 0);
}
// choose which user link to generate
if ($ticket['user_id'] < 1) {
// unregistered user
$url = 'index.php?option=com_fss&t=' . $ticket['id'] . "&p=" . $ticket['password'];
if (FSS_Settings::get('support_email_link_unreg') > 0) {
// add fixed item id if needed
$url .= "&Itemid=" . FSS_Settings::get('support_email_link_unreg');
}
$vars[] = self::BuildVar('ticket_link', $baseUrl . JRoute::_($url, false));
} else {
// registered user
$url = 'index.php?option=com_fss&view=ticket&layout=view&ticketid=' . $ticket['id'];
if (FSS_Settings::get('support_email_include_autologin')) {
$url .= "&login={login_code}";
}
if (FSS_Settings::get('support_email_link_reg') > 0) {
// add fixed item id if needed
$url .= "&Itemid=" . FSS_Settings::get('support_email_link_reg');
}
$vars[] = self::BuildVar('ticket_link', $baseUrl . JRoute::_($url, false));
}
// ticket admin link
$url = 'index.php?option=com_fss&view=admin_support&layout=ticket&ticketid=' . $ticket['id'];
if (FSS_Settings::get('support_email_link_admin') > 0) {
// add fixed item id if needed
$url .= "&Itemid=" . FSS_Settings::get('support_email_link_admin');
}
$vars[] = self::BuildVar('admin_link', $baseUrl . JRoute::_($url, false));
// email pending link
$url = 'index.php?option=com_fss&view=admin_support&layout=emails';
if (FSS_Settings::get('support_email_link_pending') > 0) {
// add fixed item id if needed
$url .= "&Itemid=" . FSS_Settings::get('support_email_link_pending');
}
$vars[] = self::BuildVar('email_pending_link', $baseUrl . JRoute::_($url, false));
$vars[] = self::BuildVar('websitetitle', FSS_Helper::getSiteName());
// need to add the tickets custom fields to the output here
$fields = FSSCF::GetAllCustomFields(true);
$values = FSSCF::GetTicketValues($ticket['id'], $ticket);
foreach ($fields as $fid => &$field) {
$name = "custom_" . $fid;
$value = "";
if (array_key_exists($fid, $values)) {
$value = (string) $values[$fid]['value'];
}
$fieldvalues = array();
$fieldvalues[0]['field_id'] = $fid;
$fieldvalues[0]['value'] = $value;
// only do area output processing if we are in html mode
if ($field['type'] != "area" || $ishtml) {
$newvalue = FSSCF::FieldOutput($field, $fieldvalues, '');
if ($newvalue) {
$value = $newvalue;
}
}
$vars[] = self::BuildVar($name, $value);
$vars[] = self::BuildVar("custom_" . $field['alias'], $value);
}
$email['subject'] = self::ParseText($template['subject'], $vars);
$email['body'] = self::ParseText($template['body'], $vars);
self::$last_vars = $vars;
if ($template['ishtml']) {
$email['body'] = FSS_Helper::MaxLineLength($email['body']);
} else {
$email['body'] = str_replace("<br />", "\n", $email['body']);
$email['body'] = html_entity_decode($email['body']);
$email['body'] = preg_replace_callback("/(&#[0-9]+;)/", array("FSS_Helper", "email_decode_utf8"), $email['body']);
$email['body'] = strip_tags($email['body']);
}
$email['body'] = str_replace("XXXLTXXX", "<", $email['body']);
$email['body'] = str_replace("XXXGTXXX", ">", $email['body']);
return $email;
}