TinyPortal

Development => Feedback => Bugs/Errors => Topic started by: Blue Steel on April 20, 2010, 10:28:13 PM

Title: [bugtracker] bug in php blocks and apparently in php articles too
Post by: Blue Steel on April 20, 2010, 10:28:13 PM
I think i've just found a bug in the php block editor (and maybe in the php articke editor .. not sure havn't tried it)

if i put in this code
// link to us php block
// for Tinyportal
// by BlueSteel
$ltu_text = "To link to us use this code/button on your site";
$ltu_site_url = "http://www.codingmonkeys.com/";
$ltu_img_src = "http://www.codingmonkeys.com/images/cm_link.gif";
$ltu_textarea_rows = 6;     // numbewr of lines in text selection box
$ltu_textarea_colums = 22; // number of characters accross in text selection box
$ltu_line_align = "center";
$ltu_img_align = "top";
$ltu_p_align = "center";
$ltu_onclick = "this.select()";
//------------------------------
// Dont Edit anything below here
//------------------------------
echo '<p align=',$ltu_p_align,'><B>',$ltu_text,'</B></p>
<p align=',$ltu_p_align,'><a href="',$ltu_site_url,'"><img src="',$ltu_img_src,'" border="0"alt="',$ltu_img_src,'"></a></p>
<p align=',$ltu_p_align,'><textarea onclick=',$ltu_onclick,' rows=',$ltu_textarea_rows,' cols=',$ltu_textarea_colums,' name=link1>
<a href="',$ltu_site_url,'"><img src="',$ltu_img_src,'" border="0"alt="',$ltu_img_src,'"></a></textarea></p>';

the next time i edit it , its getting truncated to (in the edit box)
// link to us php block
// for Tinyportal
// by BlueSteel
$ltu_text = "To link to us use this code/button on your site";
$ltu_site_url = "http://www.codingmonkeys.com/";
$ltu_img_src = "http://www.codingmonkeys.com/images/cm_link.gif";
$ltu_textarea_rows = 6;     // numbewr of lines in text selection box
$ltu_textarea_colums = 22; // number of characters accross in text selection box
$ltu_line_align = "center";
$ltu_img_align = "top";
$ltu_p_align = "center";
$ltu_onclick = "this.select()";
//------------------------------
// Dont Edit anything below here
//------------------------------
echo '<p align=',$ltu_p_align,'><B>',$ltu_text,'</B></p>
<p align=',$ltu_p_align,'><a href="',$ltu_site_url,'"><img src="',$ltu_img_src,'" border="0"alt="',$ltu_img_src,'"></a></p>
<p align=',$ltu_p_align,'><textarea onclick=',$ltu_onclick,' rows=',$ltu_textarea_rows,' cols=',$ltu_textarea_colums,' name=link1>
<a href="',$ltu_site_url,'"><img src="',$ltu_img_src,'" border="0"alt="',$ltu_img_src,'"></a>

it apears to be dropping </textarea> and anything after it ..
stuffing up the block and anyrthing after it if you have any format closing arguments eg: </div> </td> </tr> </tbody> </table> </p> etc.. etc..

It took me ages to figure out what was going on
so you need to save a copy of the block elsewhere or you've lost some of your block/article (untill a solution is found.. you have been warned ;) )
Title: Re: [bugtracker] bug in php blocks and apparently in php articles too
Post by: bloc on April 21, 2010, 09:24:05 PM
This has been fixed for TP 1.0 beta5.2