Ejemplo n.º 1
0
        $entries_query = str_replace('<tag>,', '', $entries_query);
        $partialquery = "WHERE `blogid` IN ({$entries_query}) AND `property`<'2' ORDER BY  `sticky` DESC, `pubtime` DESC";
        if ($mbcon['tag_list'] == 1) {
            $records = $m_b->new_record_array($partialquery, $mbcon['listitemperpage'], $page);
            $listbody = $m_b->make_excerption($records, 'list');
            $section_body_main[] = $m_b->make_list(@implode('', $listbody));
            $perpagevalue = $mbcon['listitemperpage'];
        } else {
            $records = $m_b->new_record_array($partialquery, $mbcon['exceptperpage'], $page);
            $section_body_main = $m_b->make_excerption($records);
            $perpagevalue = $mbcon['exceptperpage'];
        }
        $counter_now = $blog->countbyquery("SELECT COUNT(blogid) FROM `{$db_prefix}blogs` WHERE `blogid` IN ({$entries_query}) AND `property`<'2'");
        $urlref = getlink_tags(str_replace('%', '%%', urlencode(urlencode($tag))), $mode, '%s');
        $pagebar = $m_b->make_pagebar($page, $mbcon['pagebaritems'], $urlref, $counter_now, $perpagevalue, '1');
        $pagebar .= " [ {$lnc[181]} <a href=\"" . getlink_tags(urlencode(urlencode($tag)), '1') . "\" title=\"{$lnc[182]}\">{$lnc[183]}</a> | <a href=\"" . getlink_tags(urlencode(urlencode($tag)), '2') . "\" title=\"{$lnc[184]}\">{$lnc[185]}</a> ]";
    }
    $iftoppage = $mbcon['pagebarposition'] == 'down' ? 'none' : 'block';
    $ifbottompage = $mbcon['pagebarposition'] == 'up' ? 'none' : 'block';
    if ($mbcon['tagunderlinetospace'] == 1) {
        $allentries[0]['tagname'] = str_replace('_', ' ', $allentries[0]['tagname']);
    }
    if ($mbcon['tag_list'] == 1) {
        $mainbody = $t->set('contentpage', array('title' => "Tags:{$allentries[0]['tagname']}", 'contentbody' => @implode('', $section_body_main)));
    } else {
        $mainbody = @implode('', $section_body_main);
    }
    $pagetitle = "Tags:{$allentries[0]['tagname']} - ";
    announcebar();
    $bodymenu = $t->set('mainpage', array('pagebar' => $pagebar, 'iftoppage' => $iftoppage, 'ifbottompage' => $ifbottompage, 'ifannouncement' => $ifannouncement, 'topannounce' => $topannounce, 'mainpart' => $mainbody, 'currentpage' => $pageitems['currentpage'], 'previouspageurl' => $pageitems['previouspageurl'], 'nextpageurl' => $pageitems['nextpageurl'], 'turningpages' => $pageitems['turningpages'], 'totalpages' => $pageitems['totalpages'], 'previouspageexists' => '', 'nextpageexists' => ''));
}
Ejemplo n.º 2
0
     for ($i = 0; $i < count($records); $i++) {
         $records[$i]['repcontent'] = "<strong>{$lnc[71]}</strong><a href=\"" . getlink_entry($records[$i]['blogid'], $records[$i]['blogalias']) . "\">{$records[$i]['title']}</a><br/><strong>{$lnc[76]}</strong>" . $records[$i]['repcontent'];
     }
     $section_body_main[] = $m_b->make_replies($records);
     $pagebar = $m_b->make_pagebar($page, $mbcon['pagebaritems'], $urlref, $counter_now, $mbcon['listitemperpage']);
 }
 if ($searchmethod == 4) {
     $records = $blog->getgroupbyquery("SELECT * FROM `{$db_prefix}messages` WHERE `repid` in ({$result}) ORDER BY `reptime` DESC LIMIT {$start_id}, {$mbcon['listitemperpage']}");
     $section_body_main[] = $m_b->make_messages($records);
     $pagebar = $m_b->make_pagebar($page, $mbcon['pagebaritems'], $urlref, $counter_now, $mbcon['listitemperpage']);
 }
 if ($searchmethod == 5) {
     $alltags = $blog->getarraybyquery("SELECT * FROM `{$db_prefix}tags` WHERE `tagname` in ({$result})");
     for ($i = 0; $i < count($alltags['tagname']); $i++) {
         $eachtag_encoded = urlencode(urlencode($alltags['tagname'][$i]));
         $urlref = getlink_tags($eachtag_encoded);
         if ($mbcon['tagunderlinetospace'] == 1) {
             $alltags['tagname'][$i] = str_replace('_', ' ', $alltags['tagname'][$i]);
         }
         $tag_show[] = "<a href=\"{$urlref}\" title=\"{$lnc[188]}{$alltags['tagcounter'][$i]}\" rel=\"tag\">{$alltags['tagname'][$i]}</a>";
     }
     if (is_array($tag_show)) {
         $tagshow = @implode(" &nbsp; ", $tag_show);
     } else {
         $tagshow = $lnc[189];
     }
     $t = new template();
     $section_body_main[] = $t->set('taglist', array('tagcategory' => $lnc[230], 'tagcontent' => $tagshow, 'tagextra' => ''));
 }
 $iftoppage = $mbcon['pagebarposition'] == 'down' ? 'none' : 'block';
 $ifbottompage = $mbcon['pagebarposition'] == 'up' ? 'none' : 'block';
Ejemplo n.º 3
0
 function rss_entry($entry)
 {
     global $mbcon, $adminlist, $userdetail, $config, $categories, $t, $admin_email, $lnc;
     if (!@is_a($t, 'template')) {
         $t = new template();
     }
     $entrytitle = $entry['title'];
     $entrytitle = preg_replace("/&(.+?);/is", "", $entrytitle);
     $entrytime = gmdate('r', $entry['pubtime']);
     $entrytime = str_replace('  ', ' ', $entrytime);
     //PHP outputs two spaces between weekday and time
     $tmp = $entry['authorid'];
     $entryauthor = $adminlist[$tmp];
     $entryemail = $admin_email[$tmp];
     $tmp = $entry['category'];
     $entrycate = $categories[$tmp]['catename'];
     if ($entry['blogpsw']) {
         $entrycontent = $lnc[295];
     } else {
         if ($entry['entrysummary']) {
             $entry['content'] = $entry['entrysummary'];
             $notfinish = 1;
         } else {
             $entry['content'] = @str_replace('[newpage]', '[separator]', $entry['content']);
             if ($mbcon['wholerss'] != 1 && strstr($entry['content'], '[separator]')) {
                 @(list($entry['content']) = @explode('[separator]', $entry['content']));
                 $notfinish = 1;
             } else {
                 $entry['content'] = @str_replace('[separator]', '', $entry['content']);
             }
         }
         $entrycontent = $this->getrsscontent($entry['content'], 1, $entry['ubbstat'], $entry['emotstat']);
         if ($notfinish == 1) {
             $entrycontent .= "<br/>............<br/>";
         }
     }
     if ($entry['tags'] && $entry['tags'] != '>') {
         $entry['tags'] = trim($entry['tags'], '>');
         $taginfo = @explode('>', $entry['tags']);
         foreach ($taginfo as $eachtag) {
             $eachtag_encoded = urlencode(urlencode($eachtag));
             if ($mbcon['tagunderlinetospace'] == 1) {
                 $eachtag = str_replace('_', ' ', $eachtag);
             }
             $urlref = getlink_tags($eachtag_encoded);
             $taginfos[] = "{$eachtag}";
         }
         $alltags = @implode(' , ', $taginfos);
         $tags = "<br/>Tags - " . $alltags;
     } else {
         $tags = '';
     }
     $entrycontent .= $tags;
     $entryurl = "{$config['blogurl']}/" . getlink_entry($entry['blogid'], $entry['blogalias']);
     //Start Template
     $section = $t->set('rss', array('entrytitle' => $entrytitle, 'entrytime' => $entrytime, 'entryauthor' => $entryauthor, 'entrycontent' => $entrycontent, 'entryurl' => $entryurl, 'entrycate' => $entrycate, 'entryid' => $entry['blogid'], 'entryemail' => $entryemail));
     return $section;
 }
Ejemplo n.º 4
0
     $taginfo = $allentries[0];
     $entries_query = str_replace(',<end>', '', $taginfo['tagentry']);
     $entries_query = str_replace('<tag>,', '', $entries_query);
     $partialquery = "WHERE `blogid` IN ({$entries_query}) AND `property`<'2' ORDER BY  `sticky` DESC, `pubtime` DESC";
     if ($mbcon['tag_list'] == 1) {
         $records = $m_b->new_record_array($partialquery, $mbcon['listitemperpage'], $page);
         $listbody = $m_b->make_excerption($records, 'list');
         $section_body_main[] = $m_b->make_list(@implode('', $listbody));
         $perpagevalue = $mbcon['listitemperpage'];
     } else {
         $records = $m_b->new_record_array($partialquery, $mbcon['exceptperpage'], $page);
         $section_body_main = $m_b->make_excerption($records);
         $perpagevalue = $mbcon['exceptperpage'];
     }
     $counter_now = $blog->countbyquery("SELECT COUNT(blogid) FROM `{$db_prefix}blogs` WHERE `blogid` IN ({$entries_query}) AND `property`<'2'");
     $urlref = getlink_tags(str_replace('%', '%%', urlencode(urlencode($tag))), $mode, '%s');
     $pagebar = $m_b->make_pagebar($page, $mbcon['pagebaritems'], $urlref, $counter_now, $perpagevalue, '1');
     if ($flset['modeselectable'] != 1) {
         $pagebar .= "";
     }
 }
 $iftoppage = $mbcon['pagebarposition'] == 'down' ? 'none' : 'block';
 $ifbottompage = $mbcon['pagebarposition'] == 'up' ? 'none' : 'block';
 if ($mbcon['tagunderlinetospace'] == 1) {
     $allentries[0]['tagname'] = str_replace('_', ' ', $allentries[0]['tagname']);
 }
 if ($mbcon['tag_list'] == 1) {
     $mainbody = $t->set('contentpage', array('title' => "Tags:{$allentries[0]['tagname']}", 'contentbody' => @implode('', $section_body_main)));
 } else {
     $mainbody = @implode('', $section_body_main);
 }