deano92964
•
Premium
•
5165 posts Quote
•
Dec 06, 2009 16:01
•
2 likes
•
 This is a rewrite of the D6 mod to enable PHP blocks to be dragged into a page from the page builders.
First we start by adding a entry to the database. Open phpmyadmin and execute the following SQL query to add the Block to the page builder.
INSERT INTO `sys_page_compose` (`Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES ('', '998px', 'Simple PHP Block', '_PHP Block', 0, 0, 'Sample', 'PHP', 1, 0, 'non,memb', 0)
Now we need to add 3 new language keys.
Log into your sites admin panal, go to Settings -> Language Settings.
Now add these 3 new keys.
Click the Add Key button.
Key Name: _adm_pbuilder_PHP_Block
String Text: PHP Block
Click save and repeat for the next 2 keys.
Key Name: _adm_pbuilder_PHP_content
String Text: PHP-Content
Key Name: _PHP Block String Text: PHP Block
Now we need to make all the changes to the code to enable the block to be edited and deleted.
Open the file inc\classes\BxDolPageViewAdmin.php Make a backup of that file before you change it. So you can revert back to the old one if something goes wrong.
NOTE: Line numbers below may not exactly match what you have. Use the code as a visual aid to make sure you have the right spot.
Around line 246 will be the following code.
if( $sFunc == 'RSS' ) $sContentUpd = "`Content` = '" . process_db_input($aData['Url'], BX_TAGS_STRIP) . '#' . (int)$aData['Num'] . "',"; elseif( $sFunc == 'Echo') $sContentUpd = "`Content` = '" . process_db_input($aData['Content'], BX_TAGS_NO_ACTION) . "',"; elseif( $sFunc == 'XML' ) { $iApplicationID = (int)$aData['application_id']; $sContentUpd = "`Content` = '" . $iApplicationID . "',"; } else $sContentUpd = '';
Make it look like this by adding the lines marked block.
if( $sFunc == 'RSS' ) $sContentUpd = "`Content` = '" . process_db_input($aData['Url'], BX_TAGS_STRIP) . '#' . (int)$aData['Num'] . "',"; elseif( $sFunc == 'Echo') $sContentUpd = "`Content` = '" . process_db_input($aData['Content'], BX_TAGS_NO_ACTION) . "',"; elseif( $sFunc == 'PHP') $sContentUpd = "`Content` = '" . process_db_input($aData['Content'], BX_TAGS_NO_ACTION) . "',"; elseif( $sFunc == 'XML' ) { $iApplicationID = (int)$aData['application_id']; $sContentUpd = "`Content` = '" . $iApplicationID . "',"; } else $sContentUpd = ''; Continue down to to about line 260. Look for this.
function showPropForm($iBlockID) { $sNoPropertiesC = _t('_adm_pbuilder_This_block_has_no_properties'); $sProfileFieldsC = _t('_adm_pbuilder_Profile_Fields'); $sHtmlBlockC = _t('_adm_pbuilder_HTML_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'); $sXmlPathC = _t('_adm_pbuilder_XML_path');
Make it look like this. Adding the marked lines.
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_PHP_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');
Continue to about line 396
Find this.
switch( $aItem['Func'] ) { case 'PFBlock': $sBlockType = $sProfileFieldsC; break; case 'Echo': $sBlockType =$sHtmlBlockC; break; case 'XML': $sBlockType =$sXmlBlockC; break; case 'RSS': $sBlockType =$sRssBlockC; break; default: $sBlockType =$sSpecialBlockC; break; }
Make it look like this.
switch( $aItem['Func'] ) { case 'PFBlock': $sBlockType = $sProfileFieldsC; break; case 'Echo': $sBlockType =$sHtmlBlockC; break; case 'PHP': $sBlockType =$sPHPBlockC; break; case 'XML': $sBlockType =$sXmlBlockC; break; case 'RSS': $sBlockType =$sRssBlockC; break; default: $sBlockType =$sSpecialBlockC; break; }
About a half dozen lines below that look for this.
$sDeleteButton = ($aItem['Func'] == 'RSS' or $aItem['Func'] == 'Echo' or $aItem['Func'] == 'XML') ? '<input type="reset" value="Delete" name="Delete" />' : '';
Make it look like this.
$sDeleteButton = ($aItem['Func'] == 'RSS' or $aItem['Func'] == 'Echo' or $aItem['Func'] == 'XML' or $aItem['Func'] == 'PHP') ? '<input type="reset" value="Delete" name="Delete" />' : '';
Now move down to around line 460. Look for this.
if( $aItem['Func'] == 'Echo') { $aForm['inputs']['Content'] = array( 'type' => 'textarea', 'html' => true, 'name' => 'Content', 'value' => $sBlockContent, 'caption' => $sHtmlContentC, 'required' => true, ); } elseif( $aItem['Func'] == 'XML' ) { $aExistedApplications = BxDolService::call('open_social', 'get_admin_applications', array());
$aForm['inputs']['Applications'] = array( 'type' => 'select', 'name' => 'application_id', 'caption' => _t('_osi_Existed_applications'), 'values' => $aExistedApplications );
Make it look like this.
if( $aItem['Func'] == 'Echo') { $aForm['inputs']['Content'] = array( 'type' => 'textarea', 'html' => true, 'name' => 'Content', 'value' => $sBlockContent, 'caption' => $sHtmlContentC, 'required' => true, ); } elseif( $aItem['Func'] == 'PHP' ) { $aForm['inputs']['Content'] = array( 'type' => 'textarea', 'html' => true, 'name' => 'Content', 'value' => $sBlockContent, 'caption' => $sPHPContentC, 'required' => true, ); } elseif( $aItem['Func'] == 'XML' ) { $aExistedApplications = BxDolService::call('open_social', 'get_admin_applications', array());
$aForm['inputs']['Applications'] = array( 'type' => 'select', 'name' => 'application_id', 'caption' => _t('_osi_Existed_applications'), 'values' => $aExistedApplications );
Now Move to line 520 or so. Look for this.
if ($aItem['Func'] == 'RSS' or $aItem['Func'] == 'Echo' or $aItem['Func'] == 'XML') { $aForm['inputs']['Delete'] = array( 'type' => 'reset', 'name' => 'Delete', 'caption' => 'Delete', 'value' => 'Delete', ); }
Make it look like this.
if ($aItem['Func'] == 'RSS' or $aItem['Func'] == 'Echo' or $aItem['Func'] == 'XML' or $aItem['Func'] == 'PHP') { $aForm['inputs']['Delete'] = array( 'type' => 'reset', 'name' => 'Delete', 'caption' => 'Delete', 'value' => 'Delete', ); }
Thats it. It's not as easy as the D6 mod. There are more code changes. Make a backup of that file before you change it. So you can revert back to the old one if something goes wrong.
You should now see a PHP Block in the page builders that you can drag onto any page just like the HTML block.
And a note to BOONEX. This should be STANDARD in dolphin.
Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |
houstonlively
•
Advanced
•
3585 posts Quote
•
Dec 06, 2009 16:30
•
0 likes
•
 Shouldn't 'PageWidth' be 100% instead of 998px? Maybe I should just wait for Dolphin 12 |
deano92964
•
Premium
•
5165 posts Quote
•
Dec 06, 2009 16:33
•
0 likes
•
 No. Thats the default for the HTML Block also.
It will adjust when it's put in a page. Thats the the default entry.
Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |
houstonlively
•
Advanced
•
3585 posts Quote
•
Dec 06, 2009 16:37
•
0 likes
•
 OK. It would be really cool, if you could upload a zip file of BxDolPageViewAdmin.php somewhere.
That way if I screw something up, I could just blame you. Maybe I should just wait for Dolphin 12 |
deano92964
•
Premium
•
5165 posts Quote
•
Dec 06, 2009 16:45
•
0 likes
•

Now we need to make all the changes to the code to enable the block to be edited and deleted.
Open the file inc\classes\BxDolPageViewAdmin.php Make a backup of that file before you change it. So you can revert back to the old one if something goes wrong.
NOTE: Line numbers below may not exactly match what you have. Use the code as a visual aid to make sure you have the right spot.
That's why this is at the top of my post. Make a backup. Just incase you do screw up. Now if i would just follow my own advice. I sometimes don't, and occasionally regret it.
Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |
houstonlively
•
Advanced
•
3585 posts Quote
•
Dec 06, 2009 17:51
•
0 likes
•
 I don't think I was meant to have a PHP Block>
Warning: Cannot modify header information - headers already sent
by (output started at
/home/xxxxxx/public_html/inc/classes/BxDolPageViewAdmin.php:1567) in /home/xxxxxx/public_html/inc/admin_design.inc.php on line 56
Maybe it has something do do with a change set I applied to admin. Maybe I should just wait for Dolphin 12 |
deano92964
•
Premium
•
5165 posts Quote
•
Dec 06, 2009 18:01
•
0 likes
•
 Cant explain it.
I know someone else used my other one and had no problems, but you did?
A changeset? Do you mean something pulled from trac thats newer?
Could be. I will have to look at all of this again when RC3 is released. Something might be different.
Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |
houstonlively
•
Advanced
•
3585 posts Quote
•
Dec 06, 2009 18:23
•
0 likes
•
 Fixed
Interesting... my original BxDolPageViewAdmin.php had blank lines after the closing php tag and there were no problems. Once I removed the blank lines after the closing php tag, it worked fine.
My new PHP page: Remove because of the friggin spammers I got a few CSS glitches to work out, but nothing serious.
THANKS! (A big thanks for awesome work.)
There's no excuse for Boonex not to include this, since you've already done all the work. Maybe I should just wait for Dolphin 12 |
deano92964
•
Premium
•
5165 posts Quote
•
Dec 06, 2009 18:39
•
1 likes
•
 Hmm. Very strange that blank lines would cause that. It may be stupid stuff like CR and LF sequences. I always transfer text files in text mode instead of binary. My FTP client converts it to unix format by stripping out all the CR.
I have run into problems with CR and LF sequences at the end of lines in the past. It may have been something as silly as that.
Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |
houstonlively
•
Advanced
•
3585 posts Quote
•
Dec 06, 2009 18:50
•
0 likes
•
 Any objections to me adding this to trac as an enhancement? You'll be famous.
Except for a few minor css problems, my video search page finally works right. Maybe I should just wait for Dolphin 12 |
deano92964
•
Premium
•
5165 posts Quote
•
Dec 06, 2009 18:57
•
1 likes
•
 Go ahead. I would even do it myself if i had access. But my extension i posted here months ago is still pending. So i never reached expert status.
Of course, i have not contributed recently either, so i lost that status also.
Famous huh. Unlikely.
I am willing to place wagers if it will get added. My bet is no.
Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |
Zarcon
•
SuperModerator
•
2453 posts Quote
•
Dec 06, 2009 19:02
•
0 likes
•
 HoustonLively, Come on man. You have to shared that Internet Video script with us. Can you package it and send us a link? I would love to implement something like this on my site.
Chris
Zarcon - Unity Sherriff ---------- Breaking Unity Rules = Free Vacation |
mallorca
•
Premium
•
75 posts Quote
•
Dec 06, 2009 19:08
•
0 likes
•
 I for myself thought weeks ago about to ask Houstonlively for the script. It looks great and helpful. So if there is a way Houston, I'm interested to. |
mauricecano
•
Premium
•
1327 posts Quote
•
Dec 06, 2009 19:11
•
0 likes
•
 PHP blocks are built into dolphin, however to access a block and make it php you have to edit the sql database for that page directly which is a pain. this new code is very nice thanks! |
houstonlively
•
Advanced
•
3585 posts Quote
•
Dec 06, 2009 19:48
•
0 likes
•

RE: HoustonLively, Come on man. You have to shared that Internet Video script with us. Can you package it and send us a link? I would love to implement something like this on my site.
Chris
But it's not ready yet. When added with pagebuilder, some of the CSS is overridden by D7 CSS, and I need to fix it. You wouldn't want it in it's current condition... would you?
I also need to polish up the navigation stuff a little, with cute little buttons and graphics, instead of that ugly text stuff.
Maybe I should just wait for Dolphin 12 |
Zarcon
•
SuperModerator
•
2453 posts Quote
•
Dec 06, 2009 19:58
•
0 likes
•
 OK, thats cool. I will wait for it :)
Thanks,
Chris
Zarcon - Unity Sherriff ---------- Breaking Unity Rules = Free Vacation |
houstonlively
•
Advanced
•
3585 posts Quote
•
Dec 06, 2009 20:20
•
0 likes
•
 Ticket added: http://www.boonex.com/trac/dolphin/ticket/1578
Since all the work is done. I see no reason for Boonex NOT to add this. I posted the modified code for inc/classes/BxDolPageViewAdmin.php if anyone wants to just cut and paste the code in it's entirety.... they can. Like Deano said, back your stuff up! Before you run the sql query, you should also export your sys_page_compose table to a file. Maybe I should just wait for Dolphin 12 |
houstonlively
•
Advanced
•
3585 posts Quote
•
Dec 06, 2009 21:34
•
0 likes
•
 I should know better by now. Every time I post a url to a demo on my site, I get a spam account in about 2 seconds. Maybe I should just wait for Dolphin 12 |
zac88
•
Advanced
•
13 posts Quote
•
Dec 30, 2009 10:10
•
0 likes
•
 Hi guys. As first thing, thank you very much for this tutorial!
I need this feature before dolphin 7.1 and im gonna follow instructions.
Ill have problems when upgrading to next release (7.0.1)? Should I take particoulary attention to some files (overriding problem) or database changing?
How can I now if in next releases inc/classes/BxDolPageViewAdmin.php file has changed and i must re-edit him?
Thx in advice
|
deano92964
•
Premium
•
5165 posts Quote
•
Dec 30, 2009 11:14
•
1 likes
•
 Any time source mods are done, they will have to be done again when a new version or upgrade is released that replaces the modified files.
This is just the nature of doing source code mods.
The database entry should not be affected by any upgrade, but it would not hurt to check to make sure it's still there when the mod has to be applied again, and skip the database part if the entry is still in the database.
If it changes to much for the mod to be applied in a new version then i guess i will just have to rewrite it.
Hopefully 7.1 will have it built in. Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |
zac88
•
Advanced
•
13 posts Quote
•
Dec 30, 2009 14:24
•
0 likes
•

Just one more question: If boonex tem is gonna rewrite BxDolPageViewAdmin.php till dolphin 7.1, are u you gonna provide new "istructions" to get it work on next minor releases (7.01, 7.02....) ?
Thanks in advice! |
deano92964
•
Premium
•
5165 posts Quote
•
Dec 30, 2009 14:29
•
1 likes
•
 If needed. Which most likely it will not be needed. Unless they make changes to the specific spots of code that need to be modified, then this mod most likely will not have to be changed.
I don't antisipate that unless they have plans to add additional block types of their own. Which will be unlikely before 7.1 because the updates between 7.0 and 7.1 will be bug fix releases.
Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |
CALTRADE
•
Advanced
•
2659 posts Quote
•
Dec 31, 2009 21:28
•
0 likes
•
 Great job on this Deno - thanks for doingn this. Someone remind me not to overwrite my BxDolPageViewAdmin.php on the next update though - I tend to forget these things :-( I wish Boonex would just add this code to save us the grief. |
Nathan Paton
•
SuperModerator
•
6973 posts Quote
•
Dec 31, 2009 21:31
•
0 likes
•

Great job on this Deno - thanks for doingn this. Someone remind me not to overwrite my BxDolPageViewAdmin.php on the next update though - I tend to forget these things :-( I wish Boonex would just add this code to save us the grief.
He he, I'll need to remember that as well. I'm also wondering why BoonEx won't add this feature in, since it's so dead simple, too. Would you like to install the Be boot manager? Volunteer SuperModerator. I'm not tech support. |
deano92964
•
Premium
•
5165 posts Quote
•
Dec 31, 2009 21:37
•
0 likes
•
 It's been submitted as a ticket. They moved it to 7.1. So i guess they might consider it.
http://www.boonex.com/trac/dolphin/ticket/1578 Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |
Nathan Paton
•
SuperModerator
•
6973 posts Quote
•
Dec 31, 2009 21:38
•
0 likes
•

It's been submitted as a ticket. They moved it to 7.1. So i guess they might consider it.
http://www.boonex.com/trac/dolphin/ticket/1578
Ah, yes. Hopefully they will. Would you like to install the Be boot manager? Volunteer SuperModerator. I'm not tech support. |
ronklein3
•
Advanced
•
82 posts Quote
•
Jan 08, 2010 17:40
•
0 likes
•
 I found this mod, Block Magic 7.0, on Expertzzz.com listed for free. It is supposed to be for adding PHP blocks to D7. I don't know if it would require re-installing after an update or not. I have not been able to get my coder to evaluate it for me yet. It is here if want to check it. I would like to know if it is a good mod and worth installing if anyone does check it. Thanks |
slim007
•
Advanced
•
53 posts Quote
•
Jan 13, 2010 17:51
•
0 likes
•
 Hi deano92964
Many thanks for your post. Just tried it and works perfectly first time.Havent actually added a page yet, but so far looks real good.
Very nice of you to share it with us and i for one (as a non coder) appreciate all the help I can get on here, especially when its free.
Not that im against paying for stuff, just that my site is totally free (always will be) and its hard when you got to keep paying out dollars for every little addition
especially when it comes outta my pocket all the time:-) Thanks again anyway.
Jim |
LeatherSportB
•
Advanced
•
361 posts Quote
•
Jan 14, 2010 13:26
•
1 likes
•
 I'll give Block Magic 7.0 a try tonight and see how well it works.
I would rather not start changing files by hand if a plug in can take care of it.
Any ideas on when 7.1 will be released?
LSB
Light man a fire keep him warm for a night, light him ON fire & he will be warm the rest of his life |
zak2008
•
Advanced
•
108 posts Quote
•
Feb 07, 2010 06:50
•
0 likes
•
 Thanks so much for posting this solution, deano. |
deano92964
•
Premium
•
5165 posts Quote
•
Apr 28, 2010 22:25
•
1 likes
•
 I finally put this in the market here. http://www.boonex.com/unity/extensions/entry/Add_PHP_Block_to_Page_Builders_
Zip file contains a script to do the sql and language keys for you, and instructions for the source portion of the mod in both html and pdf format.
Tested and working for Dolphin 7.0.0 and 7.0.1
Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |
Nathan Paton
•
SuperModerator
•
6973 posts Quote
•
Apr 28, 2010 22:28
•
0 likes
•

I finally put this in the market here. http://www.boonex.com/unity/extensions/entry/Add_PHP_Block_to_Page_Builders_
Zip file contains a script to do the sql and language keys for you, and instructions for the source portion of the mod in both html and pdf format.
Tested and working for Dolphin 7.0.0 and 7.0.1
Thank you, Deano. Whenever I see Beastie ramming a penguin doggie-style, I will think of you. Would you like to install the Be boot manager? Volunteer SuperModerator. I'm not tech support. |
ameenoluajayi
•
Advanced
•
2 posts Quote
•
May 11, 2010 07:48
•
0 likes
•
 Anyone know why deano or houstonlively mod not working for me (i tried both deano's and houstonlively full page of the class)
and both times in the "Page Builder" when i try to view a page block the page stops at the "loading.."
You know how it shows "loading..." when u want to view a page block and after that it displays the "active blocks"/"inactive blocks" etc
well for me it doesnt finally render the page it just stops at "loading..."
Please help anyone thanks!


|
deano92964
•
Premium
•
5165 posts Quote
•
May 11, 2010 08:46
•
0 likes
•
 My suggestion now is to restore that page from a backup. The full-page version HL provided was written for D7.0.0 and should not be used if your running 7.0.1. So if your running 7.0.1 you should do it by hand.
Anyhow. Page builder loading problems is a common one you will find several posts in the forums on it. So it most likely has nothing to do with the mod. Considering hundreds of people are using this code without problems.
But reverting the page modifications back to defaults by restoring the backup and checking to see if the problem goes away is where you should start.
Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |
ameenoluajayi
•
Advanced
•
2 posts Quote
•
May 11, 2010 12:32
•
0 likes
•
 Thanks Deano
I am running 7.0
I restored the file after I tried it your way and things went back to normal. I also did so after trying HL's way.
However I need the mod so is there any other pointers or help you can give me thanks?
BTW I did not install dolphin myself (although I'm a CF/.NET developer) I let boonex install it so it would be done as best possible.
|
romeonyc77
•
Advanced
•
259 posts Quote
•
May 12, 2010 18:10
•
0 likes
•
 I just did the mod. I am getting this error message when the PHP Blocks displays on the page:
Parse error: syntax error, unexpected '<' in /home/kartingc/public_html/inc/classes/BxDolPageView.php(572)
: eval()'d code on line 1 |
deano92964
•
Premium
•
5165 posts Quote
•
May 12, 2010 19:00
•
0 likes
•
 Again. Not a mod problem but a code problem.
When using a php block, do not start the code with the normal starting and ending php tags. For example.
This will work.
echo "Hello World";
This will not work.
<?php
echo "Hello World";
?>
PHP blocks in dolphin are processed with the php function eval.
For more info on eval click here. http://php.net/manual/en/function.eval.php
Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |
TexasDragon
•
Advanced
•
37 posts Quote
•
May 27, 2010 11:02
•
0 likes
•
 in support of Romeonyc77, I too, am getting the same error. Its not because of an opening <? tag. For me its because I am using the CKEditor mod by BrowserWeb and it puts the <p> </p> tags into the field. Im looking into how to fix this now. It also does the <p> tags in a custom html block.
If anyone can come up with a fix for this before I do, please let us know!
Thank you
|
TexasDragon
•
Advanced
•
37 posts Quote
•
May 27, 2010 13:03
•
0 likes
•
 So what I did to fix this <p> and </p> issues using ckeditor, is this:
} elseif( $aItem['Func'] == 'PHP' ) { $aForm['inputs']['Content'] = array( 'type' => 'textarea', 'html' => false, 'name' => 'Content', 'value' => $sBlockContent, 'caption' => $sPHPContentC, 'required' => true, );
this way, it doesnt try to use ckeditor, or tinymce and it gives me just the code. It works for me, because I can just refresh the page im using the code on instead of seeing it in the editor page.
|
devin
•
Advanced
•
120 posts Quote
•
Oct 06, 2010 20:32
•
0 likes
•
 hello, i am using 7.0.1 and would like to add a php block in the right column on the join page to add the featured members. first question, is this possible?second question, if so, does anyone know the code to insert in the block to add the featured members?
thanks i'm tired |
nandonet
•
Advanced
•
119 posts Quote
•
Oct 11, 2010 21:33
•
0 likes
•
 hello, please could you update for dolphin 7.03? |
Nathan Paton
•
SuperModerator
•
6973 posts Quote
•
Oct 11, 2010 22:31
•
0 likes
•
 http://www.boonex.com/unity/extensions/entry/Deanos_Tools_V1_6_Dolphin_7_0_Version
Deano's free mod includes many tools, including the ability to add PHP blocks to any page in the page builder. It's compatible with the latest version. Would you like to install the Be boot manager? Volunteer SuperModerator. I'm not tech support. |
nandonet
•
Advanced
•
119 posts Quote
•
Oct 28, 2010 16:51
•
0 likes
•
 Thanks, but this module was more practical, I hope that Mr Deano encourage to update it |
deano92964
•
Premium
•
5165 posts Quote
•
Oct 28, 2010 16:55
•
0 likes
•
 There is really no update needed. I just installed it on my 7.0.3 site following the normal directions and it works fine.
Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |
fiveline
•
Advanced
•
17 posts Quote
•
Dec 14, 2010 09:40
•
0 likes
•
 *bows down* JUST WAHT I NEEDED! |
mzronny
•
Advanced
•
12 posts Quote
•
Feb 07, 2011 13:23
•
0 likes
•
 I am following instructions but my PHP Blocks show as Special Blocks with no textarea. I am using 7.0.3. |
deano92964
•
Premium
•
5165 posts Quote
•
Feb 07, 2011 13:34
•
0 likes
•
 That would indicate the source portion of the mod was not properly applied.
This post is out dated anyway.
So restore the backup of inc\classes\BxDolPageViewAdmin.php to reverse the changes you made and try using the more updated instructions in the mod i have in the market for this.
http://www.boonex.com/unity/extensions/entry/Add_PHP_Block_to_Page_Builders_
If the source changes to inc\classes\BxDolPageViewAdmin.php are not done correctly then the PHP blocks will not be able to be edited. Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |
mzronny
•
Advanced
•
12 posts Quote
•
Feb 07, 2011 14:02
•
0 likes
•
 I used that way the third try ... and when I try to restore it with the original file the php blocks still show up ... i even delete it from the db. |
deano92964
•
Premium
•
5165 posts Quote
•
Feb 07, 2011 14:04
•
0 likes
•
 When you make database changes, you need to clear the cache. The problem is in the source changes. If not done correctly they will show up as special blocks. So you have to be doing something wrong.
Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |
jmonroe
•
Advanced
•
174 posts Quote
•
Feb 08, 2011 14:37
•
0 likes
•
 Hey Deano...regarding this page creation deal... I wanted to add a custom page to the nav bar. I added it under builder--page blocks. I see it in my sys_page_compose and sys_page_compose_pages in the db. Now...I went to navigation menu...and selected my icon I want to use on the bar...gave it a name...but unsure what to put for the location.
I didnt see a physical page get created in the folders anywhere....can you help me out? Jeremy |
deano92964
•
Premium
•
5165 posts Quote
•
Feb 08, 2011 16:34
•
0 likes
•
 Perhaps you should start a new topic. This topic has nothing to do with how to create pages or adding items to the nav menu.
I am even confused as to what you're trying to do. As i believe you have PAGE BLOCKS confused with actual PAGES.
But i am sure what you are trying to do has nothing to do with this topic. So because answering your question will i believe take some time, i see no need to drag this post off topic for several posts.
Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |
CALTRADE
•
Advanced
•
2659 posts Quote
•
Feb 08, 2011 16:40
•
0 likes
•
 Could you just post a copy of BxDolPageViewAdmin.php with the changes somewhere - make it easier for klutzes like me who always make errors on things like this. Also, why doesn't Boonex include thi,s in the release code for one of the versions. Why, why, why? |
deano92964
•
Premium
•
5165 posts Quote
•
Feb 08, 2011 16:48
•
0 likes
•

Could you just post a copy of BxDolPageViewAdmin.php with the changes somewhere - make it easier for klutzes like me who always make errors on things like this. Also, why doesn't Boonex include thi,s in the release code for one of the versions. Why, why, why?
I could, and i will think about doing it. But i will have to create a different copy for each version of dolphin. I am not positive, but i am guessing every version of dolphin has a slightly different version of this file.
And i believe boonex has slated PHP blocks for dolphin 7.1
A number of people have tried to convince boonex to put it in a earlier version, but no go. I am sure they refuse to use my code as written. Because if they did not have a problem with it, it would already be in dolphin because it only takes 5 minutes to do.
Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |
brianharty87
•
Starter
•
2 posts Quote
•
Aug 15, 2011 05:12
•
0 likes
•
 The only problem with this is that $_SERVER['PHP_SELF'] returns modules/index.php. Is there any way around this? I want to get the current URL for social media buttons (for now, maybe for other things later) |
fernandorrr
•
Advanced
•
3 posts Quote
•
Sep 27, 2011 12:43
•
0 likes
•
 i cant copy php code for chat. or search or nothing :/ i have now in my page builder a php block |
deano92964
•
Premium
•
5165 posts Quote
•
Sep 27, 2011 13:49
•
0 likes
•
 A PHP block is like a HTML block. Only for PHP code. Not sure what you're expecting to do with it. Only a very small percentage of dolphins blocks are actually PHP blocks.
I think you are misunderstanding what a PHP block is and what it is for.
Dolphin Mods - http://www.boonex.com/market/posts/deano92964 |