Skip to content

Commit

Permalink
This is actually a better idea
Browse files Browse the repository at this point in the history
Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>
  • Loading branch information
DiegoAndresCortes committed Jul 19, 2021
1 parent b36a394 commit 8b730a7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
7 changes: 6 additions & 1 deletion Sources/Shop/Integration/Addons/Arcade/Arcade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@

class Arcade implements Addons
{
/**
* @var string The link to this integration or mod
*/
private static $_link = 'https://web-develop.ca/index.php?action=downloads;area=stable_smf_arcade';

/**
* @var bool Check if we want to load the language file in a specific page.
*/
Expand Down Expand Up @@ -116,7 +121,7 @@ public static function settings(&$settings)
{
self::$_settings = [
['title', 'Shop_integration_arcade'],
['desc', 'Shop_integration_arcade_desc'],
['desc', 'Shop_integration_arcade_desc', 'label' => sprintf(Shop::getText('integration_settings_desc'), self::$_link, Shop::getText('integration_arcade'))],
['int', 'Shop_integration_arcade_score', 'subtext' => Shop::getText('integration_arcade_score_desc')],
['int', 'Shop_integration_arcade_personal_best', 'subtext' => Shop::getText('integration_arcade_personal_best_desc')],
['int', 'Shop_integration_arcade_new_champion', 'subtext' => Shop::getText('integration_arcade_new_champion_desc')],
Expand Down
7 changes: 6 additions & 1 deletion Sources/Shop/Integration/Addons/BestAnswer/BestAnswer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@

class BestAnswer implements Addons
{
/**
* @var string The link to this integration or mod
*/
private static $_link = 'https://custom.simplemachines.org/mods/index.php?mod=4274';

/**
* @var bool Check if we want to load the language file in a specific page.
*/
Expand Down Expand Up @@ -95,7 +100,7 @@ public static function settings(&$settings)
{
self::$_settings = [
['title', 'Shop_integration_sycho_best_answer'],
['desc', 'Shop_integration_sycho_best_answer_desc'],
['desc', 'Shop_integration_sycho_best_answer_desc', 'label' => sprintf(Shop::getText('integration_settings_desc'), self::$_link, Shop::getText('integration_sycho_best_answer'))],
['int', 'Shop_integration_sycho_best_answer_setting', 'subtext' => Shop::getText('integration_sycho_best_answer_setting_desc')],
];
$settings = array_merge(self::$_settings, $settings);
Expand Down
1 change: 0 additions & 1 deletion Themes/default/languages/Shop/Arcade/.english.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
global $modSettings;

$txt['Shop_integration_arcade'] = 'SMF Arcade';
$txt['Shop_integration_arcade_desc'] = '<a href="https://web-develop.ca/index.php?action=downloads;area=stable_smf_arcade">SMF Arcade</a> mod is required.';
$txt['Shop_integration_arcade_score'] = (!empty($modSettings['Shop_credits_suffix']) ? $modSettings['Shop_credits_suffix'] : 'Credits') . ' for submitting score';
$txt['Shop_integration_arcade_score_desc'] = 'The user will receive points after they submit a score/play a game.';
$txt['Shop_integration_arcade_personal_best'] = (!empty($modSettings['Shop_credits_suffix']) ? $modSettings['Shop_credits_suffix'] : 'Credits') . ' for beating their personal best';
Expand Down
1 change: 0 additions & 1 deletion Themes/default/languages/Shop/BestAnswer/.english.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@
global $modSettings;

$txt['Shop_integration_sycho_best_answer'] = 'SMF Best Answer';
$txt['Shop_integration_sycho_best_answer_desc'] = '<a href="https://custom.simplemachines.org/mods/index.php?mod=4274">Best Answer</a> mod is required.';
$txt['Shop_integration_sycho_best_answer_setting'] = (!empty($modSettings['Shop_credits_suffix']) ? $modSettings['Shop_credits_suffix'] : 'Credits') . ' for best answer';
$txt['Shop_integration_sycho_best_answer_setting_desc'] = 'The user whose post is marked as the best answer will receive credits, and only if they are not marking it themselves.';
1 change: 1 addition & 0 deletions Themes/default/languages/Shop/ShopAdmin.english.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
// Integrations
$txt['Shop_settings_integrations'] = 'Integrations';
$txt['Shop_settings_integrations_desc'] = 'In this section you can change settings for different integrations with other mods or addons';
$txt['Shop_integration_settings_desc'] = '<a href="%1$s">%2$s</a> mod is required.';

// Permissions
$txt['Shop_settings_permissions'] = 'Permissions';
Expand Down

0 comments on commit 8b730a7

Please sign in to comment.