The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Staff online widget help.

Go down

In progress Staff online widget help.

Post by Swagbito on January 3rd 2015, 10:46 pm

So I added the staff online widget and it worked but...
http://rubbershinobi.forumotion.com/
It shows the whole staff list even offline. And it looks ugly.
Also,when I added the widget,I noticed that it cut out some of my topic images. How can I fix this?
Any help?
avatar
Swagbito
Forumember

Posts : 176
Reputation : 4
Language : English & Japanese

http://rubbershinobi.forumotion.com/

Back to top Go down

In progress Re: Staff online widget help.

Post by _Twisted_Mods_ on January 4th 2015, 1:09 am

where did you get this widget? .. provide a link if u can
avatar
_Twisted_Mods_
Helper
Helper

Male Posts : 2064
Reputation : 314
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

In progress Re: Staff online widget help.

Post by Swagbito on January 4th 2015, 1:24 am

avatar
Swagbito
Forumember

Posts : 176
Reputation : 4
Language : English & Japanese

http://rubbershinobi.forumotion.com/

Back to top Go down

In progress Re: Staff online widget help.

Post by _Twisted_Mods_ on January 4th 2015, 1:39 am

do you color your staff names?
avatar
_Twisted_Mods_
Helper
Helper

Male Posts : 2064
Reputation : 314
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

In progress Re: Staff online widget help.

Post by Swagbito on January 4th 2015, 1:39 am

No
avatar
Swagbito
Forumember

Posts : 176
Reputation : 4
Language : English & Japanese

http://rubbershinobi.forumotion.com/

Back to top Go down

In progress Re: Staff online widget help.

Post by _Twisted_Mods_ on January 4th 2015, 1:50 am

well i can write you a better code but you have 2 choices either you can fill in all of your staffs user id's or you can color them and just fill in the colors
avatar
_Twisted_Mods_
Helper
Helper

Male Posts : 2064
Reputation : 314
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

In progress Re: Staff online widget help.

Post by Swagbito on January 4th 2015, 1:51 am

Writing me one is fine plz.
avatar
Swagbito
Forumember

Posts : 176
Reputation : 4
Language : English & Japanese

http://rubbershinobi.forumotion.com/

Back to top Go down

In progress Re: Staff online widget help.

Post by _Twisted_Mods_ on January 4th 2015, 1:55 am

witch way do you want it by color or userid#
avatar
_Twisted_Mods_
Helper
Helper

Male Posts : 2064
Reputation : 314
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

In progress Re: Staff online widget help.

Post by Swagbito on January 4th 2015, 1:56 am

Userid#
avatar
Swagbito
Forumember

Posts : 176
Reputation : 4
Language : English & Japanese

http://rubbershinobi.forumotion.com/

Back to top Go down

In progress Re: Staff online widget help.

Post by _Twisted_Mods_ on January 4th 2015, 4:39 am

see if this works for you

Code:

<style>
#staffwidget img{width:40px;border-radius:8px}
#staffwidget .stonh{border:1px solid white;padding: 2px;border-radius: 5px;width:97%;}
#staffwidget a{text-align:center;width:100%;}
#staffwidget #innerstname{width: 100% !important;display: inline-flex;font-size: 1.10em;font-weight: bold;}
</style>
<div id="staffwidget">
</div><script>
jQuery(function(){
fff = ['1','87294','3975','98818','12726','97664']; // id's of the staff
jQuery('body').append('<span id="staffget" style="display:inline;"></span>');
jQuery('#staffget').load('/viewonline .forumbg',function(){
jQuery('#staffget a[href^="/u"]').each(function(){
   var prof = jQuery(this).attr('href');

for(var i = 0; i < fff.length; i++){
if(prof == '/u'+fff[i]){
   jQuery('#staffwidget').append(' <div id="stonlin'+i+'" class="stonh"><span id="innerstname">'+jQuery(this).parent().html()+'</span><br><span id="innerstava"></span><br></div> ');
jQuery('#staffwidget #stonlin'+i+' #innerstava').load(prof + ' #profile-advanced-right .inner:eq(0) div:eq(1)');
}};});});});
</script>


fff = ['1','87294','3975','98818','12726','97664']; // id's of the staff

thats the list of user id#'s you can have as little ['1'] or as many ['1','2','3'] as you need

avatar
_Twisted_Mods_
Helper
Helper

Male Posts : 2064
Reputation : 314
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

In progress Re: Staff online widget help.

Post by Swagbito on January 4th 2015, 11:00 am

Didn`t work.
avatar
Swagbito
Forumember

Posts : 176
Reputation : 4
Language : English & Japanese

http://rubbershinobi.forumotion.com/

Back to top Go down

In progress Re: Staff online widget help.

Post by Swagbito on January 5th 2015, 10:47 pm

Bump.
avatar
Swagbito
Forumember

Posts : 176
Reputation : 4
Language : English & Japanese

http://rubbershinobi.forumotion.com/

Back to top Go down

In progress Re: Staff online widget help.

Post by Ange Tuteur on January 6th 2015, 1:17 pm

Hello @swagbito,

Try changing your widget to this :
Code:
 <script type="text/javascript">
    myStaff = ['1', '2'];
    staff_cache_time = 4*60*1000; // mm*ss*ms;
    </script>
<div id="theStaff">
</div>
 
<style type="text/css">
.monAva img {
  height:25px;
  width:25px;
}
.myStaff a {
  display:inline-block;
  vertical-align:top;
  margin-top:.75em;
}
</style>
<div style="display:none" id="theContent">
</div>
    <noscript><div style="color:red;font-size:9px">Functionality of this widget is not possible, as JavaScript is disabled or unsupported.</div></noscript>    <script type="text/javascript">
    if (localStorage.staffOn && localStorage.staffEx > +new Date - staff_cache_time) jQuery('#theStaff').html(localStorage.staffOn);
    else loadStaff();
    function loadStaff() {
      jQuery('#theContent').load('/viewonline #main-content a, a.gen', function() {
        for (i=0; i<myStaff.length; i++) jQuery('#theContent a').filter(function() { return jQuery(this).attr('href') === '/u' + myStaff[i] }).appendTo('#theStaff').wrap('<div class="myStaff">');
        if (!jQuery('#theStaff .myStaff').length) jQuery('#theStaff').html('No staff online');
        jQuery('.myStaff a').each(function() {
          var href = jQuery(this).attr('href');
          jQuery(this).before('<span class="monAva"></span>').prev().load(href + ' #profile-advanced-right .module:first div img:first,.forumline td.row1.gensmall:first > img, .frm-set.profile-view.left dd img,dl.left-box.details:first dd img, .row1 b .gen:first img, .real_avatar img', function() {
            if (window.localStorage) {
              localStorage.staffOn = jQuery('#theStaff').html();
              localStorage.staffEx = +new Date;
            }
          });
        });
      });
    }
    </script>

myStaff = ['1', '2']; Is the list of your staff
replace 1, 2 by the id of your staff, you can add more than two by separating multiple user IDs by a comma. To get their id go to their profile and look for /u# in the address bar, # being their ID.

staff_cache_time = 4*60*1000; Is the time the widget is cached
avatar
Ange Tuteur
Forumaster

Male Posts : 13194
Reputation : 2907
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Back to top


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