Skip to content

Commit

Permalink
prettier: pre-fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel committed Sep 3, 2024
1 parent 28d59dc commit 60a3913
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ insert_final_newline = true
ij_any_keep_indents_on_empty_lines = false
quote_type = single

# [*.php]
[*.php]
max_line_length = 150
# indent_size = 4

[*.md]
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"singleQuote": true,
"semi": false,
"tabWidth": 2,
"printWidth": 100,
"printWidth": 150,
"trailingComma": "none"
}
}
Expand Down
33 changes: 17 additions & 16 deletions system/pages/news.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
<?php
global $config, $template_path;
/**
* News
*
* @package MyAAC
* @author Gesior <[email protected]>
* @author Slawkens <[email protected]>
* @author OpenTibiaBR
* @copyright 2023 MyAAC
* @link https://github.com/opentibiabr/myaac
*/
defined('MYAAC') or die('Direct access not allowed!');

require_once LIBS . 'forum.php';
require_once LIBS . 'news.php';

if($config['banner_status'] == true){
?>
<div class="modal fade" id="BannerModal" tabindex="-1" aria-labelledby="BannerModalLabel" aria-hidden="true">
Expand All @@ -17,22 +33,7 @@
$("#BannerModal").modal('show');
});
</script>
<?php } ?>
<?php
/**
* News
*
* @package MyAAC
* @author Gesior <[email protected]>
* @author Slawkens <[email protected]>
* @author OpenTibiaBR
* @copyright 2023 MyAAC
* @link https://github.com/opentibiabr/myaac
*/
defined('MYAAC') or die('Direct access not allowed!');

require_once LIBS . 'forum.php';
require_once LIBS . 'news.php';
<?php }

if(isset($_GET['archive']))
{
Expand Down
8 changes: 4 additions & 4 deletions templates/tibiacom/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function MouseOutSubmenuItem(source) {
</script>
<?= template_place_holder('head_end'); ?>
</head>
<body onBeforeUnLoad="SaveMenu();" onUnload="SaveMenu();" style="background-image:url(<?= $template_path ?><?= getImageMenuRandom('bgs') ?>);
<body onBeforeUnLoad="SaveMenu();" onUnload="SaveMenu();" style="background-image:url(<?= getImageMenuRandom('bgs') ?>);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
Expand Down Expand Up @@ -418,7 +418,7 @@ class='Button'
style='background-image:url(<?= $template_path; ?>/images/menu/green-light.gif);'></div>
</span>
<div id='<?= $cat['id']; ?>_Icon' class='Icon'
style='background-image:url(<?= $template_path ?><?= getImageMenuRandom($cat['id']) ?>);'></div>
style='background-image:url(<?= getImageMenuRandom($cat['id']) ?>);'></div>
<div id='<?= $cat['id']; ?>_Label' class='Label'
style='background-image:url(<?= $template_path; ?>/images/menu/label-<?= $cat['id']; ?>.gif);'></div>
<div id='<?= $cat['id']; ?>_Extend' class='Extend'
Expand Down Expand Up @@ -833,7 +833,7 @@ class="carousel-control-next-icon"
*/
function getImageMenuRandom($menu): string
{
global $config;
global $config, $template_path;
if (!$config['allow_menu_animated']) {
return $menu === 'bgs' ? "/images/header/{$config['background_image']}" : "/images/menu/icon-{$menu}.gif";
}
Expand All @@ -857,5 +857,5 @@ function getImageMenuRandom($menu): string

// generate random number size of the array
$img = $images[$menu][rand(0, count($images[$menu]) - 1)];
return $menu !== 'bgs' ? "/images/menu/anim/{$img}" : "/images/header/bgs/{$img}";
return $template_path . ($menu !== 'bgs' ? "/images/menu/anim/{$img}" : "/images/header/bgs/{$img}");
}

0 comments on commit 60a3913

Please sign in to comment.