- added more type-hints
- cleaned up some files (curly braces, spaces)
This commit is contained in:
Roland Häder 2022-06-23 07:16:22 +02:00
parent a1e17968d1
commit 04df7f6e05
No known key found for this signature in database
GPG key ID: C82EDE5DDFA0BA77
74 changed files with 603 additions and 529 deletions

View file

@ -6,6 +6,8 @@
* Author: Thomas Willingham (based on Mike Macgirvin's Adult Smile template)
* All smileys from sites offering them as Public Domain
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\DI;
@ -13,7 +15,7 @@ function smiley_pack_es_install() {
Hook::register('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies_es');
}
function smiley_pack_smilies_es(&$a,&$b) {
function smiley_pack_smilies_es(App $a, array &$b) {
#Smileys are split into various directories by the intended range of emotions. This is in case we get too big and need to modularise things. We can then cut and paste the right lines, move the right directory, and just change the name of the addon to happy_smilies or whatever.

View file

@ -3,19 +3,23 @@
* Name: Smiley Pack (Français)
* Description: Pack of smileys that make master too AOLish.
* Version: 1.01
* Author: Thomas Willingham (based on Mike Macgirvin's Adult Smile template)
* Author: Thomas Willingham (based on Mike Macgirvin's Adult Smile template)
* All smileys from sites offering them as Public Domain
*
*
*
*
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\DI;
function smiley_pack_fr_install() {
function smiley_pack_fr_install()
{
Hook::register('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
}
function smiley_pack_fr_smilies(&$a,&$b) {
function smiley_pack_fr_smilies(App $a, array &$b)
{
#Smileys are split into various directories by the intended range of emotions. This is in case we get too big and need to modularise things. We can then cut and paste the right lines, move the right directory, and just change the name of the addon to happy_smilies or whatever.
@ -392,7 +396,7 @@ function smiley_pack_fr_smilies(&$a,&$b) {
$b['texts'][] = ':cognetête';
$b['icons'][] = '<img src="' . DI::baseUrl()->get() . '/addon/smiley_pack/icons/oldcore/headbang.gif' . '" alt="' . ':cognetête' . '" />';
$b['texts'][] = ':barbu';
$b['texts'][] = ':barbu';
$b['icons'][] = '<img src="' . DI::baseUrl()->get() . '/addon/smiley_pack/icons/oldcore/beard.png' . '" alt="' . ':barbu' . '" />';
$b['texts'][] = ':barbeblanche';
@ -400,5 +404,4 @@ function smiley_pack_fr_smilies(&$a,&$b) {
$b['texts'][] = ':tête';
$b['icons'][] = '<img src="' . DI::baseUrl()->get() . '/addon/smiley_pack/icons/oldcore/headbang.gif' . '" alt="' . ':tête' . '" />';
}

View file

@ -8,6 +8,7 @@
* All smileys from sites offering them as Public Domain
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\DI;
@ -15,8 +16,8 @@ function smiley_pack_install() {
Hook::register('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
}
function smiley_pack_smilies(&$a,&$b) {
function smiley_pack_smilies(App $a, array &$b)
{
#Smileys are split into various directories by the intended range of emotions. This is in case we get too big and need to modularise things. We can then cut and paste the right lines, move the right directory, and just change the name of the addon to happy_smilies or whatever.
#Be careful with invocation strings. If you have a smiley called foo, and another called foobar, typing :foobar will call foo. Avoid this with clever naming, using ~ instead of :
@ -538,5 +539,4 @@ function smiley_pack_smilies(&$a,&$b) {
$b['texts'][] = ':twitch:';
$b['icons'][] = '<img class="smiley" src="' . DI::baseUrl()->get() . '/addon/smiley_pack/icons/commercial/twitch.gif' . '" alt="' . ':twitch:' . '" />';
}