Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-02-21 06:15:21

wyldeone
New Member
Registered: 2005-01-21
Posts: 3
Website

When viewing plugin in Textpattern messed up ui

I have created a plugin using Zem’s plugin template (which saves me the trouble of escaping all of the characters), and when I install the base64 string the plugin works great. However, when I view the plugin through textpattern the only thing that shows is the text box with the plugin; i.e. there isn’t the ‘save’ button and the help at the bottom. I believe that it has something to do with the fact that I use <? and ?> tags in the plugin, but taking them out and just echoing everything would make it much more difficult. My code and the base64 string are below.

The base64 code can be found <a href=“http://www.accordionsoftware.com/mjw_email.php”>here</a>.

function mjw_email()
{ global $thisarticle;

ob_start(); ? &gt; &lt;form method=&quot;post&quot; action=&quot;/email.php&quot;&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;email&quot; value=&quot;Email&quot; /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;name&quot; value=&quot;Your Name&quot; /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr &lt;td&gt;&lt;input type=&quot;submit&quot; value=&quot;Submit&quot; /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt; ? $sql = &quot;Status = 4 and Posted &lt;= now() and ID=’&quot;.$thisarticle=‘thisid’].&quot;’&quot;; $rs = safe_row(&quot;Body_html&quot;,&quot;textpattern&quot;,$sql); ? &gt; &lt;input type=&quot;hidden&quot; value=&quot;&lt; ? echo base64_encode($rs0) ? &gt;&quot; name=&quot;story&quot; /&gt; &lt;input type=&quot;hidden&quot; value=&quot;&lt; ? echo $thisarticle[&quot;author&quot;] ? &gt;&quot; name=&quot;author&quot; /&gt; &lt;input type=&quot;hidden&quot; value=&quot;&lt; ? echo base64_encode($thisarticle[&quot;title&quot;]) ? &gt;&quot; name=&quot;title&quot; /&gt; &lt;input type=&quot;hidden&quot; value=&quot;&lt; ? echo $thisarticle[&quot;permlink&quot;] ? &gt;&quot; name=&quot;link&quot; /&gt; &lt;/form&gt; &lt; ? $return = ob_get_contents(); ob_end_clean(); return($return); ? &gt; }

EDIT: replaced the code with a more html-friendly version (i.e. so that it doesn’t render), and got rid of the base64 code which was just screwing the rendering of the page anyways

Second EDIT: I have no idea why the forum is still rendering the code, as all of the brackets have been replaced with & lt; and & rt. <a href=“http://www.accordionsoftware.com/mjw_email.phps”>Here</a> is a place where the code can be viewed.

Last edited by wyldeone (2005-02-21 06:31:10)

Offline

Board footer

Powered by FluxBB