* Version: 1.0
*
*/
+
+use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
require_once('include/bbcode.php');
$title = '<title>' . (($b['title']) ? $b['title'] : L10n::t('Post from Friendica')) . '</title>';
- $post = $title . bbcode($b['body']);
+ $post = $title . BBCode::convert($b['body']);
$post = xmlify($post);
$xml = <<< EOT
* Author: Cat Gray <https://free-haven.org/profile/catness>
*/
+use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
require_once('include/bbcode.php');
$title = $b['title'];
- $post = bbcode($b['body']);
+ $post = BBCode::convert($b['body']);
$post = xmlify($post);
$tags = dwpost_get_tags($b['tag']);
* Author: Cat Gray <https://free-haven.org/profile/catness>
*/
+use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
require_once('include/datetime.php');
$title = $b['title'];
- $post = bbcode($b['body']);
+ $post = BBCode::convert($b['body']);
$post = xmlify($post);
$tags = ijpost_get_tags($b['tag']);
require_once 'include/bbcode.php';
require_once 'mod/proxy.php';
+use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
return $s;
}
function impressum_footer($a, &$b) {
- $text = proxy_parse_html(bbcode(Config::get('impressum','footer_text'), true));
+ $text = proxy_parse_html(BBCode::convert(Config::get('impressum','footer_text')));
if (! $text == '') {
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.$a->get_baseurl().'/addon/impressum/impressum.css" media="all" />';
$b .= '<div class="clear"></div>';
$b .= '<h3>'.L10n::t('Impressum').'</h3>';
$owner = Config::get('impressum', 'owner');
$owner_profile = Config::get('impressum','ownerprofile');
- $postal = proxy_parse_html(bbcode(Config::get('impressum', 'postal'), true));
- $notes = proxy_parse_html(bbcode(Config::get('impressum', 'notes'), true));
+ $postal = proxy_parse_html(BBCode::convert(Config::get('impressum', 'postal')));
+ $notes = proxy_parse_html(BBCode::convert(Config::get('impressum', 'notes')));
$email = obfuscate_email( Config::get('impressum','email') );
if (strlen($owner)) {
if (strlen($owner_profile)) {
* Author: Cat Gray <https://free-haven.org/profile/catness>
*/
+use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
require_once('include/bbcode.php');
$title = xmlify($b['title']);
- $post = bbcode($b['body']);
+ $post = BBCode::convert($b['body']);
$post = xmlify($post);
$tags = ljpost_get_tags($b['tag']);
* Version: 1.1
* Author: Matthew Exon <http://mat.exon.name>
*/
+
+use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
}
function mailstream_decode_subject($subject) {
- $html = bbcode($subject);
+ $html = BBCode::convert($subject);
if (!$html) {
return $subject;
}
$mail->IsHTML(true);
$mail->CharSet = 'utf-8';
$template = get_markup_template('mail.tpl', 'addon/mailstream/');
- $item['body'] = bbcode($item['body']);
+ $item['body'] = BBCode::convert($item['body']);
$item['url'] = $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $item['id'];
$mail->Body = replace_macros($template, [
'$upstream' => L10n::t('Upstream'),
require_once 'include/bbcode.php';
+use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
$t .= '<a href="'.$a->get_baseurl().'/profile/'.Config::get('newmemberwidget','localsupport').'" target="_new">'.L10n::t('Local Support Forum').'</a><br />'.EOL;
$ft = Config::get('newmemberwidget','freetext');
if (!trim($ft)=="")
- $t .= '<p>'.bbcode(trim($ft)).'</p>';
+ $t .= '<p>'.BBCode::convert(trim($ft)).'</p>';
$t .= '</div><div class="clear"></div>';
$a->page['aside'] = $t . $a->page['aside'];
}
* Author: Mike Macgirvin (Inital Author of the hubbwall Addon for the Hubzilla Project)
* Author: Rabuzarus <https://friendica.kommune4.de/profile/rabuzarus> (Port to Friendica)
*/
+
+use Friendica\Content\Text\BBCode;
use Friendica\Core\L10n;
use Friendica\Util\Emailer;
$subject = $_REQUEST['subject'];
- $textversion = strip_tags(html_entity_decode(bbcode(stripslashes(str_replace(["\\r", "\\n"],[ "", "\n"], $text))),ENT_QUOTES,'UTF-8'));
+ $textversion = strip_tags(html_entity_decode(BBCode::convert(stripslashes(str_replace(["\\r", "\\n"], ["", "\n"], $text))), ENT_QUOTES, 'UTF-8'));
- $htmlversion = bbcode(stripslashes(str_replace(["\\r","\\n"], ["","<br />\n"],$text)));
+ $htmlversion = BBCode::convert(stripslashes(str_replace(["\\r", "\\n"], ["", "<br />\n"], $text)));
// if this is a test, send it only to the admin(s)
// admin_email might be a comma separated list, but we need "a@b','c@d','e@f
* Author: Michael Vogel <http://pirati.ca/profile/heluecht>
*/
+use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
$title = trim($b['title']);
- $content = bbcode($b['body'], false, false, 4);
+ $content = BBCode::convert($b['body'], false, 4);
$params = [];
switch ($siteinfo["type"]) {
case "photo":
$params['type'] = "photo";
- $params['caption'] = bbcode($body, false, false, 4);
+ $params['caption'] = BBCode::convert($body, false, 4);
if (isset($siteinfo["url"]))
$params['link'] = $siteinfo["url"];
$params['type'] = "link";
$params['title'] = $title;
$params['url'] = $siteinfo["url"];
- $params['description'] = bbcode($body, false, false, 4);
+ $params['description'] = BBCode::convert($body, false, 4);
break;
case "audio":
$params['type'] = "audio";
$params['external_url'] = $siteinfo["url"];
- $params['caption'] = bbcode($body, false, false, 4);
+ $params['caption'] = BBCode::convert($body, false, 4);
break;
case "video":
$params['type'] = "video";
$params['embed'] = $siteinfo["url"];
- $params['caption'] = bbcode($body, false, false, 4);
+ $params['caption'] = BBCode::convert($body, false, 4);
break;
default:
$params['type'] = "text";
$params['title'] = $title;
- $params['body'] = bbcode($b['body'], false, false, 4);
+ $params['body'] = BBCode::convert($b['body'], false, 4);
break;
}
"<p>".$params['caption']."</p>";
if (trim($params['caption']) == "")
- $params['caption'] = bbcode("[quote]".$siteinfo["description"]."[/quote]", false, false, 4);
+ $params['caption'] = BBCode::convert("[quote]" . $siteinfo["description"] . "[/quote]", false, 4);
$consumer_key = Config::get('tumblr','consumer_key');
$consumer_secret = Config::get('tumblr','consumer_secret');
* sets the counter back
* count only unseen elements which are not type=activity (likes and dislikes not seen as new elements)
*/
+
use Friendica\App;
+use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
} else {
require_once('include/bbcode.php');
require_once("include/html2plain.php");
- $body = bbcode($body, false, false, 2, true);
+ $body = BBCode::convert($body, false, 2, true);
$body = html2plain($body, 0);
$body = ((strlen($body) > 137) ? substr($body, 0, 137) . "..." : $body);
}
PConfig::set(local_user(),'wppost','backlink',trim($_POST['wp_backlink']));
PConfig::set(local_user(),'wppost','shortcheck',trim($_POST['wp_shortcheck']));
$wp_backlink_text = notags(trim($_POST['wp_backlink_text']));
- $wp_backlink_text = bbcode($wp_backlink_text, false, false, 8);
+ $wp_backlink_text = BBCode::convert($wp_backlink_text, false, 8);
$wp_backlink_text = html2plain($wp_backlink_text, 0, true);
PConfig::set(local_user(),'wppost','wp_backlink_text', $wp_backlink_text);
// Remove the share element before fetching the first line
$title = trim(preg_replace("/\[share.*?\](.*?)\[\/share\]/ism","\n$1\n",$b['body']));
- $title = html2plain(bbcode($title, false, false), 0, true)."\n";
+ $title = html2plain(BBCode::convert($title, false), 0, true)."\n";
$pos = strpos($title, "\n");
$trailer = "";
if (($pos == 0) || ($pos > 100)) {
}
$title = '<title>' . (($wptitle) ? $wptitle : L10n::t('Post from Friendica')) . '</title>';
- $post = bbcode($b['body'], false, false, 4);
+ $post = BBCode::convert($b['body'], false, 4);
// If a link goes to youtube then remove the stuff around it. Wordpress detects youtube links and embeds it
$post = preg_replace('/<a.*?href="(https?:\/\/www.youtube.com\/.*?)".*?>(.*?)<\/a>/ism',"\n$1\n",$post);