$summary = str_replace(array("\r", "\n"), '', messagecutstr(strip_tags($post['message']), 160));
         }
         $tagarray_all = $posttag_array = array();
         $tagarray_all = explode("\t", $post['tags']);
         if ($tagarray_all) {
             foreach ($tagarray_all as $var) {
                 if ($var) {
                     $tag = explode(',', $var);
                     $posttag_array[] = $tag;
                     $tagnames[] = $tag[1];
                 }
             }
         }
         $post['tags'] = $posttag_array;
         if ($post['tags']) {
             $post['relateitem'] = getrelateitem($post['tags'], $post['tid'], $_G['setting']['relatenum'], $_G['setting']['relatetime']);
         }
         if (!$_G['forum']['disablecollect']) {
             if ($incollection) {
                 $post['relatecollection'] = getrelatecollection($post['tid'], false, $post['releatcollectionnum'], $post['releatcollectionmore']);
                 if ($_G['group']['allowcommentcollection'] && $_GET['ctid']) {
                     $ctid = dintval($_GET['ctid']);
                     $post['sourcecollection'] = C::t('forum_collection')->fetch($ctid);
                 }
             } else {
                 $post['releatcollectionnum'] = 0;
             }
         }
     }
     $postlist[$post['pid']] = $post;
 }
示例#2
0
                $summary = str_replace(array("\r", "\n"), '', messagecutstr(strip_tags($post['message']), 160));
            }
            $tagarray_all = $posttag_array = array();
            $tagarray_all = explode("\t", $post['tags']);
            if ($tagarray_all) {
                foreach ($tagarray_all as $var) {
                    if ($var) {
                        $tag = explode(',', $var);
                        $posttag_array[] = $tag;
                        $tagnames[] = $tag[1];
                    }
                }
            }
            $post['tags'] = $posttag_array;
            if ($post['tags']) {
                $post['relateitem'] = getrelateitem($post['tags'], $post['tid']);
            }
        }
        $postlist[$post['pid']] = $post;
    }
}
$seodata = array('forum' => $_G['forum']['name'], 'fup' => $_G['cache']['forums'][$fup]['name'], 'subject' => $_G['forum_thread']['subject'], 'summary' => $summary, 'tags' => @implode(',', $tagnames), 'page' => intval($_G['gp_page']));
if ($_G['forum']['status'] != 3) {
    $seotype = 'viewthread';
} else {
    $seotype = 'viewthread_group';
    $seodata['first'] = $nav['first']['name'];
    $seodata['second'] = $nav['second']['name'];
}
list($navtitle, $metadescription, $metakeywords) = get_seosetting($seotype, $seodata);
if (!$navtitle) {