mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-12-22 13:50:17 +00:00
Merge pull request #188 from annando/master
Disabled networks with reduced opacity, new settings dialog for Dreamwidth and InsaneJournal
This commit is contained in:
commit
b34489d5c1
13 changed files with 58 additions and 31 deletions
|
@ -49,15 +49,17 @@ function appnetpost_settings(&$a,&$s) {
|
|||
$enabled = get_pconfig(local_user(),'appnetpost','post');
|
||||
$checked = (($enabled) ? ' checked="checked" ' : '');
|
||||
|
||||
$css = (($enabled) ? '' : '-disabled');
|
||||
|
||||
$def_enabled = get_pconfig(local_user(),'appnetpost','post_by_default');
|
||||
$def_checked = (($def_enabled) ? ' checked="checked" ' : '');
|
||||
|
||||
$s .= '<span id="settings_appnetpost_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_appnetpost_expanded\'); openClose(\'settings_appnetpost_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/appnet.png" /><h3 class="connector">'. t('App.net Export').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/appnet.png" /><h3 class="connector">'. t('App.net Export').'</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="settings_appnetpost_expanded" class="settings-block" style="display: none;">';
|
||||
$s .= '<span class="fakelink" onclick="openClose(\'settings_appnetpost_expanded\'); openClose(\'settings_appnetpost_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/appnet.png" /><h3 class="connector">'. t('App.net Export').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/appnet.png" /><h3 class="connector">'. t('App.net Export').'</h3>';
|
||||
$s .= '</span>';
|
||||
|
||||
$s .= '<div id="appnetpost-enable-wrapper">';
|
||||
|
@ -72,7 +74,7 @@ function appnetpost_settings(&$a,&$s) {
|
|||
|
||||
/* provide a submit button */
|
||||
|
||||
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="appnetpost-submit" name="appnetpost-submit" class="settings-submit" value="' . t('Submit') . '" /></div>';
|
||||
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="appnetpost-submit" name="appnetpost-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div>';
|
||||
$s .= '<p>Register an account at <a href="https://ifttt.com">IFTTT</a> and create a recipe with the following values:';
|
||||
$s .= '<ul><li>If: New feed item (via RSS)</li>';
|
||||
$s .= '<li>Then: Post an update (via app.net)</li>';
|
||||
|
|
|
@ -56,8 +56,8 @@ function blogger_settings(&$a,&$s) {
|
|||
/* Get the current state of our config variables */
|
||||
|
||||
$enabled = get_pconfig(local_user(),'blogger','post');
|
||||
|
||||
$checked = (($enabled) ? ' checked="checked" ' : '');
|
||||
$css = (($enabled) ? '' : '-disabled');
|
||||
|
||||
$def_enabled = get_pconfig(local_user(),'blogger','post_by_default');
|
||||
|
||||
|
@ -71,11 +71,11 @@ function blogger_settings(&$a,&$s) {
|
|||
/* Add some HTML to the existing form */
|
||||
|
||||
$s .= '<span id="settings_blogger_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_blogger_expanded\'); openClose(\'settings_blogger_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/blogger.png" /><h3 class="connector">'. t('Blogger Export').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/blogger.png" /><h3 class="connector">'. t('Blogger Export').'</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="settings_blogger_expanded" class="settings-block" style="display: none;">';
|
||||
$s .= '<span class="fakelink" onclick="openClose(\'settings_blogger_expanded\'); openClose(\'settings_blogger_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/blogger.png" /><h3 class="connector">'. t('Blogger Export').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/blogger.png" /><h3 class="connector">'. t('Blogger Export').'</h3>';
|
||||
$s .= '</span>';
|
||||
|
||||
$s .= '<div id="blogger-enable-wrapper">';
|
||||
|
|
|
@ -119,8 +119,8 @@ function diaspora_settings(&$a,&$s) {
|
|||
/* Get the current state of our config variables */
|
||||
|
||||
$enabled = get_pconfig(local_user(),'diaspora','post');
|
||||
|
||||
$checked = (($enabled) ? ' checked="checked" ' : '');
|
||||
$css = (($enabled) ? '' : '-disabled');
|
||||
|
||||
$def_enabled = get_pconfig(local_user(),'diaspora','post_by_default');
|
||||
|
||||
|
@ -146,11 +146,11 @@ function diaspora_settings(&$a,&$s) {
|
|||
/* Add some HTML to the existing form */
|
||||
|
||||
$s .= '<span id="settings_diaspora_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_diaspora_expanded\'); openClose(\'settings_diaspora_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/diaspora-logo.png" /><h3 class="connector">'. t('Diaspora Export').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/diaspora-logo.png" /><h3 class="connector">'. t('Diaspora Export').'</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="settings_diaspora_expanded" class="settings-block" style="display: none;">';
|
||||
$s .= '<span class="fakelink" onclick="openClose(\'settings_diaspora_expanded\'); openClose(\'settings_diaspora_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/diaspora-logo.png" /><h3 class="connector">'. t('Diaspora Export').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/diaspora-logo.png" /><h3 class="connector">'. t('Diaspora Export').'</h3>';
|
||||
$s .= '</span>';
|
||||
|
||||
if ($status) {
|
||||
|
|
|
@ -66,8 +66,14 @@ function dwpost_settings(&$a,&$s) {
|
|||
|
||||
/* Add some HTML to the existing form */
|
||||
|
||||
$s .= '<div class="settings-block">';
|
||||
$s .= '<h3>' . t('Dreamwidth Post Settings') . '</h3>';
|
||||
$s .= '<span id="settings_dwpost_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_dwpost_expanded\'); openClose(\'settings_dwpost_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/dreamwidth.png" /><h3 class="connector">'. t("Dreamwidth Export").'</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="settings_dwpost_expanded" class="settings-block" style="display: none;">';
|
||||
$s .= '<span class="fakelink" onclick="openClose(\'settings_dwpost_expanded\'); openClose(\'settings_dwpost_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/dreamwidth.png" /><h3 class="connector">'. t("Dreamwidth Export").'</h3>';
|
||||
$s .= '</span>';
|
||||
|
||||
$s .= '<div id="dwpost-enable-wrapper">';
|
||||
$s .= '<label id="dwpost-enable-label" for="dwpost-checkbox">' . t('Enable dreamwidth Post Plugin') . '</label>';
|
||||
$s .= '<input id="dwpost-checkbox" type="checkbox" name="dwpost" value="1" ' . $checked . '/>';
|
||||
|
|
|
@ -189,6 +189,9 @@ function fbpost_content(&$a) {
|
|||
info( t('Facebook Post disabled') . EOL);
|
||||
}
|
||||
|
||||
require_once("mod/settings.php");
|
||||
settings_init($a);
|
||||
|
||||
$o = '';
|
||||
|
||||
$fb_installed = false;
|
||||
|
@ -317,6 +320,10 @@ function fbpost_content(&$a) {
|
|||
* @param null|object $b
|
||||
*/
|
||||
function fbpost_plugin_settings(&$a,&$b) {
|
||||
|
||||
$enabled = get_pconfig(local_user(),'facebook','post');
|
||||
$css = (($enabled) ? '' : '-disabled');
|
||||
|
||||
$result = q("SELECT `installed` FROM `addon` WHERE `name` = 'fbsync' AND `installed`");
|
||||
if(count($result) > 0)
|
||||
$title = t('Facebook Import/Export/Mirror');
|
||||
|
@ -324,7 +331,7 @@ function fbpost_plugin_settings(&$a,&$b) {
|
|||
$title = t('Facebook Export/Mirror');
|
||||
|
||||
$b .= '<div class="settings-block">';
|
||||
$b .= '<a href="fbpost"><img class="connector" src="images/facebook.png" /><h3 class="connector">'.$title.'</h3></a>';
|
||||
$b .= '<a href="fbpost"><img class="connector'.$css.'" src="images/facebook.png" /><h3 class="connector">'.$title.'</h3></a>';
|
||||
$b .= '</div>';
|
||||
}
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@ function gpluspost_settings(&$a,&$s) {
|
|||
|
||||
$enabled = get_pconfig(local_user(),'gpluspost','post');
|
||||
$checked = (($enabled) ? ' checked="checked" ' : '');
|
||||
$css = (($enabled) ? '' : '-disabled');
|
||||
|
||||
$def_enabled = get_pconfig(local_user(),'gpluspost','post_by_default');
|
||||
$def_checked = (($def_enabled) ? ' checked="checked" ' : '');
|
||||
|
@ -81,11 +82,11 @@ function gpluspost_settings(&$a,&$s) {
|
|||
$title = "Google+ Export";
|
||||
|
||||
$s .= '<span id="settings_gpluspost_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_gpluspost_expanded\'); openClose(\'settings_gpluspost_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/googleplus.png" /><h3 class="connector">'. t($title).'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/googleplus.png" /><h3 class="connector">'. t($title).'</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="settings_gpluspost_expanded" class="settings-block" style="display: none;">';
|
||||
$s .= '<span class="fakelink" onclick="openClose(\'settings_gpluspost_expanded\'); openClose(\'settings_gpluspost_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/googleplus.png" /><h3 class="connector">'. t($title).'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/googleplus.png" /><h3 class="connector">'. t($title).'</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="gpluspost-enable-wrapper">';
|
||||
|
||||
|
|
|
@ -65,9 +65,14 @@ function ijpost_settings(&$a,&$s) {
|
|||
|
||||
|
||||
/* Add some HTML to the existing form */
|
||||
$s .= '<span id="settings_ijpost_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_ijpost_expanded\'); openClose(\'settings_ijpost_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/insanejournal.gif" /><h3 class="connector">'. t("InsaneJournal Export").'</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="settings_ijpost_expanded" class="settings-block" style="display: none;">';
|
||||
$s .= '<span class="fakelink" onclick="openClose(\'settings_ijpost_expanded\'); openClose(\'settings_ijpost_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/insanejournal.gif" /><h3 class="connector">'. t("InsaneJournal Export").'</h3>';
|
||||
$s .= '</span>';
|
||||
|
||||
$s .= '<div class="settings-block">';
|
||||
$s .= '<h3>' . t('InsaneJournal Post Settings') . '</h3>';
|
||||
$s .= '<div id="ijpost-enable-wrapper">';
|
||||
$s .= '<label id="ijpost-enable-label" for="ijpost-checkbox">' . t('Enable InsaneJournal Post Plugin') . '</label>';
|
||||
$s .= '<input id="ijpost-checkbox" type="checkbox" name="ijpost" value="1" ' . $checked . '/>';
|
||||
|
|
|
@ -50,8 +50,8 @@ function libertree_settings(&$a,&$s) {
|
|||
/* Get the current state of our config variables */
|
||||
|
||||
$enabled = get_pconfig(local_user(),'libertree','post');
|
||||
|
||||
$checked = (($enabled) ? ' checked="checked" ' : '');
|
||||
$css = (($enabled) ? '' : '-disabled');
|
||||
|
||||
$def_enabled = get_pconfig(local_user(),'libertree','post_by_default');
|
||||
|
||||
|
@ -64,11 +64,11 @@ function libertree_settings(&$a,&$s) {
|
|||
/* Add some HTML to the existing form */
|
||||
|
||||
$s .= '<span id="settings_libertree_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_libertree_expanded\'); openClose(\'settings_libertree_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/libertree.png" /><h3 class="connector">'. t('libertree Export').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/libertree.png" /><h3 class="connector">'. t('libertree Export').'</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="settings_libertree_expanded" class="settings-block" style="display: none;">';
|
||||
$s .= '<span class="fakelink" onclick="openClose(\'settings_libertree_expanded\'); openClose(\'settings_libertree_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/libertree.png" /><h3 class="connector">'. t('libertree Export').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/libertree.png" /><h3 class="connector">'. t('libertree Export').'</h3>';
|
||||
$s .= '</span>';
|
||||
|
||||
$s .= '<div id="libertree-enable-wrapper">';
|
||||
|
|
|
@ -203,6 +203,7 @@ function pumpio_settings(&$a,&$s) {
|
|||
|
||||
$enabled = get_pconfig(local_user(),'pumpio','post');
|
||||
$checked = (($enabled) ? ' checked="checked" ' : '');
|
||||
$css = (($enabled) ? '' : '-disabled');
|
||||
|
||||
$def_enabled = get_pconfig(local_user(),'pumpio','post_by_default');
|
||||
$def_checked = (($def_enabled) ? ' checked="checked" ' : '');
|
||||
|
@ -219,11 +220,11 @@ function pumpio_settings(&$a,&$s) {
|
|||
/* Add some HTML to the existing form */
|
||||
|
||||
$s .= '<span id="settings_pumpio_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_pumpio_expanded\'); openClose(\'settings_pumpio_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/pumpio.png" /><h3 class="connector">'. t('Pump.io Import/Export/Mirror').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/pumpio.png" /><h3 class="connector">'. t('Pump.io Import/Export/Mirror').'</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="settings_pumpio_expanded" class="settings-block" style="display: none;">';
|
||||
$s .= '<span class="fakelink" onclick="openClose(\'settings_pumpio_expanded\'); openClose(\'settings_pumpio_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/pumpio.png" /><h3 class="connector">'. t('Pump.io Import/Export/Mirror').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/pumpio.png" /><h3 class="connector">'. t('Pump.io Import/Export/Mirror').'</h3>';
|
||||
$s .= '</span>';
|
||||
|
||||
$s .= '<div id="pumpio-username-wrapper">';
|
||||
|
|
|
@ -287,15 +287,17 @@ function statusnet_settings(&$a,&$s) {
|
|||
$create_userenabled = get_pconfig(local_user(),'statusnet','create_user');
|
||||
$create_userchecked = (($create_userenabled) ? ' checked="checked" ' : '');
|
||||
|
||||
$css = (($enabled) ? '' : '-disabled');
|
||||
|
||||
$globalshortening = get_config('statusnet','intelligent_shortening');
|
||||
|
||||
|
||||
$s .= '<span id="settings_statusnet_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_statusnet_expanded\'); openClose(\'settings_statusnet_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/gnusocial.png" /><h3 class="connector">'. t('StatusNet Import/Export/Mirror').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/gnusocial.png" /><h3 class="connector">'. t('StatusNet Import/Export/Mirror').'</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="settings_statusnet_expanded" class="settings-block" style="display: none;">';
|
||||
$s .= '<span class="fakelink" onclick="openClose(\'settings_statusnet_expanded\'); openClose(\'settings_statusnet_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/gnusocial.png" /><h3 class="connector">'. t('StatusNet Import/Export/Mirror').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/gnusocial.png" /><h3 class="connector">'. t('StatusNet Import/Export/Mirror').'</h3>';
|
||||
$s .= '</span>';
|
||||
|
||||
if ( (!$ckey) && (!$csecret) ) {
|
||||
|
|
|
@ -172,8 +172,8 @@ function tumblr_settings(&$a,&$s) {
|
|||
/* Get the current state of our config variables */
|
||||
|
||||
$enabled = get_pconfig(local_user(),'tumblr','post');
|
||||
|
||||
$checked = (($enabled) ? ' checked="checked" ' : '');
|
||||
$css = (($enabled) ? '' : '-disabled');
|
||||
|
||||
$def_enabled = get_pconfig(local_user(),'tumblr','post_by_default');
|
||||
|
||||
|
@ -182,11 +182,11 @@ function tumblr_settings(&$a,&$s) {
|
|||
/* Add some HTML to the existing form */
|
||||
|
||||
$s .= '<span id="settings_tumblr_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_tumblr_expanded\'); openClose(\'settings_tumblr_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/tumblr.png" /><h3 class="connector">'. t('Tumblr Export').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/tumblr.png" /><h3 class="connector">'. t('Tumblr Export').'</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="settings_tumblr_expanded" class="settings-block" style="display: none;">';
|
||||
$s .= '<span class="fakelink" onclick="openClose(\'settings_tumblr_expanded\'); openClose(\'settings_tumblr_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/tumblr.png" /><h3 class="connector">'. t('Tumblr Export').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/tumblr.png" /><h3 class="connector">'. t('Tumblr Export').'</h3>';
|
||||
$s .= '</span>';
|
||||
|
||||
$s .= '<div id="tumblr-username-wrapper">';
|
||||
|
|
|
@ -230,14 +230,16 @@ function twitter_settings(&$a,&$s) {
|
|||
$create_userenabled = get_pconfig(local_user(),'twitter','create_user');
|
||||
$create_userchecked = (($create_userenabled) ? ' checked="checked" ' : '');
|
||||
|
||||
$css = (($enabled) ? '' : '-disabled');
|
||||
|
||||
$globalshortening = get_config('twitter','intelligent_shortening');
|
||||
|
||||
$s .= '<span id="settings_twitter_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_twitter_expanded\'); openClose(\'settings_twitter_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/twitter.png" /><h3 class="connector">'. t('Twitter Import/Export/Mirror').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/twitter.png" /><h3 class="connector">'. t('Twitter Import/Export/Mirror').'</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="settings_twitter_expanded" class="settings-block" style="display: none;">';
|
||||
$s .= '<span class="fakelink" onclick="openClose(\'settings_twitter_expanded\'); openClose(\'settings_twitter_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/twitter.png" /><h3 class="connector">'. t('Twitter Import/Export/Mirror').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/twitter.png" /><h3 class="connector">'. t('Twitter Import/Export/Mirror').'</h3>';
|
||||
$s .= '</span>';
|
||||
|
||||
if ( (!$ckey) && (!$csecret) ) {
|
||||
|
|
|
@ -56,9 +56,10 @@ function wppost_settings(&$a,&$s) {
|
|||
/* Get the current state of our config variables */
|
||||
|
||||
$enabled = get_pconfig(local_user(),'wppost','post');
|
||||
|
||||
$checked = (($enabled) ? ' checked="checked" ' : '');
|
||||
|
||||
$css = (($enabled) ? '' : '-disabled');
|
||||
|
||||
$def_enabled = get_pconfig(local_user(),'wppost','post_by_default');
|
||||
$back_enabled = get_pconfig(local_user(),'wppost','backlink');
|
||||
|
||||
|
@ -73,11 +74,11 @@ function wppost_settings(&$a,&$s) {
|
|||
/* Add some HTML to the existing form */
|
||||
|
||||
$s .= '<span id="settings_wppost_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_wppost_expanded\'); openClose(\'settings_wppost_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/wordpress.png" /><h3 class="connector">'. t('Wordpress Export').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/wordpress.png" /><h3 class="connector">'. t('Wordpress Export').'</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="settings_wppost_expanded" class="settings-block" style="display: none;">';
|
||||
$s .= '<span class="fakelink" onclick="openClose(\'settings_wppost_expanded\'); openClose(\'settings_wppost_inflated\');">';
|
||||
$s .= '<img class="connector" src="images/wordpress.png" /><h3 class="connector">'. t('Wordpress Export').'</h3>';
|
||||
$s .= '<img class="connector'.$css.'" src="images/wordpress.png" /><h3 class="connector">'. t('Wordpress Export').'</h3>';
|
||||
$s .= '</span>';
|
||||
$s .= '<div id="wppost-enable-wrapper">';
|
||||
$s .= '<label id="wppost-enable-label" for="wppost-checkbox">' . t('Enable WordPress Post Plugin') . '</label>';
|
||||
|
|
Loading…
Reference in a new issue