Custom Block running php code = weird results
Posted: 1. February 2011 16:49
Your Portal Version: 1.0.6RC3
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Basic Knowledge
Boardlink: http://92.232.81.30/phpbb/
What have you done before the problem was there?
I have added a custom left block and I have turned on "Allow php in templates" In the ACP
What have you already tryed to solve the problem?
EVERYTHING including pulling on my hair!
Description and Message
Please please someone help me, I am going out of my mind with this Custom block.
I have made a tide script that will pull off todays tide from a list of the tides for the month.
It works great and displays todays tide.
I want this in a custom left block, So I enabled php in templates and have tried every php command in the world to display my php script results.
These actually work but give me odd results.
In my custom block it says that
It works fine if I point my browser to the todaytide.php file on the server, so why not within the custom block?
I did read here knowledge/kb_show.php?id=51
I really do not understand this additional_blocks.php part
Please someone help me, I have spent hours on this and this is the only place I can get answers.[/i]
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Basic Knowledge
Boardlink: http://92.232.81.30/phpbb/
What have you done before the problem was there?
I have added a custom left block and I have turned on "Allow php in templates" In the ACP
What have you already tryed to solve the problem?
EVERYTHING including pulling on my hair!
Description and Message
Please please someone help me, I am going out of my mind with this Custom block.
I have made a tide script that will pull off todays tide from a list of the tides for the month.
It works great and displays todays tide.
I want this in a custom left block, So I enabled php in templates and have tried every php command in the world to display my php script results.
Code: Select all
<!-- INCLUDE portal/block/todaytide.php -->
Code: Select all
<!-- PHP --> include("/styles/supernova/template/portal/block/todaytide.php"); <!-- ENDPHP -->
Code: Select all
<!-- PHP -->require_once("/tides_processor.php"); tides(0);<!-- ENDPHP -->
In my custom block it says that
This is an error message that means the sript is not working properly.Tide data is being updated. Please refresh the page.
It works fine if I point my browser to the todaytide.php file on the server, so why not within the custom block?
I did read here knowledge/kb_show.php?id=51
I tried adding my php Include in front of that and the script works but it loads above the banner on my portal home page looks stupidAdding PHP Code for your block
If you need to execute PHP code for your new block, there is an easy way to do this. Adding PHP Code to the block file will not do anything at all. Open portal/block/additional_blocks.php and add your PHP right in front of this:
CODE: SELECT ALL
?>
Make sure you leave no spaces before <?php and after ?> and save the file as UTF8 without BOM
I really do not understand this additional_blocks.php part
Please someone help me, I have spent hours on this and this is the only place I can get answers.[/i]