September 04, 2010, 10:04:50 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  

Change the Moved Topic Message


Pages: [1]   Go Down
  Print  
Author Topic: Change the Moved Topic Message  (Read 154 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
« on: July 21, 2009, 11:43:58 pm »

Code:
<script type="text/javascript">
var moved = "MESSAGE";

var na = document.getElementsByTagName("span");
//Created by Agent Moose (revolutionx.smfforfree3.com)
for(me=0;me<na.length;me++){
if(na[me].innerHTML.match("ello <b>(.*)</b")){
var usehername = RegExp.$1;
if(moved.match("[USER]")) moved = moved.replace("[USER]",usehername);
};};
var mo = document.getElementsByTagName("textarea");
for(ve=0;ve<mo.length;ve++){
if(mo[ve].name == "reason"){
mo[ve].value = moved;
};};
</script>

Original Request: http://revolutionx.smfforfree3.com/index.php/topic,918.0.html

This code lets you change the Move Topic Message.

MESSAGE = The Message that the moved topic message will be changed to.

There are a couple of things you may use:
[BOARD] = The Board the topic has been moved to.
[USER] = The username of the person who moved it.
[TOPIC URL] = The Topic URL of the topic that was moved.

if you want to add line spaces, add \n for each one.

So, if I had this:
Code:
This topic has been moved to [BOARD] by [USER].\n\n[TOPIC URL]

It would look like this:
Quote
This topic has been moved to [BOARD] by [USER].

[TOPIC URL]

Now, this code edits the Moved Topic Message box, making it so all you have to do is press the Move button when moving a topic.

Enjoy Smiley
« Last Edit: July 21, 2009, 11:56:55 pm by Agent Moose » Share Report Spam   Logged


Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
« Reply #1 on: July 21, 2009, 11:49:29 pm »

Woah! What a great code you made in what? 5 minutes!
Report Spam   Logged







Your Ad Here
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 © 2006-2009, Simple Machines LLC
Hostgator Hosting