call a user's blog into php block

does anyone know how I can call a user's blog to show in PHP block?  Or pull a particular category into to show in PHP block ?

thanks in advance :)

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 22 Dec 2012

bump.

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 31 Dec 2012

rss_factory.php?action=blogs&pid=1    might work  ?    in a rss block

https://dolphin-techs.com - Skype: Dolphin Techs
Quote · 31 Dec 2012

 I am wondering how a page block calls the content to show when a category is picked ?

 

rss_factory.php?action=blogs&pid=1

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 31 Dec 2012

 Ummm ... OK this did in-fact work but is the rss feed don't show the blog images / thumb

.... I also wish to be able to pull videos from a category and display them in block at other pages etc ...

I'm trying to understand how content is called and displayed on pages ?

rss_factory.php?action=blogs&pid=1    might work  ?    in a rss block

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 1 Jan 2013

another issue doing it the way you suggest Jay is that there seems to be one feed for all blogs and not per category ?!

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 1 Jan 2013

i don't think dolphin rss feed is up to par with images and thumbs in the feed.... 

i'll have to see if they have rss per category but i am not sure if they do...  

you might be able to do an rss feed per featured blog posts.  then just add everything you want in the featured block then call that in a feed.

I don't use blogs for anything so its hard to say.

https://dolphin-techs.com - Skype: Dolphin Techs
Quote · 1 Jan 2013

 any idea on this jay ?: "I'm trying to understand how content is called and displayed on pages ?"

i don't think dolphin rss feed is up to par with images and thumbs in the feed.... 

i'll have to see if they have rss per category but i am not sure if they do...  

you might be able to do an rss feed per featured blog posts.  then just add everything you want in the featured block then call that in a feed.

I don't use blogs for anything so its hard to say.

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 1 Jan 2013

create a new php block and put this in the content.

return BxDolService::call(''blogs'', ''blogs_profile_page'', array(getLoggedId()));

by default it will pull blogs of logged id user but you can put the id of the user if you want some one specific.

I didn't tested it btw, i am in half sleep so will come back tomorrow.

so much to do....
Quote · 1 Jan 2013

he wants blog categories ....

https://dolphin-techs.com - Skype: Dolphin Techs
Quote · 1 Jan 2013

like say with videos >> 

user clicks category >> new page loads >> the block within page shows relevant content ...

how does this work ?   I want to be able to do this with all content like blogs of particular category, or videos, etc etc and display it in php or html block on other pages

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 1 Jan 2013
Or pull a particular category into to show in PHP block ?

 Edit module/boonex/blogs/classes/BxBlogsModule.php and put this in the bottom just after serviceGetSpyPost() function

function serviceBlogsCategoryBlock($sCat) {
        if (!$this->isAllowedBlogsPostsBrowse()) {
            return $this->_oTemplate->displayAccessDenied();
        }
   
        require_once( $this->_oConfig->getClassPath() . 'BxBlogsSearchUnit.php');
        $oBlogSearch = new BxBlogsSearchUnit();
        $oBlogSearch->PerformObligatoryInit($this, 4);
        $oBlogSearch->aCurrent['paginate']['perPage'] = 10;
        $oBlogSearch->aCurrent['restriction']['category_uri']['value'] = $sCat;
        $sCode = $oBlogSearch->displayResultBlock();
   
        if ($oBlogSearch->aCurrent['paginate']['totalNum']) {
            return <<<EOF
<div class="bx-def-bc-padding">
    {$sCode}
</div>
EOF;
        }
    }

Now add a php block and put this in it.

return BxDolService::call('blogs', 'blogs_category_block', array('Tech News'));

Replace "Tech News" with whatever category you want.

Hope it helps, this time :)

so much to do....
Quote · 2 Jan 2013

Awesome .. I will give this a try!

would it be similar way to call videos of particular category?

Thank you for help :)

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 2 Jan 2013

 Do I  add the code after this? :

function serviceGetSpyPost($sAction, $iObjectId = 0, $iSenderId = 0, $aExtraParams = array())
    {

 Just checking :)

Or pull a particular category into to show in PHP block ?

 Edit module/boonex/blogs/classes/BxBlogsModule.php and put this in the bottom just after serviceGetSpyPost() function

function serviceBlogsCategoryBlock($sCat) {
        if (!$this->isAllowedBlogsPostsBrowse()) {
            return $this->_oTemplate->displayAccessDenied();
        }
   
        require_once( $this->_oConfig->getClassPath() . 'BxBlogsSearchUnit.php');
        $oBlogSearch = new BxBlogsSearchUnit();
        $oBlogSearch->PerformObligatoryInit($this, 4);
        $oBlogSearch->aCurrent['paginate']['perPage'] = 10;
        $oBlogSearch->aCurrent['restriction']['category_uri']['value'] = $sCat;
        $sCode = $oBlogSearch->displayResultBlock();
   
        if ($oBlogSearch->aCurrent['paginate']['totalNum']) {
            return <<<EOF
<div class="bx-def-bc-padding">
    {$sCode}
</div>
EOF;
        }
    }

Now add a php block and put this in it.

return BxDolService::call('blogs', 'blogs_category_block', array('Tech News'));

Replace "Tech News" with whatever category you want.

Hope it helps, this time :)

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 2 Jan 2013

ummm not sure why but I cannot get this working .... php block not displaying results

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 2 Jan 2013

any idea about this please?

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 3 Jan 2013

in the bottom of that file after this

    'recipient_id'     => $iRecipientId,

    'spy_type'         => 'content_activity',

        );

    }

Just before last "}";

Sorry for late reply i was busy with something.

so much to do....
Quote · 4 Jan 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.