I have been working on finally converting my website login searches to
work using Shawn's technique used for yy & pp. Some of them have
converted fine but I am having a problem with a few and am hoping
someone can shed a light on why it's not working.
The following search works to login to Mozillazine by typing :
moz /user Mozillazine _username /pwd Mozillazine _password
<search function="moz">
<name>Mozillazine</name>
<category></category>
<contributor>Tom Corcoran</contributor>
<link>http://forums.mozillazine.org/login.php?sid=f56ff8b4e8140b0a6e11d4ea2f3711b0</link>
<email></email>
<description>
</description>
<form name="mozf"
method="post"
action="http://forums.mozillazine.org/login.php">
<input type="hidden" name="username" value="" />
<input type="hidden" name="password" value="" />
<input type="hidden" name="autologin" value="on" />
<input type="hidden" name="redirect" value="" />
<input type="hidden" name="login" value="Log in" />
</form>
<script><![CDATA[
function moz(q)
{
if( nullArgs("moz", q) )
return false;
else
{
var args = parseArgsEx(q, "user, pwd");
if( args.switches.length > 0 )
{
for( var j=0; j<args.switches.length; j++ )
{
switch( args.switches[j].name )
{
case "user":
document.mozf.username.value = args.switches[j].value;
break;
case "pwd":
document.mozf.password.value = args.switches[j].value;
break;
}
}
}
} submitForm(mozf);
}
]]></script>
</search>
The converting changes the function :
function moz(q)
{
if (q=="?"){
nullArgs("moz",q);
return false;
}
var mozids = mozid;
try{
eval("var mozids = " + q + ";");
}catch(e){
var mozids = mozid;
}
try{
document.mozf.username.value = mozids[0];
document.mozf.password.value = mozids[1];
}catch(e){}
submitForm(mozf);
}
In localprefs.js you define
var mozid = Array("Mozillazine _username","Mozillazine _password")
However typing moz now opens the login pages saying :
You have specified an incorrect or inactive username, or an invalid
password.
This exact chnage works for some other of my logins.
Any clues what might have happened here?
Thanks.
Tom
.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
To unsubscribe visit:
https://lists.sourceforge.net/lists/listinfo/dqsd-users
DQSD-Users@lists.sourceforge.net
http://sourceforge.net/mailarchive/forum.php?forum_id=8601