aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-11-13 20:22:01 -0800
committerzotlabs <mike@macgirvin.com>2016-11-13 20:22:01 -0800
commit3c302bae5ac71c1853d33117f9bbcfc0e5d81651 (patch)
tree008ba03057e4b22312724155d8c45b7559eb4ca5 /include/text.php
parent103cd2b7a15caaadd5ddf8a6b69c8e3de7a2982b (diff)
downloadvolse-hubzilla-3c302bae5ac71c1853d33117f9bbcfc0e5d81651.tar.gz
volse-hubzilla-3c302bae5ac71c1853d33117f9bbcfc0e5d81651.tar.bz2
volse-hubzilla-3c302bae5ac71c1853d33117f9bbcfc0e5d81651.zip
move all the zid related stuff to one file
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php75
1 files changed, 0 insertions, 75 deletions
diff --git a/include/text.php b/include/text.php
index fa16a16a1..12b37222b 100644
--- a/include/text.php
+++ b/include/text.php
@@ -837,14 +837,6 @@ function tag_sort_length($a,$b) {
-function strip_zids($s) {
- return preg_replace('/[\?&]zid=(.*?)(&|$)/ism','$2',$s);
-}
-
-function strip_zats($s) {
- return preg_replace('/[\?&]zat=(.*?)(&|$)/ism','$2',$s);
-}
-
/**
* @brief Quick and dirty quoted_printable encoding.
*
@@ -1701,73 +1693,6 @@ function create_export_photo_body(&$item) {
}
/**
- * zidify_callback() and zidify_links() work together to turn any HTML a tags with class="zrl" into zid links
- * These will typically be generated by a bbcode '[zrl]' tag. This is done inside prepare_text() rather than bbcode()
- * because the latter is used for general purpose conversions and the former is used only when preparing text for
- * immediate display.
- *
- * Issues: Currently the order of HTML parameters in the text is somewhat rigid and inflexible.
- * We assume it looks like \<a class="zrl" href="xxxxxxxxxx"\> and will not work if zrl and href appear in a different order.
- *
- * @param array $match
- * @return string
- */
-function zidify_callback($match) {
- $is_zid = ((feature_enabled(local_channel(),'sendzid')) || (strpos($match[1],'zrl')) ? true : false);
- $replace = '<a' . $match[1] . ' href="' . (($is_zid) ? zid($match[2]) : $match[2]) . '"';
- $x = str_replace($match[0],$replace,$match[0]);
-
- return $x;
-}
-
-function zidify_img_callback($match) {
- $is_zid = ((feature_enabled(local_channel(),'sendzid')) || (strpos($match[1],'zrl')) ? true : false);
- $replace = '<img' . $match[1] . ' src="' . (($is_zid) ? zid($match[2]) : $match[2]) . '"';
-
- $x = str_replace($match[0],$replace,$match[0]);
-
- return $x;
-}
-
-
-function zidify_links($s) {
- $s = preg_replace_callback('/\<a(.*?)href\=\"(.*?)\"/ism','zidify_callback',$s);
- $s = preg_replace_callback('/\<img(.*?)src\=\"(.*?)\"/ism','zidify_img_callback',$s);
-
- return $s;
-}
-
-
-
-
-function zidify_text_callback($match) {
- $is_zid = is_matrix_url($match[2]);
- $replace = '<a' . $match[1] . ' href="' . (($is_zid) ? zid($match[2]) : $match[2]) . '"';
- $x = str_replace($match[0],$replace,$match[0]);
-
- return $x;
-}
-
-function zidify_text_img_callback($match) {
- $is_zid = is_matrix_url($match[2]);
- $replace = '<img' . $match[1] . ' src="' . (($is_zid) ? zid($match[2]) : $match[2]) . '"';
-
- $x = str_replace($match[0],$replace,$match[0]);
-
- return $x;
-}
-
-function zidify_text($s) {
-
- $s = preg_replace_callback('/\<a(.*?)href\=\"(.*?)\"/ism','zidify_text_callback',$s);
- $s = preg_replace_callback('/\<img(.*?)src\=\"(.*?)\"/ism','zidify_text_img_callback',$s);
-
- return $s;
-
-
-}
-
-/**
* @brief Return atom link elements for all of our hubs.
*
* @return string