diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 00000000..b80d4344 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,282 @@ +--- +kind: pipeline +type: docker +name: Check messages.po + +clone: + disable: true + +trigger: + event: + - pull_request + +steps: + - name: clone friendica base + image: alpine/git + commands: + - git clone https://github.com/friendica/friendica.git . + - git checkout $DRONE_COMMIT_BRANCH + - name: clone friendica addon + image: alpine/git + commands: + - git clone $DRONE_REPO_LINK addon + - cd addon/ + - git checkout $DRONE_COMMIT_BRANCH + - git fetch origin $DRONE_COMMIT_REF + - git merge $DRONE_COMMIT_SHA + - name: Run Xgettext for addons + image: friendicaci/transifex + commands: + - /xgettext-addon.sh + - name: Check update necessary + image: friendicaci/transifex + commands: + - /check-addons.sh +--- +kind: pipeline +type: docker +name: php-cs check + +clone: + disable: true + +trigger: + event: + - pull_request + +steps: + - name: Clone friendica base + image: alpine/git + commands: + - git clone https://github.com/friendica/friendica.git . + - git checkout $DRONE_COMMIT_BRANCH + - name: Clone friendica addon + image: alpine/git + commands: + - git clone $DRONE_REPO_LINK addon + - cd addon/ + - git checkout $DRONE_COMMIT_BRANCH + - git fetch origin $DRONE_COMMIT_REF + - git merge $DRONE_COMMIT_SHA + - name: Install dependencies + image: composer + commands: + - ./bin/composer.phar run cs:install + - name: Run coding standards check + image: friendicaci/php-cs + commands: + - cd addon/ + - export CHANGED_FILES="$(git diff --name-status ${DRONE_COMMIT_BEFORE}..${DRONE_COMMIT_AFTER} | grep ^A | cut -f2 | sed -e "s/^/addon\\//")" + - cd ../ + - /check-php-cs.sh +--- +kind: pipeline +type: docker +name: continuous-deployment + +trigger: + repo: + - friendica/friendica-addons + branch: + - develop + - 20*-rc + event: + - push + +node: + node: releaser # This prevents executing this pipeline at other servers than drone.friendi.ca + +clone: + disable: true + +steps: + - name: Clone friendica base + image: alpine/git + commands: + - git clone https://github.com/friendica/friendica.git . + - git checkout $DRONE_COMMIT_BRANCH + - name: Clone friendica addon + image: alpine/git + commands: + - git clone $DRONE_REPO_LINK addon + - cd addon/ + - git checkout $DRONE_COMMIT_BRANCH + - git fetch origin $DRONE_COMMIT_REF + - git merge $DRONE_COMMIT_SHA + - name: Create artifacts + image: debian + commands: + - apt-get update + - apt-get install bzip2 + - export VERSION="$(cat VERSION)" + - export RELEASE="friendica-addons-$VERSION" + - export ARTIFACT="$RELEASE.tar.gz" + - mkdir ./build + - # Create artifact for friendica-addons + - tar + --exclude='.tx' + --exclude='.git' + --exclude='.editorconfig' + --exclude='.gitattributes' + --exclude='.gitignore' + --exclude='.drone.yml' + --exclude='**/*/messages.po' + -cvzf ./build/$ARTIFACT addon/ + - # calculate SHA256 checksum + - cd ./build + - sha256sum "$ARTIFACT" > "$ARTIFACT.sum256" + - chmod 664 ./* + - ls -lh + - # output the sha256 sum for checking + - cat "$ARTIFACT.sum256" + - sha256sum "$ARTIFACT" + - name: Sign artifacts + image: plugins/gpgsign + settings: + key: + from_secret: gpg_key + passphrase: + from_secret: gpg_password + files: + - build/* + exclude: + - build/*.sum256 + detach_sign: true + - name: Upload artifacts + image: alpine + environment: + LFTP_HOST: + from_secret: sftp_host + LFTP_USER: + from_secret: sftp_user + LFTP_KEY: + from_secret: ssh_key + LFTP_PORT: "22" + LFTP_SOURCE: "build" + LFTP_TARGET: "/http" + commands: + - apk add lftp openssh openssl + - touch drone.key + - chmod 400 drone.key + - echo "$LFTP_KEY" | openssl base64 -A -d > drone.key + - lftp -c " + set net:timeout 5; + set net:max-retries 2; + set net:reconnect-interval-base 5; + set sftp:auto-confirm true; + set sftp:connect-program 'ssh -q -a -x -i drone.key'; + connect sftp://$LFTP_USER:@$LFTP_HOST:$LFTP_PORT; + cd $LFTP_TARGET; + mput $LFTP_SOURCE/*; + " + - rm drone.key + +volumes: + - name: cache + host: + path: /tmp/drone-cache +--- +kind: pipeline +type: docker +name: release-deployment + +trigger: + repo: + - friendica/friendica-addons + branch: + - stable + event: + - tag + +node: + node: releaser # This prevents executing this pipeline at other servers than drone.friendi.ca + +clone: + disable: true + +steps: + - name: Clone friendica base + image: alpine/git + commands: + - git clone https://github.com/friendica/friendica.git . + - git checkout $DRONE_COMMIT_BRANCH + - name: Clone friendica addon + image: alpine/git + commands: + - git clone $DRONE_REPO_LINK addon + - cd addon/ + - git checkout $DRONE_COMMIT_BRANCH + - git fetch origin $DRONE_COMMIT_REF + - git merge $DRONE_COMMIT_SHA + - name: Create artifacts + image: debian + commands: + - apt-get update + - apt-get install bzip2 + - export VERSION="$(cat VERSION)" + - export RELEASE="friendica-addons-$VERSION" + - export ARTIFACT="$RELEASE.tar.gz" + - mkdir ./build + - # Create artifact for friendica-addons + - tar + --exclude='.tx' + --exclude='.git' + --exclude='.editorconfig' + --exclude='.gitattributes' + --exclude='.gitignore' + --exclude='.drone.yml' + --exclude='**/*/messages.po' + -cvzf ./build/$ARTIFACT addon/ + - # calculate SHA256 checksum + - cd ./build + - sha256sum "$ARTIFACT" > "$ARTIFACT.sum256" + - chmod 664 ./* + - ls -lh + - # output the sha256 sum for checking + - cat "$ARTIFACT.sum256" + - sha256sum "$ARTIFACT" + - name: Sign artifacts + image: plugins/gpgsign + settings: + key: + from_secret: gpg_key + passphrase: + from_secret: gpg_password + files: + - build/* + exclude: + - build/*.sum256 + detach_sign: true + - name: Upload artifacts + image: alpine + environment: + LFTP_HOST: + from_secret: sftp_host + LFTP_USER: + from_secret: sftp_user + LFTP_KEY: + from_secret: ssh_key + LFTP_PORT: "22" + LFTP_SOURCE: "build" + LFTP_TARGET: "/http" + commands: + - apk add lftp openssh openssl + - touch drone.key + - chmod 400 drone.key + - echo "$LFTP_KEY" | openssl base64 -A -d > drone.key + - lftp -c " + set net:timeout 5; + set net:max-retries 2; + set net:reconnect-interval-base 5; + set sftp:auto-confirm true; + set sftp:connect-program 'ssh -q -a -x -i drone.key'; + connect sftp://$LFTP_USER:@$LFTP_HOST:$LFTP_PORT; + cd $LFTP_TARGET; + mput $LFTP_SOURCE/*; + " + - rm drone.key + +volumes: + - name: cache + host: + path: /tmp/drone-cache diff --git a/.woodpecker/.code_standards_check.yml b/.woodpecker/.code_standards_check.yml deleted file mode 100644 index df81376f..00000000 --- a/.woodpecker/.code_standards_check.yml +++ /dev/null @@ -1,62 +0,0 @@ -skip_clone: true - -pipeline: - clone_friendica_base: - image: alpine/git - commands: - - git clone https://github.com/friendica/friendica.git . - - git checkout $CI_COMMIT_BRANCH - when: - event: pull_request - clone_friendica_addon: - image: alpine/git - commands: - - git clone $CI_REPO_LINK addon - - cd addon/ - - git checkout $CI_COMMIT_BRANCH - - git fetch origin $CI_COMMIT_REF - - git merge $CI_COMMIT_SHA - when: - event: pull_request - restore_cache: - image: meltwater/drone-cache:dev - settings: - backend: "filesystem" - restore: true - cache_key: '{{ .Repo.Name }}_phpcs_{{ arch }}_{{ os }}' - archive_format: "gzip" - mount: - - '.composer' - volumes: - - /tmp/drone-cache:/tmp/cache - when: - event: pull_request - composer_install: - image: composer - commands: - - export COMPOSER_HOME=.composer - - ./bin/composer.phar run cs:install - when: - event: pull_request - rebuild_cache: - image: meltwater/drone-cache:dev - settings: - backend: "filesystem" - rebuild: true - cache_key: '{{ .Repo.Name }}_phpcs_{{ arch }}_{{ os }}' - archive_format: "gzip" - mount: - - '.composer' - volumes: - - /tmp/drone-cache:/tmp/cache - when: - event: pull_request - check: - image: friendicaci/php-cs - commands: - - cd addon/ - - export CHANGED_FILES="$(git diff --name-status ${CI_PREV_COMMIT_SHA}..${CI_COMMIT_SHA} | grep ^A | cut -f2 | sed -e "s/^/addon\\//")" - - cd ../ - - /check-php-cs.sh - when: - event: pull_request diff --git a/.woodpecker/.continuous-deployment.yml b/.woodpecker/.continuous-deployment.yml deleted file mode 100644 index ae720e54..00000000 --- a/.woodpecker/.continuous-deployment.yml +++ /dev/null @@ -1,137 +0,0 @@ -matrix: - include: - - PHP_MAJOR_VERSION: 7.4 - PHP_VERSION: 7.4.18 - -platform: releaser/release # This prevents executing this pipeline at other servers than ci.friendi.ca - -skip_clone: true - -pipeline: - clone_friendica_base: - image: alpine/git - commands: - - git clone https://github.com/friendica/friendica.git . - - git checkout $CI_COMMIT_BRANCH - when: - repo: friendica/friendica-addons - branch: [ develop, '*-rc' ] - event: push - clone_friendica_addon: - image: alpine/git - commands: - - git clone $CI_REPO_LINK addon - - cd addon/ - - git checkout $CI_COMMIT_BRANCH - - git fetch origin $CI_COMMIT_REF - - git merge $CI_COMMIT_SHA - when: - repo: friendica/friendica-addons - branch: [ develop, '*-rc' ] - event: push - restore_cache: - image: meltwater/drone-cache:dev - settings: - backend: "filesystem" - restore: true - cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}" - archive_format: "gzip" - mount: - - '.composer' - volumes: - - /tmp/drone-cache:/tmp/cache - when: - repo: friendica/friendica-addons - branch: [ develop, '*-rc' ] - event: push - composer_install: - image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION} - commands: - - export COMPOSER_HOME=.composer - - composer validate - - composer install --no-dev --optimize-autoloader - volumes: - - /etc/hosts:/etc/hosts - when: - repo: friendica/friendica-addons - branch: [ develop, '*-rc' ] - event: push - create_artifacts: - image: debian - commands: - - apt-get update - - apt-get install bzip2 - - mkdir ./build - - export VERSION="$(cat VERSION)" - - export RELEASE="friendica-addons-$VERSION" - - export ARTIFACT="$RELEASE.tar.gz" - - tar - --exclude='.tx' - --exclude='.git' - --exclude='.editorconfig' - --exclude='.gitattributes' - --exclude='.gitignore' - --exclude='.drone.yml' - --exclude='**/*/messages.po' - -cvzf ./build/$ARTIFACT addon/ - - cd ./build - - sha256sum "$ARTIFACT" > "$ARTIFACT.sum256" - - chmod 664 ./* - - ls -lh - - cat "$ARTIFACT.sum256" - - sha256sum "$ARTIFACT" - when: - repo: friendica/friendica-addons - branch: [ develop, '*-rc' ] - event: push - sign_artifacts: - image: plugins/gpgsign - settings: - key: - from_secret: gpg_key - passphrase: - from_secret: gpg_password - files: - - build/* - exclude: - - build/*.sum256 - detach_sign: true - when: - repo: friendica/friendica-addons - branch: [ develop, '*-rc' ] - event: push - upload_artifacts: - image: alpine - secrets: - - source: sftp_host - target: lftp_host - - source: sftp_user - target: lftp_user - - source: ssh_key - target: lftp_key - environment: - LFTP_PORT: "22" - LFTP_SOURCE: "build" - LFTP_TARGET: "/http" - volumes: - - /etc/hosts:/etc/hosts - commands: - - apk add lftp openssh openssl - - touch drone.key - - chmod 400 drone.key - - echo "$LFTP_KEY" | openssl base64 -A -d > drone.key - - lftp -c " - set net:timeout 5; - set net:max-retries 2; - set net:reconnect-interval-base 5; - set sftp:auto-confirm true; - set sftp:connect-program 'ssh -q -a -x -i drone.key'; - connect sftp://$LFTP_USER:@$LFTP_HOST:$LFTP_PORT; - cd $LFTP_TARGET; - mput $LFTP_SOURCE/*; - " - - rm drone.key - when: - repo: friendica/friendica-addons - branch: [ develop, '*-rc' ] - event: push diff --git a/.woodpecker/.messages.po_check.yml b/.woodpecker/.messages.po_check.yml deleted file mode 100644 index 93651b6b..00000000 --- a/.woodpecker/.messages.po_check.yml +++ /dev/null @@ -1,35 +0,0 @@ -skip_clone: true - -pipeline: - clone_friendica_base: - image: alpine/git - commands: - - git clone https://github.com/friendica/friendica.git . - - git checkout $CI_COMMIT_BRANCH - when: - event: pull_request - clone_friendica_addon: - image: alpine/git - commands: - - git clone $CI_REPO_LINK addon - - cd addon/ - - git checkout $CI_COMMIT_BRANCH - - git fetch origin $CI_COMMIT_REF - - git merge $CI_COMMIT_SHA - when: - event: pull_request - build_xgettext: - image: friendicaci/transifex - commands: - - /xgettext-addon.sh - when: - event: pull_request - check: - image: friendicaci/transifex - commands: - - /check-addons.sh - when: - event: pull_request - -branches: - exclude: [ stable ] diff --git a/.woodpecker/.releaser.yml b/.woodpecker/.releaser.yml deleted file mode 100644 index 112507c4..00000000 --- a/.woodpecker/.releaser.yml +++ /dev/null @@ -1,133 +0,0 @@ -matrix: - include: - - PHP_MAJOR_VERSION: 7.4 - PHP_VERSION: 7.4.18 - -platform: releaser/release # This prevents executing this pipeline at other servers than ci.friendi.ca - -skip_clone: true - -pipeline: - clone_friendica_base: - image: alpine/git - commands: - - git clone https://github.com/friendica/friendica.git . - - git checkout $CI_COMMIT_BRANCH - when: - repo: friendica/friendica-addons - branch: stable - event: tag - clone_friendica_addon: - image: alpine/git - commands: - - git clone $CI_REPO_LINK addon - - cd addon/ - - git checkout $CI_COMMIT_BRANCH - - git fetch origin $CI_COMMIT_REF - - git merge $CI_COMMIT_SHA - when: - repo: friendica/friendica-addons - branch: stable - event: tag - restore_cache: - image: meltwater/drone-cache:dev - settings: - backend: "filesystem" - restore: true - cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}" - archive_format: "gzip" - mount: - - '.composer' - volumes: - - /tmp/drone-cache:/tmp/cache - when: - repo: friendica/friendica-addons - branch: stable - event: tag - composer_install: - image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION} - commands: - - export COMPOSER_HOME=.composer - - composer validate - - composer install --no-dev --optimize-autoloader - when: - repo: friendica/friendica-addons - branch: stable - event: tag - volumes: - - /etc/hosts:/etc/hosts - create_artifacts: - image: debian - commands: - - apt-get update - - apt-get install bzip2 - - mkdir ./build - - export VERSION="$(cat VERSION)" - - export RELEASE="friendica-full-$VERSION" - - export ARTIFACT="$RELEASE.tar.gz" - - tar - --transform "s,^,$RELEASE/," - -X mods/release-list-exclude.txt - -T mods/release-list-include.txt - -cvzf ./build/$ARTIFACT - - cd ./build - - sha256sum "$ARTIFACT" > "$ARTIFACT.sum256" - - chmod 664 ./* - - ls -lh - - cat "$ARTIFACT.sum256" - - sha256sum "$ARTIFACT" - when: - repo: friendica/friendica-addons - branch: stable - event: tag - sign_artifacts: - image: plugins/gpgsign - settings: - key: - from_secret: gpg_key - passphrase: - from_secret: gpg_password - files: - - build/* - exclude: - - build/*.sum256 - detach_sign: true - when: - repo: friendica/friendica-addons - branch: stable - event: tag - upload_artifacts: - image: alpine - secrets: - - source: sftp_host - target: lftp_host - - source: sftp_user - target: lftp_user - - source: ssh_key - target: lftp_key - environment: - LFTP_PORT: "22" - LFTP_SOURCE: "build" - LFTP_TARGET: "/http" - volumes: - - /etc/hosts:/etc/hosts - commands: - - apk add lftp openssh openssl - - touch drone.key - - chmod 400 drone.key - - echo "$LFTP_KEY" | openssl base64 -A -d > drone.key - - lftp -c " - set net:timeout 5; - set net:max-retries 2; - set net:reconnect-interval-base 5; - set sftp:auto-confirm true; - set sftp:connect-program 'ssh -q -a -x -i drone.key'; - connect sftp://$LFTP_USER:@$LFTP_HOST:$LFTP_PORT; - cd $LFTP_TARGET; - mput $LFTP_SOURCE/*; - " - - rm drone.key - when: - repo: friendica/friendica-addons - branch: stable - event: tag diff --git a/advancedcontentfilter/advancedcontentfilter.php b/advancedcontentfilter/advancedcontentfilter.php index 3fe6884e..41ddffdb 100644 --- a/advancedcontentfilter/advancedcontentfilter.php +++ b/advancedcontentfilter/advancedcontentfilter.php @@ -159,17 +159,19 @@ function advancedcontentfilter_prepare_body_content_filter(App $a, &$hook_data) } -function advancedcontentfilter_addon_settings(App $a, array &$data) +function advancedcontentfilter_addon_settings(App $a, &$s) { if (!local_user()) { return; } - $data = [ - 'addon' => 'advancedcontentfilter', - 'title' => DI::l10n()->t('Advanced Content Filter'), - 'href' => 'advancedcontentfilter', - ]; + $advancedcontentfilter = DI::l10n()->t('Advanced Content Filter'); + + $s .= <<
{{$setrandomize}}
-{{$setrandomize}}
-{{$noappidtext}}
-{{/if}} -{{include file="field_input.tpl" field=$curweather_loc}} -{{include file="field_select.tpl" field=$curweather_units}} -{{include file="field_checkbox.tpl" field=$enabled}} + +- {{$info nofilter}} -
-- {{$error nofilter}} -
-{{$info}}
-{{include file="field_checkbox.tpl" field=$enable}} + +{{$text}}
-{{include file="field_checkbox.tpl" field=$enabled}} + +{{$new_status_message_body}}
{{$new_photo_upload_body}}
{{$new_link_post_body}}
{{$info}}
-{{include file="field_input.tpl" field=$autochans}} -{{include file="field_input.tpl" field=$sitechats}} + +{{$intro}}
-{{include file="field_checkbox.tpl" field=$enabled}} -{{include file="field_input.tpl" field=$languages}} -{{include file="field/range_percent.tpl" field=$minconfidence}} -{{include file="field_input.tpl" field=$minlength}} + +{{$description}}
-{{include file="field_checkbox.tpl" field=$mathjax_use}} + + +{{$info}}
-{{include file="field_checkbox.tpl" field=$enabled}} -{{include file="field_textarea.tpl" field=$words}} diff --git a/numfriends/lang/C/messages.po b/numfriends/lang/C/messages.po index 40b8146e..7036f840 100644 --- a/numfriends/lang/C/messages.po +++ b/numfriends/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME{{$description}}
-{{include file="field_textarea.tpl" field=$words}} + + diff --git a/randplace/lang/C/messages.po b/randplace/lang/C/messages.po index e1a95548..419123e4 100644 --- a/randplace/lang/C/messages.po +++ b/randplace/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:16-0500\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME{{$info}}
-{{include file="field_checkbox.tpl" field=$enabled}} -{{include file="field_input.tpl" field=$chars}} diff --git a/showmore_dyn/lang/C/messages.po b/showmore_dyn/lang/C/messages.po index 81dec184..4bf4c94f 100644 --- a/showmore_dyn/lang/C/messages.po +++ b/showmore_dyn/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:16-0500\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME
- {{$l10n.connected_account nofilter}}
- {{$account->description}}
-
{{$l10n.connected_public nofilter}}
- {{if $l10n.privacy_warning}} -{{$l10n.privacy_warning nofilter}}
- {{/if}} - - {{include file="field_checkbox.tpl" field=$default}} - {{include file="field_checkbox.tpl" field=$mirror}} - {{include file="field_checkbox.tpl" field=$import}} - {{*include file="field_checkbox.tpl" field=$create_user*}} - {{else}} -{{$l10n.oauth_info}}
-{{$l10n.oauth_api}}
- {{/if}} -{{else}} - {{if $sites}} -{{$l10n.global_info}}
-{{$l10n.credentials_info nofilter}}
-{{$l10n.connected nofilter}}
-
-
- {{$account->description}}
-
{{$l10n.invalid}}
- -{{/if}} -{{$l10n.privacy_warning nofilter}}
-{{/if}} -{{include file="field_checkbox.tpl" field=$default}} -{{include file="field_checkbox.tpl" field=$mirror}} -{{include file="field_checkbox.tpl" field=$import}} -{{include file="field_checkbox.tpl" field=$create_user}} diff --git a/twitter/twitter.css b/twitter/twitter.css index 480ce28d..99ee0bef 100644 --- a/twitter/twitter.css +++ b/twitter/twitter.css @@ -10,3 +10,34 @@ height: 52px; vertical-align: middle; } +#twitter-disconnect-label { + float: left; + width: 250px; + margin-bottom: 25px; +} + +#twitter-disconnect { + float: left; +} +#twitter-default-label, +#twitter-sendtaglinks-label, +#twitter-enable-label, +#twitter-shortening-label, +#twitter-mirror-label, +#twitter-import-label, +#twitter-create_user-label, +#twitter-pin-label { + float: left; + width: 250px; + margin-bottom: 10px; +} + +#twitter-checkbox { + float: left; +} + +#twitter-pin { + float: left; +} + + diff --git a/twitter/twitter.php b/twitter/twitter.php index 33af5663..e3e664f3 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -269,6 +269,8 @@ function twitter_settings_post(App $a) } catch(TwitterOAuthException $e) { notice($e->getMessage()); } + // reload the Addon Settings page, if we don't do it see Bug #42 + DI::baseUrl()->redirect('settings/connectors'); } else { // if no PIN is supplied in the POST variables, the user has changed the setting // to post a tweet for every new __public__ posting to the wall @@ -285,7 +287,7 @@ function twitter_settings_post(App $a) } } -function twitter_settings(App $a, array &$data) +function twitter_settings(App $a, &$s) { if (!local_user()) { return; @@ -293,8 +295,7 @@ function twitter_settings(App $a, array &$data) $user = User::getById(local_user()); - DI::page()->registerStylesheet(__DIR__ . '/twitter.css', 'all'); - + DI::page()['htmlhead'] .= '' . "\r\n"; /* * * * 1) Check that we have global consumer key & secret * 2) If no OAuthtoken & stuff is present, generate button to get some @@ -311,14 +312,21 @@ function twitter_settings(App $a, array &$data) $importenabled = intval(DI::pConfig()->get(local_user(), 'twitter', 'import')); $create_userenabled = intval(DI::pConfig()->get(local_user(), 'twitter', 'create_user')); - // Hide the submit button by default - $submit = ''; + $css = (($enabled) ? '' : '-disabled'); + + $s .= ''; + $s .= '