Jump to content


Authenticate_visitor


  • You cannot reply to this topic
73 replies to this topic

#1 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,505 posts
  • Gender:Male

Posted 24 April 2006 - 04:42 PM

Snippet name: authenticate_visitor
Author: Ralph (rad14701)
Version: 1.1 (Final - Modified)
More info: View this snippet
Description:
Provides visitor/user login capabilities on a website front end, including optional CAPTCHA code security. This snippet will only work with Etomite Prelude Final or newer releases. Creates a login and optional logout prompt. The snippet also makes use of Tigra Javascript Forms Validation and the newly developed form_class.

Attached Files



#2 PaulD

    Likes Etomite Forums!

  • Developers
  • PipPip
  • 389 posts
  • Gender:Male

Posted 24 April 2006 - 06:10 PM

Thanks Ralph, I have been waiting eagerly for this to be released.

I also have a good reason to upgrade my own site to prelude final now.

Thanks again,

Paul

#3 diazulu

    Etomite Forum Newbie

  • Member
  • 4 posts

Posted 04 May 2006 - 04:40 AM

Hi,

I have one problem with the snipet

When I login all works ok, but when I not login, I have an error in the page:

Line:82
Char:65
Error: Expected identifier, string or number

and this line is:

'frm_username':{'l':'Username:', 'r':'1', 't':'username_lbl', },

Thank you if you can help me

#4 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,505 posts
  • Gender:Male

Posted 04 May 2006 - 02:41 PM

diazulu, on May 4 2006, 01:40 AM, said:

Hi,

I have one problem with the snipet

When I login all works ok, but when I not login, I have an error in the page:

Line:82
Char:65
Error: Expected identifier, string or number

and this line is:

  'frm_username':{'l':'Username:', 'r':'1', 't':'username_lbl', },

Thank you if you can help me
I think you have either modified the snippet or there is something missing as the line in question farther down in the actual snippet than you have suggested, down around line 135, and there is more to that line than you have indicated... The snippet will work as posted in Etomite Prelude Final only...

Upon further investigation it appears that this line of code is actually in the form_class.php file which leads me to believe that you have removed something that the call to the form class needs...

#5 diazulu

    Etomite Forum Newbie

  • Member
  • 4 posts

Posted 04 May 2006 - 06:04 PM

I not modify anything, and I use the Etomite Prelude Final version.

Only delete Visitor Member line.

Thank you

#6 Dean

    Loves Etomite Forums!

  • Admin
  • 4,744 posts
  • Gender:Male

Posted 04 May 2006 - 07:40 PM

ok, so put that back in and see if it works :lol:

#7 diazulu

    Etomite Forum Newbie

  • Member
  • 4 posts

Posted 10 May 2006 - 02:33 AM

Not working, still the same error

#8 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,505 posts
  • Gender:Male

Posted 10 May 2006 - 03:28 AM

diazulu, on May 9 2006, 11:33 PM, said:

Not working, still the same error
<generic_request>

Please supply us with additional information so we can better assist you in resolving this issue... The following information, complete with version/release will be of great help... If the issue is browser-specific also include browsers tested and the results of each...

Server Operating System
Server Software
PHP version
MySQL

</generic_request>

#9 Dean

    Loves Etomite Forums!

  • Admin
  • 4,744 posts
  • Gender:Male

Posted 10 May 2006 - 09:43 AM

Ok, delete the reference to the snippet in your pages, then clear the etomite site cache.

Then see if your error is gone, and then add the snippet call again, but place it between [! and !] instead of [[ and ]]

#10 petrbok

    Etomite Forum Newbie

  • Member
  • 2 posts

Posted 22 May 2006 - 01:21 PM

This problem appears by MSIE only. When I remove the red highlighted commas (see code bellowe) it works OK without error messages in MSIE. I am sorry but I am not able to correct form_class.php by my own.


<script type='text/javascript' src='./manager/media/script/validator.js'></script>
<script type="text/javascript">
<!--
var a_fields={
'frm_username':{'l':'Username:', 'r':'1', 't':'username_lbl', },
'frm_password':{'l':'Password:', 'r':'1', 't':'password_lbl', },
},
o_config = { 'to_disable' : ['Submit', 'Reset'], 'alert' : 1 }
var v = new validator('authenticate_visitor', a_fields, o_config);
//-->
</script>

#11 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,505 posts
  • Gender:Male

Posted 22 May 2006 - 01:25 PM

View Postpetrbok, on May 22 2006, 09:21 AM, said:

This problem appears by MSIE only. When I remove the red highlighted commas (see code bellowe) it works OK without error messages in MSIE. I am sorry but I am not able to correct form_class.php by my own.
<script type='text/javascript' src='./manager/media/script/validator.js'></script>
<script type="text/javascript">
<!--
var a_fields={
'frm_username':{'l':'Username:', 'r':'1', 't':'username_lbl', },
'frm_password':{'l':'Password:', 'r':'1', 't':'password_lbl', },
},
o_config = { 'to_disable' : ['Submit', 'Reset'], 'alert' : 1 }
var v = new validator('authenticate_visitor', a_fields, o_config);
//-->
</script>
I am aware of this problem and had started working on the fix for it the end of last week... I get the same nagging error in IE and will have a solution posted here soon... :eto:

#12 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,505 posts
  • Gender:Male

Posted 22 May 2006 - 03:28 PM

<<< FIX >>>
The attached modified copy of manager/includes/form_class.php should resolve the errors reported... It should also address an issue with XHTML validation... :eto:

Attached Files



#13 espersen

    Etomite Forum Fan

  • Member
  • Pip
  • 144 posts

Posted 23 May 2006 - 07:42 AM

hhuhh - is it included in the recent Final-version to download ?

#14 Dean

    Loves Etomite Forums!

  • Admin
  • 4,744 posts
  • Gender:Male

Posted 23 May 2006 - 08:58 AM

No - the download files wont be updated, which is why there is a pinned announcement in the main forum....

#15 vw53a

    Likes Etomite Forums!

  • Member
  • PipPip
  • 393 posts

Posted 23 May 2006 - 10:27 AM

Hmm, I would have put the actual download in the announcement section or in the bug-section (or in an earlier created special section with fixes as used during theRC/RTM stage), and then posted here in this topic a link to that download. Now fixes will get scattered all over the place.

#16 espersen

    Etomite Forum Fan

  • Member
  • Pip
  • 144 posts

Posted 23 May 2006 - 10:35 AM

atm not easy to overlook what fixes is out

It would be nice if
a. the are included in the available download-package or
b. the fix'es are gathered in one spot - fx using the ShowFiles-snippet - easy and ready for download.

#17 Jelmer

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,173 posts

Posted 23 May 2006 - 10:37 AM

The fixes are all gathered in one forum thread, which is http://www.etomite.com/index.php?sh...t=0&#entry32463 in the Announcements section. Looks ok to me.

It would be very unwise to include all fixes in the download immediately because we would have dozens of different releases.

#18 Dean

    Loves Etomite Forums!

  • Admin
  • 4,744 posts
  • Gender:Male

Posted 23 May 2006 - 11:30 AM

Not only that, but it took us bloody ages how to figure out how to get the downloads up there to start with :P

#19 shanester

    Etomite Forum Newbie

  • Member
  • 10 posts

Posted 03 June 2006 - 07:59 AM

I installed the authenticate visitor snippet. The form appears properly and so forth, but it fails to generate a proper redirect url when I have FURLS enabled. If I don't have FURLS enabled and I pass the ID, it works fine. I have all the fixes Jelmer linked to above installed. I have tried FURLS both with and without friendly aliases, but it fails no matter whether I call the snippet with the ID or the alias (haven't tried the url call).

If I call with id=2 with FURLS enabled, the url that's generated for redirect is:

"http://www.longtins.com/cm_test/2.html"

which fails, of course. If I instead pass alias=repository, I get:

"http://www.longtins.com/cm_test/repository.html"; or
"http://www.longtins.com/cm_test/.html"

depending on whether FALIASES are enabled, both of which also fail (though I think the "repository.html" one should work since FURLS are enabled??). I suppose it's not crucial that I use FURLS, but I'd like to. I'm on Prelude Final. Suggestions?

#20 mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 03 June 2006 - 08:09 AM

View Postshanester, on Jun 3 2006, 08:59 AM, said:

Suggestions?
Read the documentation on setting up Friendly URLs, and, if necessary, the long thread on setting up FURLs. .../2.html and .../repository.html are both potentially valid if FURLs are set up properly.

edit:
... and make sure the page you are trying to redirect to is published! repository seems an odd choice ...

Edited by mikef, 03 June 2006 - 08:15 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users