MyBB Community Forums

Full Version: Admin/mod warning [mycode]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey dose any one have a custom mycode script where say some one is being "bad"
u can go like
[mod] Do not pointlessly post[/mod]???

or could some one make one?
I have something very useful at Mybb Central..

http://www.mybbcentral.com/thread-1720.html
yeah but the thing is you have to pay for it ;l witch I really don't understand I do understand the work that gets put in to it.. but i'm not paying for it when my site wont be making any money..
Just add a MyCode something like this (note, I assume you're familiar with HTML and CSS):

Regular Expression
\[mod\](.*?)\[/mod\]
Replacement
<div style="border: 1px solid yellow; background: red; color: yellow; font-size: larger;">$1</div>
I prefer to use a [ warn ] myCode.

Title
Warning

Short Description
Warning message

Regular Expression
\[warn\](.*?)\[/warn\]

Replacement
<fieldset class="warn"><legend><strong>Warning</strong></legend><br/><strong>Message</strong>: $1<br /><br /></fieldset>

Next, add a ".warn" to your global CSS and edit it...
.warn {
	background: #FFDDDD url(images/DarkOrange/warn.png) center left no-repeat;
	width: 80%;
	color: #465584;
	background-color: #FFDDDD;
	border-left: 0px solid #FF0000;
	border-right: 3px solid #FF0000;
	border-top: 0px solid #FF0000;
	border-bottom: 6px solid #FF0000;
	padding: 4px;
	padding-left: 50px;
	margin: 0px auto 8px auto;
}

The result is a light red filled box with a dark red outline (shadow)

[Image: Capture-3.png]

I used the following icon, it's a transparent PNG file so you can change the colours of you myCode as you see fit.

[Image: warn.png]


Hope this works for ya Smile



OS
OP, thanks for requesting this and Orbital Shark, thanks for sharing how to do this.
You're welcome Big Grin

I'm new to myBB so i'm still learning :p

If I have any more additions i'll post them Smile
I know this is an old post, but I implemented the function on my test site. My question is once I add the code to the post as a warning, what prevents the member from editing the post and removing the warning?
Changing edit privelidges?

Otherwise it sounds like you want modnotice
https://github.com/p00lz/ModNotice-1.8
May be more suiting. (modded the 1.6 mod to work on 1.8, should work on 1.8.4 but may need some template edits if anythings changed since)