SproutCMS

This is the code documentation for the SproutCMS project

class Text

Various text helpers such as limiting.

Source code (124 results)

/config/branding.php   Highlighted file source

Line 2: use Sprout\Helpers\Text;
Line 30: $config['copyright_html'] = '&copy; ' . Text::copyright('2015') . ' <a href="http://www.karmabunny.com.au/">Karmabunny</a>';

/config/branding.php   Highlighted file source

Line 2: use Sprout\Helpers\Text;
Line 30: $config['copyright_html'] = '&copy; ' . Text::copyright('2015') . ' <a href="http://www.karmabunny.com.au/">Karmabunny</a>';

/config/sprout.php   Highlighted file source

Line 24: * Rich text field type
Line 25: * 'TinyMCE4', 'Textarea'
Line 27: $config['rich_text_type'] = 'TinyMCE4';

/config/sprout.php   Highlighted file source

Line 24: * Rich text field type
Line 25: * 'TinyMCE4', 'Textarea'
Line 27: $config['rich_text_type'] = 'TinyMCE4';

/modules/Welcome/Controllers/WelcomeController.php   Highlighted file source

Line 764: $data['type'] = 'RichText';
Line 765: $data['settings'] = json_encode(['text' => $content]);
Line 778: $data['text'] = '<p>There\'s a voice that keeps on calling me. Down the road, that\'s where I\'ll always be.</p>'

/skin/default/partials/_footer.php   Highlighted file source

Line 3: use Sprout\Helpers\Text;
Line 55: <div class="field-element field-element--text field-element--white field-element--hidden-label">
Line 60: <input id="enews-first-name" class="textbox" type="text" name="first_name" placeholder="Name">
Line 63: <div class="field-element field-element--text field-element--white field-element--hidden-label">
Line 68: <input id="enews-email" class="textbox" type="text" name="email" placeholder="Email Address">
Line 89: <div class="footer__text">
Line 90: <p>Copyright &copy; <?php echo Enc::html(Text::copyright('2017')); ?> <?php echo Enc::html(Kohana::config('sprout.site_title')); ?>

/skin/default/partials/_footer.php   Highlighted file source

Line 3: use Sprout\Helpers\Text;
Line 55: <div class="field-element field-element--text field-element--white field-element--hidden-label">
Line 60: <input id="enews-first-name" class="textbox" type="text" name="first_name" placeholder="Name">
Line 63: <div class="field-element field-element--text field-element--white field-element--hidden-label">
Line 68: <input id="enews-email" class="textbox" type="text" name="email" placeholder="Email Address">
Line 89: <div class="footer__text">
Line 90: <p>Copyright &copy; <?php echo Enc::html(Text::copyright('2017')); ?> <?php echo Enc::html(Kohana::config('sprout.site_title')); ?>

/skin/default/partials/_promos-three.php   Highlighted file source

Line 5: use Sprout\Helpers\Text;
Line 39: echo Text::richtext(Text::limitWords($promo['description'], 20));

/skin/default/partials/_promos-three.php   Highlighted file source

Line 5: use Sprout\Helpers\Text;
Line 39: echo Text::richtext(Text::limitWords($promo['description'], 20));

/sprout/Controllers/Admin/ActionLogAdminController.php   Highlighted file source

Line 31: use Sprout\Helpers\RefineWidgetTextbox;
Line 68: $this->refine_bar->addWidget(new RefineWidgetTextbox('record_table', 'Table'));
Line 69: $this->refine_bar->addWidget(new RefineWidgetTextbox('record_id', 'Record ID'));
Line 70: $this->refine_bar->addWidget(new RefineWidgetTextbox('modified_editor', 'Editor'));

/sprout/Controllers/Admin/ActionLogAdminController.php   Highlighted file source

Line 31: use Sprout\Helpers\RefineWidgetTextbox;
Line 68: $this->refine_bar->addWidget(new RefineWidgetTextbox('record_table', 'Table'));
Line 69: $this->refine_bar->addWidget(new RefineWidgetTextbox('record_id', 'Record ID'));
Line 70: $this->refine_bar->addWidget(new RefineWidgetTextbox('modified_editor', 'Editor'));

/sprout/Controllers/Admin/ContentSubscriptionAdminController.php   Highlighted file source

Line 20: use Sprout\Helpers\RefineWidgetTextbox;
Line 48: $this->refine_bar->addWidget(new RefineWidgetTextbox('name', 'Name'));
Line 49: $this->refine_bar->addWidget(new RefineWidgetTextbox('email', 'Email'));

/sprout/Controllers/Admin/ContentSubscriptionAdminController.php   Highlighted file source

Line 20: use Sprout\Helpers\RefineWidgetTextbox;
Line 48: $this->refine_bar->addWidget(new RefineWidgetTextbox('name', 'Name'));
Line 49: $this->refine_bar->addWidget(new RefineWidgetTextbox('email', 'Email'));

/sprout/Controllers/Admin/CronJobAdminController.php   Highlighted file source

Line 23: use Sprout\Helpers\RefineWidgetTextbox;
Line 58: $this->refine_bar->addWidget(new RefineWidgetTextbox('name', 'Name'));
Line 166: header('Content-type: text/plain');

/sprout/Controllers/Admin/CronJobAdminController.php   Highlighted file source

Line 23: use Sprout\Helpers\RefineWidgetTextbox;
Line 58: $this->refine_bar->addWidget(new RefineWidgetTextbox('name', 'Name'));
Line 166: header('Content-type: text/plain');

/sprout/Controllers/Admin/EmailTextAdminController.php   Highlighted file source

Line 16: use Sprout\Helpers\EmailText;
Line 22: * Handles most processing for Email text
Line 24: class EmailTextAdminController extends ManagedAdminController
Line 26: protected $controller_name = 'email_text';
Line 27: protected $friendly_name = 'Email text';
Line 67: $view->field_defs = EmailText::getFieldDefs($view->data['name']);
Line 97: $valid->required(['text']);
Line 98: $valid->check('text', 'Validity::length', 0, 5000);
Line 107: $update_fields['text'] = $_POST['text'];

/sprout/Controllers/Admin/EmailTextAdminController.php   Highlighted file source

Line 16: use Sprout\Helpers\EmailText;
Line 22: * Handles most processing for Email text
Line 24: class EmailTextAdminController extends ManagedAdminController
Line 26: protected $controller_name = 'email_text';
Line 27: protected $friendly_name = 'Email text';
Line 67: $view->field_defs = EmailText::getFieldDefs($view->data['name']);
Line 97: $valid->required(['text']);
Line 98: $valid->check('text', 'Validity::length', 0, 5000);
Line 107: $update_fields['text'] = $_POST['text'];

/sprout/Controllers/Admin/FileAdminController.php   Highlighted file source

Line 44: use Sprout\Helpers\RefineWidgetTextbox;
Line 49: use Sprout\Helpers\Text;
Line 92: $this->refine_bar->addWidget(new RefineWidgetTextbox('name', 'Name'));
Line 94: $this->refine_bar->addWidget(new RefineWidgetTextbox('filename', 'Filename'));
Line 310: $ext = strtolower(File::getExt($_GET['file']['name']));
Line 462: $temp_path .= '.' . File::getExt($filename);
Line 621: $ext = File::getExt($filename);
Line 678: // Update file name and do image resizing, text indexing, and other postprocessing
Line 730: // Clean up and prepare text preview
Line 731: $preview = trim(Enc::cleanFunky($view->data['plaintext']));
Line 732: $preview = Text::limitWords($preview, 50, '...');
Line 814: $ext = File::getExt($new_filename);
Line 817: $plain = FileIndexing::getPlaintext($new_filename, $ext);
Line 936: $this->reindexItem($item_id, $_POST['name'], $file['plaintext'], $data['enable_indexing']);
Line 1017: * @param string $plaintext
Line 1021: private function reindexItem($item_id, $name, $plaintext, $enabled = true)
Line 1032: $res = Search::indexText($name, 4);
Line 1035: if ($plaintext) {
Line 1036: $res = Search::indexHtml($plaintext, 1);
Line 1056: $q = "SELECT id, name, filename, plaintext, enable_indexing FROM ~files";
Line 1062: if ($row['plaintext'] == '') {
Line 1063: $ext = File::getExt($row['filename']);
Line 1066: $plain = FileIndexing::getPlaintext($row['filename'], $ext);
Line 1068: Pdb::update('files', ['plaintext' => $plain], ['id' => $row['id']]);
Line 1073: $this->reindexItem($row['id'], $row['name'], $plain ?: $row['plaintext'], $row['enable_indexing']);
Line 1092: $q = "SELECT name, filename, plaintext, enable_indexing FROM sprout_files WHERE id = ?";
Line 1098: $text = strip_tags($row['plaintext']);
Line 1099: $text = substr($text, 0, 5000);
Line 1101: // Look for the first keyword in the text
Line 1106: if (preg_match("/(^|\W){$k}($|\W)/i", $text, $matches, PREG_OFFSET_CAPTURE)) {
Line 1115: $text = '...' . substr($text, $pos);
Line 1120: $text = Text::limitWords($text, 40, '...');
Line 1127: $text = preg_replace("/(^|\W)({$k})($|\W)/i", '$1<b>$2</b>$3', $text);
Line 1133: $view->text = $text;

/sprout/Controllers/Admin/FileAdminController.php   Highlighted file source

Line 44: use Sprout\Helpers\RefineWidgetTextbox;
Line 49: use Sprout\Helpers\Text;
Line 92: $this->refine_bar->addWidget(new RefineWidgetTextbox('name', 'Name'));
Line 94: $this->refine_bar->addWidget(new RefineWidgetTextbox('filename', 'Filename'));
Line 310: $ext = strtolower(File::getExt($_GET['file']['name']));
Line 462: $temp_path .= '.' . File::getExt($filename);
Line 621: $ext = File::getExt($filename);
Line 678: // Update file name and do image resizing, text indexing, and other postprocessing
Line 730: // Clean up and prepare text preview
Line 731: $preview = trim(Enc::cleanFunky($view->data['plaintext']));
Line 732: $preview = Text::limitWords($preview, 50, '...');
Line 814: $ext = File::getExt($new_filename);
Line 817: $plain = FileIndexing::getPlaintext($new_filename, $ext);
Line 936: $this->reindexItem($item_id, $_POST['name'], $file['plaintext'], $data['enable_indexing']);
Line 1017: * @param string $plaintext
Line 1021: private function reindexItem($item_id, $name, $plaintext, $enabled = true)
Line 1032: $res = Search::indexText($name, 4);
Line 1035: if ($plaintext) {
Line 1036: $res = Search::indexHtml($plaintext, 1);
Line 1056: $q = "SELECT id, name, filename, plaintext, enable_indexing FROM ~files";
Line 1062: if ($row['plaintext'] == '') {
Line 1063: $ext = File::getExt($row['filename']);
Line 1066: $plain = FileIndexing::getPlaintext($row['filename'], $ext);
Line 1068: Pdb::update('files', ['plaintext' => $plain], ['id' => $row['id']]);
Line 1073: $this->reindexItem($row['id'], $row['name'], $plain ?: $row['plaintext'], $row['enable_indexing']);
Line 1092: $q = "SELECT name, filename, plaintext, enable_indexing FROM sprout_files WHERE id = ?";
Line 1098: $text = strip_tags($row['plaintext']);
Line 1099: $text = substr($text, 0, 5000);
Line 1101: // Look for the first keyword in the text
Line 1106: if (preg_match("/(^|\W){$k}($|\W)/i", $text, $matches, PREG_OFFSET_CAPTURE)) {
Line 1115: $text = '...' . substr($text, $pos);
Line 1120: $text = Text::limitWords($text, 40, '...');
Line 1127: $text = preg_replace("/(^|\W)({$k})($|\W)/i", '$1<b>$2</b>$3', $text);
Line 1133: $view->text = $text;

/sprout/Controllers/Admin/ManagedAdminController.php   Highlighted file source

Line 40: use Sprout\Helpers\RefineWidgetTextbox;
Line 204: $this->refine_bar->addWidget(new RefineWidgetTextbox('_all_tag', 'All the tags'));
Line 205: $this->refine_bar->addWidget(new RefineWidgetTextbox('_any_tag', 'Any of the tags'));
Line 228: $this->refine_bar->addWidget(new RefineWidgetTextbox('name', 'Name'));
Line 471: return array('type' => 'text/csv; charset=UTF-8', 'filename' => $filename . '.csv', 'data' => $data);
Line 556: $view->extra_options = $this->_importExtraOptions();
Line 755: protected function _importExtraOptions () { return null; }

/sprout/Controllers/Admin/ManagedAdminController.php   Highlighted file source

Line 40: use Sprout\Helpers\RefineWidgetTextbox;
Line 204: $this->refine_bar->addWidget(new RefineWidgetTextbox('_all_tag', 'All the tags'));
Line 205: $this->refine_bar->addWidget(new RefineWidgetTextbox('_any_tag', 'Any of the tags'));
Line 228: $this->refine_bar->addWidget(new RefineWidgetTextbox('name', 'Name'));
Line 471: return array('type' => 'text/csv; charset=UTF-8', 'filename' => $filename . '.csv', 'data' => $data);
Line 556: $view->extra_options = $this->_importExtraOptions();
Line 755: protected function _importExtraOptions () { return null; }

/sprout/Controllers/Admin/OperatorAdminController.php   Highlighted file source

Line 22: use Sprout\Helpers\EmailText;
Line 83: $tools[] = '<li class="config"><a href="' . EmailText::adminEditUrl('operator.welcome') . '">Edit welcome message email</a></li>';
Line 257: $text = EmailText::getHtml('operator.welcome', $_POST);
Line 258: if (trim(strip_tags($text)) != '') {
Line 262: $mail->SkinnedHTML($text);

/sprout/Controllers/Admin/OperatorAdminController.php   Highlighted file source

Line 22: use Sprout\Helpers\EmailText;
Line 83: $tools[] = '<li class="config"><a href="' . EmailText::adminEditUrl('operator.welcome') . '">Edit welcome message email</a></li>';
Line 257: $text = EmailText::getHtml('operator.welcome', $_POST);
Line 258: if (trim(strip_tags($text)) != '') {
Line 262: $mail->SkinnedHTML($text);

/sprout/Controllers/Admin/PageAdminController.php   Highlighted file source

Line 56: use Sprout\Helpers\RefineWidgetTextbox;
Line 63: use Sprout\Helpers\TinyMCE4RichText;
Line 91: $this->refine_bar->addWidget(new RefineWidgetTextbox('name', 'Name'));
Line 94: $this->refine_bar->addWidget(new RefineWidgetTextbox('_keyword', 'Keyword search'));
Line 95: $this->refine_bar->addWidget(new RefineWidgetTextbox('_phrase', 'Exact phrase'));
Line 131: WHERE rev.status = ? AND rev.text LIKE CONCAT('%', ?, '%'))";
Line 496: $ext = File::getExt($_FILES['import']['name']);
Line 818: 'text' => $html,
Line 824: $update_fields['type'] = 'RichText';
Line 833: // Do indexing on the page text
Line 912: TinyMCE4RichText::needs();
Line 998: // Load widgets and collate rich text as page text
Line 999: $text = '';
Line 1010: // Embedded rich text widgets
Line 1011: if ($widget['area_id'] == 1 and $widget['type'] == 'RichText') {
Line 1013: if ($text) $text .= "\n";
Line 1014: $text .= $settings['text'];
Line 1021: preg_match_all('/<img.*?src="(.*?)"/', $text, $matches);
Line 1028: AdminSeo::addContent($text);
Line 1121: // Richtext width and height
Line 1122: $richtext_width = Kohana::config('sprout.admin_richtext_width');
Line 1123: $richtext_height = Kohana::config('sprout.admin_richtext_height');
Line 1124: if (!$richtext_width) $richtext_width = 700;
Line 1125: if (!$richtext_height) $richtext_height = 500;
Line 1152: $view->richtext_width = $richtext_width;
Line 1153: $view->richtext_height = $richtext_height;
Line 1160: $view->text = $text;
Line 1179: * Gets the text of a single revision
Line 1181: * @param int $id The revision to get the text of
Line 1190: $out['text'] = $rev['text'];
Line 1257: * Makes the provided html text be in a standard format to ensure the integrity of the change check
Line 1259: private function convertForChangeCheck($text)
Line 1261: $text = preg_replace('/^<!-- .+ -->/', '', trim($text));
Line 1262: return md5($text);
Line 1399: if ($widget['area_id'] != 1 or $widget['type'] != 'RichText') continue;
Line 1401: $new_text = preg_replace('/<img(.*?)src="' . preg_quote($replace_from, '/') . '"(.*?)>/', "<img\$1src=\"{$replace_to}\"\$2/>", $settings['text']);
Line 1402: if ($new_text != $settings['text']) {
Line 1403: $settings['text'] = $new_text;
Line 1584: // Update revision - if the text actually changed
Line 1722: // Do indexing on the page text, which is found in the embedded widgets
Line 1723: $text = Page::getText($page_id, $rev_id, $_SESSION['admin']['active_subsite']);
Line 1765: $res = $this->reindexItem($page_id, $_POST['name'], $text);
Line 1766: if (!$res) Notification::error('Failed to index page text');
Line 1863: if (!empty($enabled_extras['text'])) {
Line 1864: $update_data['text'] = $_POST['extras'][$page_id]['text'];
Line 1994: $q = "SELECT pages.name, revs.text
Line 2006: $q = "SELECT pages.id, pages.name, revs.text
Line 2011: WHERE revs.text LIKE CONCAT('%', ?, '%')";
Line 2017: $match = preg_match('/<a.*?href="' . preg_quote($url, '/') . '".*?>(.+?)<\/a>/', $row->text, $matches);
Line 2020: $items[] = array('id' => $row['id'], 'name' => $row['name'], 'text' => $matches[1]);
Line 2029: 'Link text' => 'text',
Line 2037: $res = preg_match_all('/<a.*?href="(.+?)".*?>(.+?)<\/a>/i', $view->page->text, $matches, PREG_SET_ORDER);
Line 2041: $items[] = array('id' => $match[1], 'url' => $match[1], 'text' => $match[2]);
Line 2048: 'Link text' => 'text',
Line 2125: private function reindexItem($item_id, $name, $text)
Line 2132: $res = Search::indexHtml($text, 1);
Line 2135: $res = Search::indexText($name, 4);
Line 2158: AND widget.area_id = 1 AND widget.active = 1 AND widget.type = 'RichText'
Line 2165: $pages[$row['id']] = ['name' => $row['name'], 'text' => ''];
Line 2170: $pages[$row['id']] = ['name' => $row['name'], 'text' => $settings['text']];
Line 2172: $pages[$row['id']]['text'] .= "\n" . $settings['text'];
Line 2184: $this->reindexItem($id, $page['name'], $page['text']);

/sprout/Controllers/Admin/PageAdminController.php   Highlighted file source

Line 56: use Sprout\Helpers\RefineWidgetTextbox;
Line 63: use Sprout\Helpers\TinyMCE4RichText;
Line 91: $this->refine_bar->addWidget(new RefineWidgetTextbox('name', 'Name'));
Line 94: $this->refine_bar->addWidget(new RefineWidgetTextbox('_keyword', 'Keyword search'));
Line 95: $this->refine_bar->addWidget(new RefineWidgetTextbox('_phrase', 'Exact phrase'));
Line 131: WHERE rev.status = ? AND rev.text LIKE CONCAT('%', ?, '%'))";
Line 496: $ext = File::getExt($_FILES['import']['name']);
Line 818: 'text' => $html,
Line 824: $update_fields['type'] = 'RichText';
Line 833: // Do indexing on the page text
Line 912: TinyMCE4RichText::needs();
Line 998: // Load widgets and collate rich text as page text
Line 999: $text = '';
Line 1010: // Embedded rich text widgets
Line 1011: if ($widget['area_id'] == 1 and $widget['type'] == 'RichText') {
Line 1013: if ($text) $text .= "\n";
Line 1014: $text .= $settings['text'];
Line 1021: preg_match_all('/<img.*?src="(.*?)"/', $text, $matches);
Line 1028: AdminSeo::addContent($text);
Line 1121: // Richtext width and height
Line 1122: $richtext_width = Kohana::config('sprout.admin_richtext_width');
Line 1123: $richtext_height = Kohana::config('sprout.admin_richtext_height');
Line 1124: if (!$richtext_width) $richtext_width = 700;
Line 1125: if (!$richtext_height) $richtext_height = 500;
Line 1152: $view->richtext_width = $richtext_width;
Line 1153: $view->richtext_height = $richtext_height;
Line 1160: $view->text = $text;
Line 1179: * Gets the text of a single revision
Line 1181: * @param int $id The revision to get the text of
Line 1190: $out['text'] = $rev['text'];
Line 1257: * Makes the provided html text be in a standard format to ensure the integrity of the change check
Line 1259: private function convertForChangeCheck($text)
Line 1261: $text = preg_replace('/^<!-- .+ -->/', '', trim($text));
Line 1262: return md5($text);
Line 1399: if ($widget['area_id'] != 1 or $widget['type'] != 'RichText') continue;
Line 1401: $new_text = preg_replace('/<img(.*?)src="' . preg_quote($replace_from, '/') . '"(.*?)>/', "<img\$1src=\"{$replace_to}\"\$2/>", $settings['text']);
Line 1402: if ($new_text != $settings['text']) {
Line 1403: $settings['text'] = $new_text;
Line 1584: // Update revision - if the text actually changed
Line 1722: // Do indexing on the page text, which is found in the embedded widgets
Line 1723: $text = Page::getText($page_id, $rev_id, $_SESSION['admin']['active_subsite']);
Line 1765: $res = $this->reindexItem($page_id, $_POST['name'], $text);
Line 1766: if (!$res) Notification::error('Failed to index page text');
Line 1863: if (!empty($enabled_extras['text'])) {
Line 1864: $update_data['text'] = $_POST['extras'][$page_id]['text'];
Line 1994: $q = "SELECT pages.name, revs.text
Line 2006: $q = "SELECT pages.id, pages.name, revs.text
Line 2011: WHERE revs.text LIKE CONCAT('%', ?, '%')";
Line 2017: $match = preg_match('/<a.*?href="' . preg_quote($url, '/') . '".*?>(.+?)<\/a>/', $row->text, $matches);
Line 2020: $items[] = array('id' => $row['id'], 'name' => $row['name'], 'text' => $matches[1]);
Line 2029: 'Link text' => 'text',
Line 2037: $res = preg_match_all('/<a.*?href="(.+?)".*?>(.+?)<\/a>/i', $view->page->text, $matches, PREG_SET_ORDER);
Line 2041: $items[] = array('id' => $match[1], 'url' => $match[1], 'text' => $match[2]);
Line 2048: 'Link text' => 'text',
Line 2125: private function reindexItem($item_id, $name, $text)
Line 2132: $res = Search::indexHtml($text, 1);
Line 2135: $res = Search::indexText($name, 4);
Line 2158: AND widget.area_id = 1 AND widget.active = 1 AND widget.type = 'RichText'
Line 2165: $pages[$row['id']] = ['name' => $row['name'], 'text' => ''];
Line 2170: $pages[$row['id']] = ['name' => $row['name'], 'text' => $settings['text']];
Line 2172: $pages[$row['id']]['text'] .= "\n" . $settings['text'];
Line 2184: $this->reindexItem($id, $page['name'], $page['text']);

/sprout/Controllers/Admin/RedirectAdminController.php   Highlighted file source

Line 20: use Sprout\Helpers\RefineWidgetTextbox;
Line 63: $this->refine_bar->addWidget(new RefineWidgetTextbox('path_exact', 'Path exact match'));
Line 64: $this->refine_bar->addWidget(new RefineWidgetTextbox('path_contains', 'Path contains'));

/sprout/Controllers/Admin/RedirectAdminController.php   Highlighted file source

Line 20: use Sprout\Helpers\RefineWidgetTextbox;
Line 63: $this->refine_bar->addWidget(new RefineWidgetTextbox('path_exact', 'Path exact match'));
Line 64: $this->refine_bar->addWidget(new RefineWidgetTextbox('path_contains', 'Path contains'));

/sprout/Controllers/Admin/WorkerJobAdminController.php   Highlighted file source

Line 26: use Sprout\Helpers\RefineWidgetTextbox;
Line 61: $this->refine_bar->addWidget(new RefineWidgetTextbox('name', 'Name'));
Line 147: header('Content-type: text/plain');

/sprout/Controllers/Admin/WorkerJobAdminController.php   Highlighted file source

Line 26: use Sprout\Helpers\RefineWidgetTextbox;
Line 61: $this->refine_bar->addWidget(new RefineWidgetTextbox('name', 'Name'));
Line 147: header('Content-type: text/plain');

/sprout/Controllers/AdminController.php   Highlighted file source

Line 56: use Sprout\Helpers\Text;
Line 104: Register::docImport('txt', 'Sprout\\Helpers\\DocImport\\DocImportPlaintext', 'Plain text');
Line 673: $plaintext = FileIndexing::getPlaintext($_FILES['import']['tmp_name'], 'xls');
Line 674: if (! $plaintext) {
Line 678: $res = @file_put_contents($tempname, $plaintext);
Line 791: * @param string $message The message to show. Should be plain-text.
Line 926: * name Link text
Line 1080: if ($ctlr->_isAddSaved() and Text::containsFormTag($main['content'])) {
Line 1267: if ($ctlr->_isEditSaved($id) and Text::containsFormTag($main['content'])) {
Line 1340: $view->browser_title = Text::limitChars(strip_tags($main['title']), 50, '...');
Line 1442: if ($ctlr->_isDeleteSaved($id) and Text::containsFormTag($main['content'])) {
Line 1475: $view->browser_title = Text::limitChars(strip_tags($main['title']), 50, '...');
Line 1578: if (Text::containsFormTag($main['content'])) {
Line 1647: $view->browser_title = Text::limitChars(strip_tags($main['title']), 50, '...');
Line 1889: $method = '_extra' . ucfirst(Text::lc2camelCase($method));
Line 2210: echo 'h1,p { font-family: sans-serif; text-align: center; margin: 50px auto; }';

/sprout/Controllers/AdminController.php   Highlighted file source

Line 56: use Sprout\Helpers\Text;
Line 104: Register::docImport('txt', 'Sprout\\Helpers\\DocImport\\DocImportPlaintext', 'Plain text');
Line 673: $plaintext = FileIndexing::getPlaintext($_FILES['import']['tmp_name'], 'xls');
Line 674: if (! $plaintext) {
Line 678: $res = @file_put_contents($tempname, $plaintext);
Line 791: * @param string $message The message to show. Should be plain-text.
Line 926: * name Link text
Line 1080: if ($ctlr->_isAddSaved() and Text::containsFormTag($main['content'])) {
Line 1267: if ($ctlr->_isEditSaved($id) and Text::containsFormTag($main['content'])) {
Line 1340: $view->browser_title = Text::limitChars(strip_tags($main['title']), 50, '...');
Line 1442: if ($ctlr->_isDeleteSaved($id) and Text::containsFormTag($main['content'])) {
Line 1475: $view->browser_title = Text::limitChars(strip_tags($main['title']), 50, '...');
Line 1578: if (Text::containsFormTag($main['content'])) {
Line 1647: $view->browser_title = Text::limitChars(strip_tags($main['title']), 50, '...');
Line 1889: $method = '_extra' . ucfirst(Text::lc2camelCase($method));
Line 2210: echo 'h1,p { font-family: sans-serif; text-align: center; margin: 50px auto; }';

/sprout/Controllers/BaseController.php   Highlighted file source

Line 23: use Sprout\Helpers\Text;
Line 113: $class_name = Text::camel2lc($class_name);

/sprout/Controllers/BaseController.php   Highlighted file source

Line 23: use Sprout\Helpers\Text;
Line 113: $class_name = Text::camel2lc($class_name);

/sprout/Controllers/Controller.php   Highlighted file source

Line 31: use Sprout\Helpers\Text;
Line 396: $class = Text::camel2lc($class);

/sprout/Controllers/Controller.php   Highlighted file source

Line 31: use Sprout\Helpers\Text;
Line 396: $class = Text::camel2lc($class);

/sprout/Controllers/DbToolsController.php   Highlighted file source

Line 66: use Sprout\Helpers\Text;
Line 113: [ 'url' => 'dbtools/fileTypesIndexingSupport', 'name' => 'File indexing support', 'desc' => 'List of file types which can be indexed for full-text search' ],
Line 723: header('Content-type: text/csv');
Line 792: $ext = strtolower(File::getExt($_FILES['filename']['name']));
Line 824: if (File::getExt($tempname) == 'zip') {
Line 838: } else if (File::getExt($tempname) == 'sql') {
Line 871: if (File::getExt($tempname) == 'zip') {
Line 887: } else if (File::getExt($tempname) == 'sql') {
Line 991: * Returns a list of file types which can be indexed for fulltext search
Line 998: 'pdf' => 'pdftotext',
Line 1034: <script type="text/javascript">
Line 1053: <script type="text/javascript">
Line 1087: $where_options .= "<br><input type=\"text\" name=\"where[{$idx}]\"></p>";
Line 1118: echo '<p><input type="checkbox" name="split_size" value="1" checked> Split the export into chunks no bigger than <input type="text" name="split_amount" value="8m">. <small>(prefixes: k, m, g)</small></p>';
Line 1266: if (File::getExt($_FILES['filename']['name']) !== 'zip') {
Line 1289: header('Content-type: text/plain');
Line 1351: 'txt' => 'text/plain',
Line 1352: 'sql' => 'text/plain',
Line 1634: 'description' => 'TEXT',
Line 1642: 'notes' => 'TEXT',
Line 1649: 'text' => 'TEXT',
Line 1749: $input_method = 'Fb::text';
Line 1843: $text = file_get_contents($template_dir . $relative_name);
Line 1844: $text = self::mtTransform($text);
Line 1847: file_put_contents($new_name, $text);
Line 1973: $data['tables_cname'][$name] = Text::lc2camelCaps(Inflector::singular($name));
Line 2094: case 'TEXT':
Line 2104: $input_method = 'Fb::text';
Line 2199: $text = file_get_contents($template_dir . $relative_name);
Line 2200: $text = self::mtTransform($text);
Line 2203: file_put_contents($new_name, $text);
Line 2233: public static function mtTransform($text)
Line 2235: $text = str_replace('AUTHOR', $_POST['module_author'], $text);
Line 2236: $text = str_replace('MODULE', $_POST['module_name'], $text);
Line 2237: $text = str_replace('CNAME', $_POST['cname'], $text);
Line 2238: $text = str_replace('SNAME', $_POST['sname'], $text);
Line 2239: $text = str_replace('PNAME', $_POST['pname'], $text);
Line 2240: $text = str_replace('SNICE', $_POST['snice'], $text);
Line 2241: $text = str_replace('PNICE', $_POST['pnice'], $text);
Line 2242: $text = str_replace('SLWR', strtolower($_POST['snice']), $text);
Line 2243: $text = str_replace('PLWR', strtolower($_POST['pnice']), $text);
Line 2245: $text = str_replace('FIELDS_XML', $_POST['_fields_xml'], $text);
Line 2246: $text = str_replace('FIELDS_JSON', $_POST['_fields_json'], $text);
Line 2247: $text = str_replace('FIELDS_MANUAL', $_POST['_fields_manual'], $text);
Line 2248: $text = str_replace('FIELDS_MAIN', $_POST['_fields_main'], $text);
Line 2250: return $text;
Line 2350: echo Form::text('username', ['-wrapper-class' => 'white']);
Line 2355: echo Form::text('pass', ['-wrapper-class' => 'white']);
Line 2511: echo '<style type="text/css">';
Line 2609: echo Form::text('group', ['-wrapper-class' => 'white']);
Line 2670: $data .= "\t" . '<br><input type="text" name="m_' .
Line 2897: $ext = strtolower(File::getExt($_FILES['filename']['name']));

/sprout/Controllers/DbToolsController.php   Highlighted file source

Line 66: use Sprout\Helpers\Text;
Line 113: [ 'url' => 'dbtools/fileTypesIndexingSupport', 'name' => 'File indexing support', 'desc' => 'List of file types which can be indexed for full-text search' ],
Line 723: header('Content-type: text/csv');
Line 792: $ext = strtolower(File::getExt($_FILES['filename']['name']));
Line 824: if (File::getExt($tempname) == 'zip') {
Line 838: } else if (File::getExt($tempname) == 'sql') {
Line 871: if (File::getExt($tempname) == 'zip') {
Line 887: } else if (File::getExt($tempname) == 'sql') {
Line 991: * Returns a list of file types which can be indexed for fulltext search
Line 998: 'pdf' => 'pdftotext',
Line 1034: <script type="text/javascript">
Line 1053: <script type="text/javascript">
Line 1087: $where_options .= "<br><input type=\"text\" name=\"where[{$idx}]\"></p>";
Line 1118: echo '<p><input type="checkbox" name="split_size" value="1" checked> Split the export into chunks no bigger than <input type="text" name="split_amount" value="8m">. <small>(prefixes: k, m, g)</small></p>';
Line 1266: if (File::getExt($_FILES['filename']['name']) !== 'zip') {
Line 1289: header('Content-type: text/plain');
Line 1351: 'txt' => 'text/plain',
Line 1352: 'sql' => 'text/plain',
Line 1634: 'description' => 'TEXT',
Line 1642: 'notes' => 'TEXT',
Line 1649: 'text' => 'TEXT',
Line 1749: $input_method = 'Fb::text';
Line 1843: $text = file_get_contents($template_dir . $relative_name);
Line 1844: $text = self::mtTransform($text);
Line 1847: file_put_contents($new_name, $text);
Line 1973: $data['tables_cname'][$name] = Text::lc2camelCaps(Inflector::singular($name));
Line 2094: case 'TEXT':
Line 2104: $input_method = 'Fb::text';
Line 2199: $text = file_get_contents($template_dir . $relative_name);
Line 2200: $text = self::mtTransform($text);
Line 2203: file_put_contents($new_name, $text);
Line 2233: public static function mtTransform($text)
Line 2235: $text = str_replace('AUTHOR', $_POST['module_author'], $text);
Line 2236: $text = str_replace('MODULE', $_POST['module_name'], $text);
Line 2237: $text = str_replace('CNAME', $_POST['cname'], $text);
Line 2238: $text = str_replace('SNAME', $_POST['sname'], $text);
Line 2239: $text = str_replace('PNAME', $_POST['pname'], $text);
Line 2240: $text = str_replace('SNICE', $_POST['snice'], $text);
Line 2241: $text = str_replace('PNICE', $_POST['pnice'], $text);
Line 2242: $text = str_replace('SLWR', strtolower($_POST['snice']), $text);
Line 2243: $text = str_replace('PLWR', strtolower($_POST['pnice']), $text);
Line 2245: $text = str_replace('FIELDS_XML', $_POST['_fields_xml'], $text);
Line 2246: $text = str_replace('FIELDS_JSON', $_POST['_fields_json'], $text);
Line 2247: $text = str_replace('FIELDS_MANUAL', $_POST['_fields_manual'], $text);
Line 2248: $text = str_replace('FIELDS_MAIN', $_POST['_fields_main'], $text);
Line 2250: return $text;
Line 2350: echo Form::text('username', ['-wrapper-class' => 'white']);
Line 2355: echo Form::text('pass', ['-wrapper-class' => 'white']);
Line 2511: echo '<style type="text/css">';
Line 2609: echo Form::text('group', ['-wrapper-class' => 'white']);
Line 2670: $data .= "\t" . '<br><input type="text" name="m_' .
Line 2897: $ext = strtolower(File::getExt($_FILES['filename']['name']));

/sprout/Controllers/FileController.php   Highlighted file source

Line 87: $embed_text = $row['author'];
Line 89: $embed_text = false;
Line 130: if ($embed_text) $img->addText($embed_text);
Line 139: if ($embed_text) $img->addText($embed_text);
Line 206: if ($embed_text) $img->addText($embed_text);

/sprout/Controllers/FileController.php   Highlighted file source

Line 87: $embed_text = $row['author'];
Line 89: $embed_text = false;
Line 130: if ($embed_text) $img->addText($embed_text);
Line 139: if ($embed_text) $img->addText($embed_text);
Line 206: if ($embed_text) $img->addText($embed_text);

/sprout/Controllers/PageController.php   Highlighted file source

Line 41: use Sprout\Helpers\Text;
Line 344: $capped = Text::plain($content_html, 20);
Line 356: * Makes alterations to the main text content
Line 358: private function textTranslation($page_id, $text)
Line 360: $text = ContentReplace::intlinks($text);
Line 361: $text = ContentReplace::embedWidgets($text, 'page', $page_id);
Line 362: $text = ContentReplace::localanchor($text);
Line 363: return $text;
Line 420: header('Content-type: text/css; charset=UTF-8');
Line 440: // Collate widgets to produce page text
Line 441: $text = Page::getText($item_id);
Line 443: $text = Text::plain($text, 0);
Line 444: $text = substr($text, 0, 5000);
Line 446: if ($text == '') return false;
Line 448: // Look for the first keyword in the text
Line 453: if (preg_match("/(^|\W){$k}($|\W)/i", $text, $matches, PREG_OFFSET_CAPTURE)) {
Line 462: $text = '...' . substr($text, $pos);
Line 467: $text = Text::limitWords($text, 40, '...');
Line 473: $text = preg_replace("/(^|\W)({$k})($|\W)/i", '$1<b>$2</b>$3', $text);
Line 479: $view->text = $text;

/sprout/Controllers/PageController.php   Highlighted file source

Line 41: use Sprout\Helpers\Text;
Line 344: $capped = Text::plain($content_html, 20);
Line 356: * Makes alterations to the main text content
Line 358: private function textTranslation($page_id, $text)
Line 360: $text = ContentReplace::intlinks($text);
Line 361: $text = ContentReplace::embedWidgets($text, 'page', $page_id);
Line 362: $text = ContentReplace::localanchor($text);
Line 363: return $text;
Line 420: header('Content-type: text/css; charset=UTF-8');
Line 440: // Collate widgets to produce page text
Line 441: $text = Page::getText($item_id);
Line 443: $text = Text::plain($text, 0);
Line 444: $text = substr($text, 0, 5000);
Line 446: if ($text == '') return false;
Line 448: // Look for the first keyword in the text
Line 453: if (preg_match("/(^|\W){$k}($|\W)/i", $text, $matches, PREG_OFFSET_CAPTURE)) {
Line 462: $text = '...' . substr($text, $pos);
Line 467: $text = Text::limitWords($text, 40, '...');
Line 473: $text = preg_replace("/(^|\W)({$k})($|\W)/i", '$1<b>$2</b>$3', $text);
Line 479: $view->text = $text;

/sprout/Helpers/Admin.php   Highlighted file source

Line 118: * type string Class name, e.g. 'RichText'
Line 135: echo '<script type="text/javascript">';
Line 209: $content = $tiles['Text blocks'];
Line 212: unset($tiles['Text blocks'], $tiles['Collections'], $tiles['Advanced']);
Line 269: * @param string $top_text Text for the top (id 0) item
Line 271: public static function pageDropdown($field_name, $selected = null, $exclude = null, $subsite_id = null, $top_text = 'None (top level page)')
Line 292: $name = Enc::html(Text::limitChars($node['name'], 35, '...'));
Line 533: echo '<div class="field-element field-element--white field-element--text field-element--small">';
Line 535: echo '<div class="field-input"><input type="text" id="onthefly-catadd" spellcheck="true" class="textbox" placeholder="Category name"></div>';

/sprout/Helpers/AdminSeo.php   Highlighted file source

Line 20: use DaveChild\TextStatistics\Maths;
Line 21: use DaveChild\TextStatistics\Syllables as Syllables;
Line 22: use DaveChild\TextStatistics\Text as TextDC;
Line 60: * @param array $links [href, text] pairs
Line 77: $str = TextDC::cleanText($str);
Line 108: $str = TextDC::cleanText($str, 0);
Line 194: $text = trim(preg_replace("/[\r\n]/", " ", $link->nodeValue));
Line 197: 'text' => $text
Line 226: * @param string $str Text to score
Line 227: * @param string $encoding Encoding of text
Line 232: $str = TextDC::cleanText($str);
Line 242: TextDC::averageWordsPerSentence($str, $encoding)
Line 268: if (empty(self::$content) or TextDC::wordCount(self::$content) < 25) {
Line 328: $count = TextDC::wordCount(self::$content);
Line 346: $avg = ceil(TextDC::averageWordsPerSentence(self::$content));
Line 457: TextDC::cleanText(TextDC::lowerCase(str_replace(['.', '-'], '', $link['text']))),
Line 514: // Not a heading, concat text to make up a "section"
Line 525: $content = TextDC::cleanText($content);
Line 526: $words = TextDC::wordCount($content);

/sprout/Helpers/AttrEditorTextbox.php   Highlighted file source

Line 18: * Specialised text input field for page attributes
Line 20: class AttrEditorTextbox extends AttrEditor
Line 33: return '<div class="field-element field-element--text field-element--white">
Line 35: <input type="text" name="value" class="textbox" value="' . Enc::html($val) . '">

/sprout/Helpers/AttrEditorTextbox.php   Highlighted file source

Line 18: * Specialised text input field for page attributes
Line 20: class AttrEditorTextbox extends AttrEditor
Line 33: return '<div class="field-element field-element--text field-element--white">
Line 35: <input type="text" name="value" class="textbox" value="' . Enc::html($val) . '">

/sprout/Helpers/BbCode.php   Highlighted file source

Line 20: * Convert an inline run of plain text into HTML.
Line 25: * @param string $text Plain text to convert
Line 29: public static function inline($text, $tags = null)
Line 31: $text = Enc::cleanfunky($text);
Line 32: $text = Enc::html($text);
Line 38: if (in_array('b', $tags)) $text = preg_replace('/\[b\](.+?)\[\/b\]/', '<b>$1</b>', $text);
Line 39: if (in_array('i', $tags)) $text = preg_replace('/\[i\](.+?)\[\/i\]/', '<i>$1</i>', $text);
Line 40: if (in_array('u', $tags)) $text = preg_replace('/\[u\](.+?)\[\/u\]/', '<u>$1</u>', $text);
Line 41: if (in_array('s', $tags)) $text = preg_replace('/\[s\](.+?)\[\/s\]/', '<s>$1</s>', $text);
Line 42: if (in_array('code', $tags)) $text = preg_replace('/\[code\](.+?)\[\/code\]/', '<code>$1</code>', $text);
Line 43: if (in_array('url', $tags)) $text = preg_replace('/\[url=(.+?)\](.+?)\[\/url\]/', '<a href="$1">$2</a>', $text);
Line 45: return $text;
Line 50: * Convert multi-line text into HTML, with support for bbcode.
Line 53: * @param string $text Plain text to convert
Line 57: public static function block($text, $tags = null)
Line 59: $text = self::inline($text, $tags);
Line 60: $text = Text::widont($text);
Line 61: $text = Text::autoP($text);

/sprout/Helpers/BbCode.php   Highlighted file source

Line 20: * Convert an inline run of plain text into HTML.
Line 25: * @param string $text Plain text to convert
Line 29: public static function inline($text, $tags = null)
Line 31: $text = Enc::cleanfunky($text);
Line 32: $text = Enc::html($text);
Line 38: if (in_array('b', $tags)) $text = preg_replace('/\[b\](.+?)\[\/b\]/', '<b>$1</b>', $text);
Line 39: if (in_array('i', $tags)) $text = preg_replace('/\[i\](.+?)\[\/i\]/', '<i>$1</i>', $text);
Line 40: if (in_array('u', $tags)) $text = preg_replace('/\[u\](.+?)\[\/u\]/', '<u>$1</u>', $text);
Line 41: if (in_array('s', $tags)) $text = preg_replace('/\[s\](.+?)\[\/s\]/', '<s>$1</s>', $text);
Line 42: if (in_array('code', $tags)) $text = preg_replace('/\[code\](.+?)\[\/code\]/', '<code>$1</code>', $text);
Line 43: if (in_array('url', $tags)) $text = preg_replace('/\[url=(.+?)\](.+?)\[\/url\]/', '<a href="$1">$2</a>', $text);
Line 45: return $text;
Line 50: * Convert multi-line text into HTML, with support for bbcode.
Line 53: * @param string $text Plain text to convert
Line 57: public static function block($text, $tags = null)
Line 59: $text = self::inline($text, $tags);
Line 60: $text = Text::widont($text);
Line 61: $text = Text::autoP($text);

/sprout/Helpers/ColModifierTruncate.php   Highlighted file source

Line 5: use Sprout\Helpers\Text;
Line 10: * Truncate the word count of a column with given word limit trailed by ellipsis symbol, with the full text in a title attribute
Line 23: return '<span title="' . Enc::html($val) . '">' . Enc::html(Text::plain($val, $this->word_limit)) . '</span>';

/sprout/Helpers/ColModifierTruncate.php   Highlighted file source

Line 5: use Sprout\Helpers\Text;
Line 10: * Truncate the word count of a column with given word limit trailed by ellipsis symbol, with the full text in a title attribute
Line 23: return '<span title="' . Enc::html($val) . '">' . Enc::html(Text::plain($val, $this->word_limit)) . '</span>';

/sprout/Helpers/DocImport/DocImportPlaintext.php   Highlighted file source

Line 17: use Sprout\Helpers\Text;
Line 20: class DocImportPlaintext extends DocImport {
Line 30: $text = trim(file_get_contents($filename));
Line 32: $text = Enc::cleanfunky($text);
Line 33: $text = Text::richtext($text);
Line 36: $text = str_replace('<br>', '<br/>', $text);
Line 40: $out .= $text;

/sprout/Helpers/DocImport/DocImportPlaintext.php   Highlighted file source

Line 17: use Sprout\Helpers\Text;
Line 20: class DocImportPlaintext extends DocImport {
Line 30: $text = trim(file_get_contents($filename));
Line 32: $text = Enc::cleanfunky($text);
Line 33: $text = Text::richtext($text);
Line 36: $text = str_replace('<br>', '<br/>', $text);
Line 40: $out .= $text;

/sprout/Helpers/Drivers/Image/GD.php   Highlighted file source

Line 402: public function addText($text)
Line 404: /** Text colour */
Line 407: /** Fill colour for the transparent rectangle which will surround the text */
Line 410: /** Width of image which will have text added */
Line 413: /** Height of image which will have text added */
Line 422: /** Text angle, N.B. 0 represents normal left-right text */
Line 428: /** Num pixels surrounding text in transparent rectangle */
Line 435: * Y-point at which text should be rendered inside image.
Line 437: * N.B. One would expect the text to start at (image height - text height - border), but the
Line 438: * position for imagettftext is based on the font's baseline, which is font dependent but assumed
Line 439: * to be about 2/3 of the overall height of the text
Line 443: // Calculate the width and height of a box to contain the rendered text
Line 444: $text_w = PHP_INT_MAX;
Line 448: $bounds = imagettfbbox($font_size, $angle, $font_file, $text);
Line 453: // Don't embed text if it can't fit into the image
Line 456: // Draw a rectangle which will contain the text
Line 464: // Add the text inside the transparent rectangle
Line 466: imagettftext($this->tmp_image, $font_size, $angle, $border, $y, $colour, $font_file, $text);

/sprout/Helpers/Drivers/Image/GD.php   Highlighted file source

Line 402: public function addText($text)
Line 404: /** Text colour */
Line 407: /** Fill colour for the transparent rectangle which will surround the text */
Line 410: /** Width of image which will have text added */
Line 413: /** Height of image which will have text added */
Line 422: /** Text angle, N.B. 0 represents normal left-right text */
Line 428: /** Num pixels surrounding text in transparent rectangle */
Line 435: * Y-point at which text should be rendered inside image.
Line 437: * N.B. One would expect the text to start at (image height - text height - border), but the
Line 438: * position for imagettftext is based on the font's baseline, which is font dependent but assumed
Line 439: * to be about 2/3 of the overall height of the text
Line 443: // Calculate the width and height of a box to contain the rendered text
Line 444: $text_w = PHP_INT_MAX;
Line 448: $bounds = imagettfbbox($font_size, $angle, $font_file, $text);
Line 453: // Don't embed text if it can't fit into the image
Line 456: // Draw a rectangle which will contain the text
Line 464: // Add the text inside the transparent rectangle
Line 466: imagettftext($this->tmp_image, $font_size, $angle, $border, $y, $colour, $font_file, $text);

/sprout/Helpers/EmailText.php   Highlighted file source

Line 23: class EmailText
Line 27: * Return email text HTML
Line 37: $reg = Register::getEmailText($code);
Line 39: throw new Exception('Did not find registration for emailText with code of "' . $code . '"');
Line 42: // Fetch text from DB
Line 43: $q = "SELECT text FROM ~email_texts WHERE name = ?";
Line 45: $text = Pdb::q($q, [$code], 'val');
Line 48: // If text was found use it, or use the default
Line 49: $text = $reg->getDefaultHTML();
Line 60: $text = str_replace('{{' . $key . '}}', Enc::html($val), $text);
Line 63: return $text;
Line 73: $reg = Register::getEmailText($code);
Line 94: $reg = Register::getEmailText($code);
Line 96: throw new Exception('Did not find registration for emailText with code of "' . $code . '"');
Line 100: $q = "SELECT id FROM ~email_texts WHERE name = ?";
Line 109: $update_fields['text'] = $reg->getDefaultHTML();
Line 110: $item_id = Pdb::insert('email_texts', $update_fields);
Line 113: return 'admin/edit/email_text/' . $item_id;

/sprout/Helpers/EmailText.php   Highlighted file source

Line 23: class EmailText
Line 27: * Return email text HTML
Line 37: $reg = Register::getEmailText($code);
Line 39: throw new Exception('Did not find registration for emailText with code of "' . $code . '"');
Line 42: // Fetch text from DB
Line 43: $q = "SELECT text FROM ~email_texts WHERE name = ?";
Line 45: $text = Pdb::q($q, [$code], 'val');
Line 48: // If text was found use it, or use the default
Line 49: $text = $reg->getDefaultHTML();
Line 60: $text = str_replace('{{' . $key . '}}', Enc::html($val), $text);
Line 63: return $text;
Line 73: $reg = Register::getEmailText($code);
Line 94: $reg = Register::getEmailText($code);
Line 96: throw new Exception('Did not find registration for emailText with code of "' . $code . '"');
Line 100: $q = "SELECT id FROM ~email_texts WHERE name = ?";
Line 109: $update_fields['text'] = $reg->getDefaultHTML();
Line 110: $item_id = Pdb::insert('email_texts', $update_fields);
Line 113: return 'admin/edit/email_text/' . $item_id;

/sprout/Helpers/EmailTextReg.php   Highlighted file source

Line 16: class EmailTextReg
Line 23: * Register an email text
Line 28: * @param string $default_html_view The view name for the default text. Must be a .htm view

/sprout/Helpers/EmailTextReg.php   Highlighted file source

Line 16: class EmailTextReg
Line 23: * Register an email text
Line 28: * @param string $default_html_view The view name for the default text. Must be a .htm view

/sprout/Helpers/Fb.php   Highlighted file source

Line 73: * Sets the text for the top item of dropdown lists.
Line 181: * You can specify either HTML or plain-text content, but not both
Line 183: * @param string $name The name of the tag, e.g. 'textarea'
Line 222: * @param string $type The type of input, e.g. 'text', 'hidden', ...
Line 258: * Generates a text field
Line 264: public static function text($name, array $attrs = [])
Line 267: self::addAttr($attrs, 'class', 'textbox');
Line 268: return self::input('text', $name, $attrs);
Line 282: self::addAttr($attrs, 'class', 'textbox');
Line 297: self::addAttr($attrs, 'class', 'textbox');
Line 333: self::addAttr($attrs, 'class', 'textbox');
Line 346: $out .= "<script type=\"text/javascript\">
Line 349: $(\"#{$id}-count\").text($(\"#{$id}\").val());
Line 351: $(\"#{$id}-count\").text($(this).val());
Line 369: self::addAttr($attrs, 'class', 'textbox password');
Line 452: $out .= '<div class="file-upload__area textbox">';
Line 455: $out .= '<div class="file-upload__helptext">';
Line 457: $out .= '<span class="file-upload__helptext__line2">or click to upload</span></p>';
Line 557: self::addAttr($attrs, 'class', 'textbox email');
Line 572: Fb::addAttr($attrs, 'class', 'textbox phone');
Line 662: * Generates a richtext field - i.e. TinyMCE
Line 665: * @param string $name The field name for this richtext field.
Line 667: * @param array $items Specify 'type' for RichText, e.g. 'TinyMCE4', or 'TinyMCE4:Lite'
Line 668: * @return string HTML containing a TEXTAREA element and an associated SCRIPT element which to converts it
Line 669: * into a richtext field
Line 671: public static function richtext($name, array $attrs = [], array $items = [])
Line 681: return RichText::draw($name, $value, $width, $height, @$items['type']);
Line 685: * Generates a multiline text field
Line 687: * @param array $attrs Extra attributes for the TEXTAREA element
Line 688: * @return string TEXTAREA element
Line 693: self::addAttr($attrs, 'class', 'textbox multiline');
Line 695: return self::tag('textarea', $attrs, ['plain' => self::getData($name)]);
Line 795: * behaviour, a plain text value can be stored by setting the 'save_id' option to false.
Line 800: * - 'value': data for the text input.
Line 812: * 'multiline' (bool, defaults to false) Use a textarea to support multiline text
Line 832: self::addAttr($attrs, 'class', 'textbox');
Line 844: $input = self::tag('textarea', $attrs, ['plain' => self::getData($name)]);
Line 846: $input = self::input('text', $name, $attrs);
Line 885: self::addAttr($attrs, 'class', 'textbox');
Line 893: $view->input = self::input('text', "{$name}_search", $attrs);
Line 1004: * @param string $label The label for the checkbox; supports minimal HTML, {@see Text::limitedSubsetHtml}
Line 1029: $out .= Text::limitedSubsetHtml($label);
Line 1164: self::addAttr($attrs, 'class', 'textbox fb-datepicker');
Line 1165: self::addAttr($attrs, 'type', 'text');
Line 1222: self::addAttr($attrs, 'class', 'textbox fb-daterangepicker');
Line 1230: $out .= self::input('text', $name_start . '_to_' . $name_end . '_picker', $attrs);
Line 1271: self::addAttr($attrs, 'class', 'textbox fb-simpledaterangepicker');
Line 1283: $out .= self::input('text', $name_start . '_to_' . $name_end . '_picker', $attrs);
Line 1327: self::addAttr($attrs, 'class', 'textbox fb-datetimerangepicker');
Line 1335: $out .= self::input('text', $name_start . '_to_' . $name_end . '_picker', $attrs);
Line 1372: self::addAttr($attrs, 'type', 'text');
Line 1373: self::addAttr($attrs, 'class', 'textbox timepicker tm');
Line 1410: self::addAttr($attrs, 'class', 'textbox fb-datetimepicker');
Line 1417: $out .= self::input('text', $name . '_picker', $attrs);
Line 1434: * 'name' Internal name of field, plaintext
Line 1435: * 'label' Field label (Sentence case), plaintext
Line 1436: * 'helptext' Additional helptext for the field, optional, limited subset html
Line 1446: self::addAttr($attrs, 'class', 'textbox total-selector__output');
Line 1458: $out = self::input('text', $name, $attrs) . PHP_EOL;
Line 1466: $sub_attrs['class'] = 'textbox';
Line 1478: if (!empty($val['helptext'])) {
Line 1479: $out .= '<div class="field-helper">' . Text::limitedSubsetHtml($val['helptext']) . '</div>' . PHP_EOL;
Line 1511: self::addAttr($attrs, 'class', 'textbox colorpicker');
Line 1613: self::addAttr($attrs, 'class', 'textbox js-autocomplete-address');
Line 1622: $view->form_field = self::input('text', $name, $attrs);
Line 1653: self::addAttr($attrs, 'class', 'textbox js-geocode-address');
Line 1658: $view->form_field = self::input('text', $name, $attrs);
Line 1664: * Render a 'generate code' button + text field
Line 1674: self::addAttr($attrs, 'class', 'textbox column column-9');
Line 1690: $view->form_field = self::input('text', $name, $attrs);
Line 1702: * field of type TEXT.
Line 1766: * @return string Possibly a LABEL element, or otherwise HTML text

/sprout/Helpers/Fb.php   Highlighted file source

Line 73: * Sets the text for the top item of dropdown lists.
Line 181: * You can specify either HTML or plain-text content, but not both
Line 183: * @param string $name The name of the tag, e.g. 'textarea'
Line 222: * @param string $type The type of input, e.g. 'text', 'hidden', ...
Line 258: * Generates a text field
Line 264: public static function text($name, array $attrs = [])
Line 267: self::addAttr($attrs, 'class', 'textbox');
Line 268: return self::input('text', $name, $attrs);
Line 282: self::addAttr($attrs, 'class', 'textbox');
Line 297: self::addAttr($attrs, 'class', 'textbox');
Line 333: self::addAttr($attrs, 'class', 'textbox');
Line 346: $out .= "<script type=\"text/javascript\">
Line 349: $(\"#{$id}-count\").text($(\"#{$id}\").val());
Line 351: $(\"#{$id}-count\").text($(this).val());
Line 369: self::addAttr($attrs, 'class', 'textbox password');
Line 452: $out .= '<div class="file-upload__area textbox">';
Line 455: $out .= '<div class="file-upload__helptext">';
Line 457: $out .= '<span class="file-upload__helptext__line2">or click to upload</span></p>';
Line 557: self::addAttr($attrs, 'class', 'textbox email');
Line 572: Fb::addAttr($attrs, 'class', 'textbox phone');
Line 662: * Generates a richtext field - i.e. TinyMCE
Line 665: * @param string $name The field name for this richtext field.
Line 667: * @param array $items Specify 'type' for RichText, e.g. 'TinyMCE4', or 'TinyMCE4:Lite'
Line 668: * @return string HTML containing a TEXTAREA element and an associated SCRIPT element which to converts it
Line 669: * into a richtext field
Line 671: public static function richtext($name, array $attrs = [], array $items = [])
Line 681: return RichText::draw($name, $value, $width, $height, @$items['type']);
Line 685: * Generates a multiline text field
Line 687: * @param array $attrs Extra attributes for the TEXTAREA element
Line 688: * @return string TEXTAREA element
Line 693: self::addAttr($attrs, 'class', 'textbox multiline');
Line 695: return self::tag('textarea', $attrs, ['plain' => self::getData($name)]);
Line 795: * behaviour, a plain text value can be stored by setting the 'save_id' option to false.
Line 800: * - 'value': data for the text input.
Line 812: * 'multiline' (bool, defaults to false) Use a textarea to support multiline text
Line 832: self::addAttr($attrs, 'class', 'textbox');
Line 844: $input = self::tag('textarea', $attrs, ['plain' => self::getData($name)]);
Line 846: $input = self::input('text', $name, $attrs);
Line 885: self::addAttr($attrs, 'class', 'textbox');
Line 893: $view->input = self::input('text', "{$name}_search", $attrs);
Line 1004: * @param string $label The label for the checkbox; supports minimal HTML, {@see Text::limitedSubsetHtml}
Line 1029: $out .= Text::limitedSubsetHtml($label);
Line 1164: self::addAttr($attrs, 'class', 'textbox fb-datepicker');
Line 1165: self::addAttr($attrs, 'type', 'text');
Line 1222: self::addAttr($attrs, 'class', 'textbox fb-daterangepicker');
Line 1230: $out .= self::input('text', $name_start . '_to_' . $name_end . '_picker', $attrs);
Line 1271: self::addAttr($attrs, 'class', 'textbox fb-simpledaterangepicker');
Line 1283: $out .= self::input('text', $name_start . '_to_' . $name_end . '_picker', $attrs);
Line 1327: self::addAttr($attrs, 'class', 'textbox fb-datetimerangepicker');
Line 1335: $out .= self::input('text', $name_start . '_to_' . $name_end . '_picker', $attrs);
Line 1372: self::addAttr($attrs, 'type', 'text');
Line 1373: self::addAttr($attrs, 'class', 'textbox timepicker tm');
Line 1410: self::addAttr($attrs, 'class', 'textbox fb-datetimepicker');
Line 1417: $out .= self::input('text', $name . '_picker', $attrs);
Line 1434: * 'name' Internal name of field, plaintext
Line 1435: * 'label' Field label (Sentence case), plaintext
Line 1436: * 'helptext' Additional helptext for the field, optional, limited subset html
Line 1446: self::addAttr($attrs, 'class', 'textbox total-selector__output');
Line 1458: $out = self::input('text', $name, $attrs) . PHP_EOL;
Line 1466: $sub_attrs['class'] = 'textbox';
Line 1478: if (!empty($val['helptext'])) {
Line 1479: $out .= '<div class="field-helper">' . Text::limitedSubsetHtml($val['helptext']) . '</div>' . PHP_EOL;
Line 1511: self::addAttr($attrs, 'class', 'textbox colorpicker');
Line 1613: self::addAttr($attrs, 'class', 'textbox js-autocomplete-address');
Line 1622: $view->form_field = self::input('text', $name, $attrs);
Line 1653: self::addAttr($attrs, 'class', 'textbox js-geocode-address');
Line 1658: $view->form_field = self::input('text', $name, $attrs);
Line 1664: * Render a 'generate code' button + text field
Line 1674: self::addAttr($attrs, 'class', 'textbox column column-9');
Line 1690: $view->form_field = self::input('text', $name, $attrs);
Line 1702: * field of type TEXT.
Line 1766: * @return string Possibly a LABEL element, or otherwise HTML text

/sprout/Helpers/File.php   Highlighted file source

Line 83: static function getExt($filename)
Line 98: $ext = self::getExt($filename);
Line 367: $ext = File::getExt($filename);
Line 511: * and in TEXT columns (contains match)
Line 574: } else if (preg_match('/TEXT/i', $col['Type'])) {
Line 606: AND widget.area_id = 1 AND widget.type = 'RichText'
Line 668: $ext = File::getExt($filename);
Line 734: return 'text/css; charset=UTF-8';
Line 975: $embed_text = $row['author'];
Line 977: $embed_text = false;
Line 1010: if ($embed_text) $img->addText($embed_text);
Line 1046: $ext = FileIndexing::getExt($filename);
Line 1049: $update_data['plaintext'] = FileIndexing::getPlaintext($filename, $ext);
Line 1159: $ext = File::getExt($_POST[$field_name][$i]);

/sprout/Helpers/Form.php   Highlighted file source

Line 49: * echo Form::text('first_name');
Line 62: static $next_helptext = null;
Line 180: * Form::text('name') // field name will be 'pages[text]'
Line 222: self::$next_helptext = null;
Line 231: * Both the label and helptext support a subset of HTML, {@see Text::limitedSubsetHtml} for more details
Line 235: * @param string $helptext Optional HTML helptext
Line 237: public static function nextFieldDetails($label, $required, $helptext = null)
Line 239: self::$next_label = Text::limitedSubsetHtml($label);
Line 241: self::$next_helptext = Text::limitedSubsetHtml($helptext);
Line 246: * Convert a full method name (e.g. Sprout\Helpers\Fb::text) into a friendly class name
Line 336: * echo Form::fieldPlain('Sprout\Helpers\Fb::text', 'first_name', [], []);
Line 340: * echo Form::fieldPlain('Sprout\Helpers\Fb::text', 'first_name', ['id' => 'first-name'], []);
Line 344: * echo Form::fieldPlain('Sprout\Helpers\Fb::text', 'first_name', ['-wrapper-class' => 'small'], []);
Line 406: if (self::$next_helptext) {
Line 407: $out .= '<div class="field-helper">' . self::$next_helptext . '</div>';
Line 501: if (self::$next_helptext) {
Line 502: $out .= '<div class="field-helper">' . self::$next_helptext . '</div>';
Line 608: * @param string $plain Plain text to encode and wrap in the field
Line 618: * Returns HTML for a text field, using {@see Fb::text} to generate the field itself
Line 624: public static function text($name, array $attrs = [])
Line 626: return static::fieldPlain('Sprout\Helpers\Fb::text', $name, $attrs);
Line 711: * 'value' => title text visible in the list item,
Line 758: 'Sprout\Helpers\Fb::text',

/sprout/Helpers/Image.php   Highlighted file source

Line 451: * Adds text to the base of an image, e.g. for copyright credit
Line 452: * @param string $text The text to add to the image
Line 455: public function addText($text)
Line 457: $this->actions['addText'] = (string) $text;

/sprout/Helpers/Image.php   Highlighted file source

Line 451: * Adds text to the base of an image, e.g. for copyright credit
Line 452: * @param string $text The text to add to the image
Line 455: public function addText($text)
Line 457: $this->actions['addText'] = (string) $text;

/sprout/Helpers/ImportCMS.php   Highlighted file source

Line 132: // RichText widget
Line 138: $fields['type'] = 'RichText';
Line 139: $fields['settings'] = json_encode(['text' => $html]);
Line 179: $settings->text = self::replacePageIds($settings->text);
Line 180: $settings->text = self::replaceFileUrls($settings->text);
Line 182: self::findOldWidgets($widget['page_revision_id'], $settings->text);
Line 184: Pdb::update('page_widgets', ['settings' => json_encode(['text' => $settings->text])], [['id', '=', $widget['id']]]);

/sprout/Helpers/Itemlist.php   Highlighted file source

Line 435: * The Closure result supports a subset of HTML, {@see Text::limitedSubsetHtml} for more details
Line 451: return Text::limitedSubsetHtml($defn($item_data));

/sprout/Helpers/Locales/LocaleInfo.php   Highlighted file source

Line 213: return Form::text($prefix . 'street', ['-wrapper-class' => 'address-street1']);
Line 217: return Form::text($prefix . 'street2', ['-wrapper-class' => 'address-street2']);
Line 221: return Form::text($prefix . 'town', ['-wrapper-class' => 'address-town']);
Line 230: return Form::text($prefix . 'state', ['-wrapper-class' => 'address-state']);
Line 234: $field = Form::text($prefix . 'state', ['-wrapper-class' => 'address-state']);
Line 241: return Form::text($prefix . 'postcode', ['-wrapper-class' => 'address-postcode']);
Line 244: $field = Form::text($prefix . 'postcode', ['-wrapper-class' => 'address-postcode']);
Line 260: * @return string Plaintext
Line 262: public function outputAddressText($data)

/sprout/Helpers/Locales/LocaleInfo.php   Highlighted file source

Line 213: return Form::text($prefix . 'street', ['-wrapper-class' => 'address-street1']);
Line 217: return Form::text($prefix . 'street2', ['-wrapper-class' => 'address-street2']);
Line 221: return Form::text($prefix . 'town', ['-wrapper-class' => 'address-town']);
Line 230: return Form::text($prefix . 'state', ['-wrapper-class' => 'address-state']);
Line 234: $field = Form::text($prefix . 'state', ['-wrapper-class' => 'address-state']);
Line 241: return Form::text($prefix . 'postcode', ['-wrapper-class' => 'address-postcode']);
Line 244: $field = Form::text($prefix . 'postcode', ['-wrapper-class' => 'address-postcode']);
Line 260: * @return string Plaintext
Line 262: public function outputAddressText($data)

/sprout/Helpers/Notification.php   Highlighted file source

Line 71: $out .= "<span class=\"notification--text\">{$message[1]}</span>";
Line 105: $out .= '<script type="text/javascript">';
Line 140: * @param string $format Either 'plain' for plain-text or 'html' for HTML which is limited to a safe subset
Line 147: $_SESSION['notify'][$scope][] = array(self::TYPE_CONFIRM, Text::limitedSubsetHtml($message), []);
Line 158: * @param string $message_format Either 'plain' for plain-text or 'html' for HTML which is limited to a safe subset
Line 165: $_SESSION['notify'][$scope][] = array(self::TYPE_ERROR, Text::limitedSubsetHtml($message), []);

/sprout/Helpers/Notification.php   Highlighted file source

Line 71: $out .= "<span class=\"notification--text\">{$message[1]}</span>";
Line 105: $out .= '<script type="text/javascript">';
Line 140: * @param string $format Either 'plain' for plain-text or 'html' for HTML which is limited to a safe subset
Line 147: $_SESSION['notify'][$scope][] = array(self::TYPE_CONFIRM, Text::limitedSubsetHtml($message), []);
Line 158: * @param string $message_format Either 'plain' for plain-text or 'html' for HTML which is limited to a safe subset
Line 165: $_SESSION['notify'][$scope][] = array(self::TYPE_ERROR, Text::limitedSubsetHtml($message), []);

/sprout/Helpers/Page.php   Highlighted file source

Line 189: * Get the page text for a page id, in HTML format, with widgets and everything, ready to go
Line 200: public static function getText($page_id, $rev_id = 0, $subsite_id = null)
Line 232: $text = '';
Line 238: $widget_text = $inst->render(WidgetArea::ORIENTATION_WIDE);
Line 239: if (!$widget_text) continue;
Line 242: if ($text) $text .= "\n";
Line 244: $text .= $widget_text;
Line 247: return ContentReplace::html($text);
Line 386: * @return array [href, text] pairs
Line 426: * @return array [href, text] pairs
Line 433: $list[] = ['href' => $node->getFriendlyUrl(), 'text' => $node->getNavigationName()];

/sprout/Helpers/RefineWidgetTextbox.php   Highlighted file source

Line 17: * A textbox widget
Line 19: class RefineWidgetTextbox extends RefineWidget
Line 32: $out = "<div class=\"field-element field-element--text field-element--small field-element--white refine-bar-{$name}\">";
Line 37: $out .= "<input type=\"text\" class=\"textbox\" name=\"{$name}\" value=\"{$value}\">";

/sprout/Helpers/RefineWidgetTextbox.php   Highlighted file source

Line 17: * A textbox widget
Line 19: class RefineWidgetTextbox extends RefineWidget
Line 32: $out = "<div class=\"field-element field-element--text field-element--small field-element--white refine-bar-{$name}\">";
Line 37: $out .= "<input type=\"text\" class=\"textbox\" name=\"{$name}\" value=\"{$value}\">";

/sprout/Helpers/Register.php   Highlighted file source

Line 36: private static $emailtexts = array();
Line 79: public static function getExtraPages()
Line 92: public static function pageattr($name, $label, $editor = 'Sprout\\Helpers\\AttrEditorTextbox')
Line 203: * Register an email text
Line 211: * @param string $default_html_view The view name for the default text. Must be a .htm view
Line 214: public static function emailText($code, array $field_defs, $default_html_view)
Line 216: self::$emailtexts[$code] = new EmailTextReg($field_defs, $default_html_view);
Line 220: * Get all registered email texts. Returns an array of EmailTextReg objects
Line 222: public static function getEmailTexts()
Line 224: return self::$emailtexts;
Line 228: * Get a single registered email texts. Returns an EmailTextReg object
Line 230: public static function getEmailText($code)
Line 232: return self::$emailtexts[$code];
Line 292: self::$admin_controllers['email_text'] = '\\Sprout\\Controllers\\Admin\\EmailTextAdminController';
Line 353: * @param string $text Explanation text. Plaintext.
Line 357: public static function adminTile($name, $icon, $text, array $controllers, $sort_order = 10)
Line 375: 'text' => $text,
Line 383: * Each tile has four keys, 'name', 'icon', 'text', and 'controllers'.
Line 403: * @param string $text Explanation text. Plaintext.
Line 406: public static function widgetTile($area_name, $name, $icon, $text, array $widgets)
Line 424: 'text' => $text,
Line 437: * Each tile has four keys, 'name', 'icon', 'text', and 'widgets'.
Line 500: * inner_html The "inside" HTML of widgets (richtext, blog content, etc)
Line 595: * Register a display condition (this is part of the Context Engine on widgets)

/sprout/Helpers/Register.php   Highlighted file source

Line 36: private static $emailtexts = array();
Line 79: public static function getExtraPages()
Line 92: public static function pageattr($name, $label, $editor = 'Sprout\\Helpers\\AttrEditorTextbox')
Line 203: * Register an email text
Line 211: * @param string $default_html_view The view name for the default text. Must be a .htm view
Line 214: public static function emailText($code, array $field_defs, $default_html_view)
Line 216: self::$emailtexts[$code] = new EmailTextReg($field_defs, $default_html_view);
Line 220: * Get all registered email texts. Returns an array of EmailTextReg objects
Line 222: public static function getEmailTexts()
Line 224: return self::$emailtexts;
Line 228: * Get a single registered email texts. Returns an EmailTextReg object
Line 230: public static function getEmailText($code)
Line 232: return self::$emailtexts[$code];
Line 292: self::$admin_controllers['email_text'] = '\\Sprout\\Controllers\\Admin\\EmailTextAdminController';
Line 353: * @param string $text Explanation text. Plaintext.
Line 357: public static function adminTile($name, $icon, $text, array $controllers, $sort_order = 10)
Line 375: 'text' => $text,
Line 383: * Each tile has four keys, 'name', 'icon', 'text', and 'controllers'.
Line 403: * @param string $text Explanation text. Plaintext.
Line 406: public static function widgetTile($area_name, $name, $icon, $text, array $widgets)
Line 424: 'text' => $text,
Line 437: * Each tile has four keys, 'name', 'icon', 'text', and 'widgets'.
Line 500: * inner_html The "inside" HTML of widgets (richtext, blog content, etc)
Line 595: * Register a display condition (this is part of the Context Engine on widgets)

/sprout/Helpers/RichText.php   Highlighted file source

Line 22: * Interface the display of a richtext field
Line 24: abstract class RichText {
Line 27: * Draw a rich text field
Line 29: * Field type should be a class name sans 'RichText', e.g. 'TinyMCE4' for the 'TinyMCE4RichText' class.
Line 40: if ($type == null) $type = trim(@$_GET['_richtext']);
Line 41: if ($type == null) $type = Kohana::config('sprout.rich_text_type');
Line 52: $class_name = $type . 'RichText';
Line 58: throw new Exception ("Unknown rich text type '{$type}'.");
Line 67: * Shows a richtext field. Should output content directly
Line 70: * @param string $content The content of the richtext field, in HTML

/sprout/Helpers/RichText.php   Highlighted file source

Line 22: * Interface the display of a richtext field
Line 24: abstract class RichText {
Line 27: * Draw a rich text field
Line 29: * Field type should be a class name sans 'RichText', e.g. 'TinyMCE4' for the 'TinyMCE4RichText' class.
Line 40: if ($type == null) $type = trim(@$_GET['_richtext']);
Line 41: if ($type == null) $type = Kohana::config('sprout.rich_text_type');
Line 52: $class_name = $type . 'RichText';
Line 58: throw new Exception ("Unknown rich text type '{$type}'.");
Line 67: * Shows a richtext field. Should output content directly
Line 70: * @param string $content The content of the richtext field, in HTML

/sprout/Helpers/RichTextSanitiser.php   Highlighted file source

Line 25: final class RichTextSanitiser
Line 27: const ATTR_TYPE_TEXT = 0;
Line 84: 'alt' => self::ATTR_TYPE_TEXT
Line 89: 'title' => self::ATTR_TYPE_TEXT
Line 107: * @param string $richtextData The HTML to sanitise
Line 110: public function __construct($richtextData, $permitted_tags = null)
Line 118: if (!@$this->dom_doc->loadHTML($richtextData, LIBXML_NOCDATA)) {
Line 157: * Get the list of errors produced during @see RichTextSanitiser::sanitise
Line 252: case XML_TEXT_NODE:

/sprout/Helpers/RichTextSanitiser.php   Highlighted file source

Line 25: final class RichTextSanitiser
Line 27: const ATTR_TYPE_TEXT = 0;
Line 84: 'alt' => self::ATTR_TYPE_TEXT
Line 89: 'title' => self::ATTR_TYPE_TEXT
Line 107: * @param string $richtextData The HTML to sanitise
Line 110: public function __construct($richtextData, $permitted_tags = null)
Line 118: if (!@$this->dom_doc->loadHTML($richtextData, LIBXML_NOCDATA)) {
Line 157: * Get the list of errors produced during @see RichTextSanitiser::sanitise
Line 252: case XML_TEXT_NODE:

/sprout/Helpers/Search.php   Highlighted file source

Line 61: * Splits up text, and adds the keywords which are found into the index chosen with selectIndex()
Line 64: * @param string $text The text to process.
Line 67: public static function indexText($text, $relevancy_multiplier = 1)
Line 69: $text = iconv('UTF-8', 'ASCII//TRANSLIT', $text);
Line 70: $text = strtolower($text);
Line 71: $text = preg_replace('/[^-@a-zA-Z0-9 ]/', '', $text);
Line 72: $words = explode(' ', $text);
Line 103: * @param string $text The text to process.
Line 106: public static function indexHtml($text, $relevancy_multiplier = 1)
Line 108: $text = Text::plain($text, 0);
Line 109: return self::indexText($text, $relevancy_multiplier);

/sprout/Helpers/Search.php   Highlighted file source

Line 61: * Splits up text, and adds the keywords which are found into the index chosen with selectIndex()
Line 64: * @param string $text The text to process.
Line 67: public static function indexText($text, $relevancy_multiplier = 1)
Line 69: $text = iconv('UTF-8', 'ASCII//TRANSLIT', $text);
Line 70: $text = strtolower($text);
Line 71: $text = preg_replace('/[^-@a-zA-Z0-9 ]/', '', $text);
Line 72: $words = explode(' ', $text);
Line 103: * @param string $text The text to process.
Line 106: public static function indexHtml($text, $relevancy_multiplier = 1)
Line 108: $text = Text::plain($text, 0);
Line 109: return self::indexText($text, $relevancy_multiplier);

/sprout/Helpers/SocialNetworking.php   Highlighted file source

Line 36: $title = Text::limitChars(strip_tags($title), 100, '...');
Line 37: $desc = Text::limitChars(strip_tags($desc), 1000, '...');
Line 115: $share_url = 'http://twitter.com/intent/tweet?text=' . Enc::url($tweet);

/sprout/Helpers/SocialNetworking.php   Highlighted file source

Line 36: $title = Text::limitChars(strip_tags($title), 100, '...');
Line 37: $desc = Text::limitChars(strip_tags($desc), 1000, '...');
Line 115: $share_url = 'http://twitter.com/intent/tweet?text=' . Enc::url($tweet);

/sprout/Helpers/Spam.php   Highlighted file source

Line 71: * Checks text for bad words, like 'tax' and 'capsicum'
Line 74: * @note Disallowed sequences are collated from /media/text/bannedwords_level{level}.txt which
Line 76: * @param string $text The text to censor
Line 77: * @return string The censored text, with disallowed sequences replaced with '*'
Line 79: public static function censor($text)
Line 91: $file = file_get_contents(DOCROOT . "media/text/bannedwords_level{$i}.txt");
Line 102: return Text::censor($text, $words, '*');
Line 107: * Looks at a block of text to see if it looks like spam.
Line 110: * @param string $text The text to check for spam
Line 113: public static function detect($text)
Line 118: if (strip_tags($text) != $text) {
Line 123: if (preg_match('!(https?|ftp)://[-_.a-zA-Z0-9]+!', $text)) {
Line 125: } else if (preg_match('!\b[-_a-zA-Z0-9]+[.][-_.a-zA-Z0-9]+\b!', $text)) {
Line 130: if (preg_match('![-_.a-zA-Z0-9]+[@][-_.a-zA-Z0-9]+!', $text)) {

/sprout/Helpers/Spam.php   Highlighted file source

Line 71: * Checks text for bad words, like 'tax' and 'capsicum'
Line 74: * @note Disallowed sequences are collated from /media/text/bannedwords_level{level}.txt which
Line 76: * @param string $text The text to censor
Line 77: * @return string The censored text, with disallowed sequences replaced with '*'
Line 79: public static function censor($text)
Line 91: $file = file_get_contents(DOCROOT . "media/text/bannedwords_level{$i}.txt");
Line 102: return Text::censor($text, $words, '*');
Line 107: * Looks at a block of text to see if it looks like spam.
Line 110: * @param string $text The text to check for spam
Line 113: public static function detect($text)
Line 118: if (strip_tags($text) != $text) {
Line 123: if (preg_match('!(https?|ftp)://[-_.a-zA-Z0-9]+!', $text)) {
Line 125: } else if (preg_match('!\b[-_a-zA-Z0-9]+[.][-_.a-zA-Z0-9]+\b!', $text)) {
Line 130: if (preg_match('![-_.a-zA-Z0-9]+[@][-_.a-zA-Z0-9]+!', $text)) {

/sprout/Helpers/Sprout.php   Highlighted file source

Line 77: * e.g. Sprout\Helpers\Text => Text
Line 360: public static function checkRedirect($text)
Line 362: $text = Enc::cleanfunky($text);
Line 363: if (preg_match('!^http(s?)://[a-z]!', $text)) return true;
Line 364: if (preg_match('!^/[a-z]!', $text)) return true;
Line 459: * Load the text for an extra page.
Line 468: $q = "SELECT text
Line 479: return $row['text'];
Line 526: * Takes two strings of text (which will be stripped of HTML tags)

/sprout/Helpers/Text.php   Highlighted file source

Line 21: * Various text helpers such as limiting.
Line 23: class Text
Line 27: * Limits a plain-text phrase to a given number of words.
Line 29: * @param string $str Phrase to limit words of, in plain text
Line 31: * @param string $end_char Characters to append if text is limited, e.g. '...'
Line 32: * @return string Plain text
Line 53: * Limits a plain-text phrase to a given number of characters.
Line 55: * @param string Phrase to limit characters of, in plain text
Line 57: * @param string $end_char Characters to append if text is limited, e.g. '...'
Line 59: * @return string Plain text
Line 89: public static function limitWordsHtml($text, $limit = 50)
Line 101: $text = preg_replace('/<!--.*?-->/s', '', $text);
Line 102: $text = preg_replace('/\s\s+/', ' ', $text);
Line 105: while (preg_match('!\G(<[a-z0-9]+[^>]*>)|(</[a-z0-9]+>)|([-_a-zA-Z0-9]+)|([^-_a-zA-Z0-9<>]+)!si', $text, $m, 0, $offset)) {
Line 234: * Finds the text that is similar between a set of words.
Line 236: * @param array words to find similar text of
Line 254: // Return the similar text
Line 259: * Converts text email addresses and anchors into links.
Line 261: * @param string text to auto link
Line 264: public static function autoLink($text)
Line 267: return Text::autoLinkUrls(Text::autoLinkEmails($text));
Line 271: * Converts text anchors into links.
Line 273: * @param string text to auto link
Line 276: public static function autoLinkUrls($text)
Line 279: if (preg_match_all('~\b(?<!href="|">)(?:ht|f)tps?://\S+(?:/|\b)~i', $text, $matches))
Line 284: $text = str_replace($match, Html::anchor($match), $text);
Line 289: if (preg_match_all('~\b(?<!://)www(?:\.[a-z0-9][-a-z0-9]*+)+\.[a-z]{2,6}\b~i', $text, $matches))
Line 294: $text = str_replace($match, Html::anchor('http://'.$match, $match), $text);
Line 298: return $text;
Line 302: * Converts text email addresses into links.
Line 304: * @param string text to auto link
Line 307: public static function autoLinkEmails($text)
Line 312: if (preg_match_all('~\b(?<!href="mailto:|">|58;)(?!\.)[-+_a-z0-9.]++(?<!\.)@(?![-.])[-a-z0-9.]+(?<!\.)\.[a-z]{2,6}\b~i', $text, $matches))
Line 317: $text = str_replace($match, Html::mailto($match), $text);
Line 321: return $text;
Line 325: * Automatically applies <p> and <br /> markup to text. Basically nl2br() on steroids.
Line 455: * Make a chunk of valid HTML into plain text, and (optionally) limit the number of words.
Line 459: * @return string Plain text
Line 491: $html = Text::limitWords($html, $max_words, '...');
Line 502: * Make a chunk of plain text into HTML rich text
Line 503: * The text will be wrapped within a block element (default is a P tag)
Line 505: * @param string $text The original plain text
Line 508: * @return string A HTML representation of the plain text
Line 510: public static function richtext($text, $block_elem = 'p')
Line 514: $text = Enc::cleanfunky($text);
Line 515: $text = Enc::html($text);
Line 516: $text = str_replace(array("\r\n", "\r", "\n"), '<br>', $text);
Line 518: if (!$block_elem) return $text;
Line 520: return "<{$block_elem}>{$text}</{$block_elem}>";
Line 591: * as a defence against XSS attacks; it should only be used on trusted input such as Form helptext.
Line 593: * @param string $html Plain text or HTML which may contain various tags

/sprout/Helpers/TextareaRichText.php   Highlighted file source

Line 21: * Interface the display of a richtext field
Line 23: class TextareaRichText extends RichText
Line 27: * Shows a richtext field. Should output content directly
Line 30: * @param string $content The content of the richtext field, in HTML
Line 41: echo "<textarea name=\"{$field_name}\" style=\"width: {$width}px; height: {$height}px;\">{$content}</textarea>\n";

/sprout/Helpers/TinyMCE4RichText.php   Highlighted file source

Line 22: * Interface the display of a richtext field
Line 24: class TinyMCE4RichText extends RichText
Line 42: * Shows a richtext field. Should output content directly
Line 45: * @param string $content The content of the richtext field, in HTML
Line 64: $options['plugins'] = 'anchor code fullscreen image link paste searchreplace table lists visualblocks fullscreen contextmenu stylebuttons media';
Line 146: // CSS file: richtext.css, content.css
Line 148: $options['content_css'][] = Sprout::absRoot() . 'media/css/richtext.css?ts=' . time();
Line 149: if (file_exists(DOCROOT . 'skin/' . Subsites::getCode($subsite) . '/css/richtext.css')) {
Line 150: $options['content_css'][] = Sprout::absRoot() . 'skin/' . Subsites::getCode($subsite) . '/css/richtext.css?ts=' . time();
Line 156: $out = '<script type="text/javascript">TinyMCE4.init(' . json_encode($options) . ');</script>';
Line 160: $out .= "<textarea name=\"{$field_name_html}\" style=\"height: {$height}px;\"";
Line 161: $out .= " class=\"richtext-editor tinymce4-editor {$field_name_class}\" data-field-name=\"{$field_name_html}\">";
Line 163: $out .= "</textarea>\n";

/sprout/Helpers/Validity.php   Highlighted file source

Line 175: * $valid->check('name', 'Validity::proseText')
Line 180: public static function proseText($str)

/sprout/Helpers/WorkerLinkChecker.php   Highlighted file source

Line 47: // Fetch and collate rich text widgets to produce page text
Line 51: $row['text'] = '';
Line 60: AND widget.area_id = 1 AND widget.type = 'RichText'
Line 68: if ($row['text']) $row['text'] .= "\n";
Line 69: $row['text'] .= $settings['text'];
Line 132: $mail->AddStringAttachment($csv, 'link_checker_report_' . date('Y_m_d') . '.csv', 'base64', 'text/csv');
Line 157: if (! @$dom->loadHTML($row['text'])) return;
Line 171: $errs[$resultname][] = array('page_id' => $row['id'], 'page_name' => $row['name'], 'link_href' => $href, 'link_text' => $elem->textContent, 'err' => $found);
Line 220: $context = stream_context_create($opts);
Line 223: $h = @fopen($href, 'r', false, $context);

/sprout/sprout_load.php   Highlighted file source

Line 77: 'Text blocks',
Line 81: 'RichText' => 'Text block',
Line 134: 'Text blocks',
Line 138: 'RichText' => 'Rich text',
Line 160: Register::emailText(

/sprout/sprout_load.php   Highlighted file source

Line 77: 'Text blocks',
Line 81: 'RichText' => 'Text block',
Line 134: 'Text blocks',
Line 138: 'RichText' => 'Rich text',
Line 160: Register::emailText(

/sprout/tests/formTest.php   Highlighted file source

Line 20: public function testText()
Line 23: $html = Form::text('bob');
Line 30: '<div class="field-element field-element--text field-element--required">
Line 35: <input type="text" value="" name="bob" class="textbox" id="field0"/>
Line 45: $field = Form::text('bob', ['-wrapper-class' => 'small']);
Line 52: $field = Form::text('bob', ['id' => 'first-name']);
Line 59: $field = Form::text('aaa');
Line 67: $field = Form::text('aaa');
Line 75: $field = Form::text('aaa[bbb]');
Line 83: $field = Form::text('bbb');
Line 91: $field = Form::text('aaa');
Line 99: $field = Form::text('aaa');
Line 107: $field = Form::text('aaa[bbb]');
Line 114: $field = Form::text('aaa[5][bbb]');
Line 122: $field = Form::text('bbb');

/sprout/tests/formTest.php   Highlighted file source

Line 20: public function testText()
Line 23: $html = Form::text('bob');
Line 30: '<div class="field-element field-element--text field-element--required">
Line 35: <input type="text" value="" name="bob" class="textbox" id="field0"/>
Line 45: $field = Form::text('bob', ['-wrapper-class' => 'small']);
Line 52: $field = Form::text('bob', ['id' => 'first-name']);
Line 59: $field = Form::text('aaa');
Line 67: $field = Form::text('aaa');
Line 75: $field = Form::text('aaa[bbb]');
Line 83: $field = Form::text('bbb');
Line 91: $field = Form::text('aaa');
Line 99: $field = Form::text('aaa');
Line 107: $field = Form::text('aaa[bbb]');
Line 114: $field = Form::text('aaa[5][bbb]');
Line 122: $field = Form::text('bbb');

/sprout/tests/registerTest.php   Highlighted file source

Line 29: public function testExtrapage()
Line 32: $extra = Register::getExtraPages();
Line 47: $this->assertEquals(array('Abc', 'Sprout\\Helpers\\AttrEditorTextbox'), $attrs['abc']);

/sprout/tests/registerTest.php   Highlighted file source

Line 29: public function testExtrapage()
Line 32: $extra = Register::getExtraPages();
Line 47: $this->assertEquals(array('Abc', 'Sprout\\Helpers\\AttrEditorTextbox'), $attrs['abc']);

/sprout/tests/textTest.php   Highlighted file source

Line 14: use Sprout\Helpers\Text;
Line 17: class textTest extends PHPUnit_Framework_TestCase
Line 86: $out = Text::limitWordsHtml($html, $limit);
Line 121: $out = Text::censor($original, $bad_words, '*', $partial);
Line 207: $out = Text::plain($html, $limit);
Line 213: * Text::richtext
Line 215: public function dataRichtext()
Line 232: * Text::richtext
Line 233: * @dataProvider dataRichtext
Line 235: public function testRichtext($text, $expect)
Line 237: $out = Text::richtext($text);
Line 243: * Text::richtext with a block tag specified
Line 245: public function dataRichtextBlockTag()
Line 261: * Text::richtext with a block tag specified
Line 262: * @dataProvider dataRichtextBlockTag
Line 264: public function testRichtextBlockTag($text, $tag, $expect)
Line 266: $out = Text::richtext($text, $tag);
Line 291: $this->assertEquals($expect, Text::lc2camelcaps($in));
Line 314: $this->assertEquals($expect, Text::lc2camelcase($in));
Line 338: $this->assertEquals($expect, Text::camel2lc($in));
Line 365: $this->assertEquals($expect, Text::limitedSubsetHtml($in));
Line 378: ['<script type="text/javascript">console.log("<form>");</script>', false],
Line 380: ['<style type="text/javascript">*:after { content: "<form>" }</style>', false],
Line 389: $this->assertEquals($expect, Text::containsFormTag($in));

/sprout/tests/textTest.php   Highlighted file source

Line 14: use Sprout\Helpers\Text;
Line 17: class textTest extends PHPUnit_Framework_TestCase
Line 86: $out = Text::limitWordsHtml($html, $limit);
Line 121: $out = Text::censor($original, $bad_words, '*', $partial);
Line 207: $out = Text::plain($html, $limit);
Line 213: * Text::richtext
Line 215: public function dataRichtext()
Line 232: * Text::richtext
Line 233: * @dataProvider dataRichtext
Line 235: public function testRichtext($text, $expect)
Line 237: $out = Text::richtext($text);
Line 243: * Text::richtext with a block tag specified
Line 245: public function dataRichtextBlockTag()
Line 261: * Text::richtext with a block tag specified
Line 262: * @dataProvider dataRichtextBlockTag
Line 264: public function testRichtextBlockTag($text, $tag, $expect)
Line 266: $out = Text::richtext($text, $tag);
Line 291: $this->assertEquals($expect, Text::lc2camelcaps($in));
Line 314: $this->assertEquals($expect, Text::lc2camelcase($in));
Line 338: $this->assertEquals($expect, Text::camel2lc($in));
Line 365: $this->assertEquals($expect, Text::limitedSubsetHtml($in));
Line 378: ['<script type="text/javascript">console.log("<form>");</script>', false],
Line 380: ['<style type="text/javascript">*:after { content: "<form>" }</style>', false],
Line 389: $this->assertEquals($expect, Text::containsFormTag($in));

/sprout/views/admin/email_text_edit.php   Highlighted file source

Line 43: <?php Form::nextFieldDetails('Text', true); ?>
Line 44: <?= Form::fieldAuto('Sprout\Helpers\Fb::richtext', 'text'); ?>

/sprout/views/admin/email_text_edit.php   Highlighted file source

Line 43: <?php Form::nextFieldDetails('Text', true); ?>
Line 44: <?= Form::fieldAuto('Sprout\Helpers\Fb::richtext', 'text'); ?>

/sprout/views/admin/extra_page_add.php   Highlighted file source

Line 36: <h3>Text</h3>
Line 37: <?= Form::richtext('text'); ?>

/sprout/views/admin/extra_page_add.php   Highlighted file source

Line 36: <h3>Text</h3>
Line 37: <?= Form::richtext('text'); ?>

/sprout/views/admin/extra_page_edit.php   Highlighted file source

Line 31: <?= Form::dropdown('type', [], Register::getExtraPages()); ?>
Line 38: <h3>Text</h3>
Line 39: <?= Form::richtext('text'); ?>

/sprout/views/admin/extra_page_edit.php   Highlighted file source

Line 31: <?= Form::dropdown('type', [], Register::getExtraPages()); ?>
Line 38: <h3>Text</h3>
Line 39: <?= Form::richtext('text'); ?>

/sprout/views/admin/file_edit.php   Highlighted file source

Line 24: use Sprout\Helpers\Text;
Line 53: <?= Form::text('name'); ?>
Line 94: <td><a href="<?= Enc::html($abs_url ); ?>"><?= Enc::html(Text::limitChars($abs_url, 50)); ?></a></td>
Line 138: <?php elseif ($data['type'] == FileConstants::TYPE_DOCUMENT and $data['plaintext']): ?>

/sprout/views/admin/file_edit.php   Highlighted file source

Line 24: use Sprout\Helpers\Text;
Line 53: <?= Form::text('name'); ?>
Line 94: <td><a href="<?= Enc::html($abs_url ); ?>"><?= Enc::html(Text::limitChars($abs_url, 50)); ?></a></td>
Line 138: <?php elseif ($data['type'] == FileConstants::TYPE_DOCUMENT and $data['plaintext']): ?>

/sprout/views/admin/page_edit.php   Highlighted file source

Line 29: use Sprout\Helpers\Text;
Line 116: $help_text = "A warning about stale content is sent if this page hasn't been updated for this many days";
Line 117: $help_text .= " (enter 0 to disable such warnings)";
Line 118: Form::nextFieldDetails('Maximum days before content is stale', false, $help_text);
Line 119: echo Form::text(
Line 132: Form::nextFieldDetails('URL slug', true, 'The text used to generate a link for the page; e.g. "this-is-a-slug" would result in: ' . Sprout::absRoot() . 'this-is-a-slug');
Line 133: echo Form::text('slug', []);
Line 138: echo Form::text('meta_keywords', ['size' => 30]);
Line 143: echo Form::text('meta_description', ['size' => 30]);
Line 155: echo Form::text('alt_browser_title', ['size' => 30]);
Line 160: echo Form::text('alt_nav_title', ['size' => 30]);
Line 294: echo '<ul class="messages all-type-neutral"><li class="neutral">', Text::richtext($admin_notes), '</li></ul>';
Line 308: <?= Form::text('name', ['spellcheck' => 'true', '-wrapper-class' => 'white']); ?>

/sprout/views/admin/page_edit.php   Highlighted file source

Line 29: use Sprout\Helpers\Text;
Line 116: $help_text = "A warning about stale content is sent if this page hasn't been updated for this many days";
Line 117: $help_text .= " (enter 0 to disable such warnings)";
Line 118: Form::nextFieldDetails('Maximum days before content is stale', false, $help_text);
Line 119: echo Form::text(
Line 132: Form::nextFieldDetails('URL slug', true, 'The text used to generate a link for the page; e.g. "this-is-a-slug" would result in: ' . Sprout::absRoot() . 'this-is-a-slug');
Line 133: echo Form::text('slug', []);
Line 138: echo Form::text('meta_keywords', ['size' => 30]);
Line 143: echo Form::text('meta_description', ['size' => 30]);
Line 155: echo Form::text('alt_browser_title', ['size' => 30]);
Line 160: echo Form::text('alt_nav_title', ['size' => 30]);
Line 294: echo '<ul class="messages all-type-neutral"><li class="neutral">', Text::richtext($admin_notes), '</li></ul>';
Line 308: <?= Form::text('name', ['spellcheck' => 'true', '-wrapper-class' => 'white']); ?>

/sprout/views/admin/style_guide/forms.php   Highlighted file source

Line 28: Form::nextFieldDetails('Text', false);
Line 29: echo Form::text('textz', $attributes);
Line 70: Form::nextFieldDetails('Richtext', false);
Line 71: echo Form::richtext('richtext', $attributes);
Line 73: Form::nextFieldDetails('More text', false);
Line 74: echo Form::text('textz', $attributes);
Line 111: 'helptext' => '(2-12 yrs)',

/sprout/views/admin/style_guide/forms.php   Highlighted file source

Line 28: Form::nextFieldDetails('Text', false);
Line 29: echo Form::text('textz', $attributes);
Line 70: Form::nextFieldDetails('Richtext', false);
Line 71: echo Form::richtext('richtext', $attributes);
Line 73: Form::nextFieldDetails('More text', false);
Line 74: echo Form::text('textz', $attributes);
Line 111: 'helptext' => '(2-12 yrs)',

/sprout/views/dbtools/overview.php   Highlighted file source

Line 3: use Sprout\Helpers\Text;
Line 7: .dbtools-box { color: #333; text-decoration: none; min-height: 150px; }
Line 8: .dbtools-box:hover { color: #333; text-decoration: none; box-shadow: 0 0 2px 2px #c3c7d4; }
Line 23: <p><?= Text::limitedSubsetHtml($tool['desc']); ?></p>

/sprout/views/dbtools/overview.php   Highlighted file source

Line 3: use Sprout\Helpers\Text;
Line 7: .dbtools-box { color: #333; text-decoration: none; min-height: 150px; }
Line 8: .dbtools-box:hover { color: #333; text-decoration: none; box-shadow: 0 0 2px 2px #c3c7d4; }
Line 23: <p><?= Text::limitedSubsetHtml($tool['desc']); ?></p>

/sprout/views/dbtools/skin_test_content.php   Highlighted file source

Line 19: <small>Small text. Usus legentis in iis qui facit, eorum claritatem Investigationes demonstraverunt. Facilisi nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id. Quod ii legunt saepius claritas est etiam processus dynamicus qui sequitur mutationem. Lobortis nisl ut aliquip ex ea commodo consequat duis autem vel eum iriure dolor in hendrerit.</small>
Line 250: Form::nextFieldDetails('Text', false);
Line 251: echo Form::text('textz', $attributes);
Line 292: Form::nextFieldDetails('Richtext', false);
Line 293: echo Form::richtext('richtext', $attributes);
Line 295: Form::nextFieldDetails('More text', false);
Line 296: echo Form::text('textz', $attributes);
Line 334: 'helptext' => '(2-12 yrs <b>only</b>)',

/sprout/views/dbtools/skin_test_content.php   Highlighted file source

Line 19: <small>Small text. Usus legentis in iis qui facit, eorum claritatem Investigationes demonstraverunt. Facilisi nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id. Quod ii legunt saepius claritas est etiam processus dynamicus qui sequitur mutationem. Lobortis nisl ut aliquip ex ea commodo consequat duis autem vel eum iriure dolor in hendrerit.</small>
Line 250: Form::nextFieldDetails('Text', false);
Line 251: echo Form::text('textz', $attributes);
Line 292: Form::nextFieldDetails('Richtext', false);
Line 293: echo Form::richtext('richtext', $attributes);
Line 295: Form::nextFieldDetails('More text', false);
Line 296: echo Form::text('textz', $attributes);
Line 334: 'helptext' => '(2-12 yrs <b>only</b>)',

/sprout/views/email/email_share.php   Highlighted file source

Line 17: use Sprout\Helpers\Text;
Line 33: <?php echo Text::richtext($message); ?>

/sprout/views/email/email_share.php   Highlighted file source

Line 17: use Sprout\Helpers\Text;
Line 33: <?php echo Text::richtext($message); ?>

/sprout/views/email/page_need_check.php   Highlighted file source

Line 18: use Sprout\Helpers\Text;
Line 26: <?= Text::richtext($changes_made); ?>

/sprout/views/email/page_need_check.php   Highlighted file source

Line 18: use Sprout\Helpers\Text;
Line 26: <?= Text::richtext($changes_made); ?>

/sprout/views/email/page_notify.php   Highlighted file source

Line 18: use Sprout\Helpers\Text;
Line 26: <?= Text::richtext($changes_made); ?></p>

/sprout/views/email/page_notify.php   Highlighted file source

Line 18: use Sprout\Helpers\Text;
Line 26: <?= Text::richtext($changes_made); ?></p>

/sprout/views/email/testing_long.php   Highlighted file source

Line 9: <p>Text level HTML elements may be used within other elements.

/sprout/views/email/testing_long.php   Highlighted file source

Line 9: <p>Text level HTML elements may be used within other elements.

/sprout/Widgets/RichTextWidget.php   Highlighted file source

Line 25: class RichTextWidget extends Widget
Line 27: protected $friendly_name = "Text block";
Line 28: protected $friendly_desc = 'HTML text content which can include links and images';
Line 39: return ContentReplace::html($this->settings['text']) . '<div class="clear"></div>';
Line 46: * @return string a richtext input field; its type is config-specified, with TinyMCE4 the default
Line 50: $richtext_width = Kohana::config('sprout.admin_richtext_width');
Line 51: $richtext_height = Kohana::config('sprout.admin_richtext_height');
Line 53: return Form::richtext('text', ['width' => $richtext_width, 'height' => $richtext_height]);

/sprout/Widgets/RichTextWidget.php   Highlighted file source

Line 25: class RichTextWidget extends Widget
Line 27: protected $friendly_name = "Text block";
Line 28: protected $friendly_desc = 'HTML text content which can include links and images';
Line 39: return ContentReplace::html($this->settings['text']) . '<div class="clear"></div>';
Line 46: * @return string a richtext input field; its type is config-specified, with TinyMCE4 the default
Line 50: $richtext_width = Kohana::config('sprout.admin_richtext_width');
Line 51: $richtext_height = Kohana::config('sprout.admin_richtext_height');
Line 53: return Form::richtext('text', ['width' => $richtext_width, 'height' => $richtext_height]);

A total of 1350 lines in 124 files were found