some profile changes, added post count to users and account and some css to account

v1.18.x
Baris Soner Usakli 12 years ago
parent 92175274b5
commit 48d5100dfe

@ -272,4 +272,18 @@ footer.footer {
color: rgb(100,100,100);
font-weight: 600;
cursor: pointer;
}
.account-username{
font-size:20px;
font-weight:bold;
}
.account-bio-block{
display:inline-block;
}
.account-bio-label{
display:inline-block;
width:100px;
}

@ -7,21 +7,36 @@
</div>
<!-- BEGIN user -->
<span class="account-username">{user.username}</span>
<br/>
<div class="account-bio-block">
<img src="{user.picture}?s=128" />
</div>
<div class="account-bio-block">
<span class="account-bio-label">Member for </span>
<span>{user.joindate}</span>
<br/>
<span class="account-bio-label">Reputation </span>
<span>{user.reputation}</span>
<br/>
<img src="{user.picture}" />
<span class="account-bio-label">Posts</span>
<span>{user.postcount}</span>
</div>
<br/>
<span>{user.username}</span>
<br/>
<br/>
<label for="email">Email Address</label><input type="text" placeholder="Enter Email Address" id="email" /><br />
<button class="btn btn-primary" id="reset" type="submit">Reset Password</button>
<br/>
<span>Member for </span>
<span id="membersince">{user.joindate}</span>
<br/>
<span>Reputation </span>
<span id="membersince">{user.reputation}</span>
<br/>
<!-- END user -->

@ -202,7 +202,10 @@ var RDB = require('./redis.js'),
// User Details - move this out later
RDB.lpush('uid:' + uid + ':posts', pid);
if (callback) callback(pid);
RDB.db.hincrby(uid, 'postcount', 1);
if (callback)
callback(pid);
});
}

@ -197,7 +197,8 @@ var config = require('../config.js'),
'joindate' : new Date().getTime(),
'password' : hash,
'picture' : User.createGravatarURLFromEmail(email),
'reputation': 0
'reputation': 0,
'postcount': 0
});
RDB.set('username:' + username + ':uid', uid);

Loading…
Cancel
Save