-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sebijk
committed
Oct 11, 2017
1 parent
93d46b4
commit 0114600
Showing
5 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# MyBB-Logout-Abfrage | ||
Ask user if he want really log out from MyBB. | ||
|
||
# Installation | ||
Copy inc and languages to MyBB Folder and activate that in Pluginmanager. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
/** | ||
* Logout Abfrage für MyBB | ||
* Webseite: | ||
* http://www.mybbcoder.info / | ||
* http://www.sebijk.com | ||
* Lizenz: GPL | ||
**/ | ||
|
||
if( !defined('IN_MYBB') ) | ||
{ | ||
die("Hacking attempt!"); | ||
} | ||
|
||
/** Hooks einbinden **/ | ||
$plugins->add_hook("global_end", "logout_js"); | ||
$plugins->add_hook("pre_output_page", "logout"); | ||
|
||
/** Infos über Logout Abfrage **/ | ||
function logout_info() | ||
{ | ||
return array( | ||
"name" => "Logout Abfrage", | ||
"description" => "Fragt den Benutzer ob er sich wirklich abmelden möchte.", | ||
"website" => "http://www.sebijk.com", | ||
"author" => "Home of the Sebijk.com", | ||
"authorsite" => "http://www.sebijk.com", | ||
"version" => "1.4", | ||
"guid" => "", | ||
"compatibility" => "16*" | ||
); | ||
} | ||
|
||
function logout_js() { | ||
global $lang, $headerinclude; | ||
$lang->load("asklogout"); | ||
|
||
$headerinclude .= '<!-- start js code for logout --> | ||
<script type="text/javascript" language="JavaScript"> | ||
<!-- | ||
function log_out() | ||
{ | ||
grayfilter = document.getElementsByTagName("html"); | ||
grayfilter[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)"; | ||
if (confirm(\''.$lang->confirm_logout.'\n'.$lang->confirm_logout_okcancel.'\')) | ||
{ | ||
return true; | ||
} | ||
else | ||
{ | ||
grayfilter[0].style.filter = ""; | ||
return false; | ||
} | ||
} | ||
//--> | ||
</script> | ||
<!-- end js code for logout -->'; | ||
} | ||
|
||
function logout($page) { | ||
global $mybb; | ||
$page = str_replace("action=logout&logoutkey={$mybb->user['logoutkey']}", "action=logout&logoutkey={$mybb->user['logoutkey']}\" onclick=\"return log_out()", $page); | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
/** | ||
* Logout Abfrage | ||
* Language File for MyBB 1.6 - | ||
* Copyright (c) 2006 by Sebijk | ||
* | ||
* Webseite des Pluginersteller: | ||
* http://www.mybbcoder.info / | ||
* http://www.sebijk.com | ||
* | ||
* $Id: asklogout.lang.php | ||
**/ | ||
|
||
$l['confirm_logout'] = "Möchtest du dich wirklich abmelden?"; | ||
$l['confirm_logout_okcancel'] ="(OK = Ja | Abbrechen = Nein)"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
/** | ||
* Logout Abfrage | ||
* Language File for MyBB 1.6 - | ||
* Copyright (c) 2006 by Sebijk | ||
* | ||
* Webseite des Pluginersteller: | ||
* http://www.mybbcoder.info / | ||
* http://www.sebijk.com | ||
* | ||
* $Id: asklogout.lang.php | ||
**/ | ||
|
||
$l['confirm_logout'] = "Möchten Sie sich wirklich abmelden?"; | ||
$l['confirm_logout_okcancel'] ="(OK = Ja | Abbrechen = Nein)"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
/** | ||
* Logout Abfrage | ||
* Language File for MyBB 1.6 - | ||
* Copyright (c) 2006 by Sebijk | ||
* | ||
* Webseite des Pluginersteller: | ||
* http://www.mybbcoder.info / | ||
* http://www.sebijk.de | ||
* | ||
* $Id: asklogout.lang.php | ||
**/ | ||
|
||
$l['confirm_logout'] = "Are you really sure you want to logout?\n (OK = Yes | Cancel = No)"; | ||
|
||
?> |