redrat Posted October 25, 2008 Author Share Posted October 25, 2008 (edited) You have to use the portal theme with this mod so you will need to use that name in the path. Edited October 25, 2008 by redrat 0 Quote Link to comment Share on other sites More sharing options...
gwhosting Posted November 1, 2008 Share Posted November 1, 2008 thanks a lot for this. I might end up using this in the long run, not sure, but again, thanks a lot! 0 Quote Link to comment Share on other sites More sharing options...
MadMan Posted November 1, 2008 Share Posted November 1, 2008 Excellent. Just excellent. I was looking for something like this. Thank you for bringing it to our attention. 0 Quote Link to comment Share on other sites More sharing options...
Nessy Posted November 1, 2008 Share Posted November 1, 2008 Well done boys. Just a tip, though. Rather than have the client run all over the site looking for infromation, why not drop a couple of includes into the client area home page to give them a summary. (Disclaimer:- this is great for small clients, but not so good for resellers or clients with hundreds of domains etc) eg. {include file='serverstatus.tpl'} {include file='upcomingdomainrenewal.tpl'} {include file='recentannouncements.tpl'} {include file='clientareanotes.tpl'} Plus a couple of other customs, as per the screenshot, notes, etc Drop in a couple of hyperlinks to the relevant sections, and you have a nice one page snapshot summary of the client. Am i missing something, where are theses template files or do you have to create them yourself 0 Quote Link to comment Share on other sites More sharing options...
Zorro67 Posted November 2, 2008 Share Posted November 2, 2008 Create new files yourself. the contents of each file come from various mods around the forum (but you'll have to search for them ) personally, I've found on various upgrades that it's quicker to drop "include" lines of code into new tpls, rather than have to compare 2-300 lines of code in your existing file, to that of the new file. Of course you could just wait until you have to upgrade & find out the hard way like we all did 0 Quote Link to comment Share on other sites More sharing options...
Nessy Posted November 2, 2008 Share Posted November 2, 2008 Ah right, thanks for the info. All i would really need would be the recent announcements so i will check out the forum. 0 Quote Link to comment Share on other sites More sharing options...
hoosierweb Posted November 23, 2008 Share Posted November 23, 2008 I have tried the includes.. webhost is my template name {include file='webhost/serverstatus.tpl'} along with copy/pasting the content from serverstatus.tpl into the clientareahome.tpl but always get the error Fatal error: Smarty error: [in webhost/serverstatus.tpl line 16]: [plugin] unknown tag - 'get_port_status' (core.load_plugins.php, line 118) in /home/cremama/public_html/libs/Smarty.class.php on line 1095 line 16 is the <td>{get_port_status num="$num" port="80"}</td> the server status page works great on its own 0 Quote Link to comment Share on other sites More sharing options...
flip Posted January 1, 2009 Share Posted January 1, 2009 RedRat: 10 / 10 for you! (: (: When i make the suggested changes, and then view the Server Status setup etc, everything looks ok. Then when viewing: http://www.___.com/___/admin/configservers.php I see the changes (as per the screen shot, nice. However! When visiting: http://www.___.com/___/serverstatus.php I get an error message after making your recommended changes (v3.7.2 user) Fatal error: Smarty error: [in portal/serverstatus.tpl line 6]: syntax error: unrecognized tag: $disabled_funcs=array_map('trim',explode(',',ini_get('disable_functions'))); (Smarty_Compiler.class.php, line 439) in /home/____/public_html/____/libs/Smarty.class.php on line 1095 I modified both ../templates/portal/serverstatus.tpl (and portal is active theme). I created the new folder and index file as per step 2. WORKS: http://www.___.com/billing/___/configservers.php NO WORK: http://www.___.com/___/serverstatus.php Thank you very much, and happy new year! (: em. 0 Quote Link to comment Share on other sites More sharing options...
lloydcodrington Posted January 4, 2009 Share Posted January 4, 2009 Hi Redrat, Love the status script, so much more informative to us and our clients. However I have a small problem with the client side of the script. The SMTP status image just shows a image placeholder. Any ideas? 0 Quote Link to comment Share on other sites More sharing options...
redrat Posted January 4, 2009 Author Share Posted January 4, 2009 (edited) @lloydcodrington: Hi Lloyd. Could you just check that you have the following lines of code in your /WHMCS/templates/portal/serverstatus.tpl file: //SMTP $port = 25; $fp = fsockopen($host,$port,$errno,$errstr,10); if(!$fp) { echo "<td><img src=\"images/statusfailed.gif\"></td>"; }else{ echo "<td><img src=\"images/statusok.gif\"></td>"; fclose($fp); } $this->assign('serverid',$serverid); $this->assign('servername',$servername); {/php} They are towards the bottom of the file after the lines relating to POP3. Please compare carefully. Thanks. @flip Hi flip. Are you sure that you have the /status/index.php file in the /public_html folder? Thus /public_html/status/index.php May I also suggest that you try upgrading to 3.8.1. You could also try re-uploading serverstatus.php in binary mode as well as the /home/____/public_html/____/libs/Smarty.class.php Hope this helps. Edited January 4, 2009 by redrat 0 Quote Link to comment Share on other sites More sharing options...
flip Posted January 5, 2009 Share Posted January 5, 2009 ohhhhhhhh :b So index.php has to go under /public_html/status/*.* not /public_html/whmcs.folder/status/*.* ??? Thank you p.s. i tried merging the two scripts, the original status and the new script above, and made a bit of a mess too! Thank god for backups.... Would be nice to keep the 'ticks' to see which services are running, and what aren't. I've got a really really really nice server status script, but it did not like any of the code, when i put it in a TPL... lol thanks again! e. 0 Quote Link to comment Share on other sites More sharing options...
dmc_ss Posted January 12, 2009 Share Posted January 12, 2009 I need to modify this slightly. For example I use Helm and although installed on the same server, doesn't use the same IP address and uses port 80. In the serverstatus.tpl file I have changed cPanel to Helm and there is a port entry there, but how do I get the script to check a different IP and port combination? Cheers, David. 0 Quote Link to comment Share on other sites More sharing options...
redrat Posted January 12, 2009 Author Share Posted January 12, 2009 Pass on that, David; I'm out of my depth on this question but I'm sure someone else might be able to help. And best wishes on finding them. Regards, Chris 0 Quote Link to comment Share on other sites More sharing options...
dmc_ss Posted January 12, 2009 Share Posted January 12, 2009 I done it. Change the $host in the following lines: $fp = fsockopen($host,$port,$errno,$errstr,10); to the IP address in question e.g: $fp = fsockopen("127.0.0.1",$port,$errno,$errstr,10); For more detals Google "fsockopen" and view the PHP manual for this command. 0 Quote Link to comment Share on other sites More sharing options...
redrat Posted January 12, 2009 Author Share Posted January 12, 2009 Awesome and well done, David. I'm glad you fixed it and got the hack going because it's a very useful one in certain circumstances. Thanks, too, for contributing your work around. I'm sure others will be appreciative of this. 0 Quote Link to comment Share on other sites More sharing options...
sbh4host Posted January 12, 2009 Share Posted January 12, 2009 Hi all i dont have with my WHMCS the Status Folder can Someone give me this folder please ? 0 Quote Link to comment Share on other sites More sharing options...
osCommerce Posted January 12, 2009 Share Posted January 12, 2009 I had trouble getting the Server Load and Uptime to display and had to turn Safe Mode off on the domain to get them to work. HTH's someone. Just had to look at the error.log file in the status folder then make the change. 0 Quote Link to comment Share on other sites More sharing options...
vorlockfoss Posted February 19, 2009 Share Posted February 19, 2009 Hi all, I've tried the above code and the status part comes up blank. When I check the source code there is no code there at all for the status's. Any ideas? Thanks for your time. URL: http://www.simplesimonwebhost.com - bearing in mind I'm still adjusting the settings. Regards, Paul. 0 Quote Link to comment Share on other sites More sharing options...
freedom internet Posted February 21, 2009 Share Posted February 21, 2009 Hi! This is a great contrib! I made some modifications that might be useful. First one is simlpe - I use Plesk and as such needed to change the port number and column label accordingly. The next one was to replace the use of the IP address when checking each service with the domain name. I've also added ALT tags for each of the status markers because at one point I screwed up while swapping the position around on a couple of them and had a status marker sitting off to the side with no clue as to what it was for. The final one was to add a status for web mail in case I decide not to provide this service or the service goes down for some reason. Code: {if $loggedin} <table width="100%" class="clientareatable" align="center" cellspacing="1"> <tr class="clientareatableheading"> <td>{$LANG.servername}</td> <td>Hosting</td> <td>Plesk</td> <td>HTTP</td> <td>FTP</td> <td>POP3</td> <td>SMTP</td> <td>WebMail</td> </tr> <tr> {php} $query1 = "SELECT * FROM tblservers ORDER BY name"; $result1 = mysql_query($query1); while ($row1 = mysql_fetch_array($result1)) { $serverid = $row1['id']; $servername = $row1['name']; $host = $row1['ipaddress']; $hosteddomains=""; $query2 = "SELECT * FROM tblhosting WHERE userid='".$_SESSION["uid"]."' AND domainstatus='Active' AND server='".$serverid."'"; $result2 = mysql_query($query2); while ($row2 = mysql_fetch_array($result2)) { $hosteddomain = $row2['domain']; $hosteddomains.=$hosteddomain."<br>"; } if ($hosteddomains) { $hosteddomains=substr($hosteddomains,0,-4); if ($host) { //Plesk $port = 8443; $fp = fsockopen($hosteddomains,$port,$errno,$errstr,10); if(!$fp) { echo "<tr class=\"clientareatableactive\">"; echo "<td><b>".$servername."</b> </td>"; echo "<td>" .$hosteddomains."</td>"; echo "<td><img src=\"images/statusfailed.gif\" alt=\"Plesk\"></td>"; }else{ echo "<tr class=\"clientareatableactive\">"; echo "<td>".$servername." </td>"; echo "<td>" .$hosteddomains."</td>"; echo "<td><img src=\"images/statusok.gif\" alt=\"Plesk\"></td>"; fclose($fp); } //HTTP $port = 80; $fp = fsockopen($hosteddomains,$port,$errno,$errstr,10); if(!$fp) { echo "<td><img src=\"images/statusfailed.gif\" alt=\"HTTP\"></td>"; } else{ echo "<td><img src=\"images/statusok.gif\" alt=\"HTTP\"></td>"; fclose($fp); } //FTP $port = 21; $fp = fsockopen('ftp.'.$hosteddomains,$port,$errno,$errstr,10); if(!$fp) { echo "<td><img src=\"images/statusfailed.gif\" alt=\"FTP\"></td>"; }else{ echo "<td><img src=\"images/statusok.gif\" alt=\"FTP\"></td>"; fclose($fp); } //POP3 $port = 110; $fp = fsockopen('mail.'.$hosteddomains,$port,$errno,$errstr,10); if(!$fp) { echo "<td><img src=\"images/statusfailed.gif\" alt=\"POP3\"></td>"; }else{ echo "<td><img src=\"images/statusok.gif\" alt=\"POP3\"></td>"; fclose($fp); } //SMTP $port = 25; $fp = fsockopen('mail.'.$hosteddomains,$port,$errno,$errstr,10); if(!$fp) { echo "<td><img src=\"imagesfailed.gif\" alt=\"SMTP\"></td>"; }else{ echo "<td><img src=\"images/statusok.gif\" alt=\"SMTP\"></td>"; fclose($fp); } $this->assign('serverid',$serverid); $this->assign('servername',$servername); //WEBMAIL $port = 80; $fp = fsockopen('webmail.'.$hosteddomains,$port,$errno,$errstr,10); if(!$fp) { echo "<td><img src=\"images/statusfailed.gif\" alt=\"WebMail\"></td>"; }else{ echo "<td><img src=\"images/statusok.gif\" alt=\"WebMail\"></td>"; fclose($fp); } {/php} {php} echo "</td></tr>"; } else { echo "<tr class=\"clientareatableactive\">"; echo "<td>".$servername."</td>"; echo "<td>" .$hosteddomains."</td>"; echo "<td colspan=\"5\"><strong><font color=\"#AAAAAA\">Not Monitored Here</font></strong></td>"; }}} {/php} </table> {else} <p>{$LANG.loginintrotext}</p> <form action="dologin.php?goto=serverstatus" method="post"> <table align="center"> <tr><td align="right">{$LANG.loginemail}:</td><td><input type="text" name="username" size="40" value="{$username}"></td></tr> <tr><td align="right">{$LANG.loginpassword}:</td><td><input type="password" name="password" size="25" value="{$password}"></td></tr> </table> <p align="center"><input type="submit" value="{$LANG.loginbutton}"><br><input type="checkbox" name="rememberme"{$rememberme}> {$LANG.loginrememberme}</p> </form> <p><b>{$LANG.loginforgotten}</B> <a href="passwordreminder.php">{$LANG.loginforgotteninstructions}</a>.</p> {/if} One thing that has stumped me and I'm not sure if anyone else will see this or not is that the status of WebMail will alternate between being available and not available even though the service is available without issue. 0 Quote Link to comment Share on other sites More sharing options...
nowares Posted February 23, 2009 Share Posted February 23, 2009 This is a great tip! Very useful and will save my clients some confusion, thanks 0 Quote Link to comment Share on other sites More sharing options...
InterWebUK Posted February 27, 2009 Share Posted February 27, 2009 How do we get the uptime to show? and is there anyway to group the servers by hosting type? e.g shared, reseller, shoutcast? 0 Quote Link to comment Share on other sites More sharing options...
redrat Posted February 27, 2009 Author Share Posted February 27, 2009 That level of functionality has not yet been built in. But there is no reason why it could not be. The whole point of this mod was only ever to show exactly what you want to show. Necessity is the mother of invention. There is no shortage of great coders here on WHMCS. Just a matter of one of them picking up wishes and making them come true. 0 Quote Link to comment Share on other sites More sharing options...
InterWebUK Posted March 3, 2009 Share Posted March 3, 2009 Any ideas as to how to get server status and uptime to show as I see from the screenshots that it should do but ours in not, We also want a page with all our servers showing this information, anyone know how to do that? 0 Quote Link to comment Share on other sites More sharing options...
redrat Posted March 3, 2009 Author Share Posted March 3, 2009 (edited) Hi Interweb. One of the main ideas about this mod was actually, purposefully, not to show the server status and uptime stats as such but, instead, just to show graphic indicators for all the key ports. EG: Green is good and red is not. I'm not sure what screen shots you are referring to......could you just mention the post number and I'll have a look at what you are referring to. Thanks. This mod will not show all of your servers on one page as a generic display available to all users regardless as to whether they have relevant accounts. It is designed, though, to show all the servers that are applicable to each client. So, if a client has accounts on X servers then they will see the corresponding displays for each of X but only when logged in. The mod was actually designed for less established, smaller host providers who expressly do not wish to broadcast that they may only have one server and this is a neat way around that problem plus gives considerably expanded info on port condition that the standard whmcs version does. More useful to clients if you like but with less issues for the host. The other main feature of this mod is not to show the php info link which is a potential security risk and is, anyway, available in cPanel itself. Does the above answer your question sufficiently? There is, I believe, an additional variant of a server status mod somewhere in these forums that does show all servers generically. I'm just not sure where I've seen it. Perhaps a search might help. Regards. PS: Interweb: I really like your interesting web site. Well done! Edited March 3, 2009 by redrat 0 Quote Link to comment Share on other sites More sharing options...
InterWebUK Posted March 3, 2009 Share Posted March 3, 2009 Hi Redrat, many thanks for the comment about or site, we are still always adding and changing parts of it. We love this script and it does the job perfectly, but I would like to show the status of the uptime of the server or have the option to, how can we do this? I am trying to get a page which is seperate to this to show all our servers, ideally being able to add a specific port number for each to show media servers are up with uptime, any ideas on how we can do this? Thanks, John 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.