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.

HTML Staff Page

2 posters

Go down

Solved HTML Staff Page

Post by Ape July 3rd 2015, 10:11 pm

I have been making a staff Page that tells you all the data of the staff members like this
HTML Staff Page Captur34 as you can see right now i have to add all the Avatars by hand by clicking one the ones i want and dragging it to the right place on a new page using the ACP

What i would like is for this to change every time the member makes a change in there profile

I did use this code but it just don't change is a member updates there Profile.
Code:
<span class="lastpost-avatar"><img src="http://i59.servimg.com/u/f59/12/23/10/57/noaval11.png" alt="" /></span>     


also i would like that if i change the rank of a member of staff the rank would change on that page on its own without me having to change it by hand

Not sure that can be done thou Sad any help will be great Thanks

APE


HTML Staff Page Left1212HTML Staff Page Center11HTML Staff Page Right112
HTML Staff Page Ape_b110
HTML Staff Page Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19450
Reputation : 2011
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: HTML Staff Page

Post by Ange Tuteur July 4th 2015, 12:09 am

@APE you want the list to automatically be updated, correct ?

The only solution I can think of would be to send multiple requests to different pages in order to retrieve the necessary data. It could be a bit... heavy, but utilizing storage and timing everything correctly could work. Smile

I think it would take less requests with the simple profile compared to advanced. blackeye
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: HTML Staff Page

Post by Ape July 4th 2015, 12:13 am

Yes @Ange Tuteur That is what i wanted Wink is there away i can say make a forum that just has say 1 post of each of my staff in and it then look in to that part of the forum for the info you need ? or it just look in the staff profiles for that data ?
I only need it to update say once a day tops


HTML Staff Page Left1212HTML Staff Page Center11HTML Staff Page Right112
HTML Staff Page Ape_b110
HTML Staff Page Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19450
Reputation : 2011
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: HTML Staff Page

Post by Ange Tuteur July 4th 2015, 12:02 pm

Could I have a look at the staff list code to see what I can do ? Also, the fields you want auto updated are just the rank and avatar ?
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: HTML Staff Page

Post by Ape July 4th 2015, 2:11 pm

@Ange Tuteur The code is way to long to post in here can i just give you the admin account of my forum bot it has full admin rights

and yes just the rank and avatar Please


HTML Staff Page Left1212HTML Staff Page Center11HTML Staff Page Right112
HTML Staff Page Ape_b110
HTML Staff Page Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19450
Reputation : 2011
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: HTML Staff Page

Post by Ange Tuteur July 4th 2015, 7:16 pm

Add this script anywhere you want on the HTML page :
Code:
<script type="text/javascript">//<![CDATA[
$(function() {
  var storage = window.localStorage;
 
  $('.team a.profile-icon').each(function() {
    var t = this,
        row = $(t).parentsUntil('TBODY'),
        id = t.href.replace(/.*?\/(u\d+).*/, '$1'),
        ava = row.find('.lastpost-avatar img')[0],
        rang = row.find('td:eq(2) img')[0],
        img;
   
   
    if (storage && storage['staffAva_' + id] && storage['staffRang_' + id] && storage['staffDataExp_' + id] > 24*60*60*1000 - +new Date) {
      ava.src = storage['staffAva_' + id];
      rang.src = storage['staffRang_' + id];
    }
    else $.get(t.href, function(d) {
      img = $('#profile-advanced-right .module:first img', d);
     
      ava.src = img[0].src;
      rang.src = img[1].src;
     
      if (storage) {
        storage['staffAva_' + id] = img[0].src;
        storage['staffRang_' + id] = img[1].src;
        storage['staffDataExp_' + id] = +new Date;
      }
    });
  });
});
//]]></script>

That should automatically set the ava and rang + cache the data for 24h. It gets the user URL from the profile link in the contact area, so make sure that's update date with the correct profile link. Smile
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: HTML Staff Page

Post by Ape July 5th 2015, 3:32 am

Thank you @Ange Tuteur its worked like a charm Wink here is a beer and a pizza just for you HTML Staff Page 63_zpswrpw4v9nHTML Staff Page Pizza2_zps0inmchul LOL this is now solved thank you buddy


Ange Tuteur Rocks


HTML Staff Page Left1212HTML Staff Page Center11HTML Staff Page Right112
HTML Staff Page Ape_b110
HTML Staff Page Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19450
Reputation : 2011
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: HTML Staff Page

Post by Ape July 5th 2015, 3:33 am

Topic solved and archived


HTML Staff Page Left1212HTML Staff Page Center11HTML Staff Page Right112
HTML Staff Page Ape_b110
HTML Staff Page Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19450
Reputation : 2011
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Back to top

- Similar topics

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