';
+ foreach($arr as $r) {
+ $matches = false;
+ $icon = '';
+ $cnt = preg_match('|\[attach\]href=\"(.*?)\" size=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"\[\/attach\]|',$r,$matches);
+ if($cnt) {
+ $icontype = strtolower(substr($matches[3],0,strpos($matches[3],'/')));
+ switch($icontype) {
+ case 'video':
+ case 'audio':
+ case 'image':
+ case 'text':
+ $icon = '
';
+ break;
+ default:
+ $icon = '
';
+ break;
+ }
+ $title = ((strlen(trim($matches[4]))) ? escape_tags(trim($matches[4])) : escape_tags($matches[1]));
+ $title .= ' ' . $matches[2] . ' ' . t('bytes');
+
+ $s .= '
' . $icon . '';
+ }
+ }
+ $s .= '
';
+ }
+ return $s;
}}
if(! function_exists('prepare_text')) {
@@ -2707,15 +2787,19 @@ function unamp($s) {
}}
+
+
if(! function_exists('lang_selector')) {
function lang_selector() {
global $lang;
+ $o = '