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.
The forum of the forums
3 posters

    Recent Status Update Widget like IPB is not working correctly

    Van-Helsing
    Van-Helsing
    Hyperactive


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

    Solved Recent Status Update Widget like IPB is not working correctly

    Post by Van-Helsing January 17th 2015, 7:56 pm

    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, 2:50 pm; edited 1 time in total
    Van-Helsing
    Van-Helsing
    Hyperactive


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

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

    Post by Van-Helsing January 19th 2015, 8:39 am

    Bump
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


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

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

    Post by _Twisted_Mods_ January 19th 2015, 10:00 am

    wrong widget that's ur staff widget
    Van-Helsing
    Van-Helsing
    Hyperactive


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

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

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

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


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

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

    Post by _Twisted_Mods_ January 19th 2015, 4: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
    Van-Helsing
    Van-Helsing
    Hyperactive


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

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

    Post by Van-Helsing January 19th 2015, 4: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

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

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

    Bump
    FrOsTyXi
    FrOsTyXi
    Forumember


    Male Posts : 460
    Reputation : 12
    Language : english

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

    Post by FrOsTyXi January 20th 2015, 7:34 pm

    @Black-Shadow i'm with you on this *)
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


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

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

    Post by _Twisted_Mods_ January 20th 2015, 7:50 pm

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


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

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

    Post by Van-Helsing January 20th 2015, 9:00 pm

    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?
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


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

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

    Post by _Twisted_Mods_ January 20th 2015, 9:15 pm

    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
                          });
                    })
                    });

    Van-Helsing
    Van-Helsing
    Hyperactive


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

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

    Post by Van-Helsing January 20th 2015, 9:26 pm

    @_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
                              });
                        })
                        });
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


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

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

    Post by _Twisted_Mods_ January 20th 2015, 10:37 pm

    t15831-topic your missing the / should be /t15831-topic
    Van-Helsing
    Van-Helsing
    Hyperactive


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

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

    Post by Van-Helsing January 21st 2015, 5: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>
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


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

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

    Post by _Twisted_Mods_ January 21st 2015, 7:10 am

    is it updating the topic with the new user id?
    Van-Helsing
    Van-Helsing
    Hyperactive


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

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

    Post by Van-Helsing January 21st 2015, 8:08 am

    _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.
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


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

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

    Post by _Twisted_Mods_ January 21st 2015, 9:30 am

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


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

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

    Post by Van-Helsing January 21st 2015, 9:38 am

    Do you need the javascript of Recent Status update and the code of recent status update widget?
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


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

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

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

    i need it all anything to do with the status update
    Van-Helsing
    Van-Helsing
    Hyperactive


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

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

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

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


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

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

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

    alright ty ... as soon as i get some extra time i will see about re writing the whole thing
    Van-Helsing
    Van-Helsing
    Hyperactive


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

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

    Post by Van-Helsing January 21st 2015, 5: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

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

    Post by Van-Helsing January 22nd 2015, 7:56 pm

    Bump
    Van-Helsing
    Van-Helsing
    Hyperactive


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

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

    Post by Van-Helsing January 23rd 2015, 9:50 pm

    Bump
    Van-Helsing
    Van-Helsing
    Hyperactive


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

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

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

    Bump
    Van-Helsing
    Van-Helsing
    Hyperactive


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

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

    Post by Van-Helsing January 26th 2015, 6:22 am

    Bump
    Van-Helsing
    Van-Helsing
    Hyperactive


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

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

    Post by Van-Helsing January 27th 2015, 7:01 am

    bump
    Van-Helsing
    Van-Helsing
    Hyperactive


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

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

    Post by Van-Helsing January 28th 2015, 8:21 am

    Bump
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


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

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

    Post by _Twisted_Mods_ January 28th 2015, 9:35 am

    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
    FrOsTyXi
    FrOsTyXi
    Forumember


    Male Posts : 460
    Reputation : 12
    Language : english

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

    Post by FrOsTyXi January 28th 2015, 11:19 am

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

      Current date/time is November 11th 2024, 3:22 pm