Форумы / Cotonti / Support / WHATS WRONG WITH THIS

biro
#1 24.04.2009 22:42
i was making a plugin like leet login then i got an annoying error....

here are codes

quicklogin.header.php
<?PHP
/* ====================
Seditio - Website engine
Copyright Neocrome
http://www.neocrome.net

[BEGIN_SED]
File=plugins/quicklogin/quicklogin.header.php
Version=1.0
Updated=2009-4-23
Type=Plugin
Author=biro
Description=A quick login plugin for header.tpl
[END_SED]

[BEGIN_SED_EXTPLUGIN]
Code=quicklogin
Part=header
File=quicklogin.header
Hooks=header.tags
Tags=header.tpl:{QUICK_LOGIN}
[END_SED_EXTPLUGIN]
============ */

if (!defined('SED_CODE')) { die('Wrong URL.'); }
		
			
$quick_login = <form name="login" action="users.php?m=auth&amp;a=check&amp;redirect=" method="post">Username:
					<input type="text" class="tinput" name="rusername" size="13" maxlength="32" onfocus="if (this.value == 'User Name') this.value = '';" />&nbsp;Password:
					<input type="password" class="tinput" name="rpassword" size="13" maxlength="32" />
					<input type="hidden" name="rremember" value="1"/>
					<input type="submit" style="font-size:10px; " value="Login" />
					<div><input type="hidden" name="x" value="GUEST" /></div><div style="display:inline;margin:0;padding:0"><input type="hidden" name="x" value="GUEST" /></div></form>
                    <b>Welcome Guest! &nbsp;&nbsp;&nbsp;&nbsp;<a href="users/register.html">Register</a>&nbsp;&nbsp;
					<a href="users/password-recover.html">Lost your password?</a></b>;


$t-> assign(array(
	"QUICK_LOGIN" 			=> $quick_login,
	));	

?>

quicklogin.setup.php
<?PHP
/* ====================
Seditio - Website engine
Copyright Neocrome
http://www.neocrome.net

[BEGIN_SED]
File=plugins/quicklogin/quicklogin.setup.php
Version=1.0
Updated=2009-4-23
Type=Plugin
Author=biro
Description=A quick login plugin for header.tpl
Tags={QUICK_LOGIN}
[END_SED]

[BEGIN_SED_EXTPLUGIN]
Code=quicklogin
Name=Quick Login
Description=A quick login plugin for header.tpl
Version=1.0
Date=2009-4-23
Author=biro
Copyright=biro | Designed for cotonti use | Please ask me before copying codes |
Notes=
Tags={QUICK_LOGIN}
Auth_guests=R
Lock_guests=W12345A
Auth_members=R
Lock_members=W12345A
[END_SED_EXTPLUGIN]



==================== */

if (!defined('SED_CODE')) { die('Wrong URL.'); }

?>

looks like u have to click view plain to view codes...srry
Be sure to check out<br /><br /><br />
My site-<a href="http://www.iso-center.co.cc">http://www.iso-center.co.cc</a><br />
My plugins;TPL Editior 1.2 &amp; Mobile site
Отредактировано: biro (24.04.2009 23:03, 15 лет назад)
TwistedGA
#2 25.04.2009 02:42
<?PHP
/* ====================
[BEGIN_SED_EXTPLUGIN]
Code=quicklogin
Part=header
File=quicklogin.header
Hooks=header.tags
Tags=header.tpl:{QUICK_LOGIN}
[END_SED_EXTPLUGIN]
============ */
if (!defined('SED_CODE')) { die('Wrong URL.'); }

$quick_login = "<form name=\"login\" action=\"users.php?m=auth&amp;a=check&redirect=\" method=\"post\">Username:
               <input type=\"text\" class=\"tinput\" name=\"rusername\" size=\"13\" maxlength=\"32\" onfocus=\"\" /> Password:
               <input type=\"password\" class=\"tinput\" name=\"rpassword\" size=\"13\" maxlength=\"32\" />
               <input type=\"hidden\" name=\"rremember\" value=\"1\"/>
               <input type=\"submit\" style=\"font-size:10px;\" value=\"Login\" />
               <div><input type=\"hidden\" name=\"x\" value=\"GUEST\" /></div><div style=\"display:inline;margin:0;padding:0\"><input type=\"hidden\" name=\"x\" value=\"GUEST\" /></div></form>
               <b>Welcome Guest!     <a href=\"users/register.html\">Register</a>
               <a href=\"users/password-recover.html\">Lost your password?</a></b>";


$t-> assign(array("QUICK_LOGIN" => $quick_login,));

?>


If you use double quotes instead of single quotes on the HTML, you must add the back slash before each double quote or it stops reading it at the first occurance. Alternatively, you can use single quotes and don't have to use the back slahes. I went the fast route to try and fix it for ya.
[color=#CC0000]Lazymod[/color] [color=#000000]Studios[/color]
biro
#3 28.04.2009 00:55
thanks didnt know this thing....
Be sure to check out<br /><br /><br />
My site-<a href="http://www.iso-center.co.cc">http://www.iso-center.co.cc</a><br />
My plugins;TPL Editior 1.2 &amp; Mobile site