AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Read from motd (https://forums.alliedmods.net/showthread.php?t=56630)

Toster v2.1 06-17-2007 07:09

Read from motd
 
If I make a text area in motd is there any way to transport the modified text back to my plugin? This could very useful!

Alka 06-17-2007 07:13

Re: Read from motd
 
What you mean? Post the text....:D

Toster v2.1 06-17-2007 07:20

Re: Read from motd
 
Code:

new len
new msg[MAX_SIZE]

len = format(msg, MAX_SIZE,"<html><head></head><body><textarea rows=^"100^" cols=^"50^">")
len+= format(msg, MAX_SIZE-len,"Original txt here")       
len+= format(msg, MAX_SIZE-len,"</textarea></body></html>",txt)
   
show_motd(player, msg, "Text edit")

I want to read the modified text...

Alka 06-17-2007 07:24

Re: Read from motd
 
Dunno what you are talking about :roll:! Be more specific...what modified text?

anssik 06-17-2007 07:26

Re: Read from motd
 
He means doing like a form textarea and a submit button in html, then getting th e form post/get in the plugin. I thought of this too sometime ago, but couldn't find any way to do it.

P34nut 06-17-2007 07:28

Re: Read from motd
 
You cannot do that

Toster v2.1 06-17-2007 07:54

Re: Read from motd
 
1 Attachment(s)
Why not... I made a screenshot!
Well this can be done in php, but I'm too lazy to learn... Maybe next year!

Sylwester 06-17-2007 09:25

Re: Read from motd
 
I though about it and its possible, but not directly. The way I found out is to use some web server. Make the motd open web site that contains text area. User will insert some string there and web server will store it in some database (ex. sql). Now you can read it with your plugin.

There are some problems with this. Motd is very low web browser. Many things will now work in it and also it doesnt display last inserted character. To see this character you must insert another one, press mouse button inside motd or use scroll.

Toster v2.1 06-17-2007 09:29

Re: Read from motd
 
I still think it would be easier with php...
Anyone know how to download file trough http protocol???

Lee 06-17-2007 09:49

Re: Read from motd
 
I'm not sure I know exactly what you mean, but w3schools might be of some use.


All times are GMT -4. The time now is 10:31.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.