Commit graph

68 commits

Author SHA1 Message Date
logmanoriginal
d80efed1f4 [Bridge] Use space indentation everywhere 2016-08-24 18:09:34 +02:00
Pierre Mazière
581bff166c [core] makes 'bridge' and 'format' parameters value less verbose
remove the requirement for 'Format' and 'Bridge' suffixes:
https://example.com/?action=display&bridge=Twitter&format=Atom&u=user

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-23 14:34:07 +02:00
Pierre Mazière
eb3392db82 [core] simplify dynamic formats discovery
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-23 14:29:53 +02:00
Pierre Mazière
b3af604cc1 [core] remove useless static methods
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-23 13:44:23 +02:00
logmanoriginal
d5db4f5859 [RssBridge] Remove require for Item.php 2016-08-22 18:58:22 +02:00
logmanoriginal
7b890da8f2 [Item] Remove file 2016-08-22 18:57:49 +02:00
Pierre Mazière
dc4f16fbe4 [core] remove JSON based paramter definition related code
bye bye JSON

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-22 01:33:14 +02:00
Pierre Mazière
2f09ae56ad [core] render two levels 'values' parameter property with optgroup
example:
$parameterSet=array(
  'feed'=>array(
     'name'=>'Feed',
     'type'=>'list',
     'values'=>array(
        'list A'=>array(
           'feed A1'=>'fA1',
           'feed A2'=>'fA2'
        ),
        'list B'=>array(
           'feed B1'=>'fB1',
           'feed B2'=>'fB2
        )
     )
  )
);

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-22 01:23:20 +02:00
Pierre Mazière
4717de9d08 [core] allow BridgeCard to be build from parameters stored in an array
The array structure is as follow:
$parameterSet=array(
 'identifier'=>array(
    'property'=>'property_value'
     …
 )
);

'values' property is stored as an associative array where
the key is the displayed string and the value is the value (sic)
attached to this string.


Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-22 01:16:06 +02:00
Pierre Mazière
10cd3a61a9 check for PROXY_NAME definition before using it
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-19 10:20:27 +02:00
Pierre Mazière
86515a1560 core: use proxy when defined in RssExpander
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-19 10:20:27 +02:00
Pierre Mazière
226484ba22 core: remove useless HttpCachingBridgeAbstract::download_remote()
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-19 10:20:27 +02:00
Pierre Mazière
fe58d23c17 core: use proxy when defined in HttpCachingBridgeAbstract
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-19 10:20:27 +02:00
Pierre Mazière
d74beb6c6a core: move message() method to parent class BridgeAbstract
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-19 10:20:27 +02:00
Pierre Mazière
f43bbda83e core: split and rename BridgeAbstract::file_get_html
We need to have one method to get the data, potentially
using the proxy if defined, and one method to get the Simple
DOM HTML object from these data, with a more informative name

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-19 10:19:56 +02:00
Pierre Mazière
d71674d2ba proxy settings must be the service provider decision
therefore, the provider decides if the service use a
proxy or not, and if users can have the possibility to
disable it on a bridge basis.

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-19 10:19:56 +02:00
Pierre Mazière
09d4e21bdc possibility to hide proxy address
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-19 10:19:56 +02:00
Pierre Mazière
3dd63ab6fd enable proxy usage for individual bridge
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-19 10:19:56 +02:00
logmanoriginal
74f0572d91 bridges: Replace returnError function with more specific
Replacements depend on original error code:
400: returnClientError
404: returnServerError
500: returnServerError
501: returnServerError
2016-08-17 14:45:08 +02:00
logmanoriginal
73a1bcf3d6 [Bridge] Add specialized error handling functions 2016-08-17 13:58:55 +02:00
Mitsukarenai
5212b91cca [whitelist] trim content for wildcard (contrib: @Piokaz) 2016-08-16 00:00:33 +02:00
logmanoriginal
d3cbf38eb1 [Bridge] Allow '*' wildcard to whitelist all bridges
For this to work the whitelist.txt must only contain '*' (no \n)
2016-08-15 08:46:04 +02:00
logmanoriginal
646ae57326 [HTMLUtils] Change getHelperButtonsFormat to private scope 2016-08-15 08:13:40 +02:00
logmanoriginal
a6da16feb7 [HTMLUtils] Remove getHelperButtonFormat 2016-08-15 08:01:32 +02:00
logmanoriginal
5d66af7a29 [HTMLUtils] Add new attribute 'defaultValue'
Behavior depends on the type:

- text: Allows any text
- number: Allows any numeric
- list: 'defaultValue' must match either name or value of one element
- checkbox: 'defaultValue' must be checked to activate checkbox
2016-08-15 02:47:36 +02:00
logmanoriginal
3fd283e29f [HTMLUtils] Fix form input attribute assignment
- Don't assign attributes to all options of a selection
- Assign attributes to checkboxes
2016-08-15 02:32:36 +02:00
logmanoriginal
3ca2f030e7 [HTMLUtils] Add common function for form header 2016-08-15 02:21:07 +02:00
logmanoriginal
f853f62270 [HTMLUtils] Cleanup code
- Use single quote instead of double quotes
- Remove unnecessary empty lines
- Use common format for indentation and blocks
- Use HEREDOC for long strings
- Remove braces from single line if-statements
2016-08-15 02:08:59 +02:00
logmanoriginal
c689180fef [HTMLUtils] Make 'required' attribute Boolean
The 'required' attribute can now be used for all parameters and
enabled/disabled using Boolean states true/false respectively:

"required" : true

or

"required" : false

This now complies to the Wiki:
https://github.com/RSS-Bridge/rss-bridge/wiki/BridgeAbstract
2016-08-15 01:14:00 +02:00
logmanoriginal
a70e143dc4 [HTMLUtils] Remove value from 'required' attribute
The 'required' attribute has no value, see
https://www.w3.org/TR/html5/forms.html#the-required-attribute
2016-08-15 01:00:51 +02:00
logmanoriginal
7d073b3e96 [lib/Bridge] Remove loadMetadatas from BridgeAbstract
This method MUST be implemented by the bridges.
2016-08-06 19:02:02 +02:00
logmanoriginal
b59915f23b [lib/Bridge] Define default behavior for getName() and getURI()
Bridges no longer require implementation for getName() and getURI()
as they are now implemented with default behavior in BridgeAbstract.

This was previously implemented only for RSSExpander and is now part
of BridgeAbstract (automatically inherited).

Documentation is updated accordingly.
2016-08-06 18:21:43 +02:00
logmanoriginal
e6bd815bcc [lib/Bridge] Fix typo
This fixes "Notice: Undefined variable: defaultBRtext in
C:\xampp\htdocs\rss-bridge_dev\lib\Bridge.php on line 114"
2016-08-05 11:27:47 +02:00
Teromene
6b7b38db54 Improved new style. 2016-08-02 22:16:43 +02:00
Teromene
ab4e63b59c New style for rss-bridge 2016-08-02 18:56:12 +02:00
Pierre Mazière
36d39d3f59 implement proxy feature without modifying simple_html_dom code
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-06-25 23:14:27 +02:00
Teromene
1c1bcc20ff Changed the antiselector to be less likely to happen. 2016-02-26 18:31:53 +00:00
Teromene
036ea43e4f Modified HTMLUtils, corrected few bugs. 2016-02-26 18:17:48 +00:00
teromene@teromene.fr
f8b9470622 Added the possibility to use a global array parameter, that is going to be displayed for every parameter count. 2016-02-11 15:24:40 +00:00
logmanoriginal
8db5dde69d Add new parameter 'title' to guide the user
The 'title' attribute will render as tooltip in the browser which is
useful to provide guidance to the operator.
2016-01-20 19:41:39 +01:00
Mitsu
31177912e0 Merge pull request #198 from teromene/rss-bridge-enclosures
Rss bridge enclosures
2016-01-19 13:45:23 +01:00
Teromene
4deefdfd7d Add enclosures support, see example in DemoBridge. 2016-01-19 12:34:38 +00:00
Teromene
5f01b7fe7d Added a function to re-encode everything to UTF-8 2016-01-19 12:17:27 +00:00
Teromene
55d4c6e425 Merge https://github.com/sebsauvage/rss-bridge into new-attribute-system 2015-12-06 17:49:41 +00:00
Teromene
9090c2e470 Changed HTMLUtils to be usable with php < 5.6 2015-12-06 17:47:20 +00:00
Mitsukarenai
4c86f38306 disabling incompatibilities issue #181 2015-12-06 17:03:31 +01:00
Teromene
f386fc4a10 Added the Cache cleaning system. 2015-12-04 09:19:05 +00:00
Teromene
a07839019e Correction de quelques problèmes avec RSSExpander suite à la migration dans lib/Bridge.
Correction de typos.
Ajout de la possibilité d'utiliser un proxy.
2015-11-27 14:20:33 +00:00
Teromene
e1cdca6971 Ajout du paramètre pattern pour les entrées de type texte, ajout du required côté HTML.
Correction de la page d'accueuil pour qu'elle soit conforme aux standards du W3C.
Correction de la regex de listage des fichiers pour qu'elle ignore les sauvegardes.
Ajout d'un nettoyeur HTML, par défaut.
2015-11-11 21:45:24 +00:00
teromene
d033bb51ac Little refactoring to reduce logic on index.php.
Moved RssExpander as a core logic system to lib/Bridge.php

Signed-off-by: teromene <teromene@teromene.fr>
2015-11-05 20:26:48 +00:00