Ejemplo n.º 1
0
 function getMain()
 {
     $aPathInfo = pathinfo(__FILE__);
     require_once $aPathInfo['dirname'] . '/BxBlogsSearchUnit.php';
     return BxBlogsSearchUnit::getBlogsMain();
 }
Ejemplo n.º 2
0
    /**
     * Blogs block for profile page (as PHP function). List of latest posts of member.
     *
     * @param $_iProfileID - member id
     *
     * @return html of last blog posts
     */
    function serviceBlogsProfilePage($_iProfileID)
    {
        if (!$this->isAllowedBlogsPostsBrowse()) {
            return $this->_oTemplate->displayAccessDenied();
        }
        $GLOBALS['oTopMenu']->setCurrentProfileID($_iProfileID);
        require_once $this->_oConfig->getClassPath() . 'BxBlogsSearchUnit.php';
        $oBlogSearch = new BxBlogsSearchUnit();
        $oBlogSearch->PerformObligatoryInit($this, 4);
        $oBlogSearch->aCurrent['paginate']['perPage'] = $this->_oConfig->getPerPage('profile');
        $oBlogSearch->aCurrent['restriction']['owner']['value'] = $_iProfileID;
        //$oBlogSearch->aCurrent['restriction']['publicStatus']['value'] = 'public';
        $sCode = $oBlogSearch->displayResultBlock();
        if ($oBlogSearch->aCurrent['paginate']['totalNum']) {
            return <<<EOF
<div class="bx-def-bc-padding">
    {$sCode}
</div>
EOF;
        }
    }
Ejemplo n.º 3
0
    /**
     * Blogs block for profile page (as PHP function). List of latest posts of member.
     *
     * @param $_iProfileID - member id
     *
     * @return html of last blog posts
     */
    function serviceBlogsProfilePage($_iProfileID)
    {
        if (!$this->isAllowedBlogsPostsBrowse()) {
            return $this->_oTemplate->displayAccessDenied();
        }
        $GLOBALS['oTopMenu']->setCurrentProfileID($_iProfileID);
        require_once $this->_oConfig->getClassPath() . 'BxBlogsSearchUnit.php';
        $oBlogSearch = new BxBlogsSearchUnit();
        $oBlogSearch->PerformObligatoryInit($this, 4);
        $oBlogSearch->aCurrent['paginate']['perPage'] = (int) getParam("max_blogs_on_home");
        $oBlogSearch->aCurrent['restriction']['owner']['value'] = $_iProfileID;
        //$oBlogSearch->aCurrent['restriction']['publicStatus']['value'] = 'public';
        $sCode = $oBlogSearch->displayResultBlock();
        if ($oBlogSearch->aCurrent['paginate']['totalNum']) {
            return <<<EOF
<div class="dbContent">
\t<div class="blog_posts_wrapper">
\t\t<div class="clear_both"></div>
\t\t{$sCode}
\t\t<div class="clear_both"></div>
\t</div>
</div>
EOF;
        }
    }