We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15003
    • 85 Posts
    I have a client who wants to be able to add links to specific documents for each of his clients. He is tired of having to email docs repeatedly when a client inadvertently deletes or forgets where they filed them. Is this possible? I have not used the &customTable, &customFields before and am wondering if it would be possible using them to add this info to the profile page. Will this work even though the field needs to contain one or more links to external files?

    I am still a newbie to MODx and would appreciate any ideas or insight on how best to set this up.

    Thanks!
    Jules
      • 7155
      • 160 Posts
      I think you would some customisation for that

      just wondering, would this info be viewable to other users or the owner of that info?
        • 15003
        • 85 Posts
        Since I posted this question I have made "some" progress, but in a different direction. Below is a description of my situation.

        My client is a consultant with anywhere from 5 to 20 clients at a time. I have set up membership groups for 4 different packages he offers. He would like to leave individual messages and document links for each client he works with. To achieve this I thought I would need to use &customTable, &customFields. Though this still may be the better solution I ended up changing direction a bit and am looking into using using the user profile comment field. My client would be able to enter his messages through the Web Users panel, and using css to display:none I can prevent his clients from being able to edit the field in the update-profile page. Using a webloginPE call I can place this comment within each service package he offers so a customized message will be seen by each client. See code below for an example.
        [!WebLoginPE? &type=`profile` &profileTpl=`view-profile-comment` &profileHomeID=`24` &disableServices=`deleteprofile,register`!]
        
        [+phx:if=`[+user.comment+]`:is=``:then=``:else=`<div class="comment-container">
                                                           <div class="comment">
                                                               <h3>Hello [+user.username+] </h3>
                                                               <p>Below is some info and links for your review</p>
                                                                  [+user.comment+]
                                                           </div>
                                                        </div>`+] 

        If I enter html code in the Web Users panel of the admin interface it is saved and renders correctly in browser window. BUT if a user goes in and updates their profile webloginPE replaces code characters within the <textarea> field with HTML Entities.

        It would be ideal if I could use the TinyMCE instead of <textarea>? I believe I found where the code for each user is located (see below), but I don’t know if there are other places that need changing as well. Nor do I know how to implement the code for TinyMCE. I went to http://wiki.modxcms.com/index.php/TinyMCE but I didn’t see a way to call it the way you do with snippets.
        LINE 418 in: mutate_user.dynamic.php
        <textarea type="text" name="comment" class="inputBox"  rows="5" style="width:300px" onchange='documentDirty=true;'><?php echo htmlspecialchars($userdata['comment']); ?></textarea>
        
        LINE 379 in: mutate_web_user.dynamic.php
        <textarea type="text" name="comment" class="inputBox"  rows="5" style="width:300px" onchange='documentDirty=true;'><?php echo htmlspecialchars(isset($_POST['comment']) ? $_POST['comment'] : $userdata['comment']); ?></textarea>

        I believe using the TinyMCE plugin for the comment area would be a good solution; my client wouldn’t have to learn html and the code wouldn’t be replace with HTML Entities when a user updates their profile. What do you think? Is this a viable solution or should I chase down a different lead?

        Thanks for you input!
        ~Jules
          • 26931
          • 2,314 Posts
          anonymized-26931 Reply #4, 17 years ago
          Hi Jules,

          maybe you could just use the ManagerCheck-Snippet, which will display a certain chunk to a manager user:
          http://modxcms.com/extras/package/270

          there’s also a snippet for webusers somewhere...
            • 15003
            • 85 Posts
            Hi Sharkbait

            I think the snippet for web users you are refering to is MemberCheck. Though I was unaware of ManagerCheck I don’t think that will help. Ultimately I am looking to have a field in a users profile than only a manger can add and edit content, but is viewed by each user when they are logged in to their account. Using the already built in comment field seems ideal if I can find a way around the couple of issue I stated in my second post.

            Thanks for you input!
            ~Jules