52 Commits

Autor SHA1 Mensagem Data
Diogo Cordeiro abc2315af6 [OverwriteThemeBackground] This new plugin will let the admin set a custom background theme independent 2019-08-21 19:02:24 +01:00
Diogo Cordeiro 67a08833ef [ExtendedProfile] Fix Admin menu option 2019-08-21 19:02:23 +01:00
Diogo Cordeiro b7ec6811cf [MODULES] Allow to delete third party plugins 2019-08-21 17:00:09 +01:00
Diogo Cordeiro e498c04e4d [MODULES] Allow to upload third party plugins
Fixed some bugs
2019-08-21 17:00:09 +01:00
Diogo Cordeiro 5d62118dc2 [MODULES] List all available plugins and allow enabling them via UI
Yet another revision of the Admin Plugin Management tool
2019-08-21 17:00:09 +01:00
Diogo Cordeiro fb13624d6e [DOCUMENTATION][DEVELOPERS][PLUGINS] Some updates to Plugins doc 2019-08-21 17:00:09 +01:00
Diogo Cordeiro 3fc86e6535 [TagCloud] Add Readme 2019-08-21 17:00:08 +01:00
Diogo Cordeiro 3ebf4db632 [SearchSub][README] No longer is a default plugin since 8614cd77 2019-08-21 17:00:08 +01:00
Diogo Cordeiro 91f5a9e442 [SamplePlugin] Review and update with the latest GNU social best practices 2019-08-21 17:00:08 +01:00
Diogo Cordeiro 1e63aeb4f2 [ConversationTree] Format the plugin, add strict typing and fix docblocks 2019-08-21 17:00:07 +01:00
Diogo Cordeiro 7c93c34d66 [OfflineBackup] Fix plugin 2019-08-21 17:00:07 +01:00
Diogo Cordeiro 3bdba42c08 [PLUGINS] Removed OpenX as the service doesn't exist anymore 2019-08-21 17:00:07 +01:00
Diogo Cordeiro bdde933224 [GroupFavorited] Fix plugin 2019-08-21 17:00:07 +01:00
Diogo Cordeiro ca8312b592 [ExtendedProfile] Hide 'Extra fields' from profile when no field was created by the sysadmin 2019-08-21 17:00:07 +01:00
Diogo Cordeiro 7c4f254881 [ExtendedProfile] Allow to delete custom profile field 2019-08-21 17:00:06 +01:00
Diogo Cordeiro e88f99b3e1 [Plugins] Incorporated GNUsocialExtendedProfile as part of ExtendedProfile
Also improved a lot of the plugin and made things in a way it would make sense
2019-08-21 17:00:03 +01:00
Diogo Cordeiro 57dd6ff9e7 [GNUsocialProfileExtensions] Fixed plugin 2019-08-21 16:54:51 +01:00
Diogo Cordeiro 7abfb17ac4 [PLUGINS] Removed GNUsocial{Photo, Photos, Video} as we don't need them anymore 2019-08-21 16:54:51 +01:00
Diogo Cordeiro 6a8d4893fc [PLUGINS] Removed GeoURL as the service doesn't exist anymore 2019-08-21 16:54:50 +01:00
Diogo Cordeiro 4f78b89b90 [ForceGroup] Modernized plugin and improved documentation 2019-08-21 16:54:50 +01:00
Diogo Cordeiro e35c351c62 [DEFAULT] Add 'DirectionDetector' as a default plugin 2019-08-21 16:54:50 +01:00
Diogo Cordeiro 7c1a4c5e69 [ChooseTheme] Fixed plugin 2019-08-21 16:54:50 +01:00
Diogo Cordeiro c62c3051d1 [BlankAd] Fixed plugin 2019-08-21 16:54:49 +01:00
Diogo Cordeiro 72e685dfb9 [Awesomeness] Fixed plugin 2019-08-21 16:54:49 +01:00
Diogo Cordeiro d56659beec [DEFAULT] Add 'AccountManager' as a default plugin 2019-08-21 16:54:49 +01:00
Diogo Cordeiro dd01794049 [CORE] Core modules shouldn't show up in version action 2019-08-21 16:54:49 +01:00
Diogo Cordeiro 6aec5e00ba [CORE] Plugin API now extends a new Module API 2019-08-21 16:54:49 +01:00
Diogo Cordeiro 9fe1cae1ac [PLUGIN API] Bug fixes and improvements 2019-08-21 16:54:48 +01:00
Diogo Cordeiro 6c92c6dac2 [CORE] Move plugin superclasses from /lib/ to /lib/modules/ 2019-08-21 16:54:48 +01:00
Diogo Cordeiro 3b61c399ee [CORE] Move core plugins to a new modules directory
For reference (raised by rozzin in IRC):

* http://foldoc.org/module
* http://foldoc.org/library
* http://foldoc.org/plugin

As noted by XRevan86, modules are not necessarily non-essential.
As we will keep the modules directory in GS root [therefore, near to
plugins/], it is evidenced the difference between both.

This is a simple yet fundamental structural change. It doesn't change
functionality but makes clearer the way we understand GNU social's
internals.
2019-08-21 16:54:48 +01:00
Miguel Dantas 90487bd67c [Embed] Added support for inline images 2019-08-21 16:54:47 +01:00
tenma fb2ef68910 [DirectMessage] Major plugin rework
This commit does the necessary rework to store private messages
as Notices and to support Federation. The plugin's README presents
some more detail about the changes and future work that is still
required to do.
2019-08-21 16:54:47 +01:00
tenma ff406a9526 [CORE][ROUTES] Update urlmapper to search dynamic routes before static ones when generating URLs.
This solves the problem of routes that differ only in having
or not $_GET params. The ones not having params (static) were
being matched first during URL generation.
2019-08-21 16:54:47 +01:00
tenma c802480d75 [CORE] Add new Notice scope for private messaging
Notice:
- Add MESSAGE_SCOPE scope

lib/*.stream:
- Filter out notices with MESSAGE_SCOPE scope
2019-08-21 16:54:47 +01:00
Miguel Dantas 2519431f02 [Embed] Added support for inline images 2019-08-21 16:54:46 +01:00
Miguel Dantas b38e71e544 [Embed] Only resize thumbnail if it's bigger than the desired size 2019-08-21 16:54:46 +01:00
Diogo Cordeiro c981afcf31 [DOCUMENTATION] Add release notes
Update INSTALL requirements
Update CHANGELOG
Update TODO
2019-08-21 16:54:09 +01:00
Diogo Cordeiro eccb8a4faf [ActivityPub] Move models from 'classes' to 'lib/models' 2019-08-21 16:46:39 +01:00
tenma 7fa5ddfc44 [ActivityPub] Fix WebFinger event subscription
ActivityPubPlugin:
- remove reference to the first argument of onEndWebFingerProfileLinks, no need
as it is an object
2019-08-21 16:46:39 +01:00
tenma 054f4e77f5 [ActivityPub] Fix handling of Delete Activity
inbox_handler:
- Call stronger validation method for Delete Activity objects
- Take into account mixed object in handle_delete

Activitypub_delete:
- Add validation method for Delete Activity objects
2019-08-21 16:46:39 +01:00
Diogo Cordeiro 1398d6cc21 [ActivityPub] This is the first release of the plugin 2019-08-21 16:46:38 +01:00
tenma b902b019fb [ActivityPub] Use queues for notice distribution
ActivityPubPlugin:
- Change event-based notice distribution to queues logic

ActivityPub/lib:
- Add queue handler class activitypubqueuehandler.php

Misc:
- Add documentation for the (Start/End)InitializeQueueManager events
2019-08-21 16:46:38 +01:00
tenma 5e589aba3c [OStatus] Fix notice enqueue
OStatusPlugin:
- Enqueue in the last position, as it should be. No need to worry about
the OMB comment, this protocol no longer have queue handlers that could
cause a conflict.
2019-08-21 16:46:38 +01:00
tenma c28cee88b7 [ActivityPub] Ensuring federation with other software
ActivityPubPlugin:
- Prevent sending a Delete for an Announce

Activitypub_announce:
- Update announce_to_array to add id, to and cc information to the retrieved object

Activitypub_follow:
- Add id to the arguments of follow_to_array, useful for Accept-Follow activities

Activitypub_notice:
- Fix notice validation, url isn't a MUST

Activitypub_inbox_handler:
- Make handle_follow use the received activity id for the later Accept-Follow

Activitypub_postman:
- Fix call to the updated announce_to_array
- Fix successive unnecessary calls to ActivityPubPlugin::actor_uri()
2019-08-21 16:46:37 +01:00
brunoccast 14a45dc546 [ActivityPub] Fix notice creation
Activitypub_notice:
- Perform url test, use id when missing.
2019-08-21 16:46:37 +01:00
brunoccast 883621ba34 [ActivityPub] Routes
ActivityPubPlugin:
- Update routes to properly use the updated URLMapper
2019-08-21 16:46:37 +01:00
brunoccast 067cc81ebb [ActivityPub] Ensuring notice deletion
ActivityPubPlugin:
- Minor onDeleteOwnNotice rewrite

Activitypub_inbox_handler:
- Add deletion check to incoming notice

Activitypub_postman:
- Call the correct getUrl function
2019-08-21 16:46:37 +01:00
brunoccast b19ee7b894 [ActivityPub] Ensuring Notice Favor/Disfavor
ActivityPubPlugin:
- Minor re-write of favor/disfavor event handlers

Activitypub_postman:
like/undo-like:
- fix proper getUrl() call
misc:
- make all activities accumulate errors (may be needed later) and log some information about it
2019-08-21 16:46:36 +01:00
brunoccast 1b356d3bf2 [ActivityPub] Ensuring notice distribution
ActivityPubPlugin:
- Fix of accepted activity verbs to include SHARES
- Add attention profiles to delivery when announcing

Activitypub_notice:
- New local function to retrieve original URL
- Removal of unnecessary 'Atom*' attributes
- Small fix to the ensuring of actor profile

Activitypub_profile:
- New local function to fetch AP profiles from a collection

Activitypub_postman:
- Fix url passed in the announce activity
2019-08-21 16:46:36 +01:00
brunoccast 94a4059b4a [ActivityPub] Caching of Following/Followers interactions and collections
Follow interaction:
- Fixed mini-bug where the subscriber profile was being used as the subscribed
- Updated cache subscription-related values in both instances
- Tested and working with local GS instances

Unfollow interaction:
- Updated cache subscription-related values in both instances
- Tested and working with local GS instances

Followers/Following collections:
- Now returning ActivityPub profiles only
- Stored collections in cache

Misc:
- Fix bug concerning the retrieval of public/private-key after in-function generation
2019-08-21 16:46:36 +01:00
brunoccast 735a0023cc [ActivityPub] Routes
ActivityPubPlugin:
- Update routes to properly use URLMapper
- Minor updates
2019-08-21 16:46:36 +01:00
Diogo Cordeiro 2ad4fa99ed [CORE] Add ActivityPub plugin
This is not the same as the one in https://notabug.org/diogo/gnu-social-activitypub-plugin
Differences to the first "release"
-> Doesn't use guzzle nor has any composer dependencies
-> Supports HTTP Signatures
-> Has basic l10n/i18n
-> Some minor bug fixes
2019-08-21 16:46:35 +01:00
1419 arquivos alterados com 19081 adições e 30098 exclusões
+15 -45
Ver Arquivo
@@ -12,6 +12,16 @@ Load and Storage:
- New media handling system
- GS is now structurely divided in includes and public
- OEmbed upgraded to Embed plugin (Now we provide Open Graph information too)
- Added Redis based caching and queues
- Improved memcached support
Federation:
- Add ActivityPub support
- RemoteFollow: Remote follow ActivityPub and OStatus remote actors via the click of a button
- ActorLists: Allow to create collections of Actors and to interact with them - supports both OStatus and ActivityPub
- The Free Network: Automagically migrate internal remote profiles between Free Network protocols
- Enable the search box to import remote notices and profiles
- Improvements on Nodeinfo (and new route)
General:
- Composer was integrated
@@ -19,57 +29,17 @@ General:
Modules:
- Restored built-in plugins
- New modules system: core plugins and plugins physically separated
- Refactor of Plugin API to better illustrate the idea of modules
- Bug fixes of core modules logic
#### TODO before alpha:
Load and Storage:
- Upgrade STOMP queue
- Add Redis based caching and queues
- Review memcached based cache
- Port PEAR DB to PDO_DataObject
- Support PostgreSQL
Network:
- Port PEAR HTTP to Guzzle
- Port PEAR Mail to PHPSendMail
- Add OAuth2 support (deprecate OAuth1)
- Add shinny new Plugins management interface for sysadmins together with a new doc for devs
Federation:
- Add ActivityPub support
- Fix audience targeting
- Add Group Actor Type
- OstatusSub: Remote follow OS and AP profiles via OStatusSub
- ActorLists: Allow to create collections of Actors and to interact with them - supports both OS and AP
- The Free Network: Automagically migrate internal remote profiles between Free Network protocols (check Nodeinfo)
- Enable the search box to import remote notices and profiles
General:
- Fix failling unit tests
- Improve Cronish
- Run session garbage collection
- Cleanup Email Registration
- Refactoring of confirmation codes
- Refactoring of Exceptions
Modules:
- Document conversion of older plugins to the new GS 2
- Create installer for v2 plugins
- Introduce new metadata for plugins (category and thumb)
- Improve plugin management tool (add install form and better UI that makes use of new metadata)
- Add plugin management tool as a install step
- Allow to install remote plugins and suggest popular trusted ones
- Improved plugin management tool (now all available plugins are shown and third party can be uploaded and deleted)
## v1.20.9release - The Invicta Crusade
Release name chosen after Porto city. Porto is one of the oldest cities in Europe and thanks to its fierce resistance
during two battles and sieges in history, it has earned the epithet of Cidade Invicta (Invincible City). The dev team
behind this release studies in Porto, Portugal.
Dropped Support for PHP5.6.x. Minimum PHP version now is 7.0.0.
Release name chosen after Porto city. Porto is one of the oldest cities in Europe and thanks to its fierce resistance during
two battles and sieges in history, it has earned the epithet of Cidade Invicta (Invincible City). The dev team behind this
release studies in Porto, Portugal.
Major changes from previous release:
- Various patches on PEAR related components
+6 -6
Ver Arquivo
@@ -229,12 +229,6 @@ StartPersonalGroupNav: beginning of personal group nav menu
EndPersonalGroupNav: end of personal group nav menu (good place to add a menu item)
- $action: action object being shown
StartGroupGroupNav: Showing the group nav menu
- $action: the current action
EndGroupGroupNav: At the end of the group nav menu
- $action: the current action
StartEndHTML: just before the </html> tag
- $action: action object being shown
@@ -355,6 +349,12 @@ EndAvatarSaveForm: after saving the avatar
StartNewQueueManager: before trying to start a new queue manager; good for plugins implementing new queue manager classes
- $qm: empty queue manager to set
StartInitializeQueueManager: about to register queue handlers in the queue manager; good for plugins to register own handlers
- $qm: queue manager
EndInitializeQueueManager: after registering queue handlers in the queue manager; good for plugins to register own handlers
- $qm: queue manager
RedirectToLogin: event when we force a redirect to login (like when going to a settings page on a remembered login)
- $action: action object being shown
- $user: current user
+68 -73
Ver Arquivo
@@ -1,8 +1,8 @@
Plugin Development
=======================
==================
SamplePlugin.php
-----------------------
----------------
Each plugin requires a main class to interact with the GNU social system.
@@ -15,7 +15,7 @@ have pre-defined arguments, based on which event they're handling. A typical
event handler:
```php
function onSomeEvent($paramA, &$paramB)
public function onSomeEvent($paramA, &$paramB): bool
{
if ($paramA == 'jed') {
throw new Exception(sprintf(_m("Invalid parameter %s"), $paramA));
@@ -26,7 +26,7 @@ function onSomeEvent($paramA, &$paramB)
```
Event Handlers
-----------------------
--------------
Event handlers must return a Boolean value.
@@ -41,50 +41,43 @@ If the handler throws an exception, processing will stop, and the exception's
error will be shown to the user.
Installation
------------------
------------
To install a plugin (like this one), site admins add the following code to their
To enable a plugin (like the SamplePlugin), site admins add the following code to their
config.php file:
```php
addPlugin('Sample');
```
Plugins must be installed in one of the following directories:
* local/plugins/{$pluginclass}.php
* local/plugins/{$name}/{$pluginclass}.php
* local/{$pluginclass}.php
* local/{$name}/{$pluginclass}.php
* plugins/{$pluginclass}.php
* plugins/{$name}/{$pluginclass}.php
Third Party Plugins must be installed in `local/plugins/{$name}/{$pluginclass}.php`
Here, `{$name}` is the name of the plugin, like 'Sample', and `{$pluginclass}`
is the name of the main class, like 'SamplePlugin'. Plugins that are part of
the main GNU social distribution go in 'plugins' and third-party or local ones
go in 'local'.
Simple plugins can be implemented as a single module. Others are more complex
and require additional modules; these should use their own directory, like
Simple plugins can be implemented as a single plugin. Others are more complex
and require additional plugins; these should use their own directory, like
'local/plugins/{$name}/'. All files related to the plugin, including images,
JavaScript, CSS, external libraries or PHP modules should go in the plugin
JavaScript, CSS, external libraries or PHP plugins should go in the plugin
directory.
Plugin Configuration
------------------
--------------------
Plugins are configured using public instance attributes. To set their values,
site administrators use this syntax:
```php
addPlugin('Sample', ('attr1' => 'foo', 'attr2' => 'bar'));
addPlugin('Sample', ['attr1' => 'foo', 'attr2' => 'bar']);
```
The same plugin class can be initialized multiple times with different arguments:
```php
addPlugin('EmailNotify', array('sendTo' => 'evan@status.net'));
addPlugin('EmailNotify', array('sendTo' => 'brionv@status.net'));
addPlugin('EmailNotify', ['sendTo' => 'evan@status.net']);
addPlugin('EmailNotify', ['sendTo' => 'brionv@status.net']);
```
```php
@@ -96,34 +89,34 @@ class SamplePlugin extends Plugin
```
Initialization
------------------
--------------
Plugins overload this method to do any initialization they need, like connecting
to remote servers or creating paths or so on. @return boolean hook value; true
to remote servers or creating paths or so on. @return bool hook value; true
means continue processing, false means stop.
```php
function initialize()
public function initialize(): bool
{
return true;
}
```
Clean Up
------------------
--------
Plugins overload this method to do any cleanup they need, like disconnecting from
remote servers or deleting temp files or so on.
```php
function cleanup()
public function cleanup(): bool
{
return true;
}
```
Database schema setup
------------------
---------------------
Plugins can add their own tables to the GNU social database. Plugins should use
GNU social's schema interface to add or delete tables. The ensureTable() method
@@ -135,25 +128,26 @@ the checkschema.php script is run, greatly improving performance. However, they
need to remember to run that script after installing or upgrading a plugin!
```php
function onCheckSchema()
public function onCheckSchema(): bool
{
$schema = Schema::get();
// '''For storing user-submitted flags on profiles'''
$schema->ensureTable('user_greeting_count',
array(new ColumnDef('user_id', 'integer', null,
true, 'PRI'),
new ColumnDef('greeting_count', 'integer')));
$schema->ensureTable('user_greeting_count',[
new ColumnDef('user_id', 'integer', null, true, 'PRI'),
new ColumnDef('greeting_count', 'integer')
]
);
return true;
}
```
Load related modules when needed
------------------
Load related plugins when needed
--------------------------------
Most non-trivial plugins will require extra modules to do their work. Typically
Most non-trivial plugins will require extra plugins to do their work. Typically
these include data classes, action classes, widget classes, or external libraries.
This method receives a class name and loads the PHP file related to that class.
@@ -166,26 +160,26 @@ in this plugin! So, make sure to return true by default to let other plugins,
and the core code, get a chance.
```php
function onAutoload($cls)
public function onAutoload($cls): bool
{
$dir = dirname(__FILE__);
$dir = __DIR__;
switch ($cls)
{
case 'HelloAction':
include_once $dir . '/' . strtolower(mb_substr($cls, 0, -6)) . '.php';
return false;
case 'User_greeting_count':
include_once $dir . '/'.$cls.'.php';
return false;
default:
return true;
case 'HelloAction':
include_once $dir . '/' . strtolower(mb_substr($cls, 0, -6)) . '.php';
return false;
case 'User_greeting_count':
include_once $dir . '/'.$cls.'.php';
return false;
default:
return true;
}
}
```
Map URLs to actions
------------------
-------------------
This event handler lets the plugin map URLs on the site to actions (and thus an
action handler class). Note that the action handler class for an action will be
@@ -193,28 +187,28 @@ named 'FoobarAction', where action = 'foobar'. The class must be loaded in the
onAutoload() method.
```php
function onRouterInitialized($m)
public function onRouterInitialized($m): bool
{
$m->connect('main/hello',
array('action' => 'hello'));
['action' => 'hello']);
return true;
}
```
Modify the default menu to link to our custom action
------------------
-----------------------------------------------------
Using event handlers, it's possible to modify the default UI for pages almost
without limit. In this method, we add a menu item to the default primary menu
for the interface to link to our action.
Action Class
------------------
------------
The Action class provides a rich set of events to hook, as well as output methods.
```php
function onEndPrimaryNav($action)
public function onEndPrimaryNav($action): bool
{
// '''common_local_url()''' gets the correct URL for the action name we provide
@@ -223,20 +217,22 @@ function onEndPrimaryNav($action)
return true;
}
function onPluginVersion(&$versions)
public function onPluginVersion(&$versions): bool
{
$versions[] = array('name' => 'Sample',
'version' => STATUSNET_VERSION,
'author' => 'Brion Vibber, Evan Prodromou',
'homepage' => 'http://example.org/plugin',
'rawdescription' =>
_m('A sample plugin to show basics of development for new hackers.'));
$versions[] = [
'name' => 'Sample',
'version' => GNUSOCIAL_VERSION,
'author' => 'Brion Vibber, Evan Prodromou',
'homepage' => 'http://example.org/plugin',
'rawdescription' =>
_m('A sample plugin to show basics of development for new hackers.')
];
return true;
}
```
hello.php
------------------
---------
This section is taken directly from the 'hello.php'. ( plugins/Sample/hello.php )
@@ -255,7 +251,7 @@ class HelloAction extends Action
```
Take arguments for running
------------------
--------------------------
This method is called first, and it lets the action class get all its arguments
and validate them. It's also the time to fetch any relevant data from the database.
@@ -263,8 +259,8 @@ and validate them. It's also the time to fetch any relevant data from the databa
Action classes should run parent::prepare(array $args = []) as the first line
of this method to make sure the default argument-processing happens.
```php
function prepare(array $args = [])
```php
public function prepare(array $args = []): bool
{
parent::prepare($args);
@@ -279,14 +275,14 @@ function prepare(array $args = [])
```
Handle request
------------------
--------------
This is the main method for handling a request. Note that most preparation
should be done in the prepare() method; by the time handle() is called the
action should be more or less ready to go.
```php
function handle()
public function handle(): void
{
parent::handle();
@@ -300,7 +296,7 @@ Title of this page
Override this method to show a custom title.
```php
function title()
public function title(): string
{
if (empty($this->user)) {
return _m('Hello');
@@ -311,7 +307,7 @@ function title()
```
Show content in the content area
------------------
--------------------------------
The default GNU social page has a lot of decorations: menus, logos, tabs, all
that jazz. This method is used to show content in the content area of the
@@ -319,15 +315,15 @@ page; it's the main thing you want to overload. This method also demonstrates
use of a plural localized string.
```php
function showContent()
public function showContent(): void
{
if (empty($this->user)) {
$this->element('p', array('class' => 'greeting'),
$this->element('p', ['class' => 'greeting'],
_m('Hello, stranger!'));
} else {
$this->element('p', array('class' => 'greeting'),
$this->element('p', ['class' => 'greeting'],
sprintf(_m('Hello, %s'), $this->user->nickname));
$this->element('p', array('class' => 'greeting_count'),
$this->element('p', ['class' => 'greeting_count'],
sprintf(_m('I have greeted you %d time.',
'I have greeted you %d times.',
$this->gc->greeting_count),
@@ -337,7 +333,7 @@ function showContent()
```
Return true if read only.
------------------
-------------------------
Some actions only read from the database; others read and write. The simple
database load-balancer built into GNU social will direct read-only actions to
@@ -347,9 +343,8 @@ This defaults to false to avoid data integrity issues, but you should make sure
to overload it for performance gains.
```php
function isReadOnly($args)
public function isReadOnly($args): bool
{
return false;
}
```
@@ -0,0 +1,90 @@
<?php
// This file is part of GNU social - https://www.gnu.org/software/social
//
// GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// GNU social is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
defined('GNUSOCIAL') || die();
/**
* Fun sample plugin: tweaks input data and adds a 'Cornify' widget to sidebar.
*
* @category Plugin
* @package GNUsocial
* @author Jeroen De Dauw <jeroendedauw@gmail.com>
* @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/
class AwesomenessPlugin extends Plugin
{
const PLUGIN_VERSION = '13.37.42';
public function onPluginVersion(array &$versions): bool
{
$versions[] = [
'name' => 'Awesomeness',
'version' => self::PLUGIN_VERSION,
'author' => 'Jeroen De Dauw',
'homepage' => 'https://git.gnu.io/gnu/gnu-social/tree/master/plugins/Awesomeness',
// TRANS: Plugin description for a sample plugin.
'rawdescription' => _m('The Awesomeness plugin adds additional awesomeness ' .
'to a GNU social installation.')
];
return true;
}
/**
* Add the conrnify button
*
* @param Action $action the current action
*
* @return void
*/
public function onEndShowSections(Action $action)
{
$action->elementStart('div', ['id' => 'cornify_section',
'class' => 'section']);
$action->raw(
<<<EOT
<a href="https://www.cornify.com" onclick="cornify_add();return false;">
<img src="https://www.cornify.com/assets/cornify.gif" width="61" height="16" border="0" alt="Cornify" />
</a>
EOT
);
$action->elementEnd('div');
}
public function onEndShowScripts(Action $action)
{
$action->script($this->path('js/cornify.js'));
}
/**
* Hook for new-notice form processing to take our HTML goodies;
* won't affect API posting etc.
*
* @param NewNoticeAction $action
* @param User $user
* @param string $content
* @param array $options
* @return bool hook return
*/
public function onStartSaveNewNoticeWeb($action, $user, &$content, &$options)
{
$content = htmlspecialchars($content);
$options['rendered'] = preg_replace("/(^|\s|-)((?:awesome|awesomeness)[\?!\.\,]?)(\s|$)/i", " <b>$2</b> ", $content);
}
}
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-08 18:20+0100\n"
"POT-Creation-Date: 2019-08-14 14:51+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,9 +17,14 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
<<<<<<< HEAD
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
=======
#. TRANS: Module description for a sample plugin.
#: AwesomenessModule.php:67
>>>>>>> 6b0ad03771... [PLUGINS] Removed GeoURL as the service doesn't exist anymore
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "Дапаўненьне Awesomeness дадае незвычайныя магчымасьці ў усталяваньне StatusNet."
msgstr "Дапаўненьне Awesomeness дадае незвычайныя магчымасьці ў усталяваньне GNU social."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-06 15:02+0000\n"
"PO-Revision-Date: 2019-08-21 14:01+0100\n"
"Last-Translator: digitaldreamer <digitaldreamer@email.cz>\n"
"Language-Team: German (http://www.transifex.com/gnu-social/gnu-social/language/de/)\n"
"MIME-Version: 1.0\n"
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "Das Awesomeness-Plugin fügt zusätzliche Großartigkeit zu einer StatusNet-Installation hinzu."
msgstr "Das Awesomeness-Plugin fügt zusätzliche Großartigkeit zu einer GNU social-Installation hinzu."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -21,6 +21,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "The Awesomeness plugin adds additional awesomeness to a StatusNet installation."
msgstr "The Awesomeness plugin adds additional awesomeness to a GNU social installation."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -21,6 +21,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "El complemento Awesomeness ('Molonosidad') incrementa en +20 la molonosidad de un sitio GNU social. (Este es un complemento de ejemplo, con un toque de humor)."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "Awesomeness pluginak informazio osagarria gehitzen dio StatusNet instalatzioari."
msgstr "Awesomeness pluginak informazio osagarria gehitzen dio GNU social instalatzioari."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "Awesomeness-liitännäinen lisää ylimääräistä upeutta (awesomeness) StatusNet-asennukseesi."
msgstr "Awesomeness-liitännäinen lisää ylimääräistä upeutta (awesomeness) GNU social-asennukseesi."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "Le plugin Awesomeness ajoute des suppléments impressionnants à une installation de StatusNet."
msgstr "Le plugin Awesomeness ajoute des suppléments impressionnants à une installation de GNU social."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "O complemento impresionante engade suplementos impresionantes á instalación do StatusNet."
msgstr "O complemento impresionante engade suplementos impresionantes á instalación do GNU social."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "תוסף מגניבות מוסיף עוד מגניבות להתקנה של סטטוסנט."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "Le plug-in Awesomeness rende un installation de StatusNet plus impressionante."
msgstr "Le plug-in Awesomeness rende un installation de GNU social plus impressionante."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -21,6 +21,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "L'extensilo Awesomeness adjuntas impresanta suplemento a GNU social-instaluro."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "Il plugin Awesomeness aggiunge ulteriore imponenza all'installazione di StatusNet."
msgstr "Il plugin Awesomeness aggiunge ulteriore imponenza all'installazione di GNU social."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "Приклучокот „Феноменалност“ ѝ дава дополнителна феноменалност на инсталацијата на StatusNet."
msgstr "Приклучокот „Феноменалност“ ѝ дава дополнителна феноменалност на инсталацијата на GNU social."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "De Awesomenessplug-in voegt extra awesomeness toe aan een StatusNetinstallatie."
msgstr "De Awesomenessplug-in voegt extra awesomeness toe aan een GNU socialinstallatie."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "Wtyczka Awesomeness dodaje dodatkowe niesamowitości do instalacji StatusNet."
msgstr "Wtyczka Awesomeness dodaje dodatkowe niesamowitości do instalacji GNU social."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "O plugin de Espectacularidade adiciona espectacularidade adicional a uma instalação de StatusNet."
msgstr "O plugin de Espectacularidade adiciona espectacularidade adicional a uma instalação de GNU social."
@@ -21,6 +21,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "O plugin Awesomeness adiciona incríveis bonus à instalação de StatusNet."
msgstr "O plugin Awesomeness adiciona incríveis bonus à instalação de GNU social."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "Потрясающий плагин добавляет потрясающие вещи в StatusNet."
msgstr "Потрясающий плагин добавляет потрясающие вещи в GNU social."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -21,6 +21,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "Insticksprogrammet Awesomeness lägger till ytterligare ypperlighet till en StatusNet-installation."
msgstr "Insticksprogrammet Awesomeness lägger till ytterligare ypperlighet till en GNU social-installation."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "Ang pampasak ng Pagiging Kahanga-hanga ay nagdaragdag ng karagdagang pagiging kahanga-hanga sa isang pagtatalaga ng StatusNet."
msgstr "Ang pampasak ng Pagiging Kahanga-hanga ay nagdaragdag ng karagdagang pagiging kahanga-hanga sa isang pagtatalaga ng GNU social."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr "Напрочуд дивовижний додаток додає додаткову напрочуд дивовижну функціональність до вашої інсталяції StatusNet."
msgstr "Напрочуд дивовижний додаток додає додаткову напрочуд дивовижну функціональність до вашої інсталяції GNU social."
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -20,6 +20,6 @@ msgstr ""
#. TRANS: Plugin description for a sample plugin.
#: AwesomenessPlugin.php:55
msgid ""
"The Awesomeness plugin adds additional awesomeness to a StatusNet "
"The Awesomeness plugin adds additional awesomeness to a GNU social "
"installation."
msgstr ""
@@ -0,0 +1,241 @@
/*
_______ ,-----. .-------. ,---. .--..-./`) ________ ____ __
/ __ \ .' .-, '. | _ _ \ | \ | |\ .-.')| | \ \ / /
| ,_/ \__) / ,-.| \ _ \ | ( ' ) | | , \ | |/ `-' \| .----' \ _. / '
,-./ ) ; \ '_ / | :|(_ o _) / | |\_ \| | `-'`"`| _|____ _( )_ .'
\ '_ '`) | _`,/ \ _/ || (_,_).' __ | _( )_\ | .---. |_( )_ | ___(_ o _)'
> (_) ) __: ( '\_/ \ ;| |\ \ | || (_ o _) | | | (_ o._)__|| |(_,_)'
( . .-'_/ )\ `"/ \ ) / | | \ `' /| (_,_)\ | | | |(_,_) | `-' /
`-'`-' / '. \_/``".' | | \ / | | | | | | | | \ /
`._____.' '-----' ''-' `'-' '--' '--' '---' '---' `-..-'
*/
var cornify_count = 0;
var cornify_add = function(options) {
// Track how often we cornified.
cornify_count += 1;
var cornify_url = 'https://www.cornify.com/';
// Create a container DIV for our 'corn or 'bow.
var div = document.createElement('div');
div.style.position = 'fixed';
// Prepare our lovely variables.
var numType = 'px';
var heightRandom = Math.random() * 0.75;
var windowHeight = 768;
var windowWidth = 1024;
var height = 0;
var width = 0;
var de = document.documentElement;
// Get the window width and height - requires some cross browser checking.
if(typeof(window.innerHeight) == 'number') {
windowHeight = window.innerHeight;
windowWidth = window.innerWidth;
} else if(de && de.clientHeight) {
windowHeight = de.clientHeight;
windowWidth = de.clientWidth;
} else {
numType = '%';
height = Math.round(height*100) + '%';
}
div.onclick = cornify_add; // Click for more magic.
div.style.zIndex = 10;
div.style.outline = 0;
if(cornify_count == 15) {
// Clicking 15 times summons the grand unicorn - which is centered on the screen.
div.style.top = Math.max( 0, Math.round((windowHeight-530)/2)) + 'px';
div.style.left = Math.round((windowWidth-530)/2) + 'px';
div.style.zIndex = 1000;
} else {
// Otherwise we randomize the position.
if(numType == 'px') {
div.style.top = Math.round( windowHeight*heightRandom ) + numType;
} else {
div.style.top = height;
}
div.style.left = Math.round(Math.random()*90) + '%';
}
var img = document.createElement('img');
var currentTime = new Date();
// Used as a cache buster so the browser makes a new request every time instead of usign the previous, cached one.
var submitTime = currentTime.getTime();
if( cornify_count==15 ) submitTime = 0;
// Construct our unicorn & rainbow request.
var url = cornify_url+'getacorn.php?r='+submitTime+'&url='+document.location.href;
// Add younicorns if requested.
if(options && (options.y || options.younicorns)) {
url += '&y='+(options.y ? options.y : options.younicorns);
if(Math.random() > 0.5) {
// Flip horizontally at random.
div.style.transform = 'scaleX(-1)';
};
}
img.setAttribute('src', url);
// Add a nice hover transition.
var ease = "all .1s linear";
div.style.WebkitTransition = ease;
div.style.WebkitTransform = "rotate(1deg) scale(1.01,1.01)";
div.style.transition = "all .1s linear";
div.onmouseover = function() {
var size = 1 + Math.round(Math.random()*10)/100;
var angle = Math.round(Math.random()*20-10);
var result = "rotate("+angle+"deg) scale("+size+","+size+")";
this.style.transform = result;
this.style.WebkitTransform = result;
};
div.onmouseout = function() {
var size = .9+Math.round(Math.random()*10)/100;
var angle = Math.round(Math.random()*6-3);
var result = "rotate("+angle+"deg) scale("+size+","+size+")";
this.style.transform = result;
this.style.WebkitTransform = result;
};
// Append our container DIV to the page.
var body = document.getElementsByTagName('body')[0];
body.appendChild(div);
div.appendChild(img);
// Hooray - now we have a sparkly unicorn (or rainbow) on the page. Another cornification well done. Congrats!
// When clicking 5 times, add a custom stylesheet to make the page look awesome.
if(cornify_count == 5) {
var cssExisting = document.getElementById('__cornify_css');
if(!cssExisting) {
var head = document.getElementsByTagName("head")[0];
var css = document.createElement('link');
css.id = '__cornify_css';
css.type = 'text/css';
css.rel = 'stylesheet';
css.href = 'https://www.cornify.com/css/cornify.css';
css.media = 'screen';
head.appendChild(css);
}
cornify_replace();
}
cornify_updatecount();
};
// Tracks how often we cornified.
var cornify_updatecount = function() {
var p = document.getElementById('cornifycount');
if(p == null) {
var p = document.createElement('p');
p.id = 'cornifycount';
p.style.position = 'fixed';
p.style.bottom = '5px';
p.style.left = '0px';
p.style.right = '0px';
p.style.zIndex = '1000000000';
p.style.color = '#ff00ff';
p.style.textAlign = 'center';
p.style.fontSize = '24px';
p.style.fontFamily = "'Comic Sans MS', 'Comic Sans', 'Marker Felt', serif"; // Only the best!
var body = document.getElementsByTagName('body')[0];
body.appendChild(p);
}
if(cornify_count == 1) {
p.innerHTML = cornify_count+' UNICORN OR RAINBOW CREATED';
} else {
p.innerHTML = cornify_count+' UNICORNS &AMP; RAINBOWS CREATED';
}
// Stores our count in a cookie for our next session.
cornify_setcookie('cornify', cornify_count+'', 1000);
};
var cornify_setcookie = function(name, value, days) {
var d = new Date();
d.setTime(d.getTime()+(days*24*60*60*1000));
var expires = "expires="+d.toGMTString();
document.cookie = name + "=" + value + "; " + expires;
};
var cornify_getcookie = function(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i=0; i<ca.length; i++) {
var c = ca[i].trim();
if(c.indexOf(name)==0) {
return c.substring(name.length,c.length);
}
}
return "";
};
// Retrieve our click count from the cookie when we start up.
cornify_count = parseInt(cornify_getcookie('cornify'));
if(isNaN(cornify_count)) {
cornify_count = 0;
}
// Adds happy words at the beginning of all headers on the page.
var cornify_replace = function() {
// Replace text.
var hc = 6;
var hs;
var h;
var k;
var words = ['Happy','Sparkly','Glittery','Fun','Magical','Lovely','Cute','Charming','Amazing','Wonderful'];
while(hc >= 1) {
hs = document.getElementsByTagName('h' + hc);
for (k = 0; k < hs.length; k++) {
h = hs[k];
h.innerHTML = words[Math.floor(Math.random()*words.length)] + ' ' + h.innerHTML;
}
hc-=1;
}
};
/*
* Adapted from http://www.snaptortoise.com/konami-js/
*/
var cornami = {
input:"",
pattern:"38384040373937396665",
clear:setTimeout('cornami.clear_input()', 5000),
load: function() {
window.document.onkeydown = function(e) {
if (cornami.input == cornami.pattern) {
cornify_add();
clearTimeout(cornami.clear);
return;
}
else {
cornami.input += e ? e.keyCode : event.keyCode;
if (cornami.input == cornami.pattern) cornify_add();
clearTimeout(cornami.clear);
cornami.clear = setTimeout("cornami.clear_input()", 5000);
}
};
},
clear_input: function() {
cornami.input="";
clearTimeout(cornami.clear);
}
};
cornami.load();
@@ -118,7 +118,7 @@ class BlankAdPlugin extends UAPPlugin
'');
}
function onPluginVersion(array &$versions)
public function onPluginVersion(array &$versions): bool
{
$versions[] = array('name' => 'BlankAd',
'version' => self::PLUGIN_VERSION,
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-08 18:20+0100\n"
"POT-Creation-Date: 2019-08-14 14:51+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais