-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
bd3c3fd
commit 542f848
Showing
23 changed files
with
341 additions
and
258 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,7 @@ | ||
# These are supported funding model platforms | ||
|
||
# github: [darkfriend] | ||
custom: [ | ||
'https://www.tinkoff.ru/cf/36wVfnMf7mo', | ||
'https://paypal.me/darkfriend' | ||
] |
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,8 +1,8 @@ | ||
<?php | ||
/** | ||
* @author dev2fun <darkfriend> | ||
* @copyright (c) 2019-2022, darkfriend <[email protected]> | ||
* @version 1.4.1 | ||
* @copyright (c) 2019-2023, darkfriend <[email protected]> | ||
* @version 1.4.2 | ||
* @global CUser $USER | ||
* @global CMain $APPLICATION | ||
*/ | ||
|
@@ -178,7 +178,7 @@ | |
'HEIGHT' => '', | ||
]; | ||
} else { | ||
$arSettingResize = unserialize($arSettingResize); | ||
$arSettingResize = unserialize($arSettingResize, ["allowed_classes" => false]); | ||
} | ||
if (!isset($arSettingResize['TYPE'])) { | ||
$arSettingResize['TYPE'] = BX_RESIZE_IMAGE_PROPORTIONAL; | ||
|
@@ -194,7 +194,7 @@ | |
if (!$arSortable) { | ||
$arSortable = array_keys($arSortableDefault); | ||
} else { | ||
$arSortable = unserialize($arSortable); | ||
$arSortable = unserialize($arSortable, ["allowed_classes" => false]); | ||
} | ||
|
||
require($_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/prolog_admin_after.php"); | ||
|
@@ -223,11 +223,11 @@ | |
<link rel="stylesheet" href="https://unpkg.com/[email protected]/scss/dist/objects.grid.responsive.min.css"> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/scss/dist/objects.containers.min.css"> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/scss/dist/components.tables.min.css"> | ||
<form method="POST" action="?action=save&lang=<? echo LANGUAGE_ID ?>&<?= $tabControl->ActiveTabParam() ?>" | ||
<form method="POST" action="?action=save&lang=<?php echo LANGUAGE_ID ?>&<?= $tabControl->ActiveTabParam() ?>" | ||
enctype="multipart/form-data" name="editform"> | ||
<?= bitrix_sessid_post() ?> | ||
<input type="hidden" name="lang" value="<?= LANG ?>"> | ||
<? | ||
<?php | ||
$tabControl->Begin(); | ||
$tabControl->BeginNextTab(); | ||
|
||
|
@@ -582,9 +582,9 @@ | |
<td> | ||
<div class="sort_container"> | ||
<ul id="sort_items" class="sort_list" data-input="sortableOpenGraph"> | ||
<? foreach ($arSortable as $sort) { ?> | ||
<?php foreach ($arSortable as $sort) { ?> | ||
<li data-id="<?= $sort ?>"><?= $arSortableDefault[$sort] ?></li> | ||
<? } ?> | ||
<?php } ?> | ||
</ul> | ||
<input type="hidden" value="<?= implode(',', $arSortable) ?>" | ||
id="sortableOpenGraph" | ||
|
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,8 +1,8 @@ | ||
<?php | ||
/** | ||
* @author dev2fun <darkfriend> | ||
* @copyright (c) 2019-2022, darkfriend <[email protected]> | ||
* @version 1.4.1 | ||
* @copyright (c) 2019-2023, darkfriend <[email protected]> | ||
* @version 1.4.2 | ||
*/ | ||
|
||
namespace Dev2fun\Module; | ||
|
@@ -70,7 +70,7 @@ public static function IsAddTab() | |
/** | ||
* @param \CAdminTabControl $form | ||
*/ | ||
public function AddAdminTab(&$form) | ||
public static function AddAdminTab(&$form) | ||
{ | ||
Loader::includeModule("dev2fun.opengraph"); | ||
if (!OpenGraph::$_init && self::IsAddTab()) { | ||
|
@@ -103,7 +103,7 @@ public function AddAdminTab(&$form) | |
* Event Handler on save element | ||
* @param array &$arFields | ||
*/ | ||
public function saveElement(&$arFields) | ||
public static function saveElement(&$arFields) | ||
{ | ||
if (!empty($arFields["ID"])) { | ||
$obParser = new \CTextParser; | ||
|
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,8 +1,8 @@ | ||
<?php | ||
/** | ||
* @author dev2fun <darkfriend> | ||
* @copyright (c) 2019-2022, darkfriend <[email protected]> | ||
* @version 1.4.0 | ||
* @copyright (c) 2019-2023, darkfriend <[email protected]> | ||
* @version 1.4.2 | ||
*/ | ||
IncludeModuleLangFile(__FILE__); | ||
|
||
|
@@ -150,7 +150,7 @@ public static function getSettingFields($incDefault = true) | |
if ($sFields) { | ||
$sFields = unserialize($sFields, ['allowed_classes' => false]); | ||
} else { | ||
$sFields = array(); | ||
$sFields = []; | ||
} | ||
if ($incDefault) { | ||
$sFields = array_merge(self::$arReqSettings, $sFields); | ||
|
@@ -205,7 +205,7 @@ public function getSettingsExcludePage() | |
if ($pages) { | ||
$pages = unserialize($pages, ['allowed_classes' => false]); | ||
} else { | ||
$pages = array(); | ||
$pages = []; | ||
} | ||
return $pages; | ||
} | ||
|
@@ -236,7 +236,7 @@ public function getSettingsResize() | |
if ($data) { | ||
$data = unserialize($data, ['allowed_classes' => false]); | ||
} else { | ||
$data = array(); | ||
$data = []; | ||
} | ||
return $data; | ||
} | ||
|
@@ -251,7 +251,7 @@ public function getSettingsSortable() | |
if ($data) { | ||
$data = unserialize($data, ['allowed_classes' => false]); | ||
} else { | ||
$data = array(); | ||
$data = []; | ||
} | ||
return $data; | ||
} | ||
|
@@ -457,16 +457,15 @@ public function getUrl($path = '') | |
public static function ShowThanksNotice() | ||
{ | ||
\CAdminNotify::Add([ | ||
// 'MESSAGE' => \Bitrix\Main\Localization\Loc::getMessage('D2F_OPENGRAPH_DONATE_MESSAGE',['#URL#'=>$APPLICATION->GetCurUri('tabControl_active_tab=donate')]), | ||
'MESSAGE' => Loc::getMessage('D2F_OPENGRAPH_DONATE_MESSAGE', ['#URL#' => '/bitrix/admin/dev2fun_opengraph_manager.php?action=settings&tabControl_active_tab=donate']), | ||
'TAG' => 'dev2fun_opengraph_update', | ||
'MODULE_ID' => 'dev2fun.opengraph', | ||
]); | ||
} | ||
|
||
public function DoBuildGlobalMenu(&$aGlobalMenu, &$aModuleMenu) | ||
public static function DoBuildGlobalMenu(&$aGlobalMenu, &$aModuleMenu) | ||
{ | ||
$aModuleMenu[] = array( | ||
$aModuleMenu[] = [ | ||
"parent_menu" => "global_menu_settings", | ||
"icon" => "dev2fun_admin_icon", | ||
"page_icon" => "dev2fun_admin_icon", | ||
|
@@ -476,7 +475,7 @@ public function DoBuildGlobalMenu(&$aGlobalMenu, &$aModuleMenu) | |
"url" => "/bitrix/admin/dev2fun_opengraph_manager.php?action=settings", | ||
"items_id" => "menu_dev2fun_opengraph", | ||
"section" => "dev2fun_opengraph", | ||
"more_url" => array(), | ||
"more_url" => [], | ||
// "items" => array( | ||
// array( | ||
// "text" => GetMessage("SUB_SETINGS_MENU_TEXT"), | ||
|
@@ -487,6 +486,6 @@ public function DoBuildGlobalMenu(&$aGlobalMenu, &$aModuleMenu) | |
// "page_icon" => "default_page_icon", | ||
// ), | ||
// ) | ||
); | ||
]; | ||
} | ||
} |
5 changes: 2 additions & 3 deletions
5
utf8/dev2fun.opengraph/install/admin/dev2fun_opengraph_manager.php
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,10 +1,9 @@ | ||
<? | ||
<?php | ||
/** | ||
* @author dev2fun (darkfriend) | ||
* @copyright darkfriend | ||
* @version 1.0.0 | ||
* @version 1.4.2 | ||
*/ | ||
global $action, $type; | ||
$GLOBALS['reqPath'] = $_SERVER["DOCUMENT_ROOT"].'/bitrix/modules/dev2fun.opengraph/admin/dev2fun_settings.php'; | ||
require($GLOBALS['reqPath']); | ||
?> |
Oops, something went wrong.