TinyPortal

Development => Support => Topic started by: sbarnes on March 28, 2006, 11:35:36 AM

Title: error when using blocks
Post by: sbarnes on March 28, 2006, 11:35:36 AM
I have tried a couple of php blocks and get the following error in the block itself:

Parse error: syntax error, unexpected '<' in /myurl/Sources/Load.php(1628) : eval()'d code(34) : eval()'d code on line 1

Any ideas??
Title: Re: error when using blocks
Post by: G6Cad on March 28, 2006, 04:03:22 PM
When you add the php code in your blocks make sure you have removed the php tags.

<?php and ?> at the start and end of the codes
Title: Re: error when using blocks
Post by: sbarnes on March 28, 2006, 04:14:45 PM
There were none, I cut and pasted a code from the clock/calender snippet and also inlcuded the file it reffered to.
Had tried other snippets previously with the same result. HTML and others appear to work fine under short tests.
Title: Re: error when using blocks
Post by: G6Cad on March 28, 2006, 06:33:26 PM
The clock and calendar snippet should not be in a PHP block, its a java/html block for that :)
Title: Re: error when using blocks
Post by: Xarcell on March 29, 2006, 02:46:54 AM
You need a echo... or put it in a HTML block.
Title: Re: error when using blocks
Post by: sbarnes on March 31, 2006, 05:48:48 PM
Thanks everyone, realised I must have done something wrong when I tried some and they worked.
Worked out the thing of removing the <?php and ?> but didnt twig that the clock block was not really for the php block, sorry I hadnt updated you. Glad there was no probs with my site, just me being dumb. :idiot2: