We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Online/Offline "Server" Display.
Topic Started: Oct 22 2011, 05:52 PM (665 Views)
MasterHiku
Member Avatar
Member
[ *  * ]
Board Address: http://s11.zetaboards.com/ACME/
Board Software: ZetaBoards
Description: If you look at the top of the page there is an "Online" icon with server IP. but, the problem is we do this manually, I'd like a code where any admin who doesn't know how to code can easy use a radio button on a certain page to switch the server status of the server on the forums from online to offline and offline to online. Any possibility? Thanks!
Offline Profile Goto Top
 
Quozzo
Member Avatar
By the blood of Sanguinius!
[ *  *  *  *  * ]
The Admin CP can't use mods for security reasons so there's no radio button for you, but doing it in JavaScript which will then work in the board is an option. Change the "online" in the code to "offline" when its, obviously, offline. ;)
Code:
 
<p id="server_status" style="text-align: center;">
<span style="font-size: 12pt;">
<b>173.224.125.19:26265</b>
</span>
</p>
<script type='text/javascript'>
var serverStatus = "online"; //online or offline, keep the quotes.
if(serverStatus == "online"){
$('#server_status').prepend('<img src="http://z5.ifrm.com/9062/78/0/p1031410/online.png" alt="ONLine" width="16" height="16"/>').attr('title','ONLine');
}else{
$('#server_status').prepend('<img src="http://z5.ifrm.com/9062/78/0/p1031411/offline.png" alt="OFFine" width="16" height="16"/>').attr('title','OFFLine');
};
</script>
Edited by Quozzo, Oct 24 2011, 06:38 AM.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
If you wanted to use a radio box it would require cookies to save the results.

Here's the offline image, by the way: http://z5.ifrm.com/9062/78/0/p1031411/offline.png
Offline Profile Goto Top
 
lightfire
Member Avatar
littlegraycloud
[ *  *  *  *  *  * ]
Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic