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
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.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.