The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Recent Status Update Widget like IPB is not working correctly

3 posters

Page 1 of 3 1, 2, 3  Next

Go down

Solved Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 18th 2015, 1:56 am

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 February 15th 2015, 8:50 pm; edited 1 time in total
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 19th 2015, 2:39 pm

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by _Twisted_Mods_ January 19th 2015, 4:00 pm

wrong widget that's ur staff widget
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2083
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 19th 2015, 9:51 pm

Hello @_Twisted_Mods_,
Please re-check the code its the widget of Members Recent Status Updates.
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by _Twisted_Mods_ January 19th 2015, 10:28 pm

my bad ur right .. but the issue isnt with this script its with the one in the widget that you click the button to update the status .. i need that 1
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2083
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 19th 2015, 10:39 pm

Yes thats the problem with the update button it not updating correctly the pseudo-database, is there a better js code to resolve this issue? I think something is going wrong when pressing the status update button. Furthermore the widget is not working correct in google chrome I mean its not displaying the latest status update but only an empty box.


Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 20th 2015, 10:44 pm

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by FrOsTyXi January 21st 2015, 1:34 am

@Black-Shadow i'm with you on this *)
FrOsTyXi
FrOsTyXi
Forumember

Male Posts : 460
Reputation : 12
Language : english

http://team-psn.forum-board.net/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by _Twisted_Mods_ January 21st 2015, 1:50 am

like i said b4 i need the other script thats in the widget with the button you click update on.. not the script from the widget that gets the info
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2083
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 21st 2015, 3:00 am

This javascript in the widget it isn't gets the update button's data? Or it is not write the members status due permission reason?
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by _Twisted_Mods_ January 21st 2015, 3:15 am

you should have a script simular this replace it with one below be sure to replace "/t2011-status-updates" with your topic url and repace "4986" with your post #

Code:

 jQuery(function(){

                jQuery('.status-button').click(function(){
                jQuery.get('/t2011-status-updates', function (data) {
                            var groupz = {
                                group1z: jQuery('.entry-content', data).text(),
                };
                    ff = groupz.group1z;
                           if(ff.match(_userdata.user_id)){
ff = ff.replace(_userdata.user_id+' ','');
                              }
                    gg = ff.split(' ');
                    mm="";
                  for(var i = 0; i < 4; i++){
                              
                      var hh = gg[i];
                      mm = mm  + " "+ hh;
                    }
                        jjii = _userdata.user_id+mm;
                        jjii2 = jjii.replace('+-----','');
                          jQuery.post('/post?p=4986&mode=editpost', {
                  subject: 'nothing really',
                        message: jjii2,
                        post: 1
                      });
                })
                });

_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2083
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 21st 2015, 3:26 am

@_Twisted_Mods_,
I just tested it with my account and a member's account. The problem is the permissions as it seems. I moved the post in the hashtags forum which the members have moderation permissions there but it still not working. I tested it with google chrome as member. Furthermore it conflicts the "Ajax Loading" js and JScript's "Where I am" js. Is the code correct?

Code:

jQuery(function(){

                    jQuery('.status-button').click(function(){
                    jQuery.get('t15831-topic', function (data) {
                                var groupz = {
                                    group1z: jQuery('.entry-content', data).text(),
                    };
                        ff = groupz.group1z;
                              if(ff.match(_userdata.user_id)){
    ff = ff.replace(_userdata.user_id+' ','');
                                  }
                        gg = ff.split(' ');
                        mm="";
                      for(var i = 0; i < 4; i++){
                                 
                          var hh = gg[i];
                          mm = mm  + " "+ hh;
                        }
                            jjii = _userdata.user_id+mm;
                            jjii2 = jjii.replace('+-----','');
                              jQuery.post('/post?p=20047&mode=editpost', {
                      subject: 'nothing really',
                            message: jjii2,
                            post: 1
                          });
                    })
                    });
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by _Twisted_Mods_ January 21st 2015, 4:37 am

t15831-topic your missing the / should be /t15831-topic
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2083
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 21st 2015, 11:44 am

_Twisted_Mods_ wrote:t15831-topic your missing the / should be /t15831-topic

Hello @_Twisted_Mods_,
I edited the js by adding the / characters and now it doesn't conflicts the other js. I tested again with my account and a member account but it seems something is going wrong the member's status updated in its profile normally but in the widget is not updated.

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>
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by _Twisted_Mods_ January 21st 2015, 1:10 pm

is it updating the topic with the new user id?
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2083
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 21st 2015, 2:08 pm

_Twisted_Mods_ wrote:is it updating the topic with the new user id?

No, when a member update its status the topic is not updating.
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by _Twisted_Mods_ January 21st 2015, 3:30 pm

ok well pm me all the script you have from both widgets ... and i ill try to re write the whole thing sometime in next couple days
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2083
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 21st 2015, 3:38 pm

Do you need the javascript of Recent Status update and the code of recent status update widget?
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by _Twisted_Mods_ January 21st 2015, 9:44 pm

i need it all anything to do with the status update
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2083
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 21st 2015, 9:54 pm

Hello @_Twisted_Mods_,
I have been pm you all the related parts,js, html modules about the status updates.
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by _Twisted_Mods_ January 21st 2015, 10:03 pm

alright ty ... as soon as i get some extra time i will see about re writing the whole thing
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2083
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 21st 2015, 11:07 pm

Yes, I think now you can debug codes and find the error or conflict on javascripts.
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 23rd 2015, 1:56 am

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 24th 2015, 3:50 am

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 25th 2015, 11:18 am

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 26th 2015, 12:22 pm

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 27th 2015, 1:01 pm

bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by Van-Helsing January 28th 2015, 2:21 pm

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by _Twisted_Mods_ January 28th 2015, 3:35 pm

i have this pretty much done for phpbb3 im running test for bugs and stuff right now then once thats finished ill make it for the other versions
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2083
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Recent Status Update Widget like IPB is not working correctly

Post by FrOsTyXi January 28th 2015, 5:19 pm

@_Twisted_Mods_ Thank you for your time and effort minus all the bumps LOL
FrOsTyXi
FrOsTyXi
Forumember

Male Posts : 460
Reputation : 12
Language : english

http://team-psn.forum-board.net/

Back to top Go down

Page 1 of 3 1, 2, 3  Next

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum