Problems, need help? Have a tip or advice? Post it here.
16 posts Page 1 of 2
@All...

I have finally decided to give "Extended Users - Members Module" a full fledged try tonight...
So I have been trying to tutorial at: http://www.couchcms.com/docs/extended-entities/post.htm

Now...
I am through till the part (step-by-step) where we have to add
Code: Select all
$t['users_tpl'] = 'users/index.php';


and then re-visit the users/index.php, logged in as super admin after adding the above code to the couch/addons/extended/config.php. (DONE!)


The tutorial then says:
Create a cloned page from our 'users/index.php' template.
You'll see that it displays some editable regions that are not defined in the template


I suppose it means that after visiting the users/index.php -> adding it to the config.php file -> revisiting the users/index.php and then visit the admin panel, and click on "Add New" to create a cloned page. If so, I should get the added extended entities.

So I did the same but still the extended entities do not show up. So what should i do. This is how my admin panel -> Users template, after clicking on the "Add New" Button, appears!

extended_users.png
extended_users.png (22.39 KiB) Viewed 3522 times


Any help will be appreciated. I have to get this done. This is one thing that I haven't been able to implement :( :cry:

Regards,
Aashish
Image
where innovation meets technology
I kept on refreshing... And it didnt work...

I finally deleted the cookies and then logged in and refreshed... And Viola...

The Extended Entities are now added...

Well for now I guess I can move on with the rest of the tutorial... But will keep my progress posted here...

Regards,
Aashish
Image
where innovation meets technology
i have "login" as a link in my menu.
do i need to have the anchor value set to "www.site.com/users/login.php"?

Also once a user logs in, does the user needs to be sent to another page. How is this redirection handled?

I am using the following code:
Code: Select all
<cms:if k_logged_out >
    <cms:redirect "<cms:login_link />" />
</cms:if>

<cms:if k_logged_in >
    <cms:redirect url="loggedin.php" />
</cms:if>


and when i login with an account other than the superadmin account it takes me to the url:
http://localhost/UserModule/loggedin.php
but the page shows the following message and does not load up:

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

This problem can sometimes be caused by disabling or refusing to accept cookies.


I have also tried:
Code: Select all
<cms:redirect url="/loggedin.php" />

Code: Select all
<cms:redirect url='http://localhost/loggedin.php' />

Code: Select all
<cms:redirect url="<cms:link k_template_name='loggedin.php'/>" />

and a few things more but none works.

In this case the loggedin.php is a regular couch template. I am using it to just display the message, login successful and las a logout link. (<a href="<cms:member_logout_link />">logout</a>)

So how do i redirect to loggedin.php?
Image
where innovation meets technology
i have "login" as a link in my menu.
do i need to have the anchor value set to "www.site.com/users/login.php"?
You can use the <cms:login_link> tag to output the right login URL -
Code: Select all
<cms:if k_logged_out >
    <li><a href="<cms:login_link />">Login</a></li>
</cms:if>

once a user logs in, does the user needs to be sent to another page. How is this redirection handled?
The <cms:login> tag accepts a 'redirect' parameter that you can use to send the user to the desired location after login -
Code: Select all
<cms:if k_logged_out >
    <cms:redirect "<cms:login_link redirect="<cms:link 'loggedin.php' />" />" />
</cms:if>

Hope it helps.
<cms:if k_logged_out >
<cms:redirect "<cms:login_link redirect="<cms:link 'loggedin.php' />" />" />
</cms:if>


@KK Sir

I suppose, This code means that:
if a member has just logged out, then the member should be redirected to a login link. Once at the login link the member will fill out the credentials and then be redirected to the loggedin.php

IF that is so, I am actually looking for the following:
if you have gone through the zip i had attached in the mail, then all pages have a login button in the menu. I have changed the code for that button on all pages to:
Code: Select all
<li><a href="<cms:login_link />">Login</a></li>


Anyone can click and go to the login page but there is another menu item (Sevak Shoodh), it is this page that needs to be accessed only after one has logged in. So in other words, I actually want that:
if a member logs in then the member should be redirected to the loggedin.php page. i.e. the url structure should be something like
Code: Select all
http://localhost/folder/users/login.php?redirect=loggedin.php

and that i am unable to achieve.

nevertheless i want to redirect the people logging out to go to the login page only and always.
Image
where innovation meets technology
Instead of existing -
Code: Select all
<li><a href="<cms:login_link />">Login</a></li>

- use the following and now anyone logging in using the link below will be redirected to 'loggedin.php'
Code: Select all
<li><a href="<cms:login_link redirect="<cms:link 'loggedin.php' />" />" >Login</a></li>

Is that what you wanted?
Code: Select all
<li><a href="<cms:login_link redirect="<cms:link 'loggedin.php' />" />" >Login</a></li>


Sir doing this even the super admin will be redirected to the loggedin.php page and that will go all wrong.

Actually all i want is a redirection that will take the logged in user to:
1. if superadmin, then couch
2. if other user, then to loggedin.php
Image
where innovation meets technology
I think you can do that by placing a check in loggedin.php and redirect super-admins automatically to the admin-panel -
Code: Select all
<cms:if k_user_access_level ge '7' >
    <cms:redirect k_admin_link />
</cms:if>
Code: Select all
<li><a href="<cms:login_link redirect="<cms:link 'loggedin.php' />" />" >Login</a></li>


I placed this in the menu in index.php but when i mouse over on the login link it shows at the left hand bottom corner that the link it will go to is:
http://localhost/folder/users/login.php?redirect=index.php

And it happens so. The code you just gave me will only function if i reach the loggedin.php, which i am unable to.
Image
where innovation meets technology
Print out <cms:link 'loggedin.php' /> and see what it shows.
Then printout <cms:login_link redirect="<cms:link 'loggedin.php' /> and see what it shows.
Try using hardcoded URL of loggedin.php in the code above. See if that works.
Try to find out why you are getting 'index.php' instead of the link to 'loggedin.php'.

Basic debugging, Aashish. I'm sure you'll manage it.
16 posts Page 1 of 2