Important announcements from CouchCMS team
148 posts Page 3 of 15
Previous 1, 2, 3, 4, 5, 6 ... 15 Next
thanks KK, your support is great!

One last question, within your first post you said you can add custom fields.

a. We can define any number/type of editable regions (i.e. custom fields) to hold user-data. So if your site decides to follow Facebook in allowing users to idenfify themselves using 51 gender types - no sweat


Now i want to add my own, however i'm unsure where to add this. I want to add a dropdown field which can only be edited within the admin panel by me. So i want to add in account type. Which then i can show within the profile section.

Basic, Pro, Trader, ProTrader.

Can this be done?
Now i want to add my own, however i'm unsure where to add this. I want to add a dropdown field which can only be edited within the admin panel by me. So i want to add in account type. Which then i can show within the profile section.

Basic, Pro, Trader, ProTrader.

Can this be done?

Of course.
All user accounts are basically just cloned-pages of the 'members/index.php' template.
Just go ahead and define the dropdown (and all other editable regions you might need) in that template and it'll show up in the admin-panel for you to edit.
KK wrote:
Now i want to add my own, however i'm unsure where to add this. I want to add a dropdown field which can only be edited within the admin panel by me. So i want to add in account type. Which then i can show within the profile section.

Basic, Pro, Trader, ProTrader.

Can this be done?

Of course.
All user accounts are basically just cloned-pages of the 'members/index.php' template.
Just go ahead and define the dropdown (and all other editable regions you might need) in that template and it'll show up in the admin-panel for you to edit.


got this working fine, however showing it on pages is my only issue.
How can this be done on say the profile page and then on the main index page of my website?

So lets say on the main index page of my site i want to show,

display name, or name.
Account type.

do i use get code or show code?
Simon,

Suppose you had a blog (blog.php) and you wished to show data about a particular cloned-page of the template anywhere on the site, what would you do?

You know the answer - use cms:pages with masterpage parameter set to 'blog.php' and specify either the cloned page we are looking for as 'page_name' or 'id' e.g.
Code: Select all
<cms:pages masterpage='blog.php' id='345'>
   ... you have all data about page with  id 345 cloned from blog.php ..
</cms:pages>


Exactly the same applies for the members - remember we are dealing with the plain old templates and cloned-pages.

Replace the 'blog.php' above with the members template's name and the '345' with the currently logged-in member's id and you have all the data just like a regular page (which is what a member account is).

To make things a little easier, Couch provides the member template's name in a variable named 'k_member_template' and the logged-in member's id as 'k_member_id'.
Our code will now become -
Code: Select all
<cms:pages masterpage=k_member_template id=k_member_id>
   ... you have all data about the current member here ..
</cms:pages>

Place the code above anywhere on the site making sure a member is indeed logged in e.g.-
Code: Select all
<cms:if k_member_logged_in >
   <cms:pages masterpage=k_member_template id=k_member_id>
      ... you have all data about the current member here ..
   </cms:pages>
</cms:if>

and you should have all the data about the member.

Hope this helps.
Strangely, that never crossed my mind. I did think this new members section was more complex however it's not at all.

Thanks kk,
Getting 'page not found' when trying to register pages. Pls help
Getting 'page not found' when trying to register pages. Pls help

Are prettyURLs turned on for the site? If so, please try turning them off (and remove the .htaccess file temporarily).
Hope this helps.
KK wrote:
Getting 'page not found' when trying to register pages. Pls help

Are prettyURLs turned on for the site? If so, please try turning them off (and remove the .htaccess file temporarily).
Hope this helps.


yes pretty url's have been turned on. ill turn them off from config and try again.
How do i turn them off? Will simply removing the .htaccess file do it?
Simply removing the .htaccess will not be sufficient. You can find the setting for prettyURLs in couch/config.php file - set it to '0' instead of '1'.
okay thank you :)
Previous 1, 2, 3, 4, 5, 6 ... 15 Next
148 posts Page 3 of 15

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 2 guests