Issue #58 : conditional welcome text

This commit is contained in:
llebegue 2015-02-04 21:40:56 +01:00
parent ef3af7fe8d
commit 9ba4dede19
4 changed files with 8 additions and 1 deletions

View File

@ -65,6 +65,9 @@ class QvitterPlugin extends Plugin {
// DEFAULT LINK COLOR
$settings['defaultlinkcolor'] = '#0084B4';
// ENABLE WELCOME TEXT
$settings['enablewelcometext'] = true;
// TIME BETWEEN POLLING
$settings['timebetweenpolling'] = 5000; // ms

View File

@ -55,6 +55,7 @@ $config['site']['qvitter']['urlshortenerapiurl'] = 'http://qttr.at/yourls-api.ph
$config['site']['qvitter']['urlshortenersignature'] = 'b6afeec983';
$config['site']['qvitter']['sitebackground'] = 'img/vagnsmossen.jpg';
$config['site']['qvitter']['favicon'] = 'img/favicon.ico?v=4';
$config['site']['qvitter']['enablewelcometext'] = true;
$config['thumbnail']['maxsize'] = 3000;
````

View File

@ -183,6 +183,7 @@ class QvitterAction extends ApiAction
window.defaultLinkColor = '<?php print QvitterPlugin::settings("defaultlinkcolor"); ?>';
window.defaultBackgroundColor = '<?php print QvitterPlugin::settings("defaultbackgroundcolor"); ?>';
window.siteBackground = '<?php print QvitterPlugin::settings("sitebackground"); ?>';
window.enableWelcomeText = '<?php print QvitterPlugin::settings("enablewelcometext"); ?>';
window.urlShortenerAPIURL = '<?php print QvitterPlugin::settings("urlshortenerapiurl"); ?>';
window.urlShortenerSignature = '<?php print QvitterPlugin::settings("urlshortenersignature"); ?>';
window.commonSessionToken = '<?php print common_session_token(); ?>';

View File

@ -2326,7 +2326,9 @@ $.each(window.sL,function(k,v){
// set some static string
$('.front-welcome-text h1').html(window.sL.welcomeHeading);
$('.front-welcome-text p').html(window.sL.welcomeText);
if (window.enableWelcomeText) {
$('.front-welcome-text p').html(window.sL.welcomeText);
}
$('#nickname').attr('placeholder',window.sL.loginUsername);
$('#password').attr('placeholder',window.sL.loginPassword);
$('button#submit-login').html(window.sL.loginSignIn);