Расширение:СоциальныйПрофиль

From mediawiki.org
This page is a translated version of the page Extension:SocialProfile and the translation is 46% complete.
Outdated translations are marked like this.
Справка по расширениям MediaWiki
Social Profile
Статус релиза: стабильно
Реализация Служебная страница , База данных , Ajax
Описание Встраивает в MediaWiki множество социальных функций для сообществ
Автор(ы)
Последняя версия 1.14 (Постоянные обновления)
MediaWiki 1.39+
Изменения в БД Да
Лицензия GNU General Public License 2.0 или позднее
Скачать Template:WikimediaDownload/gerritonly
Пример Brickipedia, the LEGO Wiki
  • $wgUserPageChoice
  • $wgUpdateProfileInRecentChanges
  • $wgUploadAvatarInRecentChanges
  • $wgUserProfileDisplay
  • $wgUserProfileThresholds
  • $wgUserLevels
  • $wgNamespacesForEditPoints
  • $wgUserStatsPointValues
  • avatarremove
  • awardsmanage
  • editothersprofiles
  • giftadmin
  • updatepoints
  • userboard-delete
Ежеквартальные загрузки 79 (Ranked 78th)
Переведите расширение SocialProfile, если оно доступно на translatewiki.net
Проблемы Открытые задачи · Сообщить об ошибке

Расширение SocialProfile встраивает в MediaWiki социальный профиль, user board и основную информацию профиля, в частности, аватары, друзей, недругов, user board, board blast, систему рангов уровней пользователя, награды и подарки. Пакет также уведомляет пользователей по электронной почте, когда другие пользователи отправляют запросы по добавлению их в друзей или недругов и/или отправляют им сообщение.

Установка

  • If you use the ExtensionDistributor to download SocialProfile, make sure that you select "master (latest development version)"; older versions are guaranteed to have lots of bugs and they are unmaintained, while master is always up-to-date and contains the newest features and bugfixes!
See social tools' MediaWiki compatibility policy for more info.
  • Вы можете использовать git, например:
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/SocialProfile


  • Скачайте основную ветку и распакуйте файл(ы) в папку с названием SocialProfile в вашей папке extensions/.
  • Добавьте следующий код в конце вашего файла LocalSettings.php :
    require_once "$IP/extensions/SocialProfile/SocialProfile.php";
    
  • Выполните скрипт обновления, который автоматически создаст необходимые таблицы, используемые расширением.
  • Следующие каталоги должны существовать в $wgUploadDirectory вики:
    • avatars/ — Каталог, в котором хранятся все загруженные пользователем изображения аватаров.
    • awards/ — Здесь будут храниться изображения системного подарка (награды) и обычные подарочные изображения.
    • Переместите каталог awards/ из каталога extensions/SocialProfile в каталог изображений, который используется в вашей установке MediaWiki. Этот каталог должен быть доступен для записи. The images included in this folder by default can be used for awards if you upload them through Special:SystemGiftManagerLogo, but they won't show up as "defaults" the same way avatar default images do show up.
    • Move the directory avatars from extensions/SocialProfile into the images directory used in your MediaWiki installation.

This directory should be writable.

  • Yes Готово – Перейдите на страницу Special:Version на своей вики, чтобы удостовериться в том, что расширение успешно установлено.

Parser functions

  • {{#avatar:Username}} - retrieves the avatar picture for the specified user.
  • {{#randomuserswithavatars}}
  • {{#newusers}}

User Options

  • echo-subscriptions-web-social-rel (requires Echo extension installed)
  • echo-subscriptions-email-social-rel (requires Echo extension installed)

Configuration variables

$wgUserProfileDisplay['board'] = true;
$wgUserProfileDisplay['foes'] = true;
$wgUserProfileDisplay['friends'] = true;
$wgUserProfileDisplay['avatar'] = true; // If set to false, disables both avatar display and upload
$wgUserBoard = true;
$wgFriendingEnabled = true;
$wgAvatarKey = $wgDBname;
$wgUserPageChoice = true;
$wgUserProfileAvatarsInDiffs = true;

There are some further configuration variables introduced in a later update for wikis that are using an external storage solution for their images (such as Amazon S3 or Swift). SocialProfile needs to be told explicitly to use this external storage for avatars etc., or it will upload them to the local server anyway.

For example, when using S3, you need to explicitly set the backend to S3, the privacy of the file to public, and the file path for avatars:

$wgSocialProfileFileBackend = 'AmazonS3';
$wgAWSRepoZones['avatars'] = [
 'container' => 'avatars',
 'path' => "/avatars",
 'isPublic' => true
];

Примечания

  • Upgrading - If you are upgrading from SocialProfile version 1.2 or older, you'll need to create four new database tables manually: gift, system_gift, user_gift, user_system_gift.

If you're upgrading from 1.3, you'll need to create user_system_messages database table.

  • Since r93317, SocialProfile's namespaces are automagically registered, so you do not need to add them to $wgExtraNamespaces .
  • SocialProfile uses either ImageMagick or PHP's built-in GD library (since r93067), depending on which one is available, for creating the resized avatar, award and gift image files.

Сообщение о багах

Снимки экрана