Add block to events main page

How can I add the events tag block to the main events page with the Deano's Tools module ?

 

I need the PHP code

Quote · 8 Mar 2015

bump

I only need the PHP code to call the tags block.

Quote · 9 Mar 2015

with Deano's Tools module you can read/edit the php blocks too.
maybe there is a php block with the code you need.

Quote · 9 Mar 2015

Nope, there isn't, I already checked out al the blocks and there is non with the tags. Can't find it in the script either :-(

Quote · 9 Mar 2015

I can't see where the 'Tags' are a Call/Function that can be used in a PHP block for Events but rather its a 'page'. Here is the snippet from the install.sql file from the Events module:

 


-- tag objects
INSERT INTO `sys_objects_tag` VALUES (NULL, 'bx_events', 'SELECT `Tags` FROM `[db_prefix]main` WHERE `ID` = {iID} AND `Status` = ''approved''', 'bx_events_permalinks', 'm/events/browse/tag/{tag}', 'modules/?r=events/browse/tag/{tag}', '_bx_events');

 

Maybe Deano might have another solution or someone else can help out.

Nothing to see here
Quote · 9 Mar 2015

The events tags page is designed to operate as a page. There is no code built into dolphin that can generate a individual block that can be placed on any page.

I played with it for quite a while and could not come up with a solution within the time i spent trying.

https://www.deanbassett.com
Quote · 10 Mar 2015

Pity, it would have saved me a page :-(

Thanks for the effort anyway.

Quote · 10 Mar 2015

Got it. Here is the code.

bx_import('BxTemplTagsModule');
$aParam = array(
'type' => 'bx_events',
'orderby' => 'popular',
'pagination' => getParam('tags_perpage_browse')
);

$sUrl = BX_DOL_URL_ROOT . 'm/events/home/';

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

return array(
$oTags->display($aParam, $iBlockId, '', $sUrl),
array(),
array(),
_t('_Tags')
);

Now, i have not tested this when the number of tags exceeds the value of the tags per page setting, so the pagination has not been tested so i am not sure if that works. I don't use events, so i don't have enough test tags to fully test that. Also if permalinks are disabled on your site, the url may need to be adjusted to use the non-permalink version.

https://www.deanbassett.com
Quote · 10 Mar 2015

I set the tags limit on 1.000 :-)

I inserted a new PHP block on the events main page with this code and IT WORKS !

Thanks Deano.

Quote · 10 Mar 2015

Oh yes, I also changed the font size to the smallest, so all tags fit in 1 block.

Quote · 10 Mar 2015
 
 
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.