Recent Status Update Widget like IPB is not working correctly
3 posters
Page 3 of 3
Page 3 of 3 • 1, 2, 3
Recent Status Update Widget like IPB is not working correctly
First topic message reminder :
Hello,
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:
Hello,
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 Sun 15 Feb 2015, 19:50; edited 1 time in total
Re: Recent Status Update Widget like IPB is not working correctly
ok some bug i guess is with ur languge hopfuly this fixes it
- Code:
jQuery(function(){ var stulist;if(localStorage.newstat ==""){jQuery.get('/u'+_userdata.user_id, function (data) {var cstat= jQuery('dl:contains(Status) .field_uneditable', data).eq(0).text();jQuery('#tm_currstat').text('Current Status: '+cstat);localStorage.cstat = 'Current Status: '+ cstat;});}else{jQuery('#tm_currstat').text(localStorage.newstat);};statischanged();var ststxt = "";jQuery('.status-button').click(function(){ststxt = jQuery('#LGstatus_input').val();});function statischanged(){if(jQuery('#LGstatus_notice').text()=='Status Updated!'){jQuery('#tm_currstat').text('Current Status: '+ststxt);localStorage.newstat = 'Current Status: '+ststxt;jQuery.get('/t15831-topic',function(data){jQuery('#LGstatus_notice').text('Updating Recent Status');var sstusers = jQuery('.postbody .entry-content', data).eq(0).text();stulist = sstusers;}).done(function(){if(stulist.match(_userdata.user_id+' ')){stulist = stulist.replace(_userdata.user_id+' ','');};var nulist = stulist.split(' ');var newulist1 = _userdata.user_id+' '+nulist[0]+' '+nulist[1]+' '+nulist[2]+' '+nulist[3]; var newulist2 = newulist1.replace('+-----',''); jQuery.post('/post?p=20047&mode=editpost', {subject: 'StatusUpdates', message: newulist2,post: 1}).done(function(){jQuery('#LGstatus_notice').text('Status Updated.');});});}}var timerId = setInterval(statischanged, 1000);});
Re: Recent Status Update Widget like IPB is not working correctly
Thank you very much @_Twisted_Mods_ for your time, now the only problem is the widget which not working in google chrome and safari browsers.
Re: Recent Status Update Widget like IPB is not working correctly
Hello @_Twisted_Mods_,
I watched that while testing these codes, there is a vulnerability issue which is that is displaying some moderation tools/functions to the simple members. Is there a way to stay the forum secure without displaying these tools/functions to members?
I watched that while testing these codes, there is a vulnerability issue which is that is displaying some moderation tools/functions to the simple members. Is there a way to stay the forum secure without displaying these tools/functions to members?
Re: Recent Status Update Widget like IPB is not working correctly
they should only see mod permissions in profiles and in that topic witch that topic is hidden.. and on my first post with the script tells you a few things you need to change
Re: Recent Status Update Widget like IPB is not working correctly
Hello @_Twisted_Mods_ ,
How can I protect the other javascripts/codes from this kind of moderators?It sounds very hard job.
How can I protect the other javascripts/codes from this kind of moderators?It sounds very hard job.
Re: Recent Status Update Widget like IPB is not working correctly
little lost on what your referring to
Re: Recent Status Update Widget like IPB is not working correctly
Hello @_Twisted_Mods_,
Is there a way to fix this security vulnerability?
Is there a way to fix this security vulnerability?
Re: Recent Status Update Widget like IPB is not working correctly
what all security needs to be fixed? give me a list of all the issues
Re: Recent Status Update Widget like IPB is not working correctly
Hello @_Twisted_Mods_,
Look I have some moderation tools in different points on my forum, due the moderation permissions to all those tools are visible to everyone member which is login in the forum.
Here is a short list:
1. Quick Moderation Tool (Inside topics)
2. Quick Moderation Tool (Topic List Box)
3. Quick Ban Tool
4. Some staff widgets (1-2 widgets)
5. Staff BBCodes Button for replies
6. Staff Posts (Different Background for Staff Members)
Look I have some moderation tools in different points on my forum, due the moderation permissions to all those tools are visible to everyone member which is login in the forum.
Here is a short list:
1. Quick Moderation Tool (Inside topics)
2. Quick Moderation Tool (Topic List Box)
3. Quick Ban Tool
4. Some staff widgets (1-2 widgets)
5. Staff BBCodes Button for replies
6. Staff Posts (Different Background for Staff Members)
Re: Recent Status Update Widget like IPB is not working correctly
i could fix these
Quick Moderation Tool (Inside topics)
2. Quick Moderation Tool (Topic List Box)
3. Quick Ban Tool
but as for rest ur forums not in English so sorry but im not even gonna attempt to mess with it
Quick Moderation Tool (Inside topics)
2. Quick Moderation Tool (Topic List Box)
3. Quick Ban Tool
but as for rest ur forums not in English so sorry but im not even gonna attempt to mess with it
Re: Recent Status Update Widget like IPB is not working correctly
Hello @_Twisted_Mods_,
Is there a javascript function to control the moderators user rank? I need a javascript function to control them and disable some javascripts for this rank of members.
Is there a javascript function to control the moderators user rank? I need a javascript function to control them and disable some javascripts for this rank of members.
Re: Recent Status Update Widget like IPB is not working correctly
you can add this to top of your JavaScript under $(function(){ at the beginning of the script
i didnt test it but should work to disable script for users not in the authusers list
i didnt test it but should work to disable script for users not in the authusers list
- Code:
authusers = ['1','2','3'];
var t = "";
for(i=0;i<authusers.length;i++){
if(_userdata.user_id==authusers[i]){
t = "yes";
};
if(t=='yes'){}else{return;};
Re: Recent Status Update Widget like IPB is not working correctly
_Twisted_Mods_ wrote:you can add this to top of your JavaScript under $(function(){ at the beginning of the script
i didnt test it but should work to disable script for users not in the authusers list
- Code:
authusers = ['1','2','3'];
var t = "";
for(i=0;i<authusers.length;i++){
if(_userdata.user_id==authusers[i]){
t = "yes";
};
if(t=='yes'){}else{return;};
Hello @_Twisted_Mods_,
This function must I added both in the widget and js code and modify the user-id numbers?
Re: Recent Status Update Widget like IPB is not working correctly
you can add that to any script that you have that you don't want members to be able to use that are not on the list
basically it checks the llist if that persons userid# isnt on the list it stop the script from running
basically it checks the llist if that persons userid# isnt on the list it stop the script from running
Re: Recent Status Update Widget like IPB is not working correctly
@Black-Shadow has this issue been solved?
Page 3 of 3 • 1, 2, 3
Similar topics
» How to do this Advanced Hiding Widget Code as well as the Recent Topic's Widget Modification
» Status Update Feed Widget not working
» Status Update Widget
» How do I add a "latest-status update" or "profile feed" widget?
» Change Recent Topics widget to Recent Posts?
» Status Update Feed Widget not working
» Status Update Widget
» How do I add a "latest-status update" or "profile feed" widget?
» Change Recent Topics widget to Recent Posts?
Page 3 of 3
Permissions in this forum:
You cannot reply to topics in this forum