Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions include/themecontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,13 @@ public function __construct() {
}

public function init() {
$this->setPluginWarnings();

add_event_handler('loc_begin_page_header', array($this, 'assignConfig'));
$shortname = $this->config->comments_disqus_shortname;
if ($this->config->comments_type == 'disqus' && !empty($shortname)) {
add_event_handler('blockmanager_apply', array($this, 'hideMenus'));
}
}

private function setPluginWarnings() {
global $pwg_loaded_plugins, $page;
if (isset($pwg_loaded_plugins['language_switch'])) {
$page['errors'][] = l10n('Language Switch plugin is enabled but is not compatible with the Bootstrap Default theme. Please disable it and download the <a href="http://piwigo.org/ext/extension_view.php?eid=797" target="_new">Bootstrap Default Language Switch</a> instead.');
}
}

public function assignConfig() {
global $template;
$template->assign('theme_config', $this->config);
Expand Down
21 changes: 21 additions & 0 deletions template/language_switch_flags.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<li id="bootstrapLanguageSwitch" class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class="pwg-icon langflag-{$lang_switch.Active.code}">&nbsp;</span><span class="pwg-button-text">{'Language'|@translate}</span>
</a>
<ul class="dropdown-menu dropdown-menu-scrollable" role="menu">
{foreach from=$lang_switch.flags item=flag name=f}
<li{if $lang_switch.Active.code==$flag.code} class="active"{/if}>
<a href="{$flag.url}">
{if $lang_info.direction=="ltr"}
<span class="pwg-icon langflag-{$flag.code}">&nbsp;</span><span class="langflag-text-ltf">{$flag.title}</span>
{else}
<span class="langflag-text-rtf">{$flag.title}</span><span class="pwg-icon langflag-{$flag.code}">&nbsp;</span>
{/if}
</a>
<li>
{/foreach}
</ul>
</li>

{* <!-- common style specific for LanguageSwitch --> *}
{combine_css path=$LANGUAGE_SWITCH_PATH|@cat:"language_switch.css"}
5 changes: 5 additions & 0 deletions theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -469,4 +469,9 @@ fieldset[disabled] .html-radios-inline label {
.user-collections-icon {
width:16px;
height:16px;
}

/* Language Switch */
[class*="langflag-text-"] {
background-position: 0 50px !important;
}