How to have a "Group online " widget when you already have a staff one
5 posters
Page 1 of 1
How to have a "Group online " widget when you already have a staff one
So I have a staff online widget but I would like one which shows a group or some members by a different name then "staff online" and I need to be able to have both at the same time.
E.G.
Staff Online:
Mad
(A group) online:
Mad
(name)
E.G.
Staff Online:
Mad
(A group) online:
Mad
(name)
Guest- Guest
Re: How to have a "Group online " widget when you already have a staff one
Are you asking for support? If yes, this is the wrong section.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: How to have a "Group online " widget when you already have a staff one
SLGray wrote:Are you asking for support? If yes, this is the wrong section.
I am asking for help on how to do something if I have put this in the wrong section I apologise you can move it to the right one.
Guest- Guest
Re: How to have a "Group online " widget when you already have a staff one
Moved to the correct section.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: How to have a "Group online " widget when you already have a staff one
Hi there,
Sorry, I don't quite understand your issue. Can you go into more specifics?
Sorry, I don't quite understand your issue. Can you go into more specifics?
Re: How to have a "Group online " widget when you already have a staff one
Draxion wrote:Hi there,
Sorry, I don't quite understand your issue. Can you go into more specifics?
As simple as I would like a widget that shows which members of the group you a sign it to is online
Guest- Guest
Re: How to have a "Group online " widget when you already have a staff one
What's the code for the staff online widget?
Take Notes- Helper
- Posts : 2337
Reputation : 324
Language : English
Location : Forumountain
Re: How to have a "Group online " widget when you already have a staff one
Genesis wrote:What's the code for the staff online widget?
- Code:
<script type="text/javascript">
myStaff = ['Mad', 'Becky Queen Of Love', 'SirGrey', 'K A W'];
staff_cache_time = 4*60*1000; // mm*ss*ms;
</script>
<div id="theStaff">
</div>
<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).text() === myStaff[i] }).appendTo('#theStaff').wrap('<div class="myStaff">');
if (!jQuery('#theStaff .myStaff').length) jQuery('#theStaff').html('No staff online');
if (window.localStorage) {
localStorage.staffOn = jQuery('#theStaff').html();
localStorage.staffEx = +new Date;
}
})
Guest- Guest
Re: How to have a "Group online " widget when you already have a staff one
What's your forum link?
Take Notes- Helper
- Posts : 2337
Reputation : 324
Language : English
Location : Forumountain
Re: How to have a "Group online " widget when you already have a staff one
Try using this for groups :
Make sure to include your group(s) colors in this array :
- Code:
<script type="text/javascript">
myGroups = ['#990099', '#CC0000'];
groups_cache_time = 4*60*1000; // mm*ss*ms;
</script>
<div id="theGroups"></div>
<div id="theGroupsContent" style="display:none"></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.groupOn && localStorage.groupEx > +new Date - group_cache_time) jQuery('#theGroups').html(localStorage.groupOn);
else loadStaff();
function loadStaff() {
jQuery.get('/viewonline', function(d) {
for (var groups = document.getElementById('theGroups'), a = jQuery('#main-content a, a.gen', d), i = 0, j = a.length; i<j; i++) {
for (var k = 0, l = myGroups.length; k < l; k++) {
if (a[i].style.color.toLowerCase() == myGroups[k].toLowerCase()) {
$(a[i]).appendTo(groups).wrap('<div class="myGroup">');
}
}
}
if (!jQuery('#theGroups .myGroup').length) jQuery('#theGroups').html('No groups online');
if (window.localStorage) {
localStorage.groupOn = groups.innerHTML;
localStorage.groupEx = +new Date;
}
})
}
</script>
Make sure to include your group(s) colors in this array :
- Code:
myGroups = ['#990099', '#CC0000'];
Re: How to have a "Group online " widget when you already have a staff one
Okay let me try thatAnge Tuteur wrote:Try using this for groups :
- Code:
<script type="text/javascript">
myGroups = ['#990099', '#CC0000'];
groups_cache_time = 4*60*1000; // mm*ss*ms;
</script>
<div id="theGroups"></div>
<div id="theGroupsContent" style="display:none"></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.groupOn && localStorage.groupEx > +new Date - group_cache_time) jQuery('#theGroups').html(localStorage.groupOn);
else loadStaff();
function loadStaff() {
jQuery.get('/viewonline', function(d) {
for (var groups = document.getElementById('theGroups'), a = jQuery('#main-content a, a.gen', d), i = 0, j = a.length; i<j; i++) {
for (var k = 0, l = myGroups.length; k < l; k++) {
if (a[i].style.color.toLowerCase() == myGroups[k].toLowerCase()) {
$(a[i]).appendTo(groups).wrap('<div class="myGroup">');
}
}
}
if (!jQuery('#theGroups .myGroup').length) jQuery('#theGroups').html('No groups online');
if (window.localStorage) {
localStorage.groupOn = groups.innerHTML;
localStorage.groupEx = +new Date;
}
})
}
</script>
Make sure to include your group(s) colors in this array :
- Code:
myGroups = ['#990099', '#CC0000'];
Nope I need #FF0000 Red
Guest- Guest
Re: How to have a "Group online " widget when you already have a staff one
Find this in the code and place your own colors in the place of this
Now to add the code in the widget you need to find this button on the editor >> click it so it looks like this >>
Now add your code and save
it should look something like this
- Code:
myGroups = ['#990099', '#CC0000'];
Now to add the code in the widget you need to find this button on the editor >> click it so it looks like this >>
Now add your code and save
it should look something like this
- Code:
<script type="text/javascript">
myGroups = ['#FF0000', '#CC0000'];
groups_cache_time = 4*60*1000; // mm*ss*ms;
</script>
<div id="theGroups"></div>
<div id="theGroupsContent" style="display:none"></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.groupOn && localStorage.groupEx > +new Date - group_cache_time) jQuery('#theGroups').html(localStorage.groupOn);
else loadStaff();
function loadStaff() {
jQuery.get('/viewonline', function(d) {
for (var groups = document.getElementById('theGroups'), a = jQuery('#main-content a, a.gen', d), i = 0, j = a.length; i<j; i++) {
for (var k = 0, l = myGroups.length; k < l; k++) {
if (a[i].style.color.toLowerCase() == myGroups[k].toLowerCase()) {
$(a[i]).appendTo(groups).wrap('<div class="myGroup">');
}
}
}
if (!jQuery('#theGroups .myGroup').length) jQuery('#theGroups').html('No groups online');
if (window.localStorage) {
localStorage.groupOn = groups.innerHTML;
localStorage.groupEx = +new Date;
}
})
}
</script>
Re: How to have a "Group online " widget when you already have a staff one
I'm looking at your forum and it seems you are missing part of the code at the top and bottom.
Take Notes- Helper
- Posts : 2337
Reputation : 324
Language : English
Location : Forumountain
Similar topics
» Staff online widget help.
» Staff Online Widget
» online widget staff
» Staff online widget
» Staff Online Widget
» Staff Online Widget
» online widget staff
» Staff online widget
» Staff Online Widget
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum