I am facing problem with status update widget with a previous post https://help.forumotion.com/t137865p60-recent-status-update-widget-like-ipb#933777, the members cannot update their status in widget only the staff members can update their profiles the statuses normally.
I am using the following widget code:
- Code:
<style>
/*-----ststusupdatewid--by-twisted------*/
.statsbox #statavatar {
display: inline-block;
width: 100%;
}
.statsbox {
color: darkgray;
padding: 5px;
margin-bottom: 2px;
margin-top: 2px;
border-radius: 4px;
border: 1px solid #EBF0F3;
background: transparent;
}
.statsbox #statavatar img {
width: 35px;
height: 35px;
float: left;
border: 1px solid whitesmoke;
border-radius: 4px;
}
.statsbox .h3 {
/*background-color:white;*/
border-radius: 5px;
padding: 2px;
/* border: 1px solid #000;*/
display: inherit;
width:110px;
text-align: left;
}
/*-------------------------------------*/
</style>
<div id="supdate_widget">
</div><script>
jQuery(function(){
jQuery('#supdate_widget').empty();
jQuery.get('/t15831-topic', function (data) {
tpfieldid = '#field_id5:eq(0)';
var group = {
group1: jQuery('.entry-content', data).text(),
};
gg = "";
ff = group.group1;
gg = ff.split(' ');
nurl1 = '/u'+gg[0];
nurl2 = '/u'+gg[1];
nurl3 = '/u'+gg[2];
nurl4 = '/u'+gg[3];
nurl5 = '/u'+gg[4];
jQuery('#supdate_widget').append(' <div id="statusbox1" class="statsbox"><div id="statavatar"></div><div id="tstatus"></div></div> ');
jQuery('#supdate_widget').append(' <div id="statusbox2" class="statsbox"><div id="statavatar"></div><div id="tstatus"></div></div> ');
jQuery('#supdate_widget').append(' <div id="statusbox3" class="statsbox"><div id="statavatar"></div><div id="tstatus"></div></div> ');
jQuery('#supdate_widget').append(' <div id="statusbox4" class="statsbox"><div id="statavatar"></div><div id="tstatus"></div></div> ');
jQuery('#supdate_widget').append(' <div id="statusbox5" class="statsbox"><div id="statavatar"></div><div id="tstatus"></div></div> ');
jQuery.get(nurl1, function (data) {
var prof1 = {
name1: jQuery('#profile-advanced-right .h3:eq(0)', data).parent().html().replace(/\(online\)/g,''),
avatar1: jQuery('#profile-advanced-right img:eq(0)', data).attr('src'),
status1: jQuery(tpfieldid, data).text(),
};
jQuery('#supdate_widget #statusbox1 #statavatar').prepend('<img src="'+prof1.avatar1+'">');
jQuery('#supdate_widget #statusbox1 #statavatar').append(prof1.name1);
jQuery('#supdate_widget #statusbox1 #tstatus').append(prof1.status1) ;
});
jQuery.get(nurl2, function (data) {
var prof = {
name: jQuery('#profile-advanced-right .h3:eq(0)', data).parent().html().replace(/\(online\)/g,''),
avatar: jQuery('#profile-advanced-right img:eq(0)', data).attr('src'),
status: jQuery(tpfieldid, data).text(),
};
jQuery('#supdate_widget #statusbox2 #statavatar').prepend('<img src="'+prof.avatar+'">');
jQuery('#supdate_widget #statusbox2 #statavatar').append(prof.name);
jQuery('#supdate_widget #statusbox2 #tstatus').append(prof.status) ;
});
jQuery.get(nurl3, function (data) {
var prof = {
name: jQuery('#profile-advanced-right .h3:eq(0)', data).parent().html().replace(/\(online\)/g,''),
avatar: jQuery('#profile-advanced-right img:eq(0)', data).attr('src'),
status: jQuery(tpfieldid, data).text(),
}
jQuery('#supdate_widget #statusbox3 #statavatar').prepend('<img src="'+prof.avatar+'">');
jQuery('#supdate_widget #statusbox3 #statavatar').append(prof.name);
jQuery('#supdate_widget #statusbox3 #tstatus').append(prof.status) ;
});
jQuery.get(nurl4, function (data) {
var prof = {
name: jQuery('#profile-advanced-right .h3:eq(0)', data).parent().html().replace(/\(online\)/g,''),
avatar: jQuery('#profile-advanced-right img:eq(0)', data).attr('src'),
status: jQuery(tpfieldid, data).text(),
}
jQuery('#supdate_widget #statusbox4 #statavatar').prepend('<img src="'+prof.avatar+'">');
jQuery('#supdate_widget #statusbox4 #statavatar').append(prof.name);
jQuery('#supdate_widget #statusbox4 #tstatus').append(prof.status) ;
});
jQuery.get(nurl5, function (data) {
var prof = {
name: jQuery('#profile-advanced-right .h3:eq(0)', data).parent().html().replace(/\(online\)/g,''),
avatar: jQuery('#profile-advanced-right img:eq(0)', data).attr('src'),
status: jQuery(tpfieldid, data).text(),
}
jQuery('#supdate_widget #statusbox5 #statavatar').prepend('<img src="'+prof.avatar+'">');
jQuery('#supdate_widget #statusbox5 #statavatar').append(prof.name);
jQuery('#supdate_widget #statusbox5 #tstatus').append(prof.status) ;
});
});
});
</script>
Last edited by Black-Shadow on February 15th 2015, 8:50 pm; edited 1 time in total