how can I add php code

Hi to all,

Please, can somebody help me? I have script in php, but i don´t know, where can i paste it. I have tried insert it to index.php but with erors. It´s code, which do column with category list to right side. I can´t insert it to clasic PHP block because it have to be on side of page.

 

Thank you much!

Quote · 7 Jan 2012

Deano has a free mod for that..

 

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

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 7 Jan 2012

 

Deano has a free mod for that..

 

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

It looks like you missed an underscore.

 

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

 

Edit: Sorry, Deano. 

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 7 Jan 2012

 

 I can´t insert it to clasic PHP block because it have to be on side of page.

Guys. He did mention he can't use a classic PHP block due to where it needs to be. So i believe he is already aware of PHP blocks.

So....... Other ideas. Perhaps the banner system. I do not know if that will work. I don't use it and don't know if it will accept PHP.




https://www.deanbassett.com
Quote · 8 Jan 2012

So basically I posted a broken link to a mod that doesn't do what he needs? God I'm helpful!

 

I guess plan B would be to insert the php in the .html file for the page he wants it on, probably /templates/base/page_01.html for the index. Then create a div in the proper .css file to make it stick to the side of the screen.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 8 Jan 2012

I have not tested that recently. But i did in the past and php in the html templates was not supported by dolphin. Or at least i could not get it working. But that was quite a while back. Maybe things have changed.

https://www.deanbassett.com
Quote · 8 Jan 2012

might work, i got some php code in the footer section works fine,

Quote · 8 Jan 2012

I just tested it on a 7.0.7 and it works. I put:

 <? echo date("Y"); ?>

in /templates/base/page_01.html and "2012" appeared right above the body of the site. If he puts his php inside a <div> and then ads that div to one of the css files he should be able to control where it shows up.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 8 Jan 2012

Thank you to all for help, you are nice, but it doesn´t work :( Maybe it´s problem in my code. I am begginer i am learning from google and it can be problem.

 

I tried insert it to page_1html but php script doesn´t work. It show this

http://testik.fotozahrada.cz/


(left side of page,)

Code what i want Insert is this:

 

<?php
 $datamoje1=mysql_query("SELECT `Category` FROM `sys_categories` WHERE `ID`  = 0 AND `Status` = 'active' AND `Type` = 'bx_photos' ORDER BY Category ASC");
echo("    <div class='kategorie_menu_div'><table cellpadding='0'>
    <tr>
            <td>Hledani:<br><input style='width: 100px;
background-color: #2D2D2D;
border: 1px solid #393534 !important;
color: #888;
outline: none;' type='text' id='filterField'></td>
    </tr>
</table>
<table id='myTable'>
   
    <thead>    <tr>
            <td>Kategorie</td>
           
        </tr>
    </thead><tbody>");
         

while ($datamoje=mysql_fetch_array($datamoje1))
         {
$category = $datamoje['Category'];
$category_encoded = urlencode($category);
      echo("<tr>");//každý záznam jeden řádek
         echo("<td class='menu1'><a class='menu1text' href='modules/?r=photos/browse/category/" . $category_encoded . "'>" . $category . $dat . "</a> </td>
                </tr>");
               }
echo("</tbody>
</table></div><script type=\"text/javascript\">
initSortTable('myTable',Array('S'));

var filter = new DG.Filter({
    filterField : $('filterField'),
    filterEl : $('myTable')
});
</script>");
?>

CSS i have set.

Has somebody idea how to do it please?

Quote · 8 Jan 2012

I found out, that problem was in inserting javascript, when i pasted without javascript, all is allright. How big is problem that i have pasted code in index.php in /modules directory?

Quote · 8 Jan 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.