-
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.
Showing
3 changed files
with
118 additions
and
44 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
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
use Joomla\CMS\Installer\InstallerHelper; | ||
use Joomla\CMS\Language\Text; | ||
use Joomla\CMS\Plugin\PluginHelper; | ||
|
||
use Joomla\CMS\Version; | ||
/** | ||
* Script file of HelloWorld component. | ||
* | ||
|
@@ -96,29 +96,57 @@ public function preflight($type, $parent) | |
* | ||
* @return void | ||
*/ | ||
function postflight($type, $parent) | ||
{ | ||
function postflight($type, $installer) | ||
{ | ||
|
||
|
||
$jversion = new Version(); | ||
|
||
// only for Joomla 3.x | ||
|
||
if (version_compare($jversion->getShortVersion(), '4.0', '<')) { | ||
|
||
$element = strtoupper($installer->get("element")); // ex. "$parent" | ||
$class = 'span'; | ||
$web_tolk_site_icon = "<i class='icon-share-alt'></i>"; | ||
|
||
} else { | ||
|
||
$element = strtoupper($installer->getElement()); | ||
$class = 'col-'; | ||
$web_tolk_site_icon = ''; | ||
} | ||
|
||
$smile = ''; | ||
if($type != 'uninstall'){ | ||
$smiles = ['☺','😀','😉','😍','😎','😊','🙏']; | ||
$smile_key = array_rand($smiles, 1); | ||
$smile = $smiles[$smile_key]; | ||
} | ||
|
||
echo " | ||
<div class='row bg-white' style='margin:25px auto; border:1px solid rgba(0,0,0,0.125); box-shadow:0px 0px 10px rgba(0,0,0,0.125); padding: 10px 20px;'> | ||
<div class='".$class."8 p-2'> | ||
<h2>".$smile.Text::_("PLG_".$element."_AFTER_".strtoupper($type))." <br/>".Text::_("PLG_".$element)."</h2> | ||
".Text::_("PLG_".$element."_DESC"); | ||
|
||
<div class='row' style='margin:25px auto; border:1px solid rgba(0,0,0,0.125); box-shadow:0px 0px 10px rgba(0,0,0,0.125); padding: 10px 20px;'> | ||
<div class='span8 control-group' id='wt_download_id_form_wrapper'> | ||
<h2>".Text::_("PLG_".strtoupper($parent->get("element"))."_AFTER_".strtoupper($type))." <br/>".Text::_("PLG_".strtoupper($parent->get("element")))."</h2> | ||
".Text::_("PLG_".strtoupper($parent->get("element"))."_DESC"); | ||
|
||
|
||
echo Text::_("PLG_".strtoupper($parent->get("element"))."_WHATS_NEW"); | ||
|
||
echo Text::_("PLG_".$element."_WHATS_NEW"); | ||
|
||
echo "</div> | ||
<div class='span4' style='display:flex; flex-direction:column; justify-content:center;'> | ||
<img width='200px' src='https://web-tolk.ru/web_tolk_logo_wide.png'> | ||
<div class='".$class."4' style='display:flex; flex-direction:column; justify-content:center;'> | ||
<img width='200' src='https://web-tolk.ru/web_tolk_logo_wide.png'> | ||
<p>Joomla Extensions</p> | ||
<p><a class='btn' href='https://web-tolk.ru' target='_blank'><i class='icon-share-alt'></i> https://web-tolk.ru</a> <a class='btn' href='mailto:[email protected]'><i class='icon-envelope'></i> [email protected]</a></p> | ||
".Text::_("PLG_".strtoupper($parent->get("element"))."_MAYBE_INTERESTING")." | ||
<p class='btn-group'> | ||
<a class='btn btn-sm btn-outline-primary' href='https://web-tolk.ru' target='_blank'>".$web_tolk_site_icon." https://web-tolk.ru</a> | ||
<a class='btn btn-sm btn-outline-primary' href='mailto:[email protected]'><i class='icon-envelope'></i> [email protected]</a> | ||
</p> | ||
<p><a class='btn btn-sm btn-outline-info' href='https://t.me/joomlaru' target='_blank'>Joomla Russian Community in Telegram</a></p> | ||
".Text::_("PLG_".$element."_MAYBE_INTERESTING")." | ||
</div> | ||
"; | ||
} | ||
"; | ||
|
||
} | ||
} |
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