Important announcements from CouchCMS team
148 posts Page 9 of 15
Previous 1 ... 6, 7, 8, 9, 10, 11, 12 ... 15 Next
Respected/Dear KK,

Yes your are right, I want to show a login box as part of a different page.

I wouldn't want it to be http://www.yoursite.com/couch/snippets/login.php

I try like this in index.php
Code: Select all
<cms:embed 'login.php' />


and after that I also try like this..
(As globals.php
and add this to snippets/slider.html
<cms:get_custom_field 'image' masterpage='globals.php' />)

I did same hare with login.php
but cant understand which portion I add to snippets/login.html
KK wrote: @BlueCaret - points noted. Thank you.


Does this mean it is not possible at all right now? Sorry meant it as I would like to know how to do it, not as a feature request (although thats good too!) Just want to confirm that this is what it means.

Thank you!
@BlueCaret, OK, I am sorry :)
Yes, I am afraid, both the functions are not available "out of the box" with the addon (at the moment).
@Subhamoy

To show an embedded login box, you can use the following code as a guide -
Code: Select all
<cms:member_check_login />

<cms:if "<cms:not k_member_logged_in />" >
   
    <!-- not logged-in. Prompt for creds -->
    <h1>Login</h1>

    <cms:form method="post" anchor='0'>
        <cms:if k_success >
            <!--
                The 'member_process_login_form' tag below expects fields named
                'member_name', 'member_password' and (optionally) 'member_remember'
            -->
            <cms:member_process_login_form
                redirect='1'
            />
           
        </cms:if>
       
        <cms:if k_error >
            <h3><font color='red'><cms:show k_error /></font></h3>
        </cms:if>
       
       
        Username (your email): <br/>
        <cms:input type='text' name='member_name' /> <br/>
       
        Password: <br />
        <cms:input type='password' name='member_password' /> <br/>
       
        <!-- if 'remember me' function is not required, the following checkbox can be omitted -->
        <cms:input type='checkbox' name="member_remember" opt_values='Remember me=1' /> <br/>
       
        <input type="submit" value="Login" name="submit"/>
    </cms:form>
   
<cms:else />
    <!-- we have a logged-in member -->
    <h1>hello</h1>
   
    <!-- give an option to logout -->
    <a href="<cms:member_logout_link />">logout</a> 

</cms:if>

It is almost the same code that we use in login.php except for one crucial difference-
Code: Select all
<cms:member_process_login_form 
   redirect='1'
/>
The redirect='1' makes the cms:member_process_login_form redirect to the same page on which it is used (as opposed to redirecting to the calling page, as it does on login.php).

Of course you can style the login form to suit yourself. Place the form code in an embedded snippet if you'd want to use it on multiple templates.

Hope this helps.
Respected /Dear,

Thanks a lot for this guidance. its really help me a lot.
but is there any alter code against this.
Code: Select all
<!-- we have a logged-in member -->
    <h1>hello</h1>


I did this
Code: Select all
   <!-- we have a logged-in member -->
<a href="members/profile.php">LOGIN HERE</a>
its work fine when I click login here.

but I want to go direct on members/profile.php page after click on submit button.

below code is not working
Code: Select all
<cms: else />
header("Location: members/profile.php')
@subhamay,

You may use either this -
Code: Select all
..
<cms: else />
<cms:redirect url="<cms:link 'members/profile.php' />" />

or can modify the following -
Code: Select all
<cms:member_process_login_form 
   redirect='1'
/>

to this
Code: Select all
<cms:member_process_login_form 
   redirect="<cms:link 'members/profile.php' />"
/>

Does this help?
Yes Its help me. Boss
kk.png
kk.png (124.83 KiB) Viewed 4138 times
I am using members module with Couch Cart. I don't have the normal PayPal checkout, instead I am using custom bank checkout.

On that checkout page, along with the "place order" button, there should be at least two more fields-email address and customer name.

I don't want my customers to enter their details again, after all they have signed up for an account.
I would like to use those variables, provided for each member, as values when placing an order.

I was looking for some "value" parameter of the couch input tag, but there is none.

edit: Solved it with jQuery.
Code: Select all
$('#name').val('<cms:show k_member_title />');


This outputs the members name to the name input field. I just need to make those fields hidden, and the customer just needs to press "place order", and their details will be submitted.
I am wondering if it would be possible to do some modifications to what the registration process is like. Couple questions/requests

First question:
I would like it to be setup so that upon requesting an account, the user is sent an email that asks them to verify their email, but this does not activate the account, they are told their account will be reviewed and activated later (by an admin). This is so we make sure we get a correct email from them.

Then once they verify their email, the admin is emailed saying someone requested an account. The admin then has to login and activate it (or link in email would work).

When the admin activates the account I want the user to get another email saying their account has been activated and list their username and password as a reminder.

Second question:
Also, is there a way to not require a screen name on registration? I only want them to use their email address as their login. Even if this means just hiding the screen name field and automatically using the email for it would work for me.

Is any of this possible and if so how would I go about doing it? Appreciate all the help!
I am having a hard time accessing errors from the registration form. When I try to show an error for a particular field it does not show up. I did a cms:dump and do not see it in the variables list.

I do use underscores in my field names, so I am wondering if this problem is occurring because of the way I named them.
Previous 1 ... 6, 7, 8, 9, 10, 11, 12 ... 15 Next
148 posts Page 9 of 15