Problems, need help? Have a tip or advice? Post it here.
14 posts Page 1 of 2
Hi KK,

I am working with member module and its working fine.

Now I have to create 3 types of profile member.

As example

1st type of member can upload 3no. Images
2nd type of member can upload 6no. Images
3rd type of member can upload 9no. Images

So I have to create total three type of clonable template (member/index1.php,index2.php,index3.php,) and also three type of profile template (member/profile1.php,profile2.php,profile3.php,) ?

But all type of member can login with one common login area.



is there any path or guideline to do like this?

please help

also I am very sorry to
Wrongly post Board index » CouchCMS Forum » News and Announcements kindly move it to member module section.

Thanks
Subhamoy
Hi Subhamoy,

I think the cleanest way of categorizing members would be through the use of folders - use only one template for all users but create three folders and place each member into one of the folders.

Depending on which folder a member belongs to you can use embedded snippets to provide the corresponding features.
So , its require 3nos member config file in addons ?

or I am trying with this but fail

Code: Select all
  // Names of the required templates
   $t['members_tpl'] = 'profile1.php';
    $t['members_tpl'] = 'profile2.php';


because when I am trying to log in profile1 member its says =" Invalid username or password"
at that time if I login with profile2 member it login successfully.

In that case if I edit

Code: Select all
  // Names of the required templates
$t['members_tpl'] = 'profile2.php';   
$t['members_tpl'] = 'profile1.php';
   

then profile1 user can login successfully.

So, i noticed that always its work with last one members_tpl

What to do ?
So , its require 3nos member config file in addons ?
No, no, Subhamoy. It requires only one member template e.g.
Code: Select all
$t['members_tpl'] = 'profile.php';

In the profile.php we set above, define three folders for the different member types.

Is that clear now?
Respected KK,

I understand what you mean but cant configure how to do that...

here is my example code kindly take a look
in goldenmember.php

Code: Select all
<cms:template title='members' clonable='1'>
<cms:editable
       name='name'
       label='Name'
       desc='Enter Your Name'
       type='text' />
      
       <cms:editable
       name='designation'
       label='Designation'
       desc='Enter Designation Here i.e. Actor, Makeup artist etc.'
       type='text' />
      
      <cms:folder name='cat_1' title=' Male Actor' />
      <cms:folder name='cat_2' title=' Female Actor' />
      <cms:folder name='cat_3' title=' Male Model' />
      <cms:folder name='cat_4' title=' Female Model' />
</cms:template>



and here is profile.php

Code: Select all
 <cms:form 
        masterpage=k_member_template
        mode='edit'
        page_id=k_member_id
        enctype="multipart/form-data"
        method='post'
        anchor='0'
      class="login"
        >
       
        <cms:if k_success >
            <cms:db_persist_form />

            <cms:set_flash name='success_msg' value='1' />
            <cms:redirect k_page_link />
        </cms:if> 
       
        <cms:if k_error >
            <font color='red'><cms:each k_error ><cms:show item /><br /></cms:each></font>
        </cms:if>
      

<p>Display Name:</p>
        <cms:input type="bound" name="k_page_title"  class="login-input" />
<p>Your E-mail</p>
    <cms:input type="bound" name="member_email"  class="login-input" />
<p>New Password:</p>
        <cms:input type="bound" name="member_password"  class="login-input"/>


        <p>Repeat Password:</p>
        <cms:input type="bound" name="member_password_repeat"  class="login-input" />


<p>Enter Name:</p>
<cms:input class="login-input"  id="first-name" name="name" placeholder="First Name  Last Name" type="bound" value="" />

<p>Enter Designation:</p>                  
<cms:input class="login-input"  id="designation" name="designation" placeholder="Your designation" type="bound" value="" />

<input style="width:200px;"  type="submit" name="submit" class="login-submit" value="Save"/> 

</footer>         
    </cms:form>   



The above code work fine for me

Now I want create another profile type without designation so I create silvermember.php and delete

Code: Select all
 <cms:editable 
       name='designation'
       label='Designation'
       desc='Enter Designation Here i.e. Actor, Makeup artist etc.'
       type='text' />
from it.

Now what to do with this template. cause I already use cms folder like "<cms:folder name='cat_1' title=' Male Actor' />"

I want to mean GoldenMember & SilverMember both already have common folder category
like
Code: Select all
<cms:folder name='cat_1' title=' Male Actor' />
      <cms:folder name='cat_2' title=' Female Actor' />
      <cms:folder name='cat_3' title=' Male Model' />
      <cms:folder name='cat_4' title=' Female Model' />


Now I cant understand how do I separate folderwise Golden Member and silver member in a same member template? if I merge both template in one template.

Kindly give me the example of code

Pls Help
Hi All,

Is this possible to make a dropdown for select member profile on member login form
if golden member they can choose goldenprofile.php or if silver member they can choose silvermember.php,
Code: Select all
<cms:else />
    <!-- we have a logged-in member -->   

<cms:redirect url="<cms:link 'members/goldenprofile.php' />" />
</cms:if>


and at the same time if they select goldenprofile.php then addons/member config.php automatically set to goldenportfolio.php
Code: Select all
    // Names of the required templates   
    $t['members_tpl'] = 'portfolio.php';
or if they select silvermember.php it will be set to silverportfolio.php.

?, if so then my problem will be solve.

Please reply.

Thanks

Subhamoy
Hi Subhamoy,

Sorry for not being able to give sufficient time to your issue - going through a busy period right now.

The problem is, I'm not able to fully understand what you are trying to achieve.

Let us try it once again but this time we do this -
forget Couch and all templates/tags stuff.

Just describe in plain text what the situation is - e.g
what are the different membership types?
what happens when a person registers? Does he choose any membership type?
what happens when he edits his profile? Can he change his membership type?

Would be great if you could create some mockup screenshots showing what two different users (of different membership types) see when they login and edit their profiles.

IMP - don't bring Couch into the description anywhere - please just describe the problem in as much detail as possible.

Thanks.
Thanks for your response
Ok

Here is my goldenmember (Databound from)

[img]
goldenmember.jpg
[/img]

Here is my Silvermember (Databound from where I don not want to give him to upload any image
[img]
silvermember0.jpg
[/img]

So its will finally look like this
[img]
silvermember2.jpg
[/img]

Attachments

Thanks. That is very helpful.

Just one more question - at what point do you set the membership type of a user (i.e. gold or silver)?
I presume it is in the registration form itself. Can you please confirm?
Couch Admin can set membership type of a user.

I mean that's why I create two different profile in earlier.

Thanks
14 posts Page 1 of 2