I started working on this in an earlier thread:
http://www.boonex.com/unity/forums/#topic/Add-a-column-to-every-page-.htm
but it's morphed into a different subject so I'm starting over. I'm trying to figure out how to edit Deano's excellent mod so it'll add more than one PHP block to Pagebuilder, and each one will different properties.
My first, not totally well thought through attempt at figuring it out:
Looking at the work I need to do it seems like it would save a lot of repetitive work if I could use Deano's "Add PHP blocks to Pagebuilder for D7" mod but change it so that instead of adding generic PHP Blocks that I'll then have to edit in two different Admin dialogs, it would add blocks that are already named and Language Keyed as I need them to be. Ideally I'll end up with 3 or 4 new blocks available in Page Builder that are named something like "PHP Content1", "PHP Content2", etc.
I've gone through the mod and tried to figure out how it needs to be changed, but I'm sure I'm wrong about some things and missing others. Deano - would you be willing to look through this and see if it looks like I'm on the right track?
I've changed the SQL query so it looks like this:
INSERT INTO `sys_page_compose` (`Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES ('', '998px', 'Simple PHP Block', '_PHPcontent1 Block', 0, 0, 'Sample', 'PHP', 1, 0, 'non,memb', 0)
And the Language keys that need to be created:
Key Name: _adm_pbuilder_PHPcontent1_Block
String Text: My PHP content headline
Click save and repeat for the next 2 keys.
Key Name: _adm_pbuilder_PHP_content
String Text: PHP-Content
Key Name: _PHPcontent1 Block
String Text: My PHP content headline
And then the edits to inc\classes\BxDolPageViewAdmin.php (I'm only including the code section that I've re-edited from Deano's original edits - I hope that's OK - I only found one obvious edit)
function showPropForm($iBlockID) {
$sNoPropertiesC = _t('_adm_pbuilder_This_block_has_no_properties');
$sProfileFieldsC = _t('_adm_pbuilder_Profile_Fields');
$sHtmlBlockC = _t('_adm_pbuilder_HTML_Block');
$sPHPBlockC = _t('_adm_pbuilder_PHPcontent1_Block');
$sXmlBlockC = _t('_adm_pbuilder_XML_Block');
$sRssBlockC = _t('_adm_pbuilder_RSS_Feed');
$sSpecialBlockC = _t('_adm_pbuilder_Special_Block');
$sHtmlContentC = _t('_adm_pbuilder_HTML_content');
$sPHPContentC = _t('_adm_pbuilder_PHP_content');
$sXmlPathC = _t('_adm_pbuilder_XML_path');
I'm afraid to try it because I'd have no idea how to fix things if I screw up :)
Thanks!
Al
Looking at it again I realize that since the edits to inc\classes\BxDolPageViewAdmin.php are permanent I would be writing over part of the existing install of Deano's mod that I have on my D7 install and that's not what I want to do - I want it to add new blocks in addition to the one I've added already.
I've stepped over the threshold of my own incompetence here and I'm wandering lost in the halls of ignorance - anyone out there have some suggestions?
Thanks!