This fixes a loop of probes / contact updates where the network has been apup and for whatever
reason is now feed. In this case the contact hasn't been updated and rescheduled with next_update as null resulting
in a huge number of queries.
The call to hasLocalData has been moved a bit up as it checks for values that otherwise would be emptied befare the call.
Fixes#13037
* create dropzone for editing in jot-modal
* customize css for dropzone to make it more beautiful (smaller
margin/paddings...)
* change position of dropzone-element dircetly to textarea, so button
for upload is small and under textarea (it's more clear)
* remove previews after upload. this shows the upload-progress, but
preview is not needed after upload. you can't do anything with the
preview, and dialog gets too big. You see successful upload, when
bb-code link to image is inserted on cursor-position in textarea
Strings:getBytesFromShorthand
i created a js-function which converts integer, k, m and g to MB
Just remove this code, when we found out, why Strings is in some files
not working.
in this case, the img[id^=waitfor... .show() shows existing image-containers. All of them which exist.
Because there can be more than one. And this filter just shows them.
adding another rotator with your suggestion can lead to 2 or more rotators on a button.
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
change the button only if it could send its request successfully to the server.
fixes:
* disrupting a video on liking or sharing
* timeline jumps around somewhere else, when you like or share a
posting/comment, and you can not find back.
its annoying, when you open filebrowser to upload an image or file, and
the button moves away under your finger/cursor, in case of loading
preview images slower than the form itself.
just change position of button (class="upload") and browser itself
(class="media") disannoys the behaviour.
- added check for empty file name as the export doesn't work without one:
`[Error] Argument 1 passed to Friendica\Moderation\DomainPatternBlocklist::exportToFile() must be of the type string, null given, called in /var/www/.../src/Console/ServerBlock.php on line 110`
- moved if() block to suggested position by MrPetovan, for me I want to have all
conditions checked at the start of the method, e.g. no unwanted null
references or (in this case) if the URL is blacklisted
- normalized URLs are without SSL, means http://host/path/file.ext so they exist
only once for contacts and servers (aka. instances)
- documented returned type `void`
- some trolls managed to flood gserver with useless URLs. They can be blocked
by domain blocking them, but still it floods gserver table with dead entries
- this hack tries to change that so they won't enter gserver at all. Let's hope
these trolls as `activitypub-trolls.cf` learn a lesson (and get adults soon)
Signed-off-by: Roland Häder <roland@mxchange.org>
Some feeds might have whitespace around the creation date.
This can't be parsed by DateTimeFormat methods.
Therefore the incoming creation date is trimmed to not contain any
surrounding whitespace for proper handling.
Relates: #12686
Some feeds might have whitespace around the URLs of each item.
This can't be handled by parse_url.
Therefore the incoming url is trimmed to not contain any surrounding
whitespace for proper handling.
Relates: #12658
- A deleted cache-key would delete a merged cache-key as well
- Deleting a key in the Model results in reloading the config to assure any value from underlying files
- Delete now really overwrites static default/setting.config.php keys
- Delete now really overwrites static default/setting.config.php categories
- The Update::check() routine is added to different places
- Merge the given config file with the new config before writing
- Remove ConfigTransaction::get() because it's no more reliable
- Move $_SERVER into ConfigFileManager constructor
- Rename "creatConfigFileLoader" to "createConfigFileManager"
- Rename variable "loader" to "manager" in all tests
If you want to contribute to the project, you don’t need to have coding experience. There are a number of tasks listed in the issue tracker with the label “[Junior Jobs](https://github.com/friendica/friendica/issues?q=is%3Aopen+is%3Aissue+label%3A%22Junior+Jobs%22)” we think are good for new contributors. But you are by no means limited to these – if you find a solution to a problem (even a new one) please make a pull request at [github](https://github.com/friendica/friendica) or let us know in the [development forum](https://forum.friendi.ca/profile/developers).
If you want to contribute to the project, you don’t need to have coding experience. There are a number of tasks listed in the issue tracker with the label “[Junior Jobs](https://github.com/friendica/friendica/issues?q=is%3Aopen+is%3Aissue+label%3A%22Junior+Jobs%22)” we think are good for new contributors. But you are by no means limited to these – if you find a solution to a problem (even a new one) please make a pull request at [github](https://github.com/friendica/friendica) or let us know in the [development forum](https://forum.friendi.ca/profile/developers).
Contribution to Friendica is also not limited to coding. Any contribution to the [documentation](https://github.com/friendica/friendica/tree/develop/doc), the [translation](https://www.transifex.com/Friendica/friendica/dashboard/) or advertisement materials is welcome or reporting a problem. You don’t need to deal with Git(Hub) or Transifex if you don’t like to. Just [get in touch](https://forum.friendi.ca/profile/helpers) with us and we will get the materials to the appropriate places.
Contribution to Friendica is also not limited to coding. Any contribution to the [documentation](https://github.com/friendica/friendica/tree/develop/doc), the [translation](https://app.transifex.com/Friendica/friendica/dashboard/) or advertisement materials is welcome or reporting a problem. You don’t need to deal with Git(Hub) or Transifex if you don’t like to. Just [get in touch](https://forum.friendi.ca/profile/helpers) with us and we will get the materials to the appropriate places.
@ -17,18 +17,18 @@ Have a look at the [installation documentation](doc/Install.md) for further info
### Friendica Screenshots
### Friendica Screenshots
| ![Frio theme in mobile browser](images/screenshots/friendica-frio-mobile-profle-1.png?raw=true "Frio theme in mobile browser") ![Frio theme in mobile browser](images/screenshots/friendica-frio-mobile-profle-2.png?raw=true "Frio theme in mobile browser")
| ![Frio theme in mobile browser](images/screenshots/friendica-frio-mobile-profile-1.png?raw=true "Frio theme in mobile browser") ![Frio theme in mobile browser](images/screenshots/friendica-frio-mobile-profile-2.png?raw=true "Frio theme in mobile browser")
|:--:|
|:--:|
|*Frio theme, mobile browser. Timeline and composer view.*|
|*Frio theme, mobile browser. Timeline and composer view.*|
|![Frio theme in desktop browser](images/screenshots/friendica-frio-green-profle-1.png?raw=true "Frio theme in desktop browser")
|![Frio theme in desktop browser](images/screenshots/friendica-frio-green-profile-1.png?raw=true "Frio theme in desktop browser")
|*Frio theme, desktop browser. Timeline view, contact info popped up, control menu open.*|
|*Frio theme, desktop browser. Timeline view, contact info popped up, control menu open.*|
|![Frio theme in desktop browser](images/screenshots/friendica-frio-green-profle-2.png?raw=true "Frio theme in desktop browser")
|![Frio theme in desktop browser](images/screenshots/friendica-frio-green-profile-2.png?raw=true "Frio theme in desktop browser")
|*Frio theme, desktop browser. Menu open for controlling individual posts.*|
|*Frio theme, desktop browser. Menu open for controlling individual posts.*|
|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profle-3.png?raw=true "Frio theme in desktop browser")
|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profile-3.png?raw=true "Frio theme in desktop browser")
|*Frio theme, desktop browser. Profile view, notification menu open.*|
|*Frio theme, desktop browser. Profile view, notification menu open.*|
|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profle-2.png?raw=true "Frio theme in desktop browser")
|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profile-2.png?raw=true "Frio theme in desktop browser")
|*Number of new posts, in total and by group.*|
|*Number of new posts, in total and by group.*|
|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profle-1.png?raw=true "Frio theme in desktop browser")
|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profile-1.png?raw=true "Frio theme in desktop browser")
|*Calender with popup of event.*|
|*Calender with popup of event.*|
|![Frio theme default colour in standard browser on tablet](images/screenshots/friendica-frio-default-profile-1.png?raw=true "Frio theme default colour in standard browser on tablet")
|![Frio theme default colour in standard browser on tablet](images/screenshots/friendica-frio-default-profile-1.png?raw=true "Frio theme default colour in standard browser on tablet")
|*Notifications menu and private messages counter, standard browser on tablet.*|
|*Notifications menu and private messages counter, standard browser on tablet.*|
@ -163,7 +163,7 @@ Add or remove an activity from an item.
* `attendmaybe`
* `attendmaybe`
To remove an activity, prepend the verb with "un", eg. "unlike" or "undislike"
To remove an activity, prepend the verb with "un", eg. "unlike" or "undislike"
Attend verbs disable eachother: that means that if "attendyes" was added to an item, adding "attendno" remove previous "attendyes".
Attend verbs disable eachother: that means that if "attendyes" was added to an item, adding "attendno" remove previous "attendyes".
Attend verbs should be used only with event-related items (there is no check at the moment).
Attend verbs should be used only with event-related items (there is no check at the moment).
#### Parameters
#### Parameters
@ -305,7 +305,7 @@ Returns [Private Messages](help/API-Entities#Private+message) matching the provi
#### Parameters
#### Parameters
* `searchstring`: string for which the API call should search as '%searchstring%' in field 'body' of all messages of the authenticated user (caption ignored)
* `searchstring`: string for which the API call should search as '%searchstring%' in field 'body' of all messages of the authenticated user (caption ignored)
* `getText` (optional): `plain`|`html` If ommited, the title is prepended to the plaintext body in the `text` attribute of the private message objects.
* `getText` (optional): `plain`|`html` If omitted, the title is prepended to the plaintext body in the `text` attribute of the private message objects.
* `getUserObjects` (optional): `true`|`false` If `false`, the `sender` and `recipient` attributes of the private message object are absent.
* `getUserObjects` (optional): `true`|`false` If `false`, the `sender` and `recipient` attributes of the private message object are absent.
#### Return values
#### Return values
@ -646,7 +646,7 @@ On error:
* 403 FORBIDDEN: if not authenticated
* 403 FORBIDDEN: if not authenticated
* 400 BADREQUEST: "no albumname specified", "album not available"
* 400 BADREQUEST: "no albumname specified", "album not available"
* 500 INTERNALSERVERERROR: "problem with deleting item occured", "unknown error - deleting from database failed"
* 500 INTERNALSERVERERROR: "problem with deleting item occurred", "unknown error - deleting from database failed"
### POST api/friendica/photoalbum/update
### POST api/friendica/photoalbum/update
@ -676,8 +676,92 @@ On error:
* 400 BADREQUEST: "no albumname specified", "no new albumname specified", "album not available"
* 400 BADREQUEST: "no albumname specified", "no new albumname specified", "album not available"
* 500 INTERNALSERVERERROR: "unknown error - updating in database failed"
* 500 INTERNALSERVERERROR: "unknown error - updating in database failed"
### GET api/friendica/photoalbums
Get a list of photo albums for the user
#### Parameters
None
#### Return values
On success a list of photo album objects:
```json
[
{
"name": "Wall Photos",
"created": "2023-01-22 02:03:19",
"count": 4
},
{
"name": "Profile photos",
"created": "2022-11-20 14:40:06",
"count": 1
}
]
```
### GET api/friendica/photoalbum
Get a list of images in a photo album
#### Parameters
* `album` (Required): name of the album to be deleted
* `limit` (Optional): Maximum number of items to get, defaults to 50, max 500
* `offset`(Optional): Offset in results to page through total items, defaults to 0
* `latest_first` (Optional): Reverse the order so the most recent images are first, defaults to false
- Does not support `polls` argument as Friendica does not have polls
- Additional fields `friendica` for Friendica specific parameters:
- `title`: Explicitly sets the title for a post status, ignored if used on a comment status. For post statuses the legacy behavior is to use any "spoiler text" as the title if it is provided. If both the title and spoiler text are provided for a post status then they will each be used for their respective roles. If no title is provided then the legacy behavior will persist. If you want to create a post with no title but spoiler text then explicitly set the title but set it to an empty string `""`.
- Does not support `polls` argument as Friendica does not have polls
- Additionally to the static values `public`, `unlisted` and `private`, the `visibility` parameter can contain a numeric value with a group id.
- Additionally to the static values `public`, `unlisted` and `private`, the `visibility` parameter can contain a numeric value with a group id.
- Additional field `quote_id` for the post that is being quote reshared
- Additional fields `friendica` for Friendica specific parameters:
- `title`: Explicitly sets the title for a post status, ignored if used on a comment status. For post statuses the legacy behavior is to use any "spoiler text" as the title if it is provided. If both the title and spoiler text are provided for a post status then they will each be used for their respective roles. If no title is provided then the legacy behavior will persist. If you want to create a post with no title but spoiler text then explicitly set the title but set it to an empty string `""`.
@ -10,7 +10,7 @@ Not all Friendica sites allow open registration.
If registration is allowed, you will see a "Register" link immediately below the login prompt on the site's home page.
If registration is allowed, you will see a "Register" link immediately below the login prompt on the site's home page.
Following this link will take you to the site registration page.
Following this link will take you to the site registration page.
The strength of our network is that lots of different sites are all completely compatible with each other.
The strength of our network is that lots of different sites are all completely compatible with each other.
If the site you're visting doesn't allow registration, or you think you might prefer another one, there is a [list of public servers here](https://dir.friendica.social/servers) and hopefully you will find one that meets your needs.
If the site you're visiting doesn't allow registration, or you think you might prefer another one, there is a [list of public servers here](https://dir.friendica.social/servers) and hopefully you will find one that meets your needs.
If you'd like to have your own server, you can do that too.
If you'd like to have your own server, you can do that too.
Visit [the Friendica website](http://friendi.ca/) to download the code with setup instructions.
Visit [the Friendica website](http://friendi.ca/) to download the code with setup instructions.
@ -100,7 +100,7 @@ See doxygen documentation of `IWritableStorage` interface for details about each
## Register a storage backend class
## Register a storage backend class
Each backend must be registered in the system when the plugin is installed, to be aviable.
Each backend must be registered in the system when the plugin is installed, to be available.
`DI::facStorage()->register(string $class)` is used to register the backend class.
`DI::facStorage()->register(string $class)` is used to register the backend class.
@ -140,18 +140,18 @@ abstract class StorageTest
There are two intended types of exceptions for storages
There are two intended types of exceptions for storages
### `ReferenceStorageExecption`
### `ReferenceStorageException`
This storage exception should be used in case the caller tries to use an invalid references.
This storage exception should be used in case the caller tries to use an invalid references.
This could happen in case the caller tries to delete or update an unknown reference.
This could happen in case the caller tries to delete or update an unknown reference.
The implementation of the storage backend must not ignore invalid references.
The implementation of the storage backend must not ignore invalid references.
Avoid throwing the common `StorageExecption` instead of the `ReferenceStorageException` at this particular situation!
Avoid throwing the common `StorageException` instead of the `ReferenceStorageException` at this particular situation!
### `StorageException`
### `StorageException`
This is the common exception in case unexpected errors happen using the storage backend.
This is the common exception in case unexpected errors happen using the storage backend.
If there's a predecessor to this exception (e.g. you caught an exception and are throwing this execption), you should add the predecessor for transparency reasons.
If there's a predecessor to this exception (e.g. you caught an exception and are throwing this exception), you should add the predecessor for transparency reasons.
Example:
Example:
@ -320,7 +320,7 @@ The file is `addon/samplestorage/samplestorage.php`
<?php
<?php
/**
/**
* Name: Sample Storage Addon
* Name: Sample Storage Addon
* Description: A sample addon which implements an unusefull storage backend
* Description: A sample addon which implements a very limited storage backend
@ -44,7 +44,7 @@ Uninstalling an addon automatically unregisters any hook it registered, but if y
The install and uninstall functions will be called (i.e. re-installed) if the addon changes after installation.
The install and uninstall functions will be called (i.e. re-installed) if the addon changes after installation.
Therefore your uninstall should not destroy data and install should consider that data may already exist.
Therefore your uninstall should not destroy data and install should consider that data may already exist.
Future extensions may provide for "setup" amd "remove".
Future extensions may provide for "setup" and "remove".
## PHP addon hooks
## PHP addon hooks
@ -60,25 +60,14 @@ This *should* be 'addon/*addon_name*/*addon_name*.php' in most cases and can be
`$function` is a string and is the name of the function which will be executed when the hook is called.
`$function` is a string and is the name of the function which will be executed when the hook is called.
### Arguments
### Arguments
Your hook callback functions will be called with at least one and possibly two arguments
Your hook callback functions will be called with at most one argument
function <addon>_<hookname>(App $a, &$b) {
function <addon>_<hookname>(&$b) {
}
}
If you wish to make changes to the calling data, you must declare them as reference variables (with `&`) during function declaration.
If you wish to make changes to the calling data, you must declare them as reference variables (with `&`) during function declaration.
#### $a
$a is the Friendica `App` class.
It contains a wealth of information about the current state of Friendica:
* which module has been called,
* configuration information,
* the page contents at the point the hook was invoked,
* profile and user information, etc.
It is recommeded you call this `$a` to match its usage elsewhere.
#### $b
#### $b
$b can be called anything you like.
$b can be called anything you like.
This is information specific to the hook currently being processed, and generally contains information that is being immediately processed or acted on that you can use, display, or alter.
This is information specific to the hook currently being processed, and generally contains information that is being immediately processed or acted on that you can use, display, or alter.
@ -88,7 +77,7 @@ Remember to declare it with `&` if you wish to alter it.
Your addon can provide user-specific settings via the `addon_settings` PHP hook, but it can also provide node-wide settings in the administration page of your addon.
Your addon can provide user-specific settings via the `addon_settings` PHP hook, but it can also provide node-wide settings in the administration page of your addon.
Simply declare a `<addon>_addon_admin(App $a)` function to display the form and a `<addon>_addon_admin_post(App $a)` function to process the data from the form.
Simply declare a `<addon>_addon_admin()` function to display the form and a `<addon>_addon_admin_post()` function to process the data from the form.0
@ -20,7 +20,7 @@ Composer requires PHP CLI and the following examples assume it's available syste
#### From Archive
#### From Archive
If you just unpacked a Friendica release archive, you don't have to use Commposer at all, all the required libraries are already bundled in the archive.
If you just unpacked a Friendica release archive, you don't have to use Composer at all, all the required libraries are already bundled in the archive.
@ -95,7 +95,7 @@ Please remove all the `require_once` mentions of the former file, as they will p
## Miscellaneous tips
## Miscellaneous tips
When you are done with moving the class, please run `php bin/console.php typo` from the Friendica base directory to check for obvious mistakes.
When you are done with moving the class, please run `php bin/console.php typo` from the Friendica base directory to check for obvious mistakes.
Howevever, this tool isn't bullet-proof, and a staging install of Friendica is recommended to test your class move without impairing your production server if you host one.
However, this tool isn't bullet-proof, and a staging install of Friendica is recommended to test your class move without impairing your production server if you host one.
Most of Friendica processes are run in the background, so make sure to turn on your debug log to check for errors that wouldn't show up while simply browsing Friendica.
Most of Friendica processes are run in the background, so make sure to turn on your debug log to check for errors that wouldn't show up while simply browsing Friendica.
If the command-line tools `diff` and `patch` are unavailabe for you, `phpcbf` can use slightly slower PHP equivalents by using the `--no-patch` argument.
If the command-line tools `diff` and `patch` are unavailable for you, `phpcbf` can use slightly slower PHP equivalents by using the `--no-patch` argument.
@ -42,7 +42,7 @@ Friendica Documentation and Resources
* [Get started](help/Developers-Intro)
* [Get started](help/Developers-Intro)
* Set up development environment
* Set up development environment
* [Help on Github](help/Github)
* [Help on GitHub](help/GitHub)
* [Help on Vagrant](help/Vagrant)
* [Help on Vagrant](help/Vagrant)
* [Bugs and Issues](help/Bugs-and-Issues)
* [Bugs and Issues](help/Bugs-and-Issues)
* Code structure
* Code structure
@ -69,7 +69,7 @@ Friendica Documentation and Resources
* Ways to get Support
* Ways to get Support
* Friendica Support Forum: [@helpers@forum.friendi.ca](https://forum.friendi.ca/~helpers)
* Friendica Support Forum: [@helpers@forum.friendi.ca](https://forum.friendi.ca/~helpers)
* [Mailing List Archive](http://mailman.friendi.ca/mailman/listinfo/support-friendi.ca) you can subscribe to the list by sending an email to ``support-request(at)friendi.ca?subject=subscribe``
* [Mailing List Archive](http://mailman.friendi.ca/mailman/listinfo/support-friendi.ca) you can subscribe to the list by sending an email to ``support-request(at)friendi.ca?subject=subscribe``
* Community chat rooms (the IRC, Matrix and XMPP rooms are bridget) these public chats are logged [from IRC](https://gnusociarg.nsupdate.info/2021/%23friendica/) and [Matrix](https://view.matrix.org/alias/%23friendi.ca:matrix.org/)
* Community chat rooms (the IRC, Matrix and XMPP rooms are bridged) these public chats are logged [from IRC](https://gnusociarg.nsupdate.info/2021/%23friendica/) and [Matrix](https://view.matrix.org/alias/%23friendi.ca:matrix.org/)
* XMPP/Jabber MUC: support(at)forum.friendi.ca
* XMPP/Jabber MUC: support(at)forum.friendi.ca
* IRC: #friendica at [libera.chat](https://web.libera.chat/?channels=#friendica)
* IRC: #friendica at [libera.chat](https://web.libera.chat/?channels=#friendica)
* Matrix: [#friendi.ca](https://matrix.to/#/#friendi.ca:matrix.org) or [#friendica-en](https://matrix.to/#/#friendica-en:matrix.org) at matrix.org
* Matrix: [#friendi.ca](https://matrix.to/#/#friendi.ca:matrix.org) or [#friendica-en](https://matrix.to/#/#friendica-en:matrix.org) at matrix.org
@ -81,6 +81,6 @@ Please refer to external documentation for a more detailed explanation how to se
### Database
### Database
There are scripts like [tuning-primer.sh](http://www.day32.com/MySQL/) and [mysqltuner.pl](http://mysqltuner.pl) that analyze your database server and give hints on values that could be changed.
There are scripts like [tuning-primer.sh](https://github.com/BMDan/tuning-primer.sh) and [mysqltuner.pl](https://github.com/major/MySQLTuner-perl/blob/master/mysqltuner.pl) that analyze your database server and give hints on values that could be changed.
Please enable the slow query log. This helps to find performance problems.
Please enable the slow query log. This helps to find performance problems.
@ -51,10 +51,13 @@ For alternative server configurations (such as Nginx server and MariaDB database
### Alternative Installation Methods
### Alternative Installation Methods
This guide will walk you through the manual installation process of Friendica.
This guide will walk you through the manual installation process of Friendica.
If this is nothing for you, you might be interested in
If this is nothing for you, you might be interested in the following:
* the [Friendica Docker image](https://github.com/friendica/docker) or
* the [Friendica Docker image](https://github.com/friendica/docker)
* how to [install Friendica with YunoHost](https://github.com/YunoHost-Apps/friendica_ynh).
* how to [install Friendica with YunoHost](https://github.com/YunoHost-Apps/friendica_ynh)
* [Tutorial: Creating a Friendica Server with Ubuntu 22.04](https://nequalsonelifestyle.com/2022/07/30/creating-friendica-server-ubuntu/)
* [Setting Up Friendica Daemon as a Systemd Service Tutorial](https://nequalsonelifestyle.com/2022/08/04/setting-up-friendica-daemon-systemd-service/)
* [Setting up Friendica on Unraid](https://www.jenovarain.com/2023/03/setting-up-friendica-on-unraid/) (NAS)
### Get Friendica
### Get Friendica
@ -228,7 +231,7 @@ Copy `.htaccess-dist` to `.htaccess` (be careful under Windows) to have working
Example:
Example:
cp .htacces-dist .htaccess
cp .htaccess-dist .htaccess
*Note*: Do **not** rename the `.htaccess-dist` file as it is tracked by GIT and renaming will cause a dirty working directory.
*Note*: Do **not** rename the `.htaccess-dist` file as it is tracked by GIT and renaming will cause a dirty working directory.
@ -350,7 +353,7 @@ Often this will need to be resolved with your hosting provider or (if self-hoste
First check your file permissions.
First check your file permissions.
Your website and all contents must generally be world-readable.
Your website and all contents must generally be world-readable.
Ensure that mod-rewite is installed and working, and that your `.htaccess` file
Ensure that mod-rewrite is installed and working, and that your `.htaccess` file
is being used. To verify the latter, create a file `test.out` containing the
is being used. To verify the latter, create a file `test.out` containing the
word "test" in the top directory of Friendica, make it world readable and point
word "test" in the top directory of Friendica, make it world readable and point
your web browser to
your web browser to
@ -463,9 +466,11 @@ After that, restart mysql and try again.
### Your worker never or rarely runs
### Your worker never or rarely runs
Friendica is coded to always play nice. It checks whether the host machine is idle enough and if it _seems_ to be overloaded, it intermittently refuses to process the worker queue.
Friendica is coded to always play nice.
It checks whether the host machine is idle enough and if it _seems_ to be overloaded, it intermittently refuses to process the worker queue.
Such checks originate from the days of single-user single-core machines and involves thresholds that you should adjust based on the number of exclusive CPU cores you have. See this issue for more information:
Such checks originate from the days of single-user single-core machines and involves thresholds that you should adjust based on the number of exclusive CPU cores you have.
@ -482,28 +487,40 @@ You tried to upload an image up to 100kB and it failed.
You may not have the ownership or file mode set correctly if you are using the file system storage backend.
You may not have the ownership or file mode set correctly if you are using the file system storage backend.
Change the backend to database. If this solves it, that is what needs to be fixed.
Change the backend to database.
If this solves it, that is what needs to be fixed.
Verify in your PHP ini:
* `file_uploads`: should be `1`
* `upload_tmp_dir`: should be writable (falls back to system default temp) and not blocked by `open_basedir`
### Error uploading large files
### Error uploading large files
You may find `413 Request Entity Too Large` or `500 Internal Error` in the network inspector of the browser if the file is too large, for example if it is a video.
You may find `413 Request Entity Too Large` or `500 Internal Error` in the network inspector of the browser if the file is too large, for example if it is a video.
First try to upload a very small file, up to 100kB. If that succeeds, you will need to increase limits at multiple places, including on any web proxy that you are using.
First try to upload a very small file, up to 100kB.
If that succeeds, you will need to increase limits at multiple places, including on any web proxy that you are using.
Which one applies to you depends on your installation.
In your PHP ini:
In your PHP ini:
* `upload_max_filesize`: defaults to 2MB
* `upload_max_filesize`: defaults to 2MB
* `post_max_size`: defaults to 8MB, must be greater than `upload_max_filesize`
* `post_max_size`: defaults to 8MB, must be greater than `upload_max_filesize`
* `memory_limit`: defaults to 128MB, must be greater than `post_max_size`
* `memory_limit`: defaults to 128MB, must be greater than `post_max_size`
* `max_input_time`: time limit of an upload, defaults to -1, meaning it uses `max_execution_time` instead
* `max_execution_time`: defaults to 30 seconds, should be enough if you also set `max_input_time`
You should verify whether you changed them in the _right file_ by checking the web interface at the end of the overview on the `Admin` panel.
You should verify whether you changed them in the _right file_ by checking the web interface at the end of the overview on the `Admin` panel.
For Apache2:
In your Apache2 config:
* `LimitRequestBody`: defaults to unlimited
* `LimitRequestBody`: defaults to unlimited
* `FcgidMaxRequestLen`: defaults to 128kB
* `SSLRenegBufferSize`: defaults to 128kB, only if your site uses TLS and perhaps only when using `SSLVerifyClient` or `SSLVerifyDepth`
* `SSLRenegBufferSize`: defaults to 128kB, only if your site uses TLS and perhaps only when using `SSLVerifyClient` or `SSLVerifyDepth`
* Remove `LoadModule reqtimeout_module modules / mod_reqtimeout.so` or adjust `RequestReadTimeout`: defaults to 20 seconds and >= 500 byte/second
For nginx:
In your nginx config:
* `client_max_body_size`: defaults to 1MB
* `client_max_body_size`: defaults to 1MB
@ -511,7 +528,28 @@ If you are using the database backend for storage, increase this in your SQL con
* `max_allowed_packet`: defaults to 32MB
* `max_allowed_packet`: defaults to 32MB
If you use the ModSecurity WAF:
In your ModSecurity WAF config:
* `SecRequestBodyLimit`: defaults to 12MB
* `SecRequestBodyLimit`: defaults to 12MB
* `SecRequestBodyNoFilesLimit`: defaults to 128kB, should not apply to Friendica
* `SecRequestBodyNoFilesLimit`: defaults to 128kB, should not apply to Friendica
In the end, you will need to restart all services that you have changed configuration for.
If you don't know which ones these are, just reboot.
### Diaspora support is not activated
You get this error when you try to add a Diaspora contact.
You can enable it from the web interface in `Admin -> Site -> Policies -> Enable diaspora* support`.
You may also set it manually in the config file or in the database within the `diaspora_enabled` key of the `system` category.
### Upgrade failed due to DB migration timeout
Altering of a table may fail if it contains a large number of rows.
First verify the existing timeout (50s by default):
`show global variables like "innodb_lock_wait_timeout";`
@ -50,12 +50,12 @@ This will take you through a similar process.
Connect to users of alternate networks
Connect to users of alternate networks
---
---
### Across the Federation and Fedivese
### Across the Federation and Fediverse
You can also use your Identity Address or other people's Identity Addresses to become friends across the so-called Federation/Fedivese of open source social media.
You can also use your Identity Address or other people's Identity Addresses to become friends across the so-called Federation/Fediverse of open source social media.
Currently, Friendica supports connections with people on diaspora*, Red, Hubzilla, GNU Social, StatusNet, Mastodon, Pleroma, socialhome, and ganggo platforms.
Currently, Friendica supports connections with people on diaspora*, Red, Hubzilla, GNU Social, StatusNet, Mastodon, Pleroma, socialhome, and ganggo platforms.
If you know (for instance) "alice" on gnusocial.net (a GNU Social site) you could put alice@gnusocial.net into your Contact page and become friends across networks.
If you know (for instance) "alice" on gnusocial.net (a GNU Social site) you could put alice@gnusocial.net into your Contact page and become friends across networks.
Likwise you can put in the URL to Alice's gnusocial.net page, if you wish.
Likewise you can put in the URL to Alice's gnusocial.net page, if you wish.
Note: Some versions of GNU Social software may require the full URL to your profile and may not work with the identity address.
Note: Some versions of GNU Social software may require the full URL to your profile and may not work with the identity address.
People on these networks can also initiate contact with you, if they know your contact details.
People on these networks can also initiate contact with you, if they know your contact details.
@ -74,7 +74,7 @@ Create an email contact with for example Alice on Gmail, enter her email in foll
In order to avoid abuse or spam, you must have an email from Alice with the correct email address in your email inbox.
In order to avoid abuse or spam, you must have an email from Alice with the correct email address in your email inbox.
Subscribing to mailing lists is done in the same way, but without the use of the "mailto:" prefix.
Subscribing to mailing lists is done in the same way, but without the use of the "mailto:" prefix.
To subscribe to a mailing list, enter the email in following example format "mailling-list@list-server.net".
To subscribe to a mailing list, enter the email in following example format "mailing-list@list-server.net".
### Syndication feeds
### Syndication feeds
You can "follow" almost anybody or any website that produces a syndication feed (RSS/Atom,etc.).
You can "follow" almost anybody or any website that produces a syndication feed (RSS/Atom,etc.).
@ -4,7 +4,7 @@ If you're not already logged in, do so in the frame below.
Once you've logged in (or if you are already logged in), you'll now be looking at your profile page.
Once you've logged in (or if you are already logged in), you'll now be looking at your profile page.
This is a bit like a Facebook wall.
This is a bit like a Facebook wall.
It's where all your status messgages are kept, and where your friends come to post on your wall.
It's where all your status messages are kept, and where your friends come to post on your wall.
To write your status, simply click on the Pencil & Paper icon in the top right (in the Frio theme), or click in the box that says "share" (other themes).
To write your status, simply click on the Pencil & Paper icon in the top right (in the Frio theme), or click in the box that says "share" (other themes).
When you do this, the posting dialog box will appear or the share box will expand.
When you do this, the posting dialog box will appear or the share box will expand.
@ -13,7 +13,7 @@ If 2FA is already enabled and you want to add another device, you must re-config
### 1. Download an authenticator app
### 1. Download an authenticator app
Any authenticator app should work with Friendica.
Any authenticator app should work with Friendica.
Notheless, we recommend:
Nonetheless, we recommend:
- For iOS, [Matt Rubin's MIT-licensed Authenticator app](https://mattrubin.me/authenticator).
- For iOS, [Matt Rubin's MIT-licensed Authenticator app](https://mattrubin.me/authenticator).
- For Android, [andOTP](https://github.com/andOTP/andOTP).
- For Android, [andOTP](https://github.com/andOTP/andOTP).
@ -68,7 +68,7 @@ Instead, if you enabled two-factor authentication, you have to generate app-spec
You can generate as many app-specific passwords as you want, they will be shown once to you just after you generated it.
You can generate as many app-specific passwords as you want, they will be shown once to you just after you generated it.
Just copy and paste it in your third-party app in the Friendica account password input field at this point.
Just copy and paste it in your third-party app in the Friendica account password input field at this point.
We recommend generating a single app-specific password for each separate third-party app you are using, using a meaningul description of the target app (like "Frienqa on my Fairphone 2").
We recommend generating a single app-specific password for each separate third-party app you are using, using a meaningful description of the target app (like "Frienqa on my Fairphone 2").
You can also revoke any and all app-specific password you generated this way.
You can also revoke any and all app-specific password you generated this way.
This may log you out of the third-party application(s) you used the revoked app-specific password to log in with.
This may log you out of the third-party application(s) you used the revoked app-specific password to log in with.
@ -38,17 +38,14 @@ $function ist ein String und der Name der Funktion, die ausgeführt wird, wenn d
Argumente
Argumente
---
---
Deine Hook-Callback-Funktion wird mit mindestens einem und bis zu zwei Argumenten aufgerufen
Deine Hook-Callback-Funktion wird mit höchstens einem Argumenten aufgerufen
function myhook_function(App $a, &$b) {
function myhook_function(&$b) {
}
}
Wenn du Änderungen an den aufgerufenen Daten vornehmen willst, musst du diese als Referenzvariable (mit "&") während der Funktionsdeklaration deklarieren.
Wenn du Änderungen an den aufgerufenen Daten vornehmen willst, musst du diese als Referenzvariable (mit "&") während der Funktionsdeklaration deklarieren.
$a ist die Friendica "App"-Klasse, die eine Menge an Informationen über den aktuellen Friendica-Status beinhaltet, u.a. welche Module genutzt werden, Konfigurationsinformationen, Inhalte der Seite zum Zeitpunkt des Hook-Aufrufs.
Es ist empfohlen, diese Funktion "$a" zu nennen, um seine Nutzung an den Gebrauch an anderer Stelle anzugleichen.
$b kann frei benannt werden.
$b kann frei benannt werden.
Diese Information ist speziell auf den Hook bezogen, der aktuell bearbeitet wird, und beinhaltet normalerweise Daten, die du sofort nutzen, anzeigen oder bearbeiten kannst.
Diese Information ist speziell auf den Hook bezogen, der aktuell bearbeitet wird, und beinhaltet normalerweise Daten, die du sofort nutzen, anzeigen oder bearbeiten kannst.
Achte darauf, diese mit "&" zu deklarieren, wenn du sie bearbeiten willst.
Achte darauf, diese mit "&" zu deklarieren, wenn du sie bearbeiten willst.
@ -70,9 +67,9 @@ DI::args()->get(1); // = 'arg1'
DI::args()->get(2); // = 'arg2'
DI::args()->get(2); // = 'arg2'
```
```
Deine Modulfunktionen umfassen oft die Funktion addon_name_content(App $a), welche den Seiteninhalt definiert und zurückgibt.
Deine Modulfunktionen umfassen oft die Funktion `addon_name_content()`, welche den Seiteninhalt definiert und zurückgibt.
Sie können auch addon_name_post(App $a) umfassen, welches vor der content-Funktion aufgerufen wird und normalerweise die Resultate der POST-Formulare handhabt.
Sie können auch `addon_name_post()` umfassen, welches vor der content-Funktion aufgerufen wird und normalerweise die Resultate der POST-Formulare handhabt.
Du kannst ebenso addon_name_init(App $a) nutzen, was oft frühzeitig aufgerufen wird und das Modul initialisert.
Du kannst ebenso `addon_name_init()` nutzen, was oft frühzeitig aufgerufen wird und das Modul initialisert.
Derzeitige Hooks
Derzeitige Hooks
@ -86,7 +83,7 @@ Derzeitige Hooks
'user_record' => die erfolgreiche Authentifizierung muss auch einen gültigen Nutzereintrag aus der Datenbank zurückgeben
'user_record' => die erfolgreiche Authentifizierung muss auch einen gültigen Nutzereintrag aus der Datenbank zurückgeben
**'logged_in'** - wird aufgerufen, sobald ein Nutzer sich erfolgreich angemeldet hat.
**'logged_in'** - wird aufgerufen, sobald ein Nutzer sich erfolgreich angemeldet hat.
$b beinhaltet den $a->Nutzer-Array
$b beinhaltet den `App->user`
**'display_item'** - wird aufgerufen, wenn ein Beitrag für die Anzeige formatiert wird.
**'display_item'** - wird aufgerufen, wenn ein Beitrag für die Anzeige formatiert wird.
@ -122,7 +119,7 @@ Derzeitige Hooks
**'profile_advanced'** - wird aufgerufen, wenn die HTML-Ausgabe für das "Advanced profile" generiert wird; stimmt mit dem "Profil"-Tab auf der Profilseite der Nutzer überein.
**'profile_advanced'** - wird aufgerufen, wenn die HTML-Ausgabe für das "Advanced profile" generiert wird; stimmt mit dem "Profil"-Tab auf der Profilseite der Nutzer überein.
$b ist die HTML-Ausgabe (String) des erstellten Profils
$b ist die HTML-Ausgabe (String) des erstellten Profils
(Die Details des Profil-Arrays sind in $a->profile)
(Die Details des Profil-Arrays sind in `App->profile`)
**'directory_item'** - wird von der Verzeichnisseite aufgerufen, wenn ein Item für die Anzeige formatiert wird.
**'directory_item'** - wird von der Verzeichnisseite aufgerufen, wenn ein Item für die Anzeige formatiert wird.
$b ist ein Array
$b ist ein Array
@ -400,6 +397,7 @@ Eine komplette Liste aller Hook-Callbacks mit den zugehörigen Dateien (am 01-Ap
@ -95,6 +95,6 @@ Nutze externe Dokumente, um eine detailiertere Erklärung für die Einrichtung e
### Database
### Database
Es gibt Skripte wie [tuning-primer.sh](http://www.day32.com/MySQL/) und [mysqltuner.pl](http://mysqltuner.pl), die den Datenbankserver analysieren und Hinweise darauf geben, welche Werte verändert werden könnten.
Es gibt Skripte wie [tuning-primer.sh](https://github.com/BMDan/tuning-primer.sh) und [mysqltuner.pl](https://github.com/major/MySQLTuner-perl/blob/master/mysqltuner.pl), die den Datenbankserver analysieren und Hinweise darauf geben, welche Werte verändert werden könnten.
Aktivere hierfür die "Slow query" Log-Datei, um Performanceprobleme zu erkennen.
Aktivere hierfür die "Slow query" Log-Datei, um Performanceprobleme zu erkennen.
To guarantee a consistent look and feel for input forms, i.e. in the settings sections, there are templates for the basic form fields.
To guarantee a consistent look and feel for input forms, i.e. in the settings sections, there are templates for the basic form fields.
They are initialized with an array of data, depending on the tyle of the field.
They are initialized with an array of data, depending on the tyle of the field.
All of these take an array holding the values, e.g. for a one line text input field, which is required and should be used to type email addesses use something along the lines of:
All of these take an array holding the values, e.g. for a one line text input field, which is required and should be used to type email addresses use something along the lines of:
'$adminmail' => array('adminmail', DI::l10n()->t('Site administrator email address'), $adminmail, DI::l10n()->t('Your account email address must match this in order to use the web admin panel.'), 'required', '', 'email'),
'$adminmail' => array('adminmail', DI::l10n()->t('Site administrator email address'), $adminmail, DI::l10n()->t('Your account email address must match this in order to use the web admin panel.'), 'required', '', 'email'),
@ -70,7 +70,7 @@ Field parameter:
### field_custom.tpl
### field_custom.tpl
A customizeable template to include a custom element in the form with the usual surroundings,
A customizable template to include a custom element in the form with the usual surroundings,
Field parameter:
Field parameter:
0. Name of the field,
0. Name of the field,
@ -88,7 +88,7 @@ Field parameter:
2. Current value of the variable,
2. Current value of the variable,
3. Help text for the input box,
3. Help text for the input box,
4. Should be set to the translation of "Required" to mark this field as required,
4. Should be set to the translation of "Required" to mark this field as required,
5. if set to "autofocus" modern browser will put the cursur into this box once the page is loaded,
5. if set to "autofocus" modern browser will put the cursor into this box once the page is loaded,
6. if set, it will be used for the input type, default is `text` (possible types: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#%3Cinput%3E_types).
6. if set, it will be used for the input type, default is `text` (possible types: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#%3Cinput%3E_types).
@ -12,7 +12,7 @@ So, how to work on the UI of friendica.
You can either directly edit an existing theme.
You can either directly edit an existing theme.
But you might loose your changes when the theme is updated by the friendica team.
But you might loose your changes when the theme is updated by the friendica team.
If you are almost happy with an existing theme, the easiest way to cover your needs is to create a new theme, inheritating most of the properties of the parent theme and change just minor stuff.
If you are almost happy with an existing theme, the easiest way to cover your needs is to create a new theme, inheriting most of the properties of the parent theme and change just minor stuff.
The below for a more detailed description of theme heritage.
The below for a more detailed description of theme heritage.
Some themes also allow users to select *variants* of the theme.
Some themes also allow users to select *variants* of the theme.
@ -33,7 +33,7 @@ In most cases, you can found these in
/view/theme/**your-theme-name**/style.css
/view/theme/**your-theme-name**/style.css
sometimes, there is also a file called style.php in the theme directory.
sometimes, there is also a file called style.php in the theme directory.
This is only needed if the theme allowes the user to change certain things of the theme dynamically.
This is only needed if the theme allows the user to change certain things of the theme dynamically.
Say the font size or set a background image.
Say the font size or set a background image.
### Templates
### Templates
@ -50,7 +50,7 @@ if you want to override any template within your theme create your version of th
any template that exists there will be used instead of the default one.
any template that exists there will be used instead of the default one.
### Javascript
### JavaScript
The same rule applies to the JavaScript files found in
The same rule applies to the JavaScript files found in
The Friendica translation process is based on `gettext` PO files.
The Friendica translation process is based on `gettext` PO files.
Basic worflow:
Basic workflow:
1. `xgettext` is used to collect translation strings across the project in the authoritative PO file located in `view/lang/C/messages.po`.
1. `xgettext` is used to collect translation strings across the project in the authoritative PO file located in `view/lang/C/messages.po`.
2. This file makes translations strings available at [the Transifex Friendica page](https://www.transifex.com/Friendica/friendica/dashboard/).
2. This file makes translations strings available at [the Transifex Friendica page](https://app.transifex.com/Friendica/friendica/dashboard/).
3. The translation itself is done at Transifex by volunteers.
3. The translation itself is done at Transifex by volunteers.
4. The resulting PO files by languages are manually updated in `view/lang/<language>/messages.po`.
4. The resulting PO files by languages are manually updated in `view/lang/<language>/messages.po`.
5. PO files are converted to PHP arrays in `view/lang/<language>/strings.php` that are ultimately used by Friendica to display the translations.
5. PO files are converted to PHP arrays in `view/lang/<language>/strings.php` that are ultimately used by Friendica to display the translations.
@ -17,13 +17,23 @@ Basic worflow:
## Translate Friendica in your favorite language
## Translate Friendica in your favorite language
Thank you for your interest in improving Friendica's translation!
Thank you for your interest in improving Friendica's translation!
Please register a free Transifex account and ask over at [the Transifex Friendica page](https://www.transifex.com/Friendica/friendica/dashboard/) to join the translation team for your favorite language.
Please register a free Transifex account and ask over at [the Transifex Friendica page](https://app.transifex.com/Friendica/friendica/dashboard/) to join the translation team for your favorite language.
As a rule of thumb, we add support for a language in Friendica when at least 50% of the strings have been translated to avoid a scattered experience.
As a rule of thumb, we add support for a language in Friendica when at least 50% of the strings have been translated to avoid a scattered experience.
For addons, we add support for a language when if we already support the language in Friendica.
For addons, we add support for a language when if we already support the language in Friendica.
## Add new translation strings
## Add new translation strings
### Supported gettext version
We currently support the gettext version 0.19.8.1 and actively check new translation strings with this version.
If you don't use this version, it's possible that our checks fail (f.e. because of tiny differences at linebreaks).
In case you do have a Docker environment, you can easily update the translations with the following command:
```shell
docker run --rm -v $PWD:/data -w /data friendicaci/transifex bin/run_xgettext.sh
```
### Core
### Core
Once you have added new translation strings in your code changes, please run `bin/run_xgettext.sh` from the base Friendica directory and commit the updated `view/lang/C/messages.po` to your branch.
Once you have added new translation strings in your code changes, please run `bin/run_xgettext.sh` from the base Friendica directory and commit the updated `view/lang/C/messages.po` to your branch.
@ -56,11 +66,11 @@ To use it, first create a configuration file with your credentials.
On Linux this file should be placed into your home directory `~/.transifexrc`.
On Linux this file should be placed into your home directory `~/.transifexrc`.
The content of the file should be something like the following:
The content of the file should be something like the following:
[https://www.transifex.com]
[https://app.transifex.com]
username = user
username = user
token =
token =
password = p@ssw0rd
password = p@ssw0rd
hostname = https://www.transifex.com
hostname = https://app.transifex.com
Since Friendica version 3.5.1 we ship configuration files for the Transifex client in the core repository and the addon repository in `.tx/config`.
Since Friendica version 3.5.1 we ship configuration files for the Transifex client in the core repository and the addon repository in `.tx/config`.
To update the PO files after you have translated strings of e.g. Esperanto on the Transifex website you can use `tx` to download the updated PO file in the right location.
To update the PO files after you have translated strings of e.g. Esperanto on the Transifex website you can use `tx` to download the updated PO file in the right location.
@ -32,5 +32,9 @@ Please check software documentation to know how modify these examples to make th
Sample systemd unit files to start worker.php periodically.
Sample systemd unit files to start worker.php periodically.
Please place them in the correct location for your system, typically this is `/etc/systemd/system/friendicaworker.timer` and `/etc/systemd/system/friendicaworker.service`.
Please place them in the correct location for your system, typically this is `/etc/systemd/system/friendicaworker.timer` and `/etc/systemd/system/friendicaworker.service`.
Please report problems and improvements to `!helpers@forum.friendi.ca` and `@utzer@social.yl.ms` or open an issue in [the Github Friendica page](https://github.com/friendica/friendica/issues).
Please report problems and improvements to `!helpers@forum.friendi.ca` and `@utzer@social.yl.ms` or open an issue in [the GitHub Friendica page](https://github.com/friendica/friendica/issues).
This is for usage of systemd instead of cron to start the worker periodically, the solution is a work-in-progress and can surely be improved.
This is for usage of systemd instead of cron to start the worker periodically, the solution is a work-in-progress and can surely be improved.
## `phpstorm-code-style.xml`
PHP Storm Code Style settings, used for this codebase
*Please copy the whole script, not only the part mentioned here!*
*Please copy the whole script, not only the part mentioned here!*
Then create a new bookmark, give it a name like "share2Friendica" and paste the script in the address field. Save it. Now you can click on that bookmarklet every time you want to share a website, you are currently reading. A new small window will open where title is prefilled and the website you want to share is put as attachement in the body of the new post.
Then create a new bookmark, give it a name like "share2Friendica" and paste the script in the address field. Save it. Now you can click on that bookmarklet every time you want to share a website, you are currently reading. A new small window will open where title is prefilled and the website you want to share is put as attachment in the body of the new post.
## Additional notes if it doesn't work
## Additional notes if it doesn't work
Some files were not shown because too many files have changed in this diff
Show More
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.