]> git.mxchange.org Git - friendica.git/blobdiff - include/conversation.php
* Add MIME types for file attachments
[friendica.git] / include / conversation.php
index 1f416f352c00bfbdbe275fa74e37b703deee8673..e659ca04d93e44b8c006755cccc2142aa538721c 100644 (file)
@@ -369,7 +369,7 @@ if(!function_exists('conversation')) {
 function conversation(&$a, $items, $mode, $update, $preview = false) {
 
 
-       require_once('bbcode.php');
+       require_once('include/bbcode.php');
 
        $ssl_state = ((local_user()) ? true : false);
 
@@ -877,26 +877,21 @@ function format_like($cnt,$arr,$type,$id) {
        if($cnt == 1)
                $o .= (($type === 'like') ? sprintf( t('%s likes this.'), $arr[0]) : sprintf( t('%s doesn\'t like this.'), $arr[0])) . EOL ;
        else {
-               //$spanatts = 'class="fakelink" onclick="openClose(\'' . $type . 'list-' . $id . '\');"';
+               $spanatts = "class=\"fakelink\" onclick=\"openClose('{$type}list-$id');\"";
                switch($type) {
                        case 'like':
-//                             $phrase = sprintf( t('<span  %1$s>%2$d people</span> like this.'), $spanatts, $cnt);
-                               $mood = t('like this');
+                               $phrase = sprintf( t('<span  %1$s>%2$d people</span> like this'), $spanatts, $cnt);
                                break;
                        case 'dislike':
-//                             $phrase = sprintf( t('<span  %1$s>%2$d people</span> don\'t like this.'), $spanatts, $cnt);
-                               $mood = t('don\'t like this');
+                               $phrase = sprintf( t('<span  %1$s>%2$d people</span> don\'t like this'), $spanatts, $cnt);
                                break;
                }
-               $tpl = get_markup_template("voting_fakelink.tpl");
-               $phrase = replace_macros($tpl, array(
-                       '$vote_id' => $type . 'list-' . $id,
-                       '$count' => $cnt,
-                       '$people' => t('people'),
-                       '$vote_mood' => $mood
+               $phrase .= EOL ;
+               $o .= replace_macros(get_markup_template('voting_fakelink.tpl'), array(
+                       '$phrase' => $phrase,
+                       '$type' => $type,
+                       '$id' => $id
                ));
-               $o .= $phrase;
-//             $o .= EOL ;
 
                $total = count($arr);
                if($total >= MAX_LIKERS)