AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   GHW Advanced MOTDs [BBCode + More] (https://forums.alliedmods.net/showthread.php?t=27615)

GHW_Chronic 04-25-2006 17:12

GHW Advanced MOTDs [BBCode + More]
 
2 Attachment(s)
  • This plugin was made to have 2 purposes, #1 was to add BBCode (Below) to MOTDs so that anyone can make advanced MOTDs, and #2 was to allows server managers to not be forced to upload images for MOTDs to the web but rather to have the ability to just place the images in their server's mod directory and upon connect the client could see the image on the MOTD.

How to use this plugin:
  • Just install this plugin like any ordinary plugin, then create an motd2.txt file in your game directory (example cstrike, czero, tfc, dod, ts, etc.). In your motd2.txt file you can add your BBCoded script like the example below. Note that first line must be "[bgcolor=?]". Anything else on line 1 will screw up the motd.

BBCode allowed in this plugin:
Code:

[ b]      - Bold
[ i]      - Italicize
[ u]      - Underline
[ img]    - Add Image
[ center]  - Center Text
[ right]  - Align Text to Right
[ justify] - Justify Paragraph
[ color=?] - Colored Text
[ bgcolor=?] - Color of background. Only can be used on line 1.
[ size=?]  - Change Text Size (1-24)
[ url=((http://blah.com))] - Link

There is no space after the "["s but I have to post it this way or the forum will interpret the BBCode.

Colors allowed in [color] + [bgcolor]:
Code:

darkred
red
pink
orange
brown
yellow
green
olive
cyan
darkblue
navy
blue
indigo
violet
white
black

Example motd2.txt: (Note that amxxlogo1.jpg is located in my server's cstrike directory.)
Code:

[bgcolor=black]
[ center][ img]amxxlogo1.jpg[/img][/center]

[ u][ b][ color=red][ size=4]Server Rules:[/size][/color][/b][/u]

[ color=white]
1. No swearing
2. Respect admins
3. No racism
4. No hacking (This includes all hacks)
5. No spamming
6. No TKing if FF is on

[ b]Report admin abuse at:[/b][/color]
[ url=((http://www.ghw-amxx.com))]GHW-AMXX Forums[/url]

Note: All images that are located in the mod directory must be downloaded by the client upon server entrance
Note #2: Images can be linked to websites as well. Example:
Code:

[ img]http://www.google.com/logo.jpg[/img]
Note #3: Images may appear larger ingame than on desktop because of difference in resolutions.
Note #4: everything is CASE SENSITIVE. Meaning doing [Color] will not work because it must be all lower cased.

Greenberet 04-25-2006 17:17

nice work!
i like this :D

i just dont like this big indentations for precaching images
there are better ways to do this

GHW_Chronic 04-25-2006 17:34

The method I used is effective and runs only once on server boot.

EKS 04-25-2006 17:39

I dont get the point of this.

Why force the client to download useless annoying files be limted by 15xx chars when there is a alternative.
Refere the guy to a webserver. ( For those that cant find a free or pay for a pure html host, go here

Write this in php instead so the users can past in bb code, and geta nice motd.html back to put on their webserver.

GHW_Chronic 04-25-2006 17:53

A. You don't have to force clients to download ANY images (if you read note #2)
B. Just because you would not use this, doesn't mean others wouldn't (damn I sound like a little nub when I say that)
C. Not too many people go over 1519 characters.
D. I live to make life simple, being able to place images into the mod directory and not having to go find a permanent webhost.
E. Whether 0 or 3,000 people use this, I don't care past this point. Let the people decide whether they want this.

Charming 04-25-2006 18:21

Wow :shock: *drewls*
Im sorry but thats bad***. aka awesome.

Hawk552 04-25-2006 18:34

I don't understand the BB code part. I think the dir thing is a good idea, but the BB code is stupid and just adds another step in the HTML parsing (since you have to parse it then give it to the HTML parser).

If you actually look at it, all the functions can be easily changed:

[b] -> <b>
[i] -> <i>
[u] -> <u>
[img] -> <img src="url">
[center] -> <div align="center">
[right] -> <div align="right">
[justify] -> <div align="justify">
[color=?] -> <font color="#RRGGBB">
[bgcolor=?] -> <body bgcolor="#RRGGBB">
[size=?] -> <font size="+n">
http://blah.com))] -> <a href="url">

I understand that in BB code the functions are slightly more abstracted, but in HTML it is so much more powerful and it doesn't waste the resources adding a plugin does. Either way, someone that doesn't know BB code would either have to learn it or just learn the proper thing, HTML.

GHW_Chronic 04-25-2006 18:41

for some reason people find BBCode easier to use. The [B]<U> and [I] are simple in HTML just like BBCode, but it is much easier for a little 7th grader to do
Code:

[img]blah[/img]
than to think about it and add the extra stuff
Code:

<img src="blah">
We have HTML classes at our school that last about 14 weeks. The fact of matter is that some people jsut find HTML hard like they find any scripting language hard and like "u" is shorthand for "you", BBCode is shorthand for HTML.

pendragon 04-25-2006 18:43

Quote:

Originally Posted by Hawk552
...

quite simply - because there is a stagaring amount of people out there that have never and will never use html but have used a forum that uses bbcode and are maybe - by virtue of experience - more comfortable with using bbcode (or a forum submission page) to generate their motd instead of spending 5 minutes trying to find the similar html tags.

i.e. people are lazy and this helps those lazy bastages out that keep posting in the off-topic section "help me make a kool motd - zomg boijangle!" :D

[edit: ^^^ damnnit - beaten]

Brad 04-25-2006 18:46

On top of what Hawk and EKS said... You're hiding the true size of the MOTD they could create and artificially limiting the size available to them.


All times are GMT -4. The time now is 19:42.

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