February 01, 2023, 03:02:13 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  

[ZB] Quick Admin Login

Pages: [1]   Go Down
Author Topic: [ZB] Quick Admin Login  (Read 352 times)
Agent Moose
Offline Offline

Gender: Male
Posts: 1,470

View Profile WWW
Badges: (View All)
« on: May 08, 2009, 07:50:50 am »

Place in (one of the following): Below Baord/Above Board/Above Copyright
<script type="text/javascript">function QuickAdmin(){/*==Created by Agent Moose (revolutionx.smfforfree3.com)==*/var User = $("#top_info strong a").text();$.get(main_url + "admin/",function(a){if($(a).find("a:contains('[Sign Out]')").html()){alert("Already logged in!");}else{var Pass1 = prompt("Enter your Password:","");var Pass2 = prompt("Enter your Password again:","");if(Pass1 == Pass2){$.post(main_url + "admin/?menu=login&amp;theme=0",{name:User,pass:Pass2},function(){alert("Logged in!");});}else{alert("Your passwords did not match!");};};});};if($("li#menu_acp").html()){$("a:contains('[Sign Out]')").after(" <a href='javascript:void(0);' onclick='QuickAdmin();'>[Quick Admin Login]</a>");};</script>

A simple code that adds a link next to the sign out link that says [Quick Admin Login] (only if your an admin of the board).

A simple code that took me awhile to make, it was my first time using Ajax Post function Tongue

Anyway, enjoy Smiley
Report Spam   Logged

Share on Facebook Share on Twitter

Pages: [1]   Go Up
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