GitHost.io will be shut down on June 1, 2019. At that point this instance will be unreachable and all data will be irrevocably deleted. More details at https://about.gitlab.com/gitlab-hosted/#githost-is-shutting-down-on-june-1st-2019

Commit 9ba4dede authored by llebegue's avatar llebegue

Issue #58 : conditional welcome text

parent ef3af7fe
......@@ -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
......
......@@ -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;
````
......
......@@ -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(); ?>';
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment