How to use front-end visitor permissions
#16
Posted 29 September 2006 - 01:23 PM
Please correct me if I'm wrong.
#17
Posted 29 September 2006 - 03:42 PM
But what you want can definately be achieved using the information in this topic. As a matter of fact, I'm using the same functionality!
#18
Posted 23 October 2006 - 10:46 PM
i made a fresh install of etomite 0.6.1.2 and followed the instructions ... mostly. I did not update the index.php (1) as mentioned because i supposed eto 0.6.1.2 already contains the one with the new permission API. All the other steps i followed word by word and added the authListMenu and the LogInOut-Snippet to my template.
First it seemed to work. I can login as a member, but then i still have no access to my so-called "member-area". And when i log in i got redirected to my "login-failed.html"-page, but the snippet on that page shows me that i have successfully logged in.
This behaviour can be seen at my eto testsite:
http://test.bildcontext.org/etomite2/
I generated two members, the first as "member1" with pwd "testme", the second as "member2" with pwd "member2".
The Login-Link is at the bottom right, and the Member Area is the last point at the menu. For testing purposes now the standard ListMenu is used again.
It would be nice if someone could take a look and give me some advice. If it's necessary i also could provide access to the manager.
This post has been edited by Jim Browski: 23 October 2006 - 10:55 PM
#19
Posted 24 October 2006 - 12:00 AM
Jim Browski, on Oct 23 2006, 06:46 PM, said:
You really need to update the index.php file as that is the actual parser... If you don't update that file you may as well not update at all... The new parser should be virtually 100% backwards compatible with any snippets you currently have with the exception that visitor permissions now work as I had originally intended and no longer need additional work-arounds... Or did I misunderstand your post in that you didn't upload the old version of the parser that is present in the package...???
#20
Posted 24 October 2006 - 08:21 AM
Ralph (rad14701), on Oct 24 2006, 02:00 AM, said:
Thanks for the reply.
As i'm no english native speaker sometimes it's hard for me to say exactly what i'm thinking of :blush:
Sorry for that. I think there is some misunderstanding.
I do use the index.php file that is shipped with the download package of eto 0.6.1.2.
I do not use the modified index.php file Jelmer in the orginal post has linked to.
Is this wrong?
The rest of Jelmers posting i followed step by step ...
#21
Posted 24 October 2006 - 01:28 PM
#22
Posted 24 October 2006 - 04:57 PM
#23
Posted 24 October 2006 - 05:13 PM
Jelmer, on Oct 24 2006, 06:57 PM, said:
Hi Jelmer, you're welcome! I will PM you my login specification for the testsite so that you can take a look. Thanks in advance.
#24
Posted 24 October 2006 - 06:17 PM
IT WORKS! :!:
The credits go to Jelmer. I PM'ed him my login details and he found this tiny little checkmark that caused the problem in just a minute.
I'm ashamed to say it but for all the users that may struggle with similar probs ...
i just did not put the members to the members group. :blush:
Ok, stop laughin' and get back to business. :D
#25
Posted 24 November 2006 - 01:23 PM
I have one little problem though. When I use the LoginOut snippet and click on the "Logout" link, I get following SQL error:
« Error » Etomite encountered the following error while attempting to parse the requested resource: « Row count error in template query result. » SQL: SELECT * FROM `isr7`.etomite_site_templates WHERE `isr7`.etomite_site_templates.id = ''; [Copy SQL to ClipBoard] Parser timing MySQL: 0.0079 s s (2 Requests) PHP: 0.0229 s s Total: 0.0307 s s
Logout via submit button (authenticate_visitor snippet) works fine.
What's wrong?
Thanks in advance! :)
#26
Posted 24 November 2006 - 03:31 PM
Psycho Mantis, on Nov 24 2006, 08:23 AM, said:
I have one little problem though. When I use the LoginOut snippet and click on the "Logout" link, I get following SQL error:
« Error » Etomite encountered the following error while attempting to parse the requested resource: « Row count error in template query result. » SQL: SELECT * FROM `isr7`.etomite_site_templates WHERE `isr7`.etomite_site_templates.id = ''; [Copy SQL to ClipBoard] Parser timing MySQL: 0.0079 s s (2 Requests) PHP: 0.0229 s s Total: 0.0307 s s
Logout via submit button (authenticate_visitor snippet) works fine.
What's wrong?
Thanks in advance! :)
Without seeing the actual page in question it is difficult to give an answer... I'm wondering if it might be possible that one snippet is throwing an error because of the previous actions of another snippet... It does seem odd that you are getting a template error, however, and this sounds vaguely familiar to me for some reason... Which Etomite release are you using...???
#27
Posted 26 November 2006 - 12:03 PM
#28
Posted 26 November 2006 - 07:24 PM
Psycho Mantis, on Nov 26 2006, 07:03 AM, said:
Here is a copy of the PM that I sent to Psycho Mantis after taking a hands-on look at the site in question... I'm posting this here just in case it might help someone else with a similar problem in the future... I will also give more of an explanation on why this problem was encountered in the first place afterwards...
Quote
I changed:
CODE
if($_SESSION['validated']) { $output = '<a href="[~1~]?logout=1">Logout ('.$_SESSION['shortname'].')</a>'; }
To:
CODE
if($_SESSION['validated']) { $output = '<a href="[~1~]&logout=1">Logout ('.$_SESSION['shortname'].')</a>'; }
The problem is that you can only have one ? in your URL's GET arguments... Changing the second one to & assures XHTML compliance but it could have just as easily been left as &...
This issue arose because Psycho Mantis apparently forgot, or was unaware, that when using [~1~] etomite uses the makeUrl() API function call to determine what type of link needs to be returned, FURL or non-FURL, based on Etomite configuration and the possible presence of a document alias... This is something that needs to be taken into consideration along with the fact that you can only have one ? in your URL... The minor error in his snippet code was causing his Logout link to be constructed as http://<full_domain_name>/index.php?id=1?logout=1 which, as you can see, has two ?'s...
#29
Posted 13 July 2007 - 05:47 PM
#30
Posted 13 July 2007 - 06:56 PM
cathode, on Jul 13 2007, 01:47 PM, said:
When working with internal URL's within snippets it's probably good practice to use makeUrl() for URL construction as it does more error checking... This would be coded as follows... The resulting code will return the proper code whether Friendly URL's and Friendly Aliases are enabled or not...
if($_SESSION['validated'])
{
$output = '<a href="'.$etomite->makeUrl($id=1, $alias=$etomite->aliases[1], $args="?logout=1").'">Logout ('.$_SESSION['shortname'].')</a>';
}


Help
Back to top
MultiQuote









