TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 333
  • Total: 333

[bugtracker] bug in php blocks and apparently in php articles too

Started by BlueSteel, April 20, 2010, 10:28:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Blue Steel

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 ;) )

bloc


This website is proudly hosted on Crocweb Cloud Website Hosting.