End user documentation?

General Discussion

Suggested Topics

  • One profile for all users

    Unsolved General Discussion
    0 Votes
    2 Posts

    @levi-haviv Hi - it should be in the ACP - try


    Or Admin -> Settings -> Uploads -> Profile Covers

  • 0 Votes
    4 Posts
    User.updateProfile = function (uid, data, callback) { var fields = ['username', 'email', 'fullname', 'website', 'location', 'groupTitle', 'birthday', 'signature', 'aboutme']; var updateUid = data.uid; var oldData; console.log(uid) //28 console.log(updateUid) //undefined

    [email protected]

    curl -X PUT -H "Authorization: Bearer d1a81c3f-b0d4-4bc1-a307-dbed9aa5fbe" --data "uid=28&username=修改用户名测试" http://localhost:4567/api/v1/users/28 { "code": "ok", "payload": {} } "uid=28&username=修改用户名测试"

    The problem is solved!(是我的问题还是文档的问题???)@julian

  • 0 Votes
    11 Posts


    Thanks for offering help!
    Here is the users_list.tpl content.

    I did change users.js

    <!-- BEGIN users --> <li class="users-box registered-user" data-uid="{users.uid}"> <div class="user-data-container"> <div class="user-media"> <a href="{config.relative_path}/user/{users.userslug}"> <div class="user-picture"> <img src="{users.picture}" /> </div> </a> <div class="user-info"> <span> <i component="user/status" class="fa fa-circle status {users.status}" title="[[global:{users.status}]]"></i> </span> <br/> <!-- IF route_users:joindate --> <div title="joindate" class="joindate"> <i class='fa fa-clock'></i> <span class='timeago' title="{users.joindateISO}"></span> </div> <!-- ENDIF route_users:joindate --> <!-- IF route_users:reputation --> <div title="reputation" class="reputation"> <i class='fa fa-star'></i> <span class='formatted-number'>{users.reputation}</span> </div> <!-- ENDIF route_users:reputation --> <!-- IF route_users:postcount --> <div title="post count" class="post-count"> <i class='fa fa-pencil'></i> <span class='formatted-number'>{users.postcount}</span> </div> <!-- ENDIF route_users:postcount --> </div> </div> <div class="user-info-extended"> <a href="{config.relative_path}/user/{users.userslug}" class="uie-username"><h4>{users.username}</h4></a> <p>{users.signature}</p> <p id="uie-location">{users.location}</p> <a>{users.website}</a> </div> </div> <div class="user-interaction"> <!-- IF !config.disableChat --> <a href="#" class="btn btn-primary btn-sm chat-btn-users" data-uid='{users.uid}' data-username='{users.username}'>[[user:chat]]</a> <!-- ENDIF !config.disableChat --> </div> <hr> </li> <!-- END users -->

    I alse changed the /srv/<url>/www/public/src/client/users.js file content to handle the chat button. That should not alter the new user load but here is the content I added to the end of Users.init = function(){... function.

    /*--- eRes change: added users button listener*/ /* note: delegated event handling*/ $('#users-container').on('click', '.chat-btn-users', function() { app.openChat($(this).data('username'), $(this).data('uid')); }); /*note: hide user interaction div */ $('#users-container').on("mouseenter", '.users-box', function(){ $(this).children(".user-interaction").css('visibility','visible'); }); $('#users-container').on("mouseleave", '.users-box', function(){ $(this).children(".user-interaction").css('visibility','hidden'); }); /*--END-- eRes change: added users button listener */

    Thanks again!

  • 0 Votes
    5 Posts
  • 0 Votes
    2 Posts

    You need to write a server side script to go through all the users and update their urls.

    Something like the following should work.

    var db = require('./database'), user = require('./user'), async = require('async'); db.getSortedSetRange('users:joindate', 0, -1, function(err, uids) { async.eachLimit(uids, 50, updateUserImage, function(err) { console.log('done'); }); }); function updateUserImage(uid, next) { user.getUserFields(uid, ['image', 'gravatarpicture', 'uploadedpicture'], function(err, userData) { // do your update here, can check current data from userData user.setUserField(uid, 'gravatarpicture', 'some_new_url', next); }); }