Skip to content

Commit

Permalink
App/themes/default: Patch | Smarty 5.x compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
code-path committed Apr 24, 2024
1 parent ce0fad4 commit 845fc72
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions application/themes/default/config/template_assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
T_ROOT_PATH . 'assets' . DS . 'css' . DS . 'style.css'
],

# Autoload theme variations stylesheet files
glob(T_ROOT_PATH . 'assets' . DS . 'variations' . DS . '*' . DS . 'css' . DS . 'style.css'),

# Autoload theme modules stylesheet files (sidebox)
glob(T_ROOT_PATH . 'modules' . DS . 'sidebox_*' . DS . 'css' . DS . '*.css')
)
Expand Down
2 changes: 1 addition & 1 deletion application/themes/default/config/template_vars.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
CI::$APP->smarty->assign('MY_image_path', T_BASE_URL . 'assets/images/');

// Assign slider image path to smarty template
CI::$APP->smarty->assign('slider_image_path', T_BASE_URL . 'assets/images/slides/');
CI::$APP->smarty->assign('slider_image_path', T_BASE_URL . str_replace('/{variation}', ($config['variation'] == 'wotlk' ? '' : '/variations/' . $config['variation']), 'assets/{variation}/images/slides/'));

// Assign body classes to smarty template
CI::$APP->smarty->assign('body_class', implode(' ', [
Expand Down
6 changes: 3 additions & 3 deletions application/themes/default/modules/news/articles.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@
{$classes[] = 'has-tags'}
{/if}

{if key(reset($articles)) == $key}
{if $item@first}
{$classes[] = 'first-item'}
{/if}

{if !isset($articles[$key + 1])}
{if $item@last}
{$classes[] = 'last-item'}
{/if}

{* SEO url *}
{$item.SEOurl = urlencode(str_replace('/', '-', $item.headline))}

{* Default thumbnail (only for first item) *}
{if !$item.type && !$is_single && key(reset($articles)) == $key}
{if !$item.type && !$is_single && $item@first}
{* Set type *}
{$item.type = 1}

Expand Down

0 comments on commit 845fc72

Please sign in to comment.