anon users use default gravatar image

v1.18.x
Baris Usakli 12 years ago
parent 9cd189e273
commit 4117a3da48

@ -31,6 +31,11 @@ marked.setOptions({
pid = post_data.pid[i];
if (post_data.deleted[i] === null || (post_data.deleted[i] === '1' && manage_content)) {
if(uid == 0) {
console.log(user_data[uid].picture);
}
posts.push({
'pid' : pid,
'uid' : uid,
@ -40,7 +45,7 @@ marked.setOptions({
'relativeTime': utils.relativeTime(post_data.timestamp[i]),
'username' : user_data[uid].username || 'anonymous',
'user_rep' : user_data[uid].reputation || 0,
'gravatar' : user_data[uid].picture,
'gravatar' : user_data[uid].picture || 'http://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e',
'fav_star_class' : vote_data[pid] ? 'icon-star' : 'icon-star-empty',
'display_moderator_tools': (uid == current_user || manage_content) ? 'show' : 'none',
'edited-class': post_data.editor[i] !== null ? '' : 'none',

@ -11,7 +11,7 @@ var utils = {
difference = now - Math.floor(parseFloat(timestamp));
difference = Math.floor(difference / 1000);
console.log(difference);
if (difference < 60) return difference + ' second' + (difference !== 1 ? 's' : '');
difference = Math.floor(difference / 60);

Loading…
Cancel
Save