Page 2 of 3

Posted: 10 Jan 2007 09:35
by peter1138
Brianetta wrote:So how's his one? (-:
It's hard to read for a start :-)

Posted: 10 Jan 2007 10:46
by Brianetta
It is? It's the same size text as this forum on my browser. Any suggestions?

Posted: 10 Jan 2007 10:49
by Redirect Left
The background makes it hard to read :/

Posted: 10 Jan 2007 11:23
by Brianetta
Captain Kirk wrote:The background makes it hard to read :/
Really? Oh, well. I might play with it later.

Edit:
OK, I've made the colours match the forum (as best I can) and I've increased the compression level to maximum. The background image is still there, though - it is my image, after all.

If anybody wants the source code, feel free to ask. Like my other script, it requires Tcl and the TclUDP library (which is not normally included with Tcl by default). Unlike my other script, it requires a working copy of ImageMagick installed on the server.

Posted: 10 Jan 2007 14:45
by Connum
Thank you Brianette, I'll use it! =)
If others don't like the backgroundimage you could add a function to specify an own image via query... But as you said, it's your image and we should be glad that you let us use it! :D

\\edit: Oh, I just recognized that I can't use it, because I'd have to update the URL every time I get a new IP... doesn't support no-ip.com. But nice work nevertheless!

Posted: 10 Jan 2007 19:12
by maartena
Thanks! I will use it! :)

Posted: 11 Jan 2007 14:31
by YOYO
Great work :)
ty i will use it now :)

Edit:
Hmm i put it in and but all i see are the links. :?
What am i doing wrong :)

Posted: 11 Jan 2007 14:41
by Brianetta
You are missing the img tags

Code: Select all

[url="http://where.to.go/when/clicked/"][img]http://ppcis.org/standard/banner/81.204.154.118-3979.png[/img][/url]

Posted: 11 Jan 2007 15:03
by YOYO
Thanks brainetta :)

Posted: 11 Jan 2007 17:25
by Brianetta
A small change - the script now sends cache headers telling clients that they can cache the image for two minutes. This was due to the amount of work my server was doing, generating images for every forum page hit with one of these in a signature!
Connum wrote:... doesn't support no-ip.com.
No, it doesn't. To protect my server from abuse, I sanitise all input when I write CGI programs. It was simpler to write an IP address validator than a hostname validator. Bearing in mind that I publish my source code I have to make sure that there are no obvious security vulnerabilities.

Posted: 02 Feb 2007 23:26
by Connum
I was just about to code something that will generate a url(-redirect) to Brianetta's png-Sig, but I think there is a problem with his server, because all files in the signatures say "connection timed out"! Just wanted to report that and hope he'll get it fixed so I can continue working on my project.

\\edit:
aww, and in exactly this moment the problem is gone...
I will post a link to my project once it's done...

\\edit2:
Okay, so here it is, check it out:
http://tvszene.tv.funpic.de/OTTD/usersigs/

You put in a DynDNS/No-IP or whatever dynamix redirect-address, and you will get back a URL to put into your signature!

Have fun!

Posted: 03 Feb 2007 07:56
by Brianetta
Not bad, except for the massive javascripted pop-over ringtones ad that replaced all your content.

Posted: 03 Feb 2007 09:24
by Grolsch
Connum, how do I get a site like yours when I click on your image? The image says click on it for rules and newgrfs, but I don't have a site to show after clicking on it... I like your site however, with rules and actual settings.

BTW: great work!

edit: I see you get your settings from you config file and your gameyear and players info from the serverlist. However, Brianetta's picture is displaying actual date, not the one from the server. Brianetta, how do you obtain the actual date from a server?

Posted: 03 Feb 2007 16:05
by Connum
oh I didn't know that funpic is displaying ads now... I'm using Adblock...
Is it really that annoying? You only need that page for generating and you can close the ad window, it will not affect the display of the images...
But I think I'll host the script on my paid server!!

Yes, the info comes from the config file... If there is any interest in it, I can make the source of the php-page available! Let me know! ;)

afaik, Brianetta gets the Serverinfo via a TCL-Script. He'll give it to you if you ask him nicely, I'm sure! ;)
What do you mean with "actual date"? You mean that it's updated regularely in opposite to the serverlist which is updated in an interval of about 5 minutes I think?

If you find a method to query the server via php (I don't want to install TCL just for that), please let me know!

\\edit:
oh, and one thing for my infopage: I don't display the GRF settings because I'm not using any GRF's but it will take me only some minutes to implement that! Btw all variables from the configfile are available as variables, only rcon-password will be replaced for security reasons...

Posted: 04 Feb 2007 01:59
by Brianetta
Connum wrote:afaik, Brianetta gets the Serverinfo via a TCL-Script. He'll give it to you if you ask him nicely, I'm sure! ;)
What do you mean with "actual date"? You mean that it's updated regularely in opposite to the serverlist which is updated in an interval of about 5 minutes I think?
The source is here. As for the "actual date," this is the actual date that was in the game at the moment your browser loaded the image.

Posted: 04 Feb 2007 09:32
by Grolsch
Connum, the date on the server list is the date my server sends to the master server when it's advertising itself, once every x minutes. Brianetta's picture gets the date from my server, so if I refresh the picture 2 seconds after I loaded it, the date will have changed.

I would really appreciate it if you give me the source code from your homepage to get the settings from the config file.

Brianetta, I have no experience with TCL. Is that the only way to extract the current date and player amount from a server? I will google a bit for TCL and see what it is, so you don't have to explain how it works (yet ;) ) but if there are other ways, I hear them gladly :)

Posted: 04 Feb 2007 09:43
by Rubidium
Grolsch wrote:Connum, the date on the server list is the date my server sends to the master server when it's advertising itself, once every x minutes.
Not entirely true; there is also an updater process that queries every game server every 5 minutes to get up-to-date information, whereas the game server only advertises itself every 15 minutes.
Grolsch wrote:s that the only way to extract the current date and player amount from a server?
No, you can write a script/application yourself to fetch that information. Furthermore there are implementations in PHP and C++, see /website/includes/openttd.inc.php or /masterserver/udp.cpp in the SVN repository.

Posted: 04 Feb 2007 14:27
by Connum
Hmm i tried to find out how do get the info via php with the stuff found on SVN, but I couldn't find anything helpful! =/

Posted: 04 Feb 2007 19:09
by Brianetta
Connum wrote:Hmm i tried to find out how do get the info via php with the stuff found on SVN, but I couldn't find anything helpful! =/
That's because it isn't particularly helpful to those who want to derrive their own script. The SVN website scripts query the server periodically, and populate a database. The web page that displays the information gets it from that database. Important for reducing load, but not good for showing somebody how it actually works.

I wrote the script in Tcl because I wanted to be able to build it into autopilot at some point. autopilot is written in Tcl. You could write it in any language with UDP support.

Posted: 09 Feb 2007 14:17
by DaGeek
Brianetta wrote: I wrote the script in Tcl because I wanted to be able to build it into autopilot at some point. autopilot is written in Tcl. You could write it in any language with UDP support.
Did u ever add this to the AutoPilot Script ?

I have made some major Changes to the AutoPilot Script after our last Forum
conversation, and would love to know if you managed to get this to work as well.
If not I will put a bit of time into it and make it work.