PHP Block

Where or even how can I add a php block? I want to add the facebook like button, I tried with the html block but the code is just removed, can someone help me please?

 

Thank you.

Quote · 21 Apr 2012

here is a module that can make your work lot easier

http://www.boonex.com/m/Deanos_Tools_V1_6_Dolphin_7_0_Version

so much to do....
Quote · 21 Apr 2012

I have already added that and adding the php from there doesn't work either.

Quote · 21 Apr 2012

You have to go to the page builder and select your new php block from the relevant page and drag it to the specific place in page 

so much to do....
Quote · 21 Apr 2012

Like I said it doesnt work, doesn't allow for php code always comes up with:

 

/inc/classes/BxDolPageView.php(607) : eval()'d code on line 1

Quote · 21 Apr 2012

Even placing the most basic php test using:

 

<?php
phpinfo( );
?>


Produces an error. THis form is not designed for php, so the author hasn't designed this properly.

Quote · 21 Apr 2012

you are adding something wrong in the block. try this

echo "Hello";

if you see "Hello" than the block is okay check your code for syntax error.

so much to do....
Quote · 21 Apr 2012

stop putting

<?php

?>

so much to do....
Quote · 21 Apr 2012

Thank you.

Quote · 21 Apr 2012

 You're welcome

Thank you.

 

so much to do....
Quote · 21 Apr 2012

To go further on it incase your interested.

All php blocks in dolphin whether created by hand or by a module use the php eval function to process the code within them. http://php.net/manual/en/function.eval.php

The php manual states this...

The code mustn't be wrapped in opening and closing PHP tags, i.e. 'echo "Hi!";' must be passed instead of '<? echo "Hi!"; >'. It is still possible to leave and reenter PHP mode though using the appropriate PHP tags, e.g. 'echo "In PHP mode!"; ?>In HTML mode!<? echo "Back in PHP mode!";'.

Apart from that the passed code must be valid PHP. This includes that all statements must be properly terminated using a semicolon. 'echo "Hi!"' for example will cause a parse error, whereas 'echo "Hi!";' will work.


Hopefully that gives you a better understanding.

https://www.deanbassett.com
Quote · 21 Apr 2012
 
 
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.