Good art is a taste, good design is an opinion.


Come as guest, stay as family.
Board Index

Come as guest, stay as family.


You are not connected. Please login or register

Foto

[Archived] Recent Update Widget



View previous topic View next topic Go down Message [Page 1 of 1]

1
Offline

  Destroya*

avatar
Punbb Senior
Punbb Senior
  • Description:
Hello, I would like to ask, how can I instal something like the Recent Status Updates for all users on my forum? I have already the Update Status option but I don't know how to create a recent updates widget. Any help appreciated Very Happy Thx

  • Information:
Forum:http://raptorgaming.forumotion.com/Version:PHPBB3
Type:Request a codeTags:Recent,Update,Widget

Powered by PunBB
Currently 0 users have thanked Destroya* for this post:

2
Offline

  Shadow

avatar
Administrator
Administrator
Currently this option works only on punbb forum versions and it's still not stable.

_Twisted_Mods_ wrote:this is the script for when you click the update button .. it grabs a list of users # from the post and removes the last one adds the user# of the user who clicked the button .. this is only for punbb because the elements are different in other versions

/t3-status-users = the post page that it gets used id's from
/post?p=4 = the post # for it to edit the post.. u can highlight edit post to get the post #

Code:

jQuery(function(){
jQuery('.status-button').click(function(){
 jQuery.get('/t3-status-users', function (data) {
            var groupz = {
                group1z: jQuery('.entry-content', data).text(),
};
    ff = groupz.group1z;
    gg = ff.split(' ');
    mm="";
  for(var i = 0; i < 4; i++){
      
       var hh = gg[i];
       mm = mm  + " "+ hh;

    }

         jQuery.post('/post?p=4&mode=editpost', {
  subject: 'Status Updates',
         message: _userdata.user_id+mm,
         post: 1
      });
   
 })
 
});
});




this is the code for the recent status update widget .. it grabs the list of user # from the post goes to each ones profile and gets their name,avatar, and status and attaches it to its holder

/t3-status-users = page it grabs the user ids from
#field_id2 = the profile field it grabs the status from

Code:

<style>
/*-----ststusupdatewid--by-twisted------*/
.statsbox #statavatar {

    display: inline-block;
    width: 100%;
}
.statsbox {

    padding: 5px;
    margin-bottom: 2px;
    margin-top: 2px;
    border-radius: 5px;
    border: 1px solid #000;
 
}
.statsbox #statavatar img {
    width: 30px;
    float: left;
}
.statsbox .h3 {
  background-color:white;
    border-radius: 5px;
    padding: 2px;
    border: 1px solid #000;
    display: inherit;
  width:110px;
  text-align: center;
}
/*-------------------------------------*/
</style>
<div id="supdate_widget">
</div><script>

jQuery(function(){
 jQuery('#supdate_widget').empty();
 jQuery.get('/t3-status-users', function (data) {
    tpfieldid = '#field_id2: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>

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

3
Offline

  Destroya*

avatar
Punbb Senior
Punbb Senior
Does this mean it won't work on phpbb3? I tried it but I am not sure wich ones to put on the JS and which one to put in the widget and I tried a few combinations, Lol

Powered by PunBB
Currently 0 users have thanked Destroya* for this post:

4
Offline

  Van-Helsing

avatar
★Moderator★
★Moderator★
[aviso="Thread Archived"]Original poster seems to be inactive and did not respond within 7 days in this thread. Because of this, the topic has been Archived.

If you have further questions, please open a new topic.[/aviso]

Powered by PunBB
Currently 0 users have thanked Van-Helsing for this post:

View previous topic View next topic Back to top Message [Page 1 of 1]


Topic URL's

URL
BBcode
HTML

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