Archive for myfreeforum.org Before posting please check the "stickies" in the support forums.
Please ask questions in real English and not "txt". You will get a better response.
Please do not ask support questions via PMs.
 



       myfreeforum.org Forum Index -> Off Topic
Symon

html to motd.txt (steam fans only)

Anyone what to try and covet this code to work as a motd.txt ?

Spoiler:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>AssieJack servers</title>


<meta name="GENERATOR" content="Created by Symon field">
<style type="text/css">
img { behavior: url("pngfix.htc"); }
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<img src="1.png" align="top" alt="" border="0" width="152" height="152" style="position:absolute;left:0px;top:452px;width:152px;height:152px;z-index:0">
<img src="2.png" align="top" alt="" border="0" width="152" height="152" style="position:absolute;left:802px;top:0px;width:152px;height:152px;z-index:1">
<img src="3.png" align="top" alt="" border="0" width="152" height="152" style="position:absolute;left:0px;top:0px;width:152px;height:152px;z-index:2">
<img src="4.png" align="top" alt="" border="0" width="152" height="152" style="position:absolute;left:800px;top:457px;width:152px;height:152px;z-index:3">

<div id="Text1" style="position:absolute;left:181px;top:50px;width:538px;height:63px;z-index:4" align="center">
<font style="font-size:48px" color="#000000" face="Blackadder ITC">Welcome To Assiejacks Server</font></div>
<div id="Text2" style="position:absolute;left:239px;top:141px;width:441px;height:27px;z-index:5" align="left">
<font style="font-size:24px" color="#000000" face="Arial">This Server Plays The GunGame Mod.</font></div>
<div id="Text3" style="position:absolute;left:356px;top:219px;width:150px;height:16px;z-index:6" align="left">
<font style="font-size:13px" color="#000000" face="Arial">Rules As Follows</font></div>
<div id="Text4" style="position:absolute;left:352px;top:263px;width:286px;height:111px;z-index:7" align="left">
<font style="font-size:13px" color="#000000" face="Arial">No Spawn Camping<br>
 No Hacks<br>
&nbsp; Please Keep Swearing To Minimal<br>

&nbsp;&nbsp; Enjoy<br>
<br>
<br>
</font></div>
<div id="Text5" style="position:absolute;left:311px;top:507px;width:345px;height:16px;z-index:8" align="left">
<font style="font-size:13px" color="#000000" face="Arial">AssieJack servers Has A Sister server For The DMR Clan</font></div>
</body>
</html>



works ok on as a webpage (imgs not applied as of yet)

http://assiejack.teamhost.co.uk/motd.html

But not as a motd.txt
admin (no pm's please)

probably as it has head and body tags. Not good for something that is working as a snippet.
Viper

admin (no pm's please) wrote:
probably as it has head and body tags. Not good for something that is working as a snippet.


Aye. Take this line out aswell:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Nick(NR)

This should do it, let me know, may be worth altering the links colors:

Spoiler:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>AssieJack servers</title>
<style type="text/css">

img { behavior: url("pngfix.htc"); }

pre    {font-family:Verdana,Tahoma;color:#000000;}

body   {background:#ffffff;}

a   {text-decoration:underline;}


a:link  {
    color:  #FFFFFF;
    }
a:visited   {
    color:  #FFFFFF;
    }
a:active    {
    color:  #FFFFFF;
    }
a:hover {
    color:  #FFFFFF;
    text-decoration:    underline;
    }
</style>
</head>
<body scroll="no">
<pre>
<img src="1.png" align="top" alt="" border="0" width="152" height="152" style="position:absolute;left:0px;top:452px;width:152px;height:152px;z-index:0">
<img src="2.png" align="top" alt="" border="0" width="152" height="152" style="position:absolute;left:802px;top:0px;width:152px;height:152px;z-index:1">
<img src="3.png" align="top" alt="" border="0" width="152" height="152" style="position:absolute;left:0px;top:0px;width:152px;height:152px;z-index:2">
<img src="4.png" align="top" alt="" border="0" width="152" height="152" style="position:absolute;left:800px;top:457px;width:152px;height:152px;z-index:3">

<div id="Text1" style="position:absolute;left:181px;top:50px;width:538px;height:63px;z-index:4" align="center">
<font style="font-size:48px" color="#000000" face="Blackadder ITC">Welcome To Assiejacks Server</font></div>
<div id="Text2" style="position:absolute;left:239px;top:141px;width:441px;height:27px;z-index:5" align="left">
<font style="font-size:24px" color="#000000" face="Arial">This Server Plays The GunGame Mod.</font></div>
<div id="Text3" style="position:absolute;left:356px;top:219px;width:150px;height:16px;z-index:6" align="left">
<font style="font-size:13px" color="#000000" face="Arial">Rules As Follows</font></div>
<div id="Text4" style="position:absolute;left:352px;top:263px;width:286px;height:111px;z-index:7" align="left">
<font style="font-size:13px" color="#000000" face="Arial">No Spawn Camping<br>
 No Hacks<br>
&nbsp; Please Keep Swearing To Minimal<br>

&nbsp;&nbsp; Enjoy<br>
<br>
<br>
</font></div>
<div id="Text5" style="position:absolute;left:311px;top:507px;width:345px;height:16px;z-index:8" align="left">
<font style="font-size:13px" color="#000000" face="Arial">AssieJack servers Has A Sister server For The DMR Clan</font></div>
</pre>
</body>
</html>

Symon

Doesnt work nick,

If i just have the images it shows them in all 4 corners, however as soon as i add the text it crashes and you see just the standard light brown screen.

So it seems to be a .css problem
Nick(NR)

I got a sneaky feeling it's this playing silly buggers:

img { behavior: url("pngfix.htc"); }
Symon

Nick(NR) wrote:
I got a sneaky feeling it's this playing silly buggers:

img { behavior: url("pngfix.htc"); }


What i done was tpo grab an orginal motd.txt , and just add 4 images to the corners, this worked.

However as soon as i try and add anything in the middle that is when it doesnt work.

and that file you just pointed to reads as follows, (but i took that out as well)

www.assiejack.teamhost.co.uk/motd.html

using

www.assiejack.teamhost.co.uk/motd.txt

pngfix.htc

Code:
<public:component>
<public:attach event="onpropertychange" onevent="propertyChanged()" />
<script>

var supported = /MSIE (5\.5)|[6789]/.test(navigator.userAgent) && navigator.platform == "Win32";
var realSrc;
var transSrc = "trans.gif";

if (supported) fixImage();

function propertyChanged()
{
   if (!supported) return;

   var pName = event.propertyName;
   if (pName != "src") return;
   // if not set to transparent
   if ( ! new RegExp(transSrc).test(src))
      fixImage();
};

function fixImage()
{
   // get src
   var src = element.src;

   // check for real change
   if (src == realSrc)
   {
      element.src = transSrc;
      return;
   }

   if ( ! new RegExp(transSrc).test(src))
   {
      // backup old src
      realSrc = src;
   }

   // test for png
   if ( /\.png$/.test( realSrc.toLowerCase() ) )
   {
      // set transparent image
      element.src = transSrc;
      // set filter
      element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
   }
   else
   {
      // remove filter
      element.runtimeStyle.filter = "";
   }
}

</script>
</public:component>
Nick(NR)

it shouldn't need a png fix, it's not an old browser it's a game that shows png sprays, so it wasn't needed anyways, but all the same will have to finish getting dod and have a bash on your server.
Viper

Viper wrote:
Take this line out aswell:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Symon

Viper wrote:
Viper wrote:
Take this line out aswell:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


Funny thing is i left that in and it works for images on 4 corners ?
Symon

I cheated in the end took a screen shot of how i wanted it and just place a single image which works.
Nick(NR)

Why not use a borderless table with jpgs?

If you wanted text over the pics, then some css to set the pics as bg's would've worked

       myfreeforum.org Forum Index -> Off Topic
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum