本文整理汇总了PHP中PHPWS_Text::parseOutput方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPWS_Text::parseOutput方法的具体用法?PHP PHPWS_Text::parseOutput怎么用?PHP PHPWS_Text::parseOutput使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPWS_Text
的用法示例。
在下文中一共展示了PHPWS_Text::parseOutput方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view
/**
* View this PHAT_Checkbox
*
* @return string The HTML content to view the PHAT_Checkbox
* @access public
*/
function view()
{
$label = $this->getLabel();
if (isset($_REQUEST['PHAT_' . $label]) && is_array($_REQUEST['PHAT_' . $label])) {
$this->setValue($_REQUEST['PHAT_' . $label]);
}
if ($this->isRequired()) {
$viewTags['REQUIRED_FLAG'] = '*';
}
$viewTags['BLURB'] = PHPWS_Text::parseOutput($this->getBlurb(), ENCODE_PARSED_TEXT, false, true);
$viewTags['CHECK_BOXES'] = '';
$optionText = $this->getOptionText();
$optionValues = $this->getOptionValues();
$value = $this->getValue();
$viewTags['CHECK_BOXES'] = null;
for ($i = 0; $i < sizeof($optionText); $i++) {
if (isset($value[$i])) {
$match = $value[$i];
} else {
$match = null;
}
$option_value = $optionValues[$i];
$element = new Form_CheckBox('PHAT_' . $label . '[' . $i . ']', $option_value);
$element->setMatch($match);
$id = preg_replace('/\\W/', '', $option_value) . $i;
$element->setId($id);
$label_text = "<label for='{$id}'>" . $optionText[$i] . "</label>";
$viewTags['CHECK_BOXES'] .= $element->get() . " {$label_text}<br />\n";
}
return PHPWS_Template::processTemplate($viewTags, 'phatform', 'checkbox/view.tpl');
}
示例2: getContent
public function getContent($format = TRUE)
{
if ($format) {
return PHPWS_Text::parseTag(PHPWS_Text::parseOutput($this->content), null, 'block');
} else {
return $this->content;
}
}
示例3: getContent
public function getContent($view_mode = true, $fix_anchor = true)
{
if (empty($this->content)) {
return null;
}
if ($view_mode) {
return PHPWS_Text::parseTag(PHPWS_Text::parseOutput($this->content, ENCODE_PARSED_TEXT, false, false, $fix_anchor));
} else {
return PHPWS_Text::decodeText($this->content);
}
}
示例4: view
/**
* View this PHAT_Textarea
*
* @return string The HTML to needed view this PHAT_Textarea
* @access public
*/
function view()
{
$label = $this->getLabel();
if (isset($_REQUEST['PHAT_' . $label])) {
$this->setValue($_REQUEST['PHAT_' . $label]);
}
if ($this->isRequired()) {
$viewTags['REQUIRED_FLAG'] = '*';
}
$viewTags['ID'] = 'textarea' . $this->_id;
$viewTags['BLURB'] = PHPWS_Text::parseOutput($this->getBlurb(), ENCODE_PARSED_TEXT, false, true);
$viewTags['NAME'] = 'PHAT_' . $this->getLabel();
$viewTags['ROWS'] = $this->_rows;
$viewTags['COLS'] = $this->_cols;
$viewTags['VALUE'] = $this->getValue();
return PHPWS_Template::processTemplate($viewTags, 'phatform', 'textarea/view.tpl');
}
示例5: view
/**
* View this PHAT_Dropobox
*
* The view function provides the HTML for a user to view the PHAT_Dropbox.
*
* @param mixed $value whatever needed to match in the dropbox
* @return string The HTML to be shown
*/
function view($value = NULL)
{
$label = $this->getLabel();
if (isset($_REQUEST['PHAT_' . $label])) {
$this->setValue($_REQUEST['PHAT_' . $label]);
}
if ($this->isRequired()) {
$viewTags['REQUIRED_FLAG'] = '*';
}
$optionText = $this->getOptionText();
$optionValues = $this->getOptionValues();
for ($i = 0; $i < sizeof($optionText); $i++) {
$options[$optionValues[$i]] = $optionText[$i];
}
$viewTags['BLURB'] = PHPWS_Text::parseOutput($this->getBlurb(), ENCODE_PARSED_TEXT, false, true);
$element = new Form_Select('PHAT_' . $label, $options);
$element->setMatch($this->getValue());
$element->setId($element->name);
$viewTags['ID'] = $element->getId();
$viewTags['DROPBOX'] = $element->get();
return PHPWS_Template::process($viewTags, 'phatform', 'dropbox/view.tpl');
}
示例6: view
/**
* View this PHAT_Radiobutton
*
* The view function provides the HTML for a user to view the PHAT_Radiobutton.
*
* @return string The HTML to be shown
* @access public
*/
function view($value = NULL)
{
$label = $this->getLabel();
if (isset($_REQUEST['PHAT_' . $label])) {
$this->setValue($_REQUEST['PHAT_' . $label]);
}
if ($this->isRequired()) {
$viewTags['REQUIRED_FLAG'] = '*';
}
$viewTags['BLURB'] = PHPWS_Text::parseOutput($this->getBlurb(), ENCODE_PARSED_TEXT, false, true);
$viewTags['RADIO_BUTTONS'] = '';
$optionText = $this->getOptionText();
$optionValues = $this->getOptionValues();
for ($i = 0; $i < sizeof($optionText); $i++) {
$option_value = $optionValues[$i];
$element = new Form_RadioButton('PHAT_' . $label, $option_value);
$element->setMatch($this->getValue());
$id = preg_replace('/\\W/', '', $option_value) . $i;
$viewTags['RADIO_BUTTONS'] .= '<div class="radio"><label>' . $element->get() . ' ' . $optionText[$i] . "</label></div>\n";
}
return PHPWS_Template::processTemplate($viewTags, 'phatform', 'radiobutton/view.tpl');
}
示例7: view
/**
* View this PHAT_Multiselect
*
* @return string The HTML content to view the PHAT_Multiselect
* @access public
*/
function view()
{
$label = $this->getLabel();
if (isset($_REQUEST['PHAT_' . $label]) && is_array($_REQUEST['PHAT_' . $label])) {
$this->setValue($_REQUEST['PHAT_' . $label]);
}
if ($this->isRequired()) {
$viewTags['REQUIRED_FLAG'] = '*';
}
$viewTags['BLURB'] = PHPWS_Text::parseOutput($this->_blurb, ENCODE_PARSED_TEXT, false, true);
$optionText = $this->getOptionText();
$optionValues = $this->getOptionValues();
for ($i = 0; $i < sizeof($optionText); $i++) {
$options[$optionValues[$i]] = $optionText[$i];
}
$multiselect = new Form_Multiple('PHAT_' . $label, $options);
$multiselect->setMatch($this->getValue());
$multiselect->setId($multiselect->name);
$viewTags['ID'] = $multiselect->getId();
$viewTags['MULTISELECT'] = $multiselect->get();
return PHPWS_Template::processTemplate($viewTags, 'phatform', 'multiselect/view.tpl');
}
示例8: testEditors
function testEditors($text)
{
if ($_SESSION["OBJ_user"]->allow_access("xwysiwyg", "settings")) {
$this->content .= "<a href=\"" . $this->linkRef . "&action=admin" . "\">" . $_SESSION['translate']->it("Back to administration") . "</a>";
$tags = array();
$tags["TESTAREA"] = PHPWS_WizardBag::js_insert("wysiwyg", "xw_test_form", "xw_testarea") . PHPWS_Form::formTextArea("xw_testarea", $text, 10, 70);
$tags["SUBMIT_BUTTON"] = PHPWS_Form::formSubmit($_SESSION["translate"]->it("Save"));
$elements[0] = PHPWS_Form::formHidden("module", "xwysiwyg");
$elements[0] .= PHPWS_Form::formHidden("action", "testEditor");
$elements[0] .= PHPWS_Template::processTemplate($tags, "xwysiwyg", "test_editor.tpl");
$this->content .= PHPWS_Form::makeForm("xw_test_form", "index.php", $elements, "post", FALSE, TRUE);
$this->content .= "<hr /><br />" . PHPWS_Text::parseOutput($text);
} else {
$this->content .= $_SESSION['translate']->it("Access was denied due to lack of proper permissions.");
}
// End of ADMINISTRATOR condition
}
示例9: getDescription
public function getDescription()
{
return PHPWS_Text::parseOutput($this->description);
}
示例10: view
/**
*
*
*
*
*/
function view($showLinks = TRUE)
{
/* Find the key into the entries array for the selected entry */
foreach ($this->_entries as $entryKey => $entryValue) {
if ($entryValue['id'] == $_REQUEST['PHAT_ENTRY_ID']) {
break;
}
}
/* Get the data for the selected entry from the database */
$sql = 'SELECT * FROM ' . $this->getFormTable() . " WHERE id='" . $_REQUEST['PHAT_ENTRY_ID'] . "'";
$entry = PHPWS_DB::getRow($sql);
$rowClass = NULL;
$entryTags = array();
$entryTags['ENTRY_DATA'] = NULL;
/* Step through the entries values and feed them through the entryRow template */
$toggle = 1;
foreach ($entry as $key => $value) {
$rowTags = array();
if ($key == 'position') {
continue;
} elseif ($key == 'updated') {
$value = date(PHPWS_DATE_FORMAT . ' ' . PHPWS_TIME_FORMAT, $value);
}
$attribute = ' class="bgcolor1" ';
/* Toggle the row colors for better visability */
if ($toggle % 2) {
$rowClass = $attribute;
} else {
$rowClass = null;
}
$toggle++;
if (isset($rowClass)) {
$rowTags['ROW_CLASS'] = $rowClass;
}
$rowTags['ENTRY_LABEL'] = $key;
if (preg_match('/a:\\d+:{/', $value)) {
$rowTags['ENTRY_VALUE'] = implode(', ', unserialize($value));
} else {
$rowTags['ENTRY_VALUE'] = PHPWS_Text::parseOutput($value, ENCODE_PARSED_TEXT, false, true);
}
$entryTags['ENTRY_DATA'] .= PHPWS_Template::processTemplate($rowTags, 'phatform', 'report/entryRow.tpl');
}
if (isset($this->archive)) {
$entryTags['BACK_LINK'] = $_SESSION['PHAT_advViews']->getArchiveViewLink();
}
if ($showLinks && !isset($_REQUEST['lay_quiet'])) {
$entryTags['PRINT'] = '<a href="index.php?module=phatform&PHAT_REPORT_OP=view&PHAT_ENTRY_ID=' . $_REQUEST['PHAT_ENTRY_ID'] . '&lay_quiet=1" target="_blank">' . dgettext('phatform', 'Print View') . '</a>';
/* Show the next and/or previous links to step through entries */
if ($entryKey < sizeof($this->_entries) - 1) {
$entryTags['NEXT'] = '<a href="index.php?module=phatform&PHAT_REPORT_OP=view&PHAT_ENTRY_ID=' . $this->_entries[$entryKey + 1]['id'] . '">' . dgettext('phatform', 'Next Entry') . '</a>';
}
if ($entryKey > 0) {
$entryTags['PREVIOUS'] = '<a href="index.php?module=phatform&PHAT_REPORT_OP=view&PHAT_ENTRY_ID=' . $this->_entries[$entryKey - 1]['id'] . '">' . dgettext('phatform', 'Previous Entry') . '</a>';
}
}
$GLOBALS['CNT_phatform']['title'] = $_SESSION['PHAT_FormManager']->form->getLabel();
/* Return the entire processed entry */
if (isset($_REQUEST['lay_quiet'])) {
echo PHPWS_Template::processTemplate($entryTags, 'phatform', 'report/entry.tpl');
} else {
return PHPWS_Template::processTemplate($entryTags, 'phatform', 'report/entry.tpl');
}
}
示例11: postHeader
public function postHeader()
{
PHPWS_Core::initModClass('pagesmith', 'PS_Text.php');
$header = strip_tags($_POST['header'], PS_ALLOWED_HEADER_TAGS);
$section = new PS_Text();
$section->pid = $_POST['pid'];
$section->secname = $_POST['section_name'];
$section->content = PHPWS_Text::parseInput($header);
$section->setSaved();
$vars['cnt_section_name'] = $_POST['tpl'] . '-' . $_POST['section_name'];
//$vars['hdn_section_name'] = sprintf('pagesmith_%s', $_POST['section_name']);
$vars['content'] = addslashes(PHPWS_Text::parseOutput($section->content));
$vars['hidden_value'] = $section->content;
Layout::nakedDisplay(javascriptMod('pagesmith', 'update', $vars));
}
示例12: whatsnewBlock
public static function whatsnewBlock()
{
if (PHPWS_Settings::get('whatsnew', 'cache_timeout') > 0) {
$cache_key = 'whatsnew_cache_key';
$content = PHPWS_Cache::get($cache_key, PHPWS_Settings::get('whatsnew', 'cache_timeout'));
if (!empty($content)) {
return $content;
}
}
$link = null;
$summary = null;
$date = null;
$module_name = null;
$exclude = unserialize(PHPWS_Settings::get('whatsnew', 'exclude'));
$db = new PHPWS_DB('phpws_key');
$db->addJoin('left', 'phpws_key', 'modules', 'module', 'title');
$db->addWhere('active', 1);
$db->addWhere('restricted', 0);
if ($exclude) {
foreach ($exclude as $module) {
$db->addWhere('module', $module, '!=');
}
}
$db->addOrder('update_date desc');
$db->setLimit(PHPWS_Settings::get('whatsnew', 'qty_items'));
$db->setIndexBy('id');
$db->addColumn('phpws_key.url');
$db->addColumn('phpws_key.title');
$db->addColumn('phpws_key.summary');
$db->addColumn('phpws_key.update_date');
$db->addColumn('modules.title', null, 'module_title');
$db->addColumn('modules.proper_name');
// $db->setTestMode();
$result = $db->select();
$tpl['TITLE'] = PHPWS_Text::parseOutput(PHPWS_Settings::get('whatsnew', 'title'));
$tpl['TEXT'] = PHPWS_Text::parseOutput(PHPWS_Settings::get('whatsnew', 'text'));
if (!PHPWS_Error::logIfError($result) && !empty($result)) {
foreach ($result as $item) {
$link = '<a href="' . $item['url'] . '">' . $item['title'] . '</a>';
if (PHPWS_Settings::get('whatsnew', 'show_summaries')) {
$summary = PHPWS_Text::parseOutput($item['summary']);
}
if (PHPWS_Settings::get('whatsnew', 'show_dates')) {
$date = strftime(WHATSNEW_DATE_FORMAT, $item['update_date']);
}
if (PHPWS_Settings::get('whatsnew', 'show_source_modules')) {
$module_name = dgettext($item['module_title'], PHPWS_Text::parseOutput($item['proper_name']));
}
$tpl['new-items'][] = array('LINK' => $link, 'SUMMARY' => $summary, 'DATE' => $date, 'MODULE_NAME' => $module_name);
}
} else {
$tpl['new-items'][] = array('LINK' => dgettext('whatsnew', 'Sorry, no results'));
}
$content = PHPWS_Template::process($tpl, 'whatsnew', 'block.tpl');
if (PHPWS_Settings::get('whatsnew', 'cache_timeout') > 0 && !Current_User::isLogged() && !Current_User::allow('whatsnew')) {
PHPWS_Cache::save($cache_key, $content);
}
return $content;
}
示例13: getSummary
function getSummary($parse = TRUE)
{
if ($parse) {
return PHPWS_Text::parseOutput($this->summary);
}
return $this->summary;
}
示例14: getSummary
public function getSummary($print = false)
{
if (empty($this->summary)) {
return null;
}
if ($print) {
return PHPWS_Text::parseOutput($this->summary);
} else {
return $this->summary;
}
}
示例15: getExtra3
public function getExtra3()
{
return PHPWS_Text::parseOutput($this->extra3);
}