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

Recent

Welcome to TinyPortal. Please login or sign up.

September 18, 2024, 06:10:43 PM

Login with username, password and session length
Members
  • Total Members: 3,905
  • Latest: acciply
Stats
  • Total Posts: 195,368
  • Total Topics: 21,241
  • Online today: 251
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 56
  • Total: 56

[TP1.0 Beta5] suspected bug in php block editor

Started by BlueSteel, April 20, 2010, 05:59:19 AM

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

lurkalot

Quote from: BlueSteel on April 20, 2010, 05:59:19 AM

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)


BlueSteel,

Just tested this on my test site, and it does the same.  Works well until you Revisit the block to edit it and even clicking save again without actually changing the code results in a mess.

Tried it in an article, and all worked fine until I moved it to another category, then messes up the same as as a php block.

IchBin