Intechnic
Users Developers
Home / Forums / In-Portal CMS / General In-Portal Discussions / You need to Login to perform this operation / Topic Posts

In-Portal Forum

This is a place for users of In-Portal to ask questions, discuss various topics, and interact with other members of the In-Portal Community. Please report bugs through the Bugs Team (not the Forum). If you are interested in contributing or joining one of the many Teams for In-Portal, please check out the Contribute section of the website.
 

In-Portal Forum

You need to Login to perform this operation (5)


Posted: 04/29/2005 8:42:58 AM

Reply Quoted  


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

Posted: 05/01/2005 9:07:52 PM

Reply Quoted  


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.

Posted: 05/14/2005 4:41:04 AM

Reply Quoted  


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

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&quot_noaccess="access_denied.tpl&quot_Permission="LINK.ADD,LINK.ADD.PENDING&quot/>



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&quot_noaccess="inlink/suggest_link/access_denied.tpl&quot_Permission="LINK.ADD,LINK.ADD.PENDING&quot/>



2. In inlink/suggest_link.tpl template change the original tag to:

<inp:perm_include _Template="inlink/suggest_link/suggest_link_form_check&quot_noaccess="access_denied.tpl&quot_Permission="login&quot/>



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]

Posted: 05/16/2005 3:04:30 PM

Reply Quoted  


Dmitry wrote:05/15/2005 9:30:20 PM
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&quot_noaccess="access_denied.tpl&quot_Permission="LINK.ADD,LINK.ADD.PENDING&quot/>



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&quot_noaccess="inlink/suggest_link/access_denied.tpl&quot_Permission="LINK.ADD,LINK.ADD.PENDING&quot/>



2. In inlink/suggest_link.tpl template change the original tag to:

<inp:perm_include _Template="inlink/suggest_link/suggest_link_form_check&quot_noaccess="access_denied.tpl&quot_Permission="login&quot/>



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]



Hi Dmitry

Thanks for the quick response - much appreciated

I didnt think i could do the changes as you suggested but your directions were really good and I think(Hmmm!) i have it working.

I originally followed the steps as i think you set out however i found that i still got the new error message fine but it also showed when the login message needed to show.

So feeling brave here's what i did.
i added a new label in admin with the new output i wanted and then I changed the access denied template that i added to the submit link folder to call this new label - and it seems to work as the original access denied tpl still calls the original message

That said - please let me know if you think this is a mistake

Cheers once again
Brinley
ps: i have another suggestion which i'll post when i get a moment