Hello: I am using boon-ex dolphin and am trying to retrieve a php block from one module and place it in a php block on another. The "Page" module is for businesses and the "beauty" module list employee information. I created a php block on the page in page module and used the following code within that block to retrieve data that will show the Page owner's employees.
Nothing happened so I then used the following
BxDolService::call('beauty', 'profile_block', array($iProfileId));
I then used the following acquired from your module and nothing appeared:
bx_import('BxDolService'); return BxDolService::call('beauty', 'profile_block', array($this->oProfileGen->_iProfileID));
Actually, what I want to show is the page owner's information. So if I am looking at Mary's business page- for instance, I want to see her additions in the beauty module within that php block. The following represents the Service Method for retrieving that block's info.
- Profile block with user's beauty
- @ BxBeautyModule::serviceProfileBlock
- BxDolService::call('beauty', 'profile_block', array($iProfileId));
/**
Profile block with user's beauty
@ $iProfileId profile id
@return html to display on homepage in a block
/
function serviceProfileBlock ($iProfileId) {
$iProfileId = (int)$iProfileId;
$aProfile = getProfileInfo($iProfileId);
bx_import ('PageMain', $this->_aModule);
$o = new BxBeautyPageMain ($this);
$o->sUrlStart = getProfileLink($aProfile['ID']) . '?';
$this->_oTemplate->addCss(array( 'unit.css', 'twig.css'));
return $o->ajaxBrowse(
'user',
$this->_oDb->getParam('modzzz_beauty_perpage_profile'),
array(),
$aProfile['NickName'],
true,
false
);
}
Please note thet PHP Blocks in dolphin are processed using the php eval function.
They cannot contain starting and ending php tags. Example
This will not work in a php block.
<?php
echo 'Hello World!';
?>
But this will work.
echo 'Hello World!';
Most existing php code cannot simply be dropped into a php block without some rewrites to make it compatible with eval.
Can someone provide any assistance please?
Thanks