We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

[plugin] x2html: Converts XHTML to HTML.

Development and Programming

mhulse's avatar
mhulse
329 posts
16 years ago
mhulse's avatar mhulse

pi.x2html.php

UPDATE: 2010/04/14: Code now on GitHub

I take no credit here… Well, all I did was port a Textpattern plugin. 😊

Original TXP plugin/info found here.

Example:

{exp:search:simple_form weblog="my_weblog"}<div><input type="text" name="keywords" id="keywords"></div>{/exp:search:simple_form}

Will output:

<form method="post" action="http://hulse.me/"  >
<div class='hiddenFields'>
<input type="hidden" name="ACT" value="19" />
<input type="hidden" name="XID" value="71a80be03d3dd887997aadf2e2d644166b3ab703" />
<input type="hidden" name="RP" value="search/results" />
<input type="hidden" name="NRP" value="" />
<input type="hidden" name="RES" value="" />
<input type="hidden" name="status" value="" />
<input type="hidden" name="weblog" value="my_weblog" />
<input type="hidden" name="search_in" value="" />
<input type="hidden" name="where" value="all" />
<input type="hidden" name="site_id" value="1" />
</div>
<div><input type="text" name="keywords" id="keywords"></div></form>

When using this plugin:

{exp:x2html}
    {exp:search:simple_form weblog="my_weblog"}
        <div><input type="text" name="keywords" id="keywords"></div>
    {/exp:search:simple_form}
{/exp:x2html}

The output will now be:

<form method="post" action="http://hulse.me/"  >
<div class='hiddenFields'>
<input type="hidden" name="ACT" value="19">
<input type="hidden" name="XID" value="b1911f2767bf35f957cb5a6d9f44fa5cb94d607f">
<input type="hidden" name="RP" value="search/results">
<input type="hidden" name="NRP" value="">
<input type="hidden" name="RES" value="">
<input type="hidden" name="status" value="">
<input type="hidden" name="weblog" value="my_weblog">
<input type="hidden" name="search_in" value="">
<input type="hidden" name="where" value="all">
<input type="hidden" name="site_id" value="1">
</div>
<div><input type="text" name="keywords" id="keywords"></div></form>

Enjoy!

Micky

       
mhulse's avatar
mhulse
329 posts
15 years ago
mhulse's avatar mhulse

Hello,

I have updated this plugin to work with EE 2.0. See attached files in first post.

New usage instructions (not much has changed):

{exp:mah_x2html}
    {exp:search:simple_form weblog="my_weblog"}
        <div><input type="text" name="keywords" id="keywords"></div>
    {/exp:search:simple_form}
{/exp:mah_x2html}

Note the name change. Hopefully this is not too much of a headache for ya’ll. Now that EE uses packages, I wanted a way to order my “mah” plugs.

Version 2.0 ****************** - Updated plugin to be 2.0 compatible Version 1.0 ****************** - Initial public release.

Let me know if you experience problems.

       
mhulse's avatar
mhulse
329 posts
15 years ago
mhulse's avatar mhulse

Update: I Added the ability for this plugin to format custom fields… It will use the EE XHTML auto_typography function to format the text, and then it will strip the “closing slash” formatting.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.