HTML Staff Page
2 posters
Page 1 of 1
HTML Staff Page
I have been making a staff Page that tells you all the data of the staff members like this
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.
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 any help will be great Thanks
APE
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 any help will be great Thanks
APE
Re: HTML Staff Page
@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.
I think it would take less requests with the simple profile compared to advanced.
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.
I think it would take less requests with the simple profile compared to advanced.
Re: HTML Staff Page
Yes @Ange Tuteur That is what i wanted 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
I only need it to update say once a day tops
Re: HTML Staff Page
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 ?
Re: HTML Staff Page
@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
and yes just the rank and avatar Please
Re: HTML Staff Page
Add this script anywhere you want on the HTML page :
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.
- 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.
Re: HTML Staff Page
Thank you @Ange Tuteur its worked like a charm here is a beer and a pizza just for you LOL this is now solved thank you buddy
Ange Tuteur Rocks
Ange Tuteur Rocks
Similar topics
» How to Embed a Google Docs Form into an HTML page using HTML Pages Management
» [Help] HTML Page: Space between Header and top of page.
» Switch user page out with a html page
» HTML page as Home page problem
» HTML for staff only
» [Help] HTML Page: Space between Header and top of page.
» Switch user page out with a html page
» HTML page as Home page problem
» HTML for staff only
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum