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 displaying closing tag as HTML

Development and Programming

ArchAngelUGP's avatar
ArchAngelUGP
1 posts
16 years ago
ArchAngelUGP's avatar ArchAngelUGP

Hey Guys/Gals, I have been working on a plugin which basically blocks specific users based on the area code of the user. But I have ran into a snag. I am using the plugin to pretty much govern the whole site so I wont have to put the geolocating code into each template. Can pretty much call it like any other tag and the page is secure. Anyways, while coding this I’m having a problem closing the {exp:member:login_form} tag without having it display on the page. It’s pretty odd.

Running 1.6.7 EE.

This is the snippit from the plugin:

if ($return_eval == 0)
        {
            global $FNS;
            
            $return_url = $FNS->fetch_current_uri();
            
            $this->return_data = "<center>
            Unfortunately it appears you are in a area that is blocked. 
            To protect our models we have limited the area's that can view this site. 
            If you are a member, and you are seeing this message please log in below.
            
            {exp:member:login_form return='" . $return_url . "'}

            <label>Username:</label>

            <input type='text' name='username' value='' maxlength='32' class='input' size='25' /></p>

            <label>Password:</label>

            <input type='password' name='password' value='' maxlength='32' class='input' size='25' /></p>

            <input type='submit' name='submit' value='Submit' /></p>

            <a href="http://{path=">Forgot your password</a>
            {/exp:member:login_form}</center>
            ";        
        }[/code]

This is the View Source from IE.

[code]<center>
   Unfortunately it appears you are in a area that is blocked. 
   To protect our models we have limited the area's that can view this site. 
   If you are a member, and you are seeing this message please log in below.
   
   <form method="post" action="http://****/"  >
<div class='hiddenFields'>
<input type="hidden" name="XID" value="850ddb2319294c5f53cb1fb8a54a8fd493cc2278" />
<input type="hidden" name="ACT" value="9" />
<input type="hidden" name="RET" value="http://****/" />
<input type="hidden" name="site_id" value="1" />
</div>
</form></p>
   <label>Username:</label>

   <input type='text' name='username' value='' maxlength='32' class='input' size='25' /></p>
   <label>Password:</label>

   <input type='password' name='password' value='' maxlength='32' class='input' size='25' /></p>
   <input type='submit' name='submit' value='Submit' /></p>
   <a href="http://http:/member/forgot_password/">Forgot your password</a>
   {/exp:member:login_form}</center>

Any insite to what is going on would be greatly appreciated

       
Greg Aker's avatar
Greg Aker
6,022 posts
16 years ago
Greg Aker's avatar Greg Aker

Greetings ArchAngelUGP, and welcome to the forums!

Instead of using ExpressionEngine template tags in your plugin, I would probably consider using $FNS->redirect to redirect the user to a new login page. Also do a var_dump of $OUT to see what’s available there as well.

Regards,

-greg

ETA: I’m going to move this down to the plugin forums, as it’s a better fit.

       
Derek Jones's avatar
Derek Jones
7,561 posts
16 years ago
Derek Jones's avatar Derek Jones

My suggestion would be to have the plugin parse a conditional, allowing you to include the tag in your template, which is afterall where tags are intended to go.

       

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.