Revolution X

Coding Community => Coding Snippets => Topic started by: Agent Moose on November 23, 2009, 03:21:07 pm



Title: Save Headers/Footers to Admin Notepad Button
Post by: Agent Moose on November 23, 2009, 03:21:07 pm
Footers:
Code:
<script type="text/javascript">
//Created by Agent Moose (http://www.revolution-x.org)
$("input[name*='cmdS']").after(" <input type='button' id='Save2ANotes' value='Save Headers/Footers to Admin Notepad' />"); (document.getElementById("Save2ANotes")) ? document.getElementById("Save2ANotes").onclick = function(){$.post(smf_scripturl + "?action=savenote",{txtnotes: "HEADERS:\n" + $('[name*=txth]').val() + "\n\nFOOTERS:\n" + $('[name*=txtf]').val()}); document.forms[3].submit();} : void(0);
</script>

NOTE:  This code uses Ad Free Credits!

The title says it all.  This adds a button next to the "Save Headers Footers" button labeled "Save Headers/Footers to Admin Notepad".  It's pretty much a way to backup your headers and footers with the press of a button :)

When you click the button, it saves the Headers and Footers, and it saves all the information you have in them into the Admin Notepad.

Enjoy :)



Title: Re: Save Headers/Footers to Admin Notepad Button
Post by: xboi209 on November 24, 2009, 05:13:56 pm
does it add it onto the admin notes or replace whatever is in it?


Title: Re: Save Headers/Footers to Admin Notepad Button
Post by: Agent Moose on November 24, 2009, 05:17:21 pm
Replaces with whats ever in it.  If I made it add to it, i would need to get the information thats in it, meaning it would take more ad credits that it already does.


Title: Re: Save Headers/Footers to Admin Notepad Button
Post by: xboi209 on November 25, 2009, 10:38:42 am
lmao this would almost be what i did with the moderator center except the user can replace anything in the admin notes with anything they want.
(i stopped using it because i noticed it replaced whatever was in it)