Important announcements from CouchCMS team
148 posts Page 6 of 15
Previous 1 ... 3, 4, 5, 6, 7, 8, 9 ... 15 Next
@atisz - you are almost there.
Please see viewtopic.php?p=12825#p12825 for how to use the dumped info to actually show the image.
KK wrote: @atisz - you are almost there.
Please see viewtopic.php?p=12825#p12825 for how to use the dumped info to actually show the image.


Hm, strange... I saw that post also, but with all the info from there I still was not able to display the user avatar at that time. But I think I was trying to use both code separately instead of combining them :)
Thanks KK, displaying avatar is working now.
Yep, it's a nice-looking module, but yes I've come across the usual limitations - incompatibility with existing users, with comments ("<cms:process_comment/>" unfortunately doesn't support custom values like "k_comment_author=k_member_title"), with cart orders... So, I do appreciate this module but will wait for adding necessary for me features)
Is it possible to force a member to pay for his membership? I've tried adding a paypall button, but I can't really seem to figure it out.
Code: Select all
            <cms:form class="login" enctype="multipart/form-data" method='post' anchor='0'>
<cms:paypal_processor/>
       <cms:if k_paypal_success>
                <cms:if k_success >
                    <!--
                        The 'member_process_registration_form' tag below expects fields named
                        'member_displayname', 'member_name' (optional), 'member_email',
                        'member_password' and 'member_password_repeat'
                    -->
                    <cms:member_process_registration_form />
                   
                    <cms:if k_success >
                        <cms:redirect url='checkout.php' />
                    </cms:if>
                </cms:if>

                <cms:if k_error >
                    <font color='red'><cms:each k_error ><cms:show item /><br /></cms:each></font>
                </cms:if>
</cms:if>
<cms:if k_paypal_error>
   
        <!-- All PayPal variables and the error message is available here -->
       
    </cms:if>
</cms:paypal_processor>
Displaying own profile picture is working fine. But... how could I change my code in index.php to display other members profile picture too? All I managed to do it was to display my own profile picture or all members profile picture, but not the correct one for the selected member.
The bellow code is from myaccount.php, and I know in index.php there is no necessary to use the pages tag and I think we must have something to use instead of id=k_member_id also, in order to display the correct profile picture for other registered members.
Code: Select all
<cms:if k_member_logged_in >
         <cms:pages masterpage=k_member_template id=k_member_id>   
         <div id="about_pic"><!-- Start about_pic -->
            <cms:show_securefile 'avatar' >
                <cms:if file_is_image >
                    <a href="<cms:cloak_url link=file_id />"><img src="<cms:cloak_url link=file_id thumbnail='1' />" /></a><br />
                <cms:else />
                         <a href="<cms:cloak_url link=file_id />"><cms:show file_name /></a> (<cms:size_format file_size />)
                </cms:if>
            </cms:show_securefile>
         </div><!-- End about_pic -->
      </cms:pages>
            </cms:if>
Hi @atisz,

All I managed to do it was to display my own profile picture or all members profile picture, but not the correct one for the selected member.

Let us forget the 'members' module for a while.

Think of normal cloned pages of any regular template.
How do you display only selected pages of a template?
We use cms:pages tag with different parameters (id, page_name, folder, date, custom_fields and so on). Full info - http://www.couchcms.com/docs/tags-reference/pages.html.

First get those 'selected' members using the regular cms:pages technique mentioned above (members, as you know, as normal cloned-pages).
Once you do that, the cms:show_securefile will show their avatars.

So, when you say 'selected member', what do you have in mind? Please let us know and we can discuss the cms:pages code required to get that member.

Thanks.
Thank you KK for your quick reply. I thought that securefile type need some extra settings for get displayed, as all my other member info (name, email, phone, ....) are displayed correctly.

The way things should work in members/index.php:
1. The sidebar contains a list of registered users (members) with their name and avatar - this is ok. Code used:
Code: Select all
<ul class="list">
           <cms:pages masterpage='members/index.php'>
                <li>
                 <div class="avatar">
                 <cms:show_securefile 'avatar' >
                   <cms:if file_is_image >
                       <a href="<cms:show k_page_link/>"><img src="<cms:cloak_url link=file_id thumbnail='1' />" /></a>
                   <cms:else />
                       <a href="<cms:cloak_url link=file_id />"><cms:show file_name /></a>
                   </cms:if>
                 </cms:show_securefile>
                 </div>
                       <h3 class="name"><a href="<cms:show k_page_link/>"><cms:show k_page_title /></a></h3>
            </li>
            </cms:pages>
        </ul>

2. When a logged in member click on the name/avatar of another member from the list, that member profile infos are displayed in the same template's (members/index.php) main container. The problem here is that the avatar is not displaying correctly, although all other infos (name, email, phone, job, birthday, ...) are displaying correctly, for that specific clicked member.

So where I'm wrong here?
Can you please PM me the template where the avatar is not displaying?
Thanks
KK wrote: Can you please PM me the template where the avatar is not displaying?
Thanks


Of course. I have just sent it to you over PM. I'm really curious what's wrong with it :)
@KK, this may be the PHP4 clone bug fixed in 1.4.5.
Previous 1 ... 3, 4, 5, 6, 7, 8, 9 ... 15 Next
148 posts Page 6 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