Thanks JTADEO. Now, ok, I just couldn't resist digging more into it, so if you want to enable PHP BLOCKS in the admin section, simply follow the 4-steps guide below.
Note: I strongly recommend you backup your BxDolPageViewAdmin.php just in case...
--------------------
STEP 1
--------------------
Run the following Insert query in the pageCompose table:
The key field is "Func", being set to "Sample". Any record set to "Sample" in this table will make the relevant block appear among the Samples(!) in the "page builders" section. Try and look at any page from the Page Builders screen, you'll now see the PHP block displayed as Sample.
--------------------
STEP 2
--------------------
Edit the following file:
./inc/classes/BxDolPageViewAdmin.php
Update the saveItem function (starting line 174) by modifying line 187:
FROM: elseif( $sFunc == 'Echo' )
TO: elseif( $sFunc == 'Echo' or $sFunc == 'PHP' )
This will enable the PHP code to be saved from the admin interface.
--------------------
STEP 3
--------------------
Modify line 553:
FROM: if( $aItem['Func'] == 'RSS' or $aItem['Func'] == 'Echo' ) {
TO: if( $aItem['Func'] == 'RSS' or $aItem['Func'] == 'Echo' or $aItem['Func'] == 'PHP' ) {
This will enable the "Delete" button in the PHP blocks popup form
--------------------
STEP 4
--------------------
Search for :
if( $aItem['Func'] == 'Echo' )
This IF condition defines what fields to display in the block popup form, based on the block type/func. You just need to insert the following on line 533
(just before the end of the IF condition for the HTML blocks):
// THE INSERT FINISHES HERE
} elseif( $aItem['Func'] == 'RSS' ) {
... etc etc...
--------------------
ET VOILA!
--------------------
Now you can manage PHP blocks straight from the admin section without having to fiddle with MySQL or other geeky stuff!
Personally I can think of loads of new blocks I'm gonna create... right now actually!
Dunno what's coming up with 6.2, hope fully they'll incorporate this by default :-)
HAVE FUN!
--------------------
DISCLAIMER
--------------------
- Don't make the modif if you're not comfortable with PHP
- This "hack" might get overridden/overwritten by future releases
Note: I strongly recommend you backup your BxDolPageViewAdmin.php just in case...
--------------------
STEP 1
--------------------
Run the following Insert query in the pageCompose table:
INSERT INTO `PageCompose` ( `ID` , `Page` , `PageWidth` , `Desc` , `Caption` , `Column` , `Order` , `Func` , `Content` , `DesignBox` , see more