April 16, 2024, 04:57:51 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Revolution X, where Coding meets Graphics.
 
  Home Help Search Arcade Affiliates Staff List Calendar Members Login Register  

User Notice Box

Pages: [1]   Go Down
  Print  
Author Topic: User Notice Box  (Read 506 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
Tenth year Anniversary Nineth year Anniversary Search
« on: July 13, 2009, 10:23:05 pm »

Footers:
Code:
<script type="text/javascript">
var Symbol = "SYMBOL";
var NoticeText = "NOTICE TEXT";

var Notice = new Array(); var z = 0;
Notice[z++] = ["NAME","REASON"];

//Created by Agent Moose (revolutionx.smfforfree3.com)
var name = document.getElementsByTagName("span");
for(v=0;v<name.length;v++){
if(name[v].innerHTML.match(/Hello <b>(.*)<\/b>/i)){
var username = RegExp.$1;
};};
for(x=0;x<Notice.length;x++){
if(username == Notice[x][0]){
document.getElementById("bodyarea").innerHTML = '<div style="border: 2px dashed rgb(204, 51, 68); margin: 2ex; padding: 2ex; color: black; background-color: rgb(255, 228, 233);"><div style="float: left; width: 2ex; font-size: 2em; color: red;">' + Symbol + '</div><b style="text-decoration: underline;">' + Notice[x][0] + '</b><br/><div style="padding-left: 6ex;">' + NoticeText + Notice[x][1] + '</div></div>' + document.getElementById("bodyarea").innerHTML;
};};
</script>
Original Request: http://revolutionx.smfforfree3.com/index.php/topic,856.0.html

This will add a notice box to a certain user, which the admin can specify Smiley

SYMBOL = The Symbol that will be left of the text (example: "!!")
NOTICE = the Text before the Username (example: "Notice: Username")
NAME = The User you want the notice box to show up for
REASON = The reason why that user is getting the notice.

Enjoy Smiley
Report Spam   Logged


Share on Facebook Share on Twitter

Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #1 on: July 14, 2009, 09:33:39 am »

Thanks for the code, Moose!
I thought it would take longer but that was fast!
Report Spam   Logged






Andrew
Exclusive
Exclusive
Offline Offline

Gender: Male
Posts: 539



View Profile WWW
Badges: (View All)
Combination Topic Starter Poll Voter
« Reply #2 on: July 14, 2009, 10:54:19 am »

Nicely done Agent! And I agree, that was fast!!

Can we add more notices by adding more of these lines? :
Code:
Notice[z++] = ["NAME","REASON"];
Report Spam   Logged

Exilis
Optimistic & Creative
Global Moderator
Global Moderator
Offline Offline

Posts: 929


View Profile
Badges: (View All)
Tenth year Anniversary Linux User Combination
« Reply #3 on: July 14, 2009, 11:24:51 am »

Yes you can.
Report Spam   Logged

Global Mod, (sort of) at your service.

http://twitter.com/timothyaveni

Lyle
MeTube
Member
Member
Offline Offline

Gender: Male
Posts: 69



View Profile
Badges: (View All)
« Reply #4 on: August 07, 2009, 06:49:49 pm »

very good...helps to tell people wha they are doing wrong...and so they can stop what they are doing before they get banned or w/e
Report Spam   Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy