<instructions type="update" fromversion="5.2.*">
<!-- Delete wcfsetup/install/files/lib/form/MailForm.class.php during the upgrade to make it 100% non-functional. -->
+ <!-- Remove useGoogleFont style variable. -->
</instructions>
<instructions type="update" fromversion="3.1.*">
{event name='metaTags'}
<!-- Stylesheets -->
-{if $__wcf->getStyleHandler()->getStyle()->getVariable('useGoogleFont')}
- <link href='//fonts.googleapis.com/css?family={$__wcf->getStyleHandler()->getStyle()->getVariable('wcfFontFamilyGoogle')|urlencode}:400,300,600' rel='stylesheet' type='text/css'>
-{/if}
{@$__wcf->getStyleHandler()->getStylesheet()}
{event name='stylesheets'}
new AcpUiStyleImageUpload({if $action == 'add'}0{else}{@$style->styleID}{/if}, '{$tmpHash}', false);
new AcpUiStyleImageUpload({if $action == 'add'}0{else}{@$style->styleID}{/if}, '{$tmpHash}', true);
- new UiToggleInput('input[name="useGoogleFont"]', {
- show: ['#wcfFontFamilyGoogleContainer']
- });
-
{if $action === 'edit'}
new AcpUiStyleFaviconUpload({@$style->styleID});
</dd>
</dl>
- <dl>
- <dt></dt>
- <dd><label>
- <input type="checkbox" id="useGoogleFont" name="useGoogleFont" value="1"{if !$variables[useGoogleFont]|empty} checked{/if}>
- <span>{lang}wcf.acp.style.globals.useGoogleFont{/lang}</span>
- </label></dd>
- </dl>
<dl id="wcfFontFamilyGoogleContainer"{if $errorField == 'wcfFontFamilyGoogle'} class="formError"{/if}>
<dt><label for="wcfFontFamilyGoogle">{lang}wcf.acp.style.globals.fontFamilyGoogle{/lang}</label></dt>
<dd>
}
}
$this->variables['useFluidLayout'] = isset($_POST['useFluidLayout']) ? 1 : 0;
- $this->variables['useGoogleFont'] = isset($_POST['useGoogleFont']) ? 1 : 0;
// style data
if (isset($_POST['authorName'])) $this->authorName = StringUtil::trim($_POST['authorName']);
'pageLogoHeight',
'pageLogoMobile',
'useFluidLayout',
- 'useGoogleFont',
'wcfFontFamilyGoogle',
'wcfFontFamilyFallback'
];
$content .= $this->prepareFile($mixin);
}
+ // add google fonts
+ if (!empty($variables['wcfFontFamilyGoogle'])) {
+ $cssFile = FontManager::getInstance()->getCssFilename(substr($variables['wcfFontFamilyGoogle'], 1, -1));
+ if (is_readable($cssFile)) {
+ $content .= file_get_contents($cssFile);
+ }
+ }
+
return $content;
}
<item name="wcf.acp.style.globals.fontSizeHeadline"><![CDATA[Schriftgröße (Überschrift)]]></item>
<item name="wcf.acp.style.globals.fontSizeSection"><![CDATA[Schriftgröße (Sektions-Überschrift)]]></item>
<item name="wcf.acp.style.globals.fontSizeTitle"><![CDATA[Schriftgröße (Seiten-Titel)]]></item>
- <item name="wcf.acp.style.globals.useGoogleFont"><![CDATA[Google-Schriftart aktivieren]]></item>
<item name="wcf.acp.style.globals.fontFamilyGoogle"><![CDATA[Schriftart]]></item>
<item name="wcf.acp.style.globals.fontFamilyGoogle.description"><![CDATA[Die angegebene Schriftart wird beim Speichern des Stils heruntergeladen und anschließend den Benutzern anschließend ohne externe Verbindungen als Webfont zur Verfügung gestellt.]]></item>
<item name="wcf.acp.style.globals.fontFamilyGoogle.error.downloadFailed"><![CDATA[Der Download der Schriftart ist fehlgeschlagen.]]></item>
<item name="wcf.acp.style.globals.fontSizeHeadline"><![CDATA[Font Size (Headline)]]></item>
<item name="wcf.acp.style.globals.fontSizeSection"><![CDATA[Font Size (Section)]]></item>
<item name="wcf.acp.style.globals.fontSizeTitle"><![CDATA[Font Size (Page Title)]]></item>
- <item name="wcf.acp.style.globals.useGoogleFont"><![CDATA[Use Google font face]]></item>
<item name="wcf.acp.style.globals.fontFamilyGoogle"><![CDATA[Font Face]]></item>
<item name="wcf.acp.style.globals.fontFamilyGoogle.description"><![CDATA[The given font face will be downloaded when saving the style and afterwards will be delivered as a web font without connecting to external services.]]></item>
<item name="wcf.acp.style.globals.fontFamilyGoogle.error.downloadFailed"><![CDATA[Downloading the given font face failed.]]></item>
INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('pageLogoHeight', '40');
INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('pageLogoMobile', '');
INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('useFluidLayout', '1');
-INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('useGoogleFont', '1');
INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfButtonBackground', 'rgba(207, 216, 220, 1)');
INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfButtonBackgroundActive', 'rgba(120, 144, 156, 1)');
INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfButtonDisabledBackground', 'rgba(223, 223, 223, 1)');