Simple Machine Codes
April 19, 2024, 07:47:22 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Gallery Affiliates Code Index Staff List Calendar Members Login Register  

Alert on Logout

Pages: [1]   Go Down
  Print  
Author Topic: Alert on Logout  (Read 348 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« on: April 21, 2009, 05:02:01 pm »

Footers:
Code:
<script type="text/javascript">
var Leave = "YOUR TEXT";

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;
};};
var Logout = document.links;
for(c=0;c<Logout.length;c++){
if(Logout[c].href.match(/action=logout/i) && Logout[c].parentNode.className == "maintab_back"){
Logout[c].onclick = function(){ alert(Leave) };
};};
if(Leave.match(/{user}/i)) Leave = Leave.replace(/{user}/i,username);
</script>
Original Request: http://revolutionx.smfforfree3.com/index.php/topic,429.0.html

When this code is added to your forum, a pop-up box will appear when you click the "Logout" tab.

YOUR TEXT = The text the message will show.
If you want to show the user's name in the message, put {user}.

Enjoy Smiley
« Last Edit: April 21, 2009, 05:03:29 pm by Agent Moose » Report Spam   Logged

Share on Facebook Share on Twitter



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