Raised This Month: $94 Target: $400
 23% 

GHW Advanced MOTDs [BBCode + More]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   Brad (55)
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 04-25-2006 , 18:12   GHW Advanced MOTDs [BBCode + More]
Reply With Quote #1

  • 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.
Attached Files
File Type: sma Get Plugin or Get Source (GHW_MOTD.sma - 3418 views - 5.9 KB)

Last edited by GHW_Chronic; 01-05-2008 at 09:41.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 04-25-2006 , 18:17  
Reply With Quote #2

nice work!
i like this

i just dont like this big indentations for precaching images
there are better ways to do this
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 04-25-2006 , 18:34  
Reply With Quote #3

The method I used is effective and runs only once on server boot.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 04-25-2006 , 18:39  
Reply With Quote #4

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.
__________________
Github archive for plugins, the repos for the other c++ projects are there to.
EKS is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 04-25-2006 , 18:53  
Reply With Quote #5

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.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Charming
BANNED
Join Date: Nov 2005
Location: Canada
Old 04-25-2006 , 19:21  
Reply With Quote #6

Wow *drewls*
Im sorry but thats bad***. aka awesome.
Charming is offline
Send a message via ICQ to Charming Send a message via AIM to Charming Send a message via MSN to Charming Send a message via Yahoo to Charming
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 04-25-2006 , 19:34  
Reply With Quote #7

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.
__________________

Last edited by GHW_Chronic; 08-03-2006 at 08:05.
Hawk552 is offline
Send a message via AIM to Hawk552
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 04-25-2006 , 19:41  
Reply With Quote #8

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.

Last edited by GHW_Chronic; 08-03-2006 at 08:02.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
pendragon
Senior Member
Join Date: Mar 2004
Location: In a bubble
Old 04-25-2006 , 19:43  
Reply With Quote #9

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!"

[edit: ^^^ damnnit - beaten]
__________________
pendragon is offline
Send a message via ICQ to pendragon Send a message via AIM to pendragon Send a message via MSN to pendragon
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 04-25-2006 , 19:46  
Reply With Quote #10

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.
__________________
Brad is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:07.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode