Merge pull request #3731 from tobiasd/20170924-doc
some more stuff for the docs
This commit is contained in:
commit
0e4845b58a
7 changed files with 51 additions and 27 deletions
|
@ -994,7 +994,8 @@ The following API calls from the Twitter API are not implemented in either Frien
|
||||||
/usr/bin/curl -u USER:PASS https://YOUR.FRIENDICA.TLD/api/statuses/update.xml -d source="some source id" -d status="the status you want to post"
|
/usr/bin/curl -u USER:PASS https://YOUR.FRIENDICA.TLD/api/statuses/update.xml -d source="some source id" -d status="the status you want to post"
|
||||||
|
|
||||||
### Python
|
### Python
|
||||||
The [RSStoFriedika](https://github.com/pafcu/RSStoFriendika) code can be used as an example of how to use the API with python. The lines for posting are located at [line 21](https://github.com/pafcu/RSStoFriendika/blob/master/RSStoFriendika.py#L21) and following.
|
The [RSStoFriedika](https://github.com/pafcu/RSStoFriendika) code can be used as an example of how to use the API with python.
|
||||||
|
The lines for posting are located at [line 21](https://github.com/pafcu/RSStoFriendika/blob/master/RSStoFriendika.py#L21) and following.
|
||||||
|
|
||||||
def tweet(server, message, group_allow=None):
|
def tweet(server, message, group_allow=None):
|
||||||
url = server + '/api/statuses/update'
|
url = server + '/api/statuses/update'
|
||||||
|
|
|
@ -38,7 +38,8 @@ The class `ItemsManager` has been declared in the `Friendica` namespace.
|
||||||
Namespaces are useful to keep classes separated and avoid names conflicts (could be that a library you want to use also defines a class named `ItemsManager`, but as long as it is in another namespace, you don't have any problem)
|
Namespaces are useful to keep classes separated and avoid names conflicts (could be that a library you want to use also defines a class named `ItemsManager`, but as long as it is in another namespace, you don't have any problem)
|
||||||
|
|
||||||
Let's say now that you need to load some items in a view, maybe in a fictional `mod/network.php`.
|
Let's say now that you need to load some items in a view, maybe in a fictional `mod/network.php`.
|
||||||
In order for the Composer autoloader to work, it must first be included. In Friendica this is already done at the top of `boot.php`, with `require_once('vendor/autoload.php');`.
|
In order for the Composer autoloader to work, it must first be included.
|
||||||
|
In Friendica this is already done at the top of `boot.php`, with `require_once('vendor/autoload.php');`.
|
||||||
|
|
||||||
The code will be something like:
|
The code will be something like:
|
||||||
|
|
||||||
|
@ -58,7 +59,8 @@ function network_content(App $a) {
|
||||||
That's a quite simple example, but look: no `require()`!
|
That's a quite simple example, but look: no `require()`!
|
||||||
If you need to use a class, you can simply use it and you don't need to do anything else.
|
If you need to use a class, you can simply use it and you don't need to do anything else.
|
||||||
|
|
||||||
Going further: now we have a bunch of `*Manager` classes that cause some code duplication, let's define a `BaseManager` class, where we move all common code between all managers:
|
Going further: now we have a bunch of `*Manager` classes that cause some code duplication.
|
||||||
|
Let's define a `BaseManager` class, where we move all common code between all managers:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
// src/BaseManager.php
|
// src/BaseManager.php
|
||||||
|
@ -194,4 +196,4 @@ So you can think of namespaces as folders in a Unix file system, with global sco
|
||||||
## Related
|
## Related
|
||||||
|
|
||||||
* [Using Composer](help/Composer)
|
* [Using Composer](help/Composer)
|
||||||
* [How To Move Classes to `src`](help/Developer-How-To-Move-Classes-to-src)
|
* [How To Move Classes to `src`](help/Developer-How-To-Move-Classes-to-src)
|
||||||
|
|
|
@ -53,6 +53,7 @@ Friendica - Dokumentation und Ressourcen
|
||||||
* [Using Composer](help/Composer) (EN)
|
* [Using Composer](help/Composer) (EN)
|
||||||
* [Code-Referenz (mit doxygen generiert - setzt Cookies)](doc/html/)
|
* [Code-Referenz (mit doxygen generiert - setzt Cookies)](doc/html/)
|
||||||
* [Twitter/GNU Social API Functions](help/api) (EN)
|
* [Twitter/GNU Social API Functions](help/api) (EN)
|
||||||
|
* [Translation of Friendica](help/translations) (EN)
|
||||||
|
|
||||||
**Externe Ressourcen**
|
**Externe Ressourcen**
|
||||||
|
|
||||||
|
|
|
@ -59,15 +59,17 @@ When you publish an event, you can choose who shall receive it, as with a regula
|
||||||
The recipients will see the posting about the event in their network-stream.
|
The recipients will see the posting about the event in their network-stream.
|
||||||
Additionally it will be added to their calendar and thus be shown in their events overview page.
|
Additionally it will be added to their calendar and thus be shown in their events overview page.
|
||||||
|
|
||||||
Recipients of the event-posting can comment or dis-/like the event, as with a regular posting, and also announce that they will attend, not attend or may-be attend the event with a single click.
|
Recipients of the event-posting can comment or dis-/like the event, as with a regular posting.
|
||||||
|
Furthermore they can announce that they will attend, not attend or may-be attend the event with a single click.
|
||||||
|
|
||||||
### Addons
|
### Addons
|
||||||
|
|
||||||
#### OpenStreetMap
|
#### OpenStreetMap
|
||||||
|
|
||||||
If this addon is activated on you friendica node, the content of the location field will be matched with the identification service of OSM when you submit the event.
|
If this addon is activated on your friendica node, the content of the location field will be matched with the identification service of OSM when you submit the event.
|
||||||
Should OSM find anything matching, a map for the location will be embedded automatically at the end of the events view.
|
Should OSM find anything matching, a map for the location will be embedded automatically at the end of the events view.
|
||||||
|
|
||||||
#### Calendar Export
|
#### Calendar Export
|
||||||
|
|
||||||
If this addon is activated the public events you have created will be published in ical or csv file. The URL of the published file is ``example.com/cal/nickname/export/format`` (where format is either ical of csv).
|
If this addon is activated the public events you have created will be published in ical or csv file.
|
||||||
|
The URL of the published file is ``example.com/cal/nickname/export/format`` (where format is either ical of csv).
|
||||||
|
|
|
@ -6,7 +6,8 @@ Config values that can only be set in .htconfig.php
|
||||||
There are some config values that haven't found their way into the administration page.
|
There are some config values that haven't found their way into the administration page.
|
||||||
This has several reasons.
|
This has several reasons.
|
||||||
Maybe they are part of a current development that isn't considered stable and will be added later in the administration page when it is considered safe.
|
Maybe they are part of a current development that isn't considered stable and will be added later in the administration page when it is considered safe.
|
||||||
Or it triggers something that isn't expected to be of public interest. Or it is for testing purposes only.
|
Or it triggers something that isn't expected to be of public interest.
|
||||||
|
Or it is for testing purposes only.
|
||||||
|
|
||||||
**Attention:** Please be warned that you shouldn't use one of these values without the knowledge what it could trigger.
|
**Attention:** Please be warned that you shouldn't use one of these values without the knowledge what it could trigger.
|
||||||
Especially don't do that with undocumented values.
|
Especially don't do that with undocumented values.
|
||||||
|
@ -98,7 +99,7 @@ Example: To set the directory value please add this line to your .htconfig.php:
|
||||||
|
|
||||||
* **upgrade_link** -
|
* **upgrade_link** -
|
||||||
|
|
||||||
## experimentals ##
|
## experimental ##
|
||||||
|
|
||||||
* **exp_themes** (Boolean) - Show experimental themes as well.
|
* **exp_themes** (Boolean) - Show experimental themes as well.
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@ Install an ejabberd with synchronized credentials
|
||||||
|
|
||||||
* [Home](help)
|
* [Home](help)
|
||||||
|
|
||||||
[Ejabberd](https://www.ejabberd.im/) is a chat server that uses XMPP as messaging protocol that you can use with a large amount of clients. In conjunction
|
[Ejabberd](https://www.ejabberd.im/) is a chat server that uses XMPP as messaging protocol that you can use with a large amount of clients.
|
||||||
with the "xmpp" addon it can be used for a web based chat solution for your users.
|
In conjunction with the "xmpp" addon it can be used for a web based chat solution for your users.
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
|
@ -3,7 +3,8 @@ Friendica Templating Documentation
|
||||||
|
|
||||||
* [Home](help)
|
* [Home](help)
|
||||||
|
|
||||||
Friendica uses [Smarty 3](http://www.smarty.net/) as PHP templating engine. The main templates are found in
|
Friendica uses [Smarty 3](http://www.smarty.net/) as PHP templating engine.
|
||||||
|
The main templates are found in
|
||||||
|
|
||||||
/view/templates
|
/view/templates
|
||||||
|
|
||||||
|
@ -33,9 +34,10 @@ where the value may as well be an array by its own.
|
||||||
Form Templates
|
Form Templates
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
All of these take an array for holding the values, eg,. 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 addesses use something along the lines of:
|
||||||
|
|
||||||
'$adminmail' => array('adminmail', t('Site administrator email address'), $adminmail, t('Your account email address must match this in order to use the web admin panel.'), 'required', '', 'email'),
|
'$adminmail' => array('adminmail', t('Site administrator email address'), $adminmail, t('Your account email address must match this in order to use the web admin panel.'), 'required', '', 'email'),
|
||||||
|
|
||||||
|
@ -45,7 +47,9 @@ Listed below are the template file names, the general purpose of the template an
|
||||||
|
|
||||||
### field_checkbox.tpl
|
### field_checkbox.tpl
|
||||||
|
|
||||||
A checkbox. If the checkbox is checked its value is **1**. Field parameter:
|
A checkbox.
|
||||||
|
If the checkbox is checked its value is **1**.
|
||||||
|
Field parameter:
|
||||||
|
|
||||||
0. Name of the checkbox,
|
0. Name of the checkbox,
|
||||||
1. Label for the checkbox,
|
1. Label for the checkbox,
|
||||||
|
@ -54,7 +58,8 @@ A checkbox. If the checkbox is checked its value is **1**. Field parameter:
|
||||||
|
|
||||||
### field_combobox.tpl
|
### field_combobox.tpl
|
||||||
|
|
||||||
A combobox, combining a pull down selection and a textual input field. Field parameter:
|
A combobox, combining a pull down selection and a textual input field.
|
||||||
|
Field parameter:
|
||||||
|
|
||||||
0. Name of the combobox,
|
0. Name of the combobox,
|
||||||
1. Label for the combobox,
|
1. Label for the combobox,
|
||||||
|
@ -65,7 +70,8 @@ A combobox, combining a pull down selection and a textual input field. Field par
|
||||||
|
|
||||||
### field_custom.tpl
|
### field_custom.tpl
|
||||||
|
|
||||||
A customizeable template to include a custom element in the form with the usual surroundings, Field parameter:
|
A customizeable template to include a custom element in the form with the usual surroundings,
|
||||||
|
Field parameter:
|
||||||
|
|
||||||
0. Name of the field,
|
0. Name of the field,
|
||||||
1. Label for the field,
|
1. Label for the field,
|
||||||
|
@ -74,7 +80,8 @@ A customizeable template to include a custom element in the form with the usual
|
||||||
|
|
||||||
### field_input.tpl
|
### field_input.tpl
|
||||||
|
|
||||||
A single line input field for textual input. Field parameter:
|
A single line input field for textual input.
|
||||||
|
Field parameter:
|
||||||
|
|
||||||
0. Name of the field,
|
0. Name of the field,
|
||||||
1. Label for the input box,
|
1. Label for the input box,
|
||||||
|
@ -86,7 +93,8 @@ A single line input field for textual input. Field parameter:
|
||||||
|
|
||||||
### field_intcheckbox.tpl
|
### field_intcheckbox.tpl
|
||||||
|
|
||||||
A checkbox (see above) but you can define the value of it. Field parameter:
|
A checkbox (see above) but you can define the value of it.
|
||||||
|
Field parameter:
|
||||||
|
|
||||||
0. Name of the checkbox,
|
0. Name of the checkbox,
|
||||||
1. Label for the checkbox,
|
1. Label for the checkbox,
|
||||||
|
@ -96,7 +104,8 @@ A checkbox (see above) but you can define the value of it. Field parameter:
|
||||||
|
|
||||||
### field_openid.tpl
|
### field_openid.tpl
|
||||||
|
|
||||||
An input box (see above) but prepared for special CSS styling for openID input. Field parameter:
|
An input box (see above) but prepared for special CSS styling for openID input.
|
||||||
|
Field parameter:
|
||||||
|
|
||||||
0. Name of the field,
|
0. Name of the field,
|
||||||
1. Label for the input box,
|
1. Label for the input box,
|
||||||
|
@ -105,7 +114,9 @@ An input box (see above) but prepared for special CSS styling for openID input.
|
||||||
|
|
||||||
### field_password.tpl
|
### field_password.tpl
|
||||||
|
|
||||||
A single line input field (see above) for textual input. The characters typed in will not be shown by the browser. Field parameter:
|
A single line input field (see above) for textual input.
|
||||||
|
The characters typed in will not be shown by the browser.
|
||||||
|
Field parameter:
|
||||||
|
|
||||||
0. Name of the field,
|
0. Name of the field,
|
||||||
1. Label for the field,
|
1. Label for the field,
|
||||||
|
@ -116,7 +127,8 @@ A single line input field (see above) for textual input. The characters typed in
|
||||||
|
|
||||||
### field_radio.tpl
|
### field_radio.tpl
|
||||||
|
|
||||||
A radio button. Field parameter:
|
A radio button.
|
||||||
|
Field parameter:
|
||||||
|
|
||||||
0. Name of the radio button,
|
0. Name of the radio button,
|
||||||
1. Label for the radio button,
|
1. Label for the radio button,
|
||||||
|
@ -126,7 +138,8 @@ A radio button. Field parameter:
|
||||||
|
|
||||||
### field_richtext.tpl
|
### field_richtext.tpl
|
||||||
|
|
||||||
A multi-line input field for *rich* textual content. Field parameter:
|
A multi-line input field for *rich* textual content.
|
||||||
|
Field parameter:
|
||||||
|
|
||||||
0. Name of the input field,
|
0. Name of the input field,
|
||||||
1. Label for the input box,
|
1. Label for the input box,
|
||||||
|
@ -135,7 +148,8 @@ A multi-line input field for *rich* textual content. Field parameter:
|
||||||
|
|
||||||
### field_select.tpl
|
### field_select.tpl
|
||||||
|
|
||||||
A drop down selection box. Field parameter:
|
A drop down selection box.
|
||||||
|
Field parameter:
|
||||||
|
|
||||||
0. Name of the field,
|
0. Name of the field,
|
||||||
1. Label of the selection box,
|
1. Label of the selection box,
|
||||||
|
@ -145,7 +159,8 @@ A drop down selection box. Field parameter:
|
||||||
|
|
||||||
### field_select_raw.tpl
|
### field_select_raw.tpl
|
||||||
|
|
||||||
A drop down selection box (see above) but you have to prepare the values yourself. Field parameter:
|
A drop down selection box (see above) but you have to prepare the values yourself.
|
||||||
|
Field parameter:
|
||||||
|
|
||||||
0. Name of the field,
|
0. Name of the field,
|
||||||
1. Label of the selection box,
|
1. Label of the selection box,
|
||||||
|
@ -155,7 +170,8 @@ A drop down selection box (see above) but you have to prepare the values yoursel
|
||||||
|
|
||||||
### field_textarea.tpl
|
### field_textarea.tpl
|
||||||
|
|
||||||
A multi-line input field for (plain) textual content. Field parameter:
|
A multi-line input field for (plain) textual content.
|
||||||
|
Field parameter:
|
||||||
|
|
||||||
0. Name of the input field,
|
0. Name of the input field,
|
||||||
1. Label for the input box,
|
1. Label for the input box,
|
||||||
|
@ -164,7 +180,8 @@ A multi-line input field for (plain) textual content. Field parameter:
|
||||||
|
|
||||||
### field_yesno.tpl
|
### field_yesno.tpl
|
||||||
|
|
||||||
A button that has two states *yes* or *no*. Field parameter:
|
A button that has two states *yes* or *no*.
|
||||||
|
Field parameter:
|
||||||
|
|
||||||
0. Name of the input field,
|
0. Name of the input field,
|
||||||
1. Label for the button,
|
1. Label for the button,
|
||||||
|
|
Loading…
Reference in a new issue