Important announcements from CouchCMS team
148 posts Page 5 of 15
Previous 1, 2, 3, 4, 5, 6, 7, 8 ... 15 Next
@simmons,

Are you sure you have put
Code: Select all
<cms:member_check_login />
in the template showing the sidebar?

If the check above is not done or if a member is indeed not logged-in, the k_member_id variable will be empty.

Following should work (you'll remember we discussed this once before in this thread)
Code: Select all
<cms:member_check_login />
..
..
<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:show_securefile 'imagefile'>
         <cms:dump/>
      </cms:show_securefile>

   </cms:pages>
</cms:if>

Hope this helps.
The sidebar is the one that has the <cms:member_check_login /> in the top most line.
I set it up this way because the sidebar is embedded on every page and is loaded before any content is displayed, within the <cms:if k_member_logged_in /> code is where I have a short script that displays the member's display name and other member details, so the k_member_id is present...

I just figured it out, in the pages tag I used page_id=k_member_id, instead of id=k_member_id.

So sorry.
I'm not primitive, My time machine just malfunctioned in your era.
Hi,

Playing with the member module I see it's simple to check if current user is logged in. I'm wondering if is there a way to check and list other logged in users?
@atisz
is there a way to check and list other logged in users?
No way as yet, Atisz. Will have to get that part in once Couch is ready to create forums. Will have to wait for a little while.
KK wrote: Will have to get that part in once Couch is ready to create forums.

Including a page-view counter yea? :)
I'm not primitive, My time machine just malfunctioned in your era.
No way as yet, Atisz. Will have to get that part in once Couch is ready to create forums. Will have to wait for a little while.

Ok KK, I'll wait. And probably a chat like this http://anantgarg.com/2009/05/13/gmail-facebook-style-jquery-chat/ is another thing that is impossible to be implemented right now. Can you estimate how much will take until this version of Couch will be released?
If setting up a separate member area for a website, on member login the redirect should take the visitor rather to members/myaccount.php than to k_site_link. In documentation I couldn't find any reference on how to make this change.
on member login the redirect should take the visitor rather to members/myaccount.php than to k_site_link.

The 'cms:member_process_login_form' tag accepts an optional 'redirect' parameter you can use to set where the member gets redirected to e.g.
Code: Select all
<cms:member_process_login_form redirect="<cms:link 'members/myaccount.php' />" />

Please note that the 'redirect' parameter accepts only a full URL (i.e. that begins with 'http://' or 'https://') and the URL should belong to the current site (i.e. cannot redirect to an external site). Therefore it is a good practice to use cms:link to generate the correct URL of the target template (as done in the example above).

Hope this helps.
KK wrote:
Hope this helps.

As usual :) Thanks KK!
I have read all posts of this topic related to displaying the current member's avatar but I think I'm missing something :(
In my index.php I have:
Code: Select all
<cms:editable name='avatar' label='Avatar' allowed_ext='png, jpg, jpeg' max_size='2048' type='securefile' thumb_width='100' show_preview='1' use_thumb_for_preview='1' />

and in myaccount.php
Code: Select all
<cms:member_check_login />
.........................
<cms:if k_member_logged_in >
   <cms:pages masterpage=k_member_template id=k_member_id>
   <cms:show_securefile 'avatar'>
        <cms:dump/>
   </cms:show_securefile>
   </cms:pages>
</cms:if>

but all i get displayed is:
show_securefile
file_id: 12
file_name: user1.jpg
file_ext: jpg
file_is_image: 1
file_size: 70106
What am I missing here?
Previous 1, 2, 3, 4, 5, 6, 7, 8 ... 15 Next
148 posts Page 5 of 15

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 1 guest