PDA

View Full Version : PHP Nuke: creating a block with serverspy monitor..


sito
06-21-04, 05:54 PM
I've scoured the earth on how to do this. No luck. :cry:

<SCRIPT LANGUAGE="JavaScript"
SRC="http://share1.serverspy.net/cgi-bin/monitor.js?mid=57310">
</SCRIPT>

How do I put this in a block? When I try it doesn't show up. Extreme PHP newb here, so be gentle.

Thanks for any advice/help.

cyberskye
06-21-04, 06:18 PM
Don't know your product, but you want this to be a php block? Try this:


<?php
echo "<SCRIPT LANGUAGE="JavaScript"
SRC="http://share1.serverspy.net/cgi-bin/monitor.js?mid=57310">
</SCRIPT>";
?>

You may be able to put raw js or html in the 'block', in which case my response would be less than helpful

sito
06-21-04, 06:25 PM
Don't know your product, but you want this to be a php block? Try this:


<?php
echo "<SCRIPT LANGUAGE="JavaScript"
SRC="http://share1.serverspy.net/cgi-bin/monitor.js?mid=57310">
</SCRIPT>";
?>

You may be able to put raw js or html in the 'block', in which case my response would be less than helpful

Ok, I think I've already tried that but maybe I wrote it wrong. I will try it again though thanks.

sito
06-21-04, 06:29 PM
After I enter the info into the block, it logs me out and no change. No Stats block comes up. I'm missing something. Is there a permission I would need to enable?

sito
06-21-04, 07:22 PM
Ok here's what I did...

I made a text file under the blocks folder named "block-Server_Monitor.php"

I included this text in the file:

<?php
ob_start();
include("serversmonitor.html");
$output = ob_get_contents();
ob_end_clean();
$content = $output;
?>

I then took the HTML code produced here at serverspy and pasted it into an html file I created in my "public_html" folder called "serversmonitor.html".

Then go into your admin in Nuke, create new block using file "Server Monitor". Done.

Works! :D

porkchop
06-29-04, 09:08 PM
Ok here's what I did...

I made a text file under the blocks folder named "block-Server_Monitor.php"

I included this text in the file:

<?php
ob_start();
include("serversmonitor.html");
$output = ob_get_contents();
ob_end_clean();
$content = $output;
?>

I then took the HTML code produced here at serverspy and pasted it into an html file I created in my "public_html" folder called "serversmonitor.html".

Then go into your admin in Nuke, create new block using file "Server Monitor". Done.

Works! :D
hey when you're adding a new block in nuke do you have to put anything at all in the content box or can i just leave it blank and just leave it to the block-xxx.php file?