X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=encode.php;h=63ff5ce60f94aac1a0e04d05bf00afcc4d388e05;hb=3faf64c6a1e0cbd4f880da951775c41fb8a6f0ab;hp=9aa09a68c661e5d21c20bd434db9efbb473d5b20;hpb=423f31ad0add74bbb6066d3c9f760ad0a5580cda;p=wfpl.git
diff --git a/encode.php b/encode.php
index 9aa09a6..63ff5ce 100644
--- a/encode.php
+++ b/encode.php
@@ -71,6 +71,15 @@ function enc_htmlbrtab($str) {
return $str;
}
+# Encode for output in html. Spaces converted to and \n to
+#
+# Example:
+function enc_htmlbrnbsp($str) {
+ $str = enc_htmlbr($str);
+ $str = str_replace(' ', ' ', $str);
+ return $str;
+}
+
# Encode for output in html. Spaces converted to
#
# Example:
@@ -370,3 +379,12 @@ function enc_thumb_height($str) {
list($a, $b, $c, $src, $width, $height) = explode(' ', $str);
return $height;
}
+
+# example template: Length: ~length.html~ day~length.s~
+function enc_s($str) {
+ if($str == '1') {
+ return '';
+ }
+
+ return 's';
+}