March 13, 2010, 04:33:15 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  

Request a Feature


Pages: [1]   Go Down
  Print  
Author Topic: Request a Feature  (Read 631 times)
0 Members and 1 Guest are viewing this topic.
Exilis
Optimistic & Creative
Global Moderator
Global Moderator
Offline Offline

Posts: 929


View Profile
« on: January 03, 2009, 10:40:55 am »

If you don't want it centered, do this:
Code:
<script>
/* Made by SyntaxBlitz, please do NOT remove credit.
 Used Agent Moose's Request Board code as a reference, do credit goes to him too.
 Some of the tricky code snippets I used from that code =]
 Also, thanks to Moosey for helping me out with the finding out of the username =] */

//The user's username? --- This code snippet is by Agent Moose, all credit goes to him.
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;
  }
}
//------------------------

if(location.href.match("action=pm") && location.href.match("other=requestFeature")) {
if(username) {
$("#bodyarea").after("<span class='smalltext'>Feature Request made by SyntaxBlitz of <a href='http://www.revolutionx.smfforfree3.com/'>Revolution X.</a></span>")
document.title = "Request a feature"
form = "<div id='requestForm'><br />This is the feature request form.<br /><br />Main idea:<input type='text' name='idea' /><br />Details:<br /><text" + "area name='details' cols='50' rows='20' /></text" + "area><br /><br /><input type='submit' value='Request Feature' onClick='isItGood();' /></div>";
$("#bodyarea").after(form);
$("input[name=subject]").val("A new feature has been requested by " + username);
$("#bodyarea").hide();
}
}
function isItGood() {
$("div#requestForm").after("<div id='isrite' style='overflow: auto; width: 500px; height: 500px;'>Is this right?<br />Main idea: " + $("input[name=idea]").val() + "<br /><br />Details: " + $("textarea[name=details]").val() + "<br /><br /><button onClick='request();'>Yes</button> <button onClick='undo();'>No</button></div>");
$("div#requestForm").hide();
}
function undo() {
 $("div#isrite").hide();
 $("div#requestForm").show();
}
function request() {
 $("textarea[name=message]").val("Main idea: " + $("input[name=idea]").val() + "\nDetails: " + $("textarea[name=details]").val());
 document.forms["postmodify"].submit();
}
</script>
Report Spam   Logged

Global Mod, (sort of) at your service.

http://twitter.com/timothyaveni



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
ServerBeach Coupon