Posted: 05/15/2005 9:30:20 PM
Reply Quoted
miura wrote: | 05/14/2005 4:41:04 AM |
Dmitry wrote: | 05/01/2005 9:07:52 PM | miura wrote: | 04/29/2005 8:42:58 AM | I dont know if anyone else is getting this but its confusing quite a number of people when they try to regsiter with our link directory
Basically if someone tries to add a site before they have registered an error page appears syaing: You need to Login to perform this operation.
The problem is that if they are logged in and are on the homepage (top category which cant have sites added to it) they get exactly the same error message as above which confuses the hell out of them as they have just logged in.
What i would like to happen is for the eror to read something like "Please first visit the category you wish to add your link to, then click on Add a Site".
Is this something I have done that is causing this and does anyoneknow of a fix?
Cheers Brinley |
Hello Brinley,
I see what you mean and I'll look into this in a couple of days and let you now what can be done.
Thanks. |
any news on this as we are doing a radio slot next week that may generate a lot of submissions and I would like this to be in place by then
Cheers Brinley |
Hello,
And sorry for a delay. Ok, first let's open
inlink/suggest_link.tpl template. There you'll find the following tag:
<inp:perm_include _Template="inlink/suggest_link/suggest_link_form" _noaccess="access_denied.tpl" _Permission="LINK.ADD,LINK.ADD.PENDING" />
Basically, what it does is includes the specified template (inlink/suggest_link/suggest_link_form) in case if user group of the current user has
LINK.ADD or
LINK.ADD.PENDING permissions in current category. In the same tag you can define NoAccess template - that's where user will be taken if he doesn't have permissions. The complication arises when you realize that system can be setup in the way when any user group even the Guests (not logged in) can submit the Links. This means that at any time user doesn't has permissions to Suggest List he'll see the same message.
Now, how we can work around this. Since you know that all your user will have to be logged in in order to see that Suggest Link form we first need to check for login status and then permissions for current category. In other words break down the permissions check on two parts - Login and Suggest Link permissions.
1. Create a new template called something like
inlink/suggest_link/suggest_link_form_check.tpl and place the following tag in it:
<inp:perm_include _Template="inlink/suggest_link/suggest_link_form" _noaccess="inlink/suggest_link/access_denied.tpl" _Permission="LINK.ADD,LINK.ADD.PENDING" />
2. In
inlink/suggest_link.tpl template change the original tag to:
<inp:perm_include _Template="inlink/suggest_link/suggest_link_form_check" _noaccess="access_denied.tpl" _Permission="login" />
3. Copy
access_denied.tpl to
inlink/suggest_link/access_denied.tpl template and change the error message to whatever you think it should be when user is logged in but doesn't have permissions to suggest a link.
Feel free to let me know if you get stuck.
Thanks.
[Edited By Dmitry on 05/15/05 9:31:34 PM]