Tags block from blogs tags to blogs home

I would like to move the special 'tags' block in the blog module to the blog home page.

It looks a bit stupid that there is a separate page for the tags :-)

Since Deanos Tools are not upgraded for 7.3.1, I can't figure out how to do this.

Anyone who can share this ?

Quote · 18 Jul 2016

Would not matter if my module was updated or not.

There are two problems with that.

1) That specific page does not even appear to be in the page builders. My module would not be able to access the blocks to make copies.

2) They are special blocks. Designed for that specific page. So would not work when copied.

As stupid as it is, it's how all of them are. The Articles, Photos, Files, Events, ect all have a separate tags page.

https://www.deanbassett.com
Quote · 18 Jul 2016

Tags can grow to large numbers with a busy site with lots of members; that may be why a separate tag page; those tag clouds things become unusable with large number of tags as well. 

Geeks, making the world a better place
Quote · 18 Jul 2016

I understand GG, but it should have been a movable block as we can see on the Blogs view post page. That way, we have the option to shift it where we want it.

Quote · 18 Jul 2016

 

I understand GG, but it should have been a movable block as we can see on the Blogs view post page. That way, we have the option to shift it where we want it.

If it is something that is desired by enough people, there will probably be a module on the market in short order.  Or you could post a job although I don't think most developers check the jobs page.  I don't myself very often.

Geeks, making the world a better place
Quote · 18 Jul 2016

Try to use the following code to create recent tags block using PHP block:

        bx_import('BxTemplTags');
$oTags = new BxTemplTags(); $oTags->getTagObjectConfig(); return $oTags->display( array( 'type' => 'blog', 'orderby' => 'recent', 'limit' => getParam('tags_show_limit') ), $iBlockId, '', BX_DOL_URL_ROOT . 'modules/boonex/blogs/blogs.php?action=tags' );

for popular tags use the following code:

        bx_import('BxTemplTags');
$oTags = new BxTemplTags(); $oTags->getTagObjectConfig(); if (!isset($this->_aParam['pagination'])) $this->_aParam['pagination'] = getParam('tags_perpage_browse'); return $oTags->display(array('type' => 'blog', 'orderby' => 'popular'), $iBlockId, '', BX_DOL_URL_ROOT . 'modules/boonex/blogs/blogs.php?action=tags');

 

Rules → http://www.boonex.com/terms
Quote · 23 Jul 2016

I also received this workaround from Igor :

 

1.    Enable the PHP Block by running this URL in a browser:
http://example.com/path-to-dolphin/administration/pageBuilder.php?action_sys=addCodeBlock

(replace the domain and path to Dolphin with your data)

2.    Go to Admin Panel -> Builders -> Pages Builder -> select "Blogs Home" -> drag the "PHP Block" to the column 1 or 2 -> click it -> enter its caption, for example _popular_tags

3.    In the big edit box below enter the PHP code:
bx_import('BxTemplTagsModule');
$aParam = array(
'type' => 'blog',
'orderby' => 'popular'
);
$sLink = BX_DOL_URL_ROOT . 'blogs/' . 'tags';
$oTags = new BxTemplTagsModule($aParam, _t('_all'), $sLink);
return $oTags->getBlockCode_All($iBlockId)[0];

 

4.    Save and check.

Quote · 24 Jul 2016

I haven't tried neither of them yet (working on other things at the moment), but if anyone did please leave your comments.

 

Thanks AlexT and Igor.

Quote · 24 Jul 2016

 

 

I understand GG, but it should have been a movable block as we can see on the Blogs view post page. That way, we have the option to shift it where we want it.

If it is something that is desired by enough people, there will probably be a module on the market in short order.  Or you could post a job although I don't think most developers check the jobs page.  I don't myself very often.

 

That's one of the problems here on  Boonex. One bumps into a problem which can't be solved in short time and the development of a site has to be postponed for days, weeks, months ...

 

But ... as you can see, there are solutions when you post your question on the forum or into the Boonex Team conversation :-)

Quote · 24 Jul 2016

 

bx_import('BxTemplTagsModule');
$aParam = array(
'type' => 'blog',
'orderby' => 'popular'
);
$sLink = BX_DOL_URL_ROOT . 'blogs/' . 'tags';
$oTags = new BxTemplTagsModule($aParam, _t('_all'), $sLink);
return $oTags->getBlockCode_All($iBlockId)[0];

 

PHP block created, I entered the code, but no result on Blog homepage :-(

Quote · 24 Jul 2016

 

$oTags = new BxTemplTags();
$oTags->getTagObjectConfig();

return $oTags->display(
array(
'type' => 'blog',
'orderby' => 'recent',
'limit' => getParam('tags_show_limit')
),
$iBlockId, '', BX_DOL_URL_ROOT . 'modules/boonex/blogs/blogs.php?action=tags'
);

 

Same here : I created the PHP block, tried both codes, got a 500 error on my site :-(

Quote · 24 Jul 2016

Since I have my website on an add-on domain, could the problem be in the BX_DOL_URL_ROOT ?

Quote · 24 Jul 2016

 

Since I have my website on an add-on domain, could the problem be in the BX_DOL_URL_ROOT ?

That will return the URL of your site; should not matter.  Please note that if the results of a PHP block is null, then the PHP block will not display.

Geeks, making the world a better place
Quote · 24 Jul 2016

When I empty the block again, my page opens again. So something must be wrong with the code or with the root url of my site :-(

Quote · 24 Jul 2016

This is the code I entered :

 

$oTags = new BxTemplTags();

        $oTags->getTagObjectConfig();

 

        return $oTags->display(

            array(

                'type' => 'blog',

                'orderby' => 'recent',

                'limit' => getParam('tags_show_limit')

            ),

            $iBlockId, '', BX_DOL_URL_ROOT . 'modules/boonex/blogs/blogs.php?action=tags'

        );

 

Caption lang key = _recent_tags

Quote · 24 Jul 2016

I've checked my code - it works fine. However I've added import in the begging of the code for the case if it isn't included yet. So please try again:

https://www.boonex.com/forums/topic/Tags-block-from-blogs-tags-to-blogs-home.htm#276889

When I empty the block again, my page opens again. So something must be wrong with the code or with the root url of my site :-(

 

Rules → http://www.boonex.com/terms
Quote · 25 Jul 2016

YES ! This code does it :

 

bx_import('BxTemplTags');
$oTags = new BxTemplTags(); $oTags->getTagObjectConfig(); return $oTags->display( array( 'type' => 'blog', 'orderby' => 'recent', 'limit' => getParam('tags_show_limit') ), $iBlockId, '', BX_DOL_URL_ROOT . 'modules/boonex/blogs/blogs.php?action=tags' );
Quote · 25 Jul 2016

Thanks AlexT.

 

The bx_import('BxTemplTags'); was the missing part.

Quote · 25 Jul 2016
 
 
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.