easier updates

This commit is contained in:
Hannes Mannerheim 2014-11-27 21:04:41 +01:00
parent 62a0357577
commit 8303c557dd
5 changed files with 55 additions and 20 deletions

View File

@ -45,6 +45,10 @@ class QvitterPlugin extends Plugin {
· ·
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */
// THESE SETTINGS CAN BE OVERRIDDEN IN CONFIG.PHP
// e.g. $config['site']['qvitter']['enabledbydefault'] = 'false';
// ENABLED BY DEFAULT (true/false)
$settings['enabledbydefault'] = true;
@ -59,7 +63,7 @@ class QvitterPlugin extends Plugin {
// URL SHORTENER
$settings['urlshortenerapiurl'] = 'http://qttr.at/yourls-api.php';
$settings['urlshortenersignature'] = 'b6afeec983';
$settings['urlshortenersignature'] = 'b6afeec983';
/* · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
@ -69,7 +73,12 @@ class QvitterPlugin extends Plugin {
· \____) (____/ ·
· ·
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */
// config.php settings override the settings in this file
$configphpsettings = common_config('site','qvitter');
foreach($configphpsettings as $configphpsetting=>$value) {
$settings[$configphpsetting] = $value;
}
return $settings[$setting];
}
@ -251,7 +260,7 @@ class QvitterPlugin extends Plugin {
var qvitterEnabled = '.$qvitter_enabled.';
var qvitterAllLink = \''.common_local_url('all', array('nickname' => $user->nickname)).'\';
');
$action->script($this->path('js/toggleqvitter.js'));
$action->script($this->path('js/toggleqvitter.js?changed='.date('YmdHis',filemtime(INSTALLDIR.'/plugins/Qvitter/js/toggleqvitter.js'))));
}
}
@ -364,7 +373,8 @@ class QvitterPlugin extends Plugin {
#site_nav_global_primary a:hover,
.threaded-replies .notice-faves:before,
.threaded-replies .notice-repeats:before,
.notice-reply-comments > a:before {
.notice-reply-comments > a:before,
#content .notices > .notice > .entry-metadata .conversation {
color:#".$linkcolor.";
}
#site_nav_global_primary a:hover {

View File

@ -38,6 +38,21 @@ be opt-in instead.
6. Users can go to ://{instance}/settings/qvitter and enable or disable Qvitter.
Optional
-----
For easy updates, you can use /config.php to override the settings in /plugins/Qvitter/QvitterPlugin.php.
For example, add this to your /config.php file:
```// Qvitter-settings
$config['site']['qvitter']['enabledbydefault'] = true;
$config['site']['qvitter']['defaultbackgroundcolor'] = '#f4f4f4';
$config['site']['qvitter']['defaultlinkcolor'] = '#0084B4';
$config['site']['qvitter']['timebetweenpolling'] = 5000;
$config['site']['qvitter']['urlshortenerapiurl'] = 'http://qttr.at/yourls-api.php';
$config['site']['qvitter']['urlshortenersignature'] = 'b6afeec983';
```
Note: Qvitter is tested with GNU Social version 1.1.1-alpha2 (7e47026085fa4f2071e694d9c3e3fe2aa5142135).
@ -58,18 +73,18 @@ TODO
1. Join _new_ external groups and follow _new_ external users ("New" meaning users/groups that the server don't know yet)
2. Creating groups, make admin, block user
1. Creating groups, make admin, block user
10. Search users
1. Search users
11. Recommended users
1. Recommended users
12. Filters (hide queets containing strings, e.g. mute users)
1. Filters (hide queets containing strings, e.g. mute users)
14. More languages, maybe make proper po/mo-files
1. More languages, maybe make proper po/mo-files
16. Admin-interface
1. Admin-interface
17. New "expand queet" api for getting conversation, retweets, favs and attachment in the same request
1. New "expand queet" api for getting conversation, retweets, favs and attachment in the same request
19. Node.js long polling server and an new api that serve aggregate of all polling users requests in one go
1. Node.js long polling server and an new api that serve aggregate of all polling users requests in one go

View File

@ -102,7 +102,7 @@ class QvitterAction extends ApiAction
<title><?php print $sitetitle; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
<link rel="stylesheet" type="text/css" href="<?php print $qvitterpath; ?>css/qvitter.css?v=41" />
<link rel="stylesheet" type="text/css" href="<?php print $qvitterpath; ?>css/qvitter.css?changed=<?php print date('YmdHis',filemtime(INSTALLDIR.'/plugins/Qvitter/css/qvitter.css')); ?>" />
<link rel="stylesheet" type="text/css" href="<?php print $qvitterpath; ?>css/jquery.minicolors.css" />
<link rel="shortcut icon" type="image/x-icon" href="<?php print $qvitterpath; ?>/img/favicon.ico?v=4">
<?php
@ -706,7 +706,7 @@ class QvitterAction extends ApiAction
<h2 id="faq-23">Why doesn't my repeat/requeet show up on other instances?</h2>
<p>In the latest versions of GNU Social, repeats/requeets do not get sent to your followers on other instances. This was possible in StatusNet, but this feature has been removed due to a security issue. GNU Social developers are working on a solution. In the meantime, if you really want your repeat/requeet to federate, you can always to a "manual repeat", i.e. write RQ @username, and then copy-paste the notice.</p>
<p class="faq-credits"><em>Thanks to <a href="https://quitter.se/simsa0">@simsa0</a> and <a href="https://quitter.se/mcscx">@mcscx</a> for their work on this FAQ.</em></p>
<p class="faq-credits"><em>Thanks to <a href="https://quitter.se/simsa0">@simsa0</a> and <a href="https://quitter.se/mcscx">@mcscx</a> for their work on this FAQ. Any errors are due to bad editing by <a href="https://quitter.se/hannes2peer">@hannes2peer</a>.</em></p>
</div>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lib/jquery-2.1.1.min.js"></script>
@ -715,11 +715,19 @@ class QvitterAction extends ApiAction
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lib/jquery.minicolors.min.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lib/jquery.jWindowCrop.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lib/load-image.min.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/dom-functions.js?v=42"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/misc-functions.js?v=41"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/ajax-functions.js?v=41"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lan.js?v=41"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/qvitter.js?v=43"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/dom-functions.js?changed=<?php print date('YmdHis',filemtime(INSTALLDIR.'/plugins/Qvitter/js/dom-functions.js')); ?>"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/misc-functions.js?changed=<?php print date('YmdHis',filemtime(INSTALLDIR.'/plugins/Qvitter/js/misc-functions.js')); ?>"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/ajax-functions.js?changed=<?php print date('YmdHis',filemtime(INSTALLDIR.'/plugins/Qvitter/js/ajax-functions.js')); ?>"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lan.js?changed=<?php print date('YmdHis',filemtime(INSTALLDIR.'/plugins/Qvitter/js/lan.js')); ?>"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/qvitter.js?changed=<?php print date('YmdHis',filemtime(INSTALLDIR.'/plugins/Qvitter/js/qvitter.js')); ?>"></script>
<?php
// we might have custom javascript in the config file that we want to add
if(QvitterPlugin::settings('js')) {
print '<script type="text/javascript">'.QvitterPlugin::settings('js').'</script>';
}
?>
</body>
</html>

View File

@ -102,7 +102,7 @@ button.shorten i,
background-image: url("../img/sprite.png?v=40");
background-size: 500px 1329px;
}
#logo {
width:89px;
height:34px;

View File

@ -95,6 +95,8 @@ $('#what-is-federation').on('mouseleave',function(){
if(!window.registrationsClosed) {
$('.front-signup input, .front-signup button').removeAttr('disabled'); // clear this onload
$('#signup-btn-step1').click(function(){
$(document).trigger('onClickStep1Register'); // hook
display_spinner();
$('.front-signup input, .front-signup button').addClass('disabled');