-
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
1 parent
42c36de
commit 09b3183
Showing
3 changed files
with
119 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 |
---|---|---|
@@ -0,0 +1,119 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<plugin name="(aXen) Administrative bar" version_long="20000" version_human="2.0.0" author="aXenDev" website="https://axendev.net/" update_check="http://axendev.net/myapps/plugins/administrativebar/check.php"><hooks><hook type="S" class="\IPS\Theme\class_core_front_global" filename="administrativebar"><![CDATA[//<?php | ||
/* To prevent PHP errors (extending class does not exist) revealing path */ | ||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) ) | ||
{ | ||
exit; | ||
} | ||
class hook529 extends _HOOK_CLASS_ | ||
{ | ||
/* !Hook Data - DO NOT REMOVE */ | ||
public static function hookData() { | ||
return array_merge_recursive( array ( | ||
'globalTemplate' => | ||
array ( | ||
0 => | ||
array ( | ||
'selector' => 'html > body', | ||
'type' => 'add_inside_start', | ||
'content' => '{{if ( \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( \'core\', \'modcp\' ) ) AND \IPS\Member::loggedIn()->modPermission() ) or \IPS\Member::loggedIn()->isAdmin()}} | ||
<div class="ipsPadding:half ipsAreaBackground{{if settings.aXenAdminBar_mobile}} ipsResponsive_hidePhone{{endif}}"> | ||
<div class="ipsFlex ipsFlex-ai:center ipsFlex-jc:between ipsLayout_container"> | ||
{{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( \'core\', \'modcp\' ) ) AND \IPS\Member::loggedIn()->modPermission()}} | ||
<span data-menuItem=\'modcp\'> | ||
<a href=\'{url="app=core&module=modcp" seoTemplate="modcp"}\'> | ||
{{if settings.aXenAdminBar_icon}}<i class="fa fa-shield"></i> {{endif}}{lang="menu_modcp"} | ||
</a> | ||
</span> | ||
{{endif}} | ||
{{if \IPS\Member::loggedIn()->isAdmin() AND \IPS\SHOW_ACP_LINK }} | ||
<span data-menuItem=\'admincp\'> | ||
<a href=\'{url="" base="admin"}\' target=\'_blank\' rel="noopener"> | ||
{{if settings.aXenAdminBar_icon}}<i class=\'fa fa-lock\'></i> {{endif}}{lang="menu_admincp"} | ||
</a> | ||
</span> | ||
{{endif}} | ||
</div> | ||
</div> | ||
{{endif}}', | ||
), | ||
), | ||
), parent::hookData() ); | ||
} | ||
/* End Hook Data */ | ||
} | ||
]]></hook></hooks><settings><setting><key>aXenAdminBar_icon</key><default>1</default></setting><setting><key>aXenAdminBar_mobile</key><default>0</default></setting></settings><settingsCode><![CDATA[//<?php | ||
$form->add( new \IPS\Helpers\Form\YesNo( 'aXenAdminBar_icon', \IPS\Settings::i()->aXenAdminBar_icon ) ); | ||
$form->add( new \IPS\Helpers\Form\YesNo( 'aXenAdminBar_mobile', \IPS\Settings::i()->aXenAdminBar_mobile ) ); | ||
if ( $values = $form->values() ) | ||
{ | ||
$form->saveAsSettings(); | ||
return TRUE; | ||
} | ||
return $form;]]></settingsCode><htmlFiles/><cssFiles/><jsFiles/><resourcesFiles/><lang><word key="aXenAdminBar_icon" js="0">Enable icons?</word><word key="aXenAdminBar_mobile" js="0">Hide in mobile?</word></lang><versions><version long="10000" human="1.0.0"><![CDATA[//<?php | ||
/* To prevent PHP errors (extending class does not exist) revealing path */ | ||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) ) | ||
{ | ||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' ); | ||
exit; | ||
} | ||
/** | ||
* Install Code | ||
*/ | ||
class ips_plugins_setup_install | ||
{ | ||
/** | ||
* ... | ||
* | ||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops) | ||
*/ | ||
public function step1() | ||
{ | ||
return TRUE; | ||
} | ||
// You can create as many additional methods (step2, step3, etc.) as is necessary. | ||
// Each step will be executed in a new HTTP request | ||
}]]></version><version long="20000" human="2.0.0"><![CDATA[//<?php | ||
/* To prevent PHP errors (extending class does not exist) revealing path */ | ||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) ) | ||
{ | ||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' ); | ||
exit; | ||
} | ||
/** | ||
* 2.0.0 Upgrade Code | ||
*/ | ||
class ips_plugins_setup_upg_20000 | ||
{ | ||
/** | ||
* ... | ||
* | ||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops) | ||
*/ | ||
public function step1() | ||
{ | ||
return TRUE; | ||
} | ||
// You can create as many additional methods (step2, step3, etc.) as is necessary. | ||
// Each step will be executed in a new HTTP request | ||
}]]></version></versions></plugin> |