aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php87
1 files changed, 42 insertions, 45 deletions
diff --git a/include/text.php b/include/text.php
index b03e2d1a9..e69ce7d10 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1652,7 +1652,7 @@ function format_hashtags(&$item) {
if($s)
$s .= ' ';
- $s .= '<span class="badge rounded-pill bg-info"><i class="fa fa-hashtag"></i>&nbsp;<a class="text-white" href="' . zid($t['url']) . '" >' . $term . '</a></span>';
+ $s .= '<span class="badge rounded-pill bg-info"><i class="bi bi-hash"></i>&nbsp;<a class="text-white" href="' . zid($t['url']) . '" >' . $term . '</a></span>';
}
}
@@ -1675,7 +1675,7 @@ function format_mentions(&$item) {
continue;
if($s)
$s .= ' ';
- $s .= '<span class="badge rounded-pill bg-success"><i class="fa fa-at"></i>&nbsp;<a class="text-white" href="' . zid($t['url']) . '" >' . $term . '</a></span>';
+ $s .= '<span class="badge rounded-pill bg-success"><i class="bi bi-at"></i>&nbsp;<a class="text-white" href="' . zid($t['url']) . '" >' . $term . '</a></span>';
}
}
@@ -3203,53 +3203,53 @@ function linkify_tags(&$body, $uid, $in_network = true) {
function getIconFromType($type) {
$iconMap = array(
//Folder
- 'Collection' => 'fa-folder-o',
- 'multipart/mixed' => 'fa-folder-o', //dirs in attach use this mime type
+ 'Collection' => 'bi-folder',
+ 'multipart/mixed' => 'bi-folder', //dirs in attach use this mime type
//Common file
- 'application/octet-stream' => 'fa-file-o',
+ 'application/octet-stream' => 'bi-file-earmark',
//Text
- 'text/plain' => 'fa-file-text-o',
- 'text/markdown' => 'fa-file-text-o',
- 'text/bbcode' => 'fa-file-text-o',
- 'text/html' => 'fa-file-text-o',
- 'application/msword' => 'fa-file-word-o',
- 'application/pdf' => 'fa-file-pdf-o',
- 'application/vnd.oasis.opendocument.text' => 'fa-file-word-o',
- 'application/epub+zip' => 'fa-book',
+ 'text/plain' => 'bi-earmark-text',
+ 'text/markdown' => 'bi-filetype-md',
+ 'text/bbcode' => 'bi-file-earmark-text',
+ 'text/html' => 'bi-filetype-html',
+ 'application/msword' => 'bi-file-earmark-word',
+ 'application/pdf' => 'bi-file-earmark-pdf',
+ 'application/vnd.oasis.opendocument.text' => 'bifile--earmark-text',
+ 'application/epub+zip' => 'bi-file-earmark-text',
//Spreadsheet
- 'application/vnd.oasis.opendocument.spreadsheet' => 'fa-file-excel-o',
- 'application/vnd.ms-excel' => 'fa-file-excel-o',
+ 'application/vnd.oasis.opendocument.spreadsheet' => 'bi-file-earmark-spreadsheet',
+ 'application/vnd.ms-excel' => 'bi-file-earmark-spreadsheet',
//Image
- 'image/jpeg' => 'fa-picture-o',
- 'image/png' => 'fa-picture-o',
- 'image/gif' => 'fa-picture-o',
- 'image/webp' => 'fa-picture-o',
- 'image/svg+xml' => 'fa-picture-o',
+ 'image/jpeg' => 'bi-file-earmark-image',
+ 'image/png' => 'bi-file-earmark-image',
+ 'image/gif' => 'bi-file-earmark-image',
+ 'image/webp' => 'bi-file-earmark-image',
+ 'image/svg+xml' => 'bi-filetype-svg',
//Archive
- 'application/zip' => 'fa-file-archive-o',
- 'application/x-rar-compressed' => 'fa-file-archive-o',
+ 'application/zip' => 'bi-file-earmark-zip',
+ 'application/x-rar-compressed' => 'bi-file-earmark-zip',
//Audio
- 'audio/mpeg' => 'fa-file-audio-o',
- 'audio/wav' => 'fa-file-audio-o',
- 'application/ogg' => 'fa-file-audio-o',
- 'audio/ogg' => 'fa-file-audio-o',
- 'audio/webm' => 'fa-file-audio-o',
- 'audio/mp4' => 'fa-file-audio-o',
+ 'audio/mpeg' => 'bi-file-earmark-music',
+ 'audio/wav' => 'bi-file-earmark-music',
+ 'application/ogg' => 'bi-file-earmark-music',
+ 'audio/ogg' => 'bi-file-earmark-music',
+ 'audio/webm' => 'bi-file-earmark-music',
+ 'audio/mp4' => 'bi-file-earmark-music',
//Video
- 'video/quicktime' => 'fa-file-video-o',
- 'video/webm' => 'fa-file-video-o',
- 'video/mp4' => 'fa-file-video-o',
- 'video/x-matroska' => 'fa-file-video-o'
+ 'video/quicktime' => 'bi-file-earmark-play',
+ 'video/webm' => 'bi-file-earmark-play',
+ 'video/mp4' => 'bi-file-earmark-play',
+ 'video/x-matroska' => 'bi-file-earmark-play'
);
$catMap = [
- 'application' => 'fa-file-code-o',
- 'multipart' => 'fa-folder',
- 'audio' => 'fa-file-audio-o',
- 'video' => 'fa-file-video-o',
- 'text' => 'fa-file-text-o',
- 'image' => 'fa=file-picture-o',
- 'message' => 'fa-file-text-o'
+ 'application' => 'bi-file-earmark',
+ 'multipart' => 'bi-folder',
+ 'audio' => 'bi-file-earmark-music',
+ 'video' => 'bi-file-earmark-play',
+ 'text' => 'bi-file-earmark-text',
+ 'image' => 'bi-file-earmark-image',
+ 'message' => 'bi-file-earmark-text'
];
@@ -3266,7 +3266,7 @@ function getIconFromType($type) {
}
if(! $iconFromType) {
- $iconFromType = 'fa-file-o';
+ $iconFromType = 'bi-file-earmark';
}
@@ -3755,12 +3755,9 @@ function cleanup_bbcode($body) {
$body = preg_replace_callback('/\[img(.*?)\[\/(img)\]/ism','\red_escape_codeblock',$body);
$body = preg_replace_callback('/\[zmg(.*?)\[\/(zmg)\]/ism','\red_escape_codeblock',$body);
- $body = preg_replace_callback("/([^\]\='".'"'."\;\/\{]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\
-+\,\(\)]+)/ismu", '\nakedoembed', $body);
-
- $body = preg_replace_callback("/([^\]\='".'"'."\;\/\{]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\
-+\,\(\)]+)/ismu", '\red_zrl_callback', $body);
+ $body = preg_replace_callback("/([^\]\='".'"'."\;\/\{]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\+\,\(\)]+)/ismu", '\nakedoembed', $body);
+ $body = preg_replace_callback("/([^\]\='".'"'."\;\/\{]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\+\,\(\)]+)/ismu", '\red_zrl_callback', $body);
$body = preg_replace_callback('/\[\$b64code(.*?)\[\/(code)\]/ism','\red_unescape_codeblock',$body);
$body = preg_replace_callback('/\[\$b64summary(.*?)\[\/(summary)\]/ism','\red_unescape_codeblock',$body);