Fix extension definitions

Before, extensions were missing the definition of mandatory methods.
At the moment, it's not a problem because the coding guidelines are not
enforced by the code. But in the future, it will break.
Now, extensions have all mandatory method definitions.
This commit is contained in:
Alexis Degrugillier 2021-01-05 07:56:11 -05:00
parent 17f42e4b53
commit 26be877e7a
21 changed files with 130 additions and 22 deletions

View file

@ -4,7 +4,7 @@
{ {
"name": "Custom CSS", "name": "Custom CSS",
"description": "A FreshRSS extension which give ability to create user-specific CSS rules to apply in addition of the actual theme", "description": "A FreshRSS extension which give ability to create user-specific CSS rules to apply in addition of the actual theme",
"version": 0.2, "version": 0.3,
"author": "Marien Fressinaud", "author": "Marien Fressinaud",
"url": "https://github.com/FreshRSS/Extensions", "url": "https://github.com/FreshRSS/Extensions",
"type": "gh-subdirectory" "type": "gh-subdirectory"
@ -12,7 +12,7 @@
{ {
"name": "Custom JS", "name": "Custom JS",
"description": "A FreshRSS extension which give ability to create user-specific Javascript rules to apply in addition of the actual theme", "description": "A FreshRSS extension which give ability to create user-specific Javascript rules to apply in addition of the actual theme",
"version": 0.2, "version": 0.3,
"author": "Frans de Jonge", "author": "Frans de Jonge",
"url": "https://github.com/FreshRSS/Extensions", "url": "https://github.com/FreshRSS/Extensions",
"type": "gh-subdirectory" "type": "gh-subdirectory"
@ -20,7 +20,7 @@
{ {
"name": "Image Proxy", "name": "Image Proxy",
"description": "No insecure content warnings or disappearing images on https sites", "description": "No insecure content warnings or disappearing images on https sites",
"version": 0.4, "version": 0.6,
"author": "Frans de Jonge", "author": "Frans de Jonge",
"url": "https://github.com/FreshRSS/Extensions", "url": "https://github.com/FreshRSS/Extensions",
"type": "gh-subdirectory" "type": "gh-subdirectory"
@ -28,7 +28,7 @@
{ {
"name": "Sticky Feeds", "name": "Sticky Feeds",
"description": "Set the feed aside in the main stream following the window scroll", "description": "Set the feed aside in the main stream following the window scroll",
"version": 0.1, "version": 0.2,
"author": "Marien Fressinaud", "author": "Marien Fressinaud",
"url": "https://github.com/FreshRSS/Extensions", "url": "https://github.com/FreshRSS/Extensions",
"type": "gh-subdirectory" "type": "gh-subdirectory"
@ -68,9 +68,9 @@
{ {
"name": "Keep Folder State", "name": "Keep Folder State",
"description": "Stores the state of the folders locally and expand them automatically if necessary", "description": "Stores the state of the folders locally and expand them automatically if necessary",
"version": 0.1, "version": 0.2,
"author": "Marco Heizmann", "author": "Marco Heizmann",
"url": "https://github.com/oyox/FreshRSS-extensions", "url": "https://github.com/FreshRSS/Extensions",
"type": "gh-subdirectory" "type": "gh-subdirectory"
}, },
{ {
@ -116,9 +116,9 @@
{ {
"name": "Reading Time", "name": "Reading Time",
"description": "Add a reading time estimation for each article", "description": "Add a reading time estimation for each article",
"version": 1.0, "version": 1.3,
"author": "Lapineige", "author": "Lapineige",
"url": "https://framagit.org/Lapineige/FreshRSS_Extension-ReadingTime/", "url": "https://github.com/FreshRSS/Extensions",
"type": "gh-subdirectory" "type": "gh-subdirectory"
}, },
{ {
@ -156,7 +156,7 @@
{ {
"name": "Share By Email", "name": "Share By Email",
"description": "Improve the sharing by email system.", "description": "Improve the sharing by email system.",
"version": 0.1, "version": 0.2,
"author": "Marien Fressinaud", "author": "Marien Fressinaud",
"url": "https://github.com/FreshRSS/Extensions", "url": "https://github.com/FreshRSS/Extensions",
"type": "gh-subdirectory" "type": "gh-subdirectory"
@ -188,7 +188,7 @@
{ {
"name": "Quick Collapse", "name": "Quick Collapse",
"description": "Quickly change from folded to unfolded articles", "description": "Quickly change from folded to unfolded articles",
"version": 0.1, "version": 0.2,
"author": "romibi and Marien Fressinaud", "author": "romibi and Marien Fressinaud",
"url": "https://github.com/FreshRSS/Extensions", "url": "https://github.com/FreshRSS/Extensions",
"type": "gh-subdirectory" "type": "gh-subdirectory"
@ -208,6 +208,22 @@
"author": "Kapdap", "author": "Kapdap",
"url": "https://github.com/Kapdap/freshrss-extensions", "url": "https://github.com/Kapdap/freshrss-extensions",
"type": "gh-subdirectory" "type": "gh-subdirectory"
},
{
"name": "TinyTinyRSS API",
"description": "Provides an API compliant with TinyTinyRSS applications.",
"version": 0.2,
"author": "Marien Fressinaud",
"url": "https://github.com/FreshRSS/Extensions",
"type": "gh-subdirectory"
},
{
"name": "Title-Wrap",
"description": "Applies a line-wrap to long article titles, as opposed to truncating the title when it overflows its display area.",
"version": 0.2,
"author": "Frans de Jonge, Joris Kinable",
"url": "https://github.com/FreshRSS/Extensions",
"type": "gh-subdirectory"
} }
] ]
} }

View file

@ -1,6 +1,14 @@
<?php <?php
class CustomCSSExtension extends Minz_Extension { class CustomCSSExtension extends Minz_Extension {
public function install() {
return true;
}
public function uninstall() {
return true;
}
public function init() { public function init() {
$this->registerTranslates(); $this->registerTranslates();

View file

@ -2,7 +2,7 @@
"name": "Custom CSS", "name": "Custom CSS",
"author": "Marien Fressinaud", "author": "Marien Fressinaud",
"description": "Give possibility to overwrite the CSS with a user-specific rules.", "description": "Give possibility to overwrite the CSS with a user-specific rules.",
"version": 0.2, "version": 0.3,
"entrypoint": "CustomCSS", "entrypoint": "CustomCSS",
"type": "user" "type": "user"
} }

View file

@ -1,6 +1,14 @@
<?php <?php
class CustomJSExtension extends Minz_Extension { class CustomJSExtension extends Minz_Extension {
public function install() {
return true;
}
public function uninstall() {
return true;
}
public function init() { public function init() {
$this->registerTranslates(); $this->registerTranslates();

View file

@ -2,7 +2,7 @@
"name": "Custom JS", "name": "Custom JS",
"author": "₣rans de Jonge", "author": "₣rans de Jonge",
"description": "Apply custom JS.", "description": "Apply custom JS.",
"version": 0.2, "version": 0.3,
"entrypoint": "CustomJS", "entrypoint": "CustomJS",
"type": "user" "type": "user"
} }

View file

@ -9,6 +9,14 @@ class ImageProxyExtension extends Minz_Extension {
const SCHEME_INCLUDE = ''; const SCHEME_INCLUDE = '';
const URL_ENCODE = '1'; const URL_ENCODE = '1';
public function install() {
return true;
}
public function uninstall() {
return true;
}
public function init() { public function init() {
$this->registerHook('entry_before_display', $this->registerHook('entry_before_display',
array('ImageProxyExtension', 'setImageProxyHook')); array('ImageProxyExtension', 'setImageProxyHook'));

View file

@ -2,7 +2,7 @@
"name": "Image Proxy", "name": "Image Proxy",
"author": "Frans de Jonge", "author": "Frans de Jonge",
"description": "No insecure content warnings or disappearing images.", "description": "No insecure content warnings or disappearing images.",
"version": 0.5, "version": 0.6,
"entrypoint": "ImageProxy", "entrypoint": "ImageProxy",
"type": "user" "type": "user"
} }

View file

@ -1,6 +1,16 @@
<?php <?php
class KeepFolderStateExtension extends Minz_Extension { class KeepFolderStateExtension extends Minz_Extension {
public function install() {
return true;
}
public function uninstall() {
return true;
}
public function handleConfigureAction() {
}
public function init() { public function init() {
Minz_View::appendScript($this->getFileUrl('jquerymin.js', 'js'),'','',''); Minz_View::appendScript($this->getFileUrl('jquerymin.js', 'js'),'','','');

View file

@ -2,7 +2,7 @@
"name": "Keep Folder State", "name": "Keep Folder State",
"author": "Marco Heizmann", "author": "Marco Heizmann",
"description": "Stores the state of the folders locally and expand them automatically if necessary.", "description": "Stores the state of the folders locally and expand them automatically if necessary.",
"version": 0.1, "version": 0.2,
"entrypoint": "KeepFolderState", "entrypoint": "KeepFolderState",
"type": "user" "type": "user"
} }

View file

@ -1,6 +1,17 @@
<?php <?php
class QuickCollapseExtension extends Minz_Extension { class QuickCollapseExtension extends Minz_Extension {
public function install() {
return true;
}
public function uninstall() {
return true;
}
public function handleConfigureAction() {
}
public function init() { public function init() {
$this->registerTranslates(); $this->registerTranslates();
$this->registerViews(); $this->registerViews();

View file

@ -2,7 +2,7 @@
"name": "Quick Collapse", "name": "Quick Collapse",
"author": "romibi and Marien Fressinaud", "author": "romibi and Marien Fressinaud",
"description": "Quickly change from folded to unfolded articles", "description": "Quickly change from folded to unfolded articles",
"version": 0.1, "version": 0.2,
"entrypoint": "QuickCollapse", "entrypoint": "QuickCollapse",
"type": "user" "type": "user"
} }

View file

@ -1,5 +1,16 @@
<?php <?php
class ReadingTimeExtension extends Minz_Extension { class ReadingTimeExtension extends Minz_Extension {
public function install() {
return true;
}
public function uninstall() {
return true;
}
public function handleConfigureAction() {
}
public function init() { public function init() {
Minz_View::appendScript($this->getFileUrl('readingtime.js', 'js')); Minz_View::appendScript($this->getFileUrl('readingtime.js', 'js'));
} }

View file

@ -2,7 +2,7 @@
"name": "ReadingTime", "name": "ReadingTime",
"author": "Lapineige", "author": "Lapineige",
"description": "Add a reading time estimation next to each article title", "description": "Add a reading time estimation next to each article title",
"version": 1.2, "version": 1.3,
"entrypoint": "ReadingTime", "entrypoint": "ReadingTime",
"type": "user" "type": "user"
} }

View file

@ -1,6 +1,17 @@
<?php <?php
class ShareByEmailExtension extends Minz_Extension { class ShareByEmailExtension extends Minz_Extension {
public function install() {
return true;
}
public function uninstall() {
return true;
}
public function handleConfigureAction() {
}
public function init() { public function init() {
$this->registerTranslates(); $this->registerTranslates();

View file

@ -2,7 +2,7 @@
"name": "Share By Email", "name": "Share By Email",
"author": "Marien Fressinaud", "author": "Marien Fressinaud",
"description": "Improve the sharing by email system.", "description": "Improve the sharing by email system.",
"version": 0.1, "version": 0.2,
"entrypoint": "ShareByEmail", "entrypoint": "ShareByEmail",
"type": "user" "type": "user"
} }

View file

@ -1,6 +1,17 @@
<?php <?php
class StickyFeedsExtension extends Minz_Extension { class StickyFeedsExtension extends Minz_Extension {
public function install() {
return true;
}
public function uninstall() {
return true;
}
public function handleConfigureAction() {
}
public function init() { public function init() {
Minz_View::appendStyle($this->getFileUrl('style.css', 'css')); Minz_View::appendStyle($this->getFileUrl('style.css', 'css'));
Minz_View::appendScript($this->getFileUrl('script.js', 'js')); Minz_View::appendScript($this->getFileUrl('script.js', 'js'));

View file

@ -2,7 +2,7 @@
"name": "Sticky Feeds", "name": "Sticky Feeds",
"author": "Marien Fressinaud", "author": "Marien Fressinaud",
"description": "Set the feed aside in the main stream following the window scroll.", "description": "Set the feed aside in the main stream following the window scroll.",
"version": 0.1, "version": 0.2,
"entrypoint": "StickyFeeds", "entrypoint": "StickyFeeds",
"type": "user" "type": "user"
} }

View file

@ -1,6 +1,9 @@
<?php <?php
class TTRSS_APIExtension extends Minz_Extension { class TTRSS_APIExtension extends Minz_Extension {
public function handleConfigureAction() {
}
public function init() { public function init() {
$this->registerHook('post_update', $this->registerHook('post_update',
array($this, 'postUpdateHook')); array($this, 'postUpdateHook'));

View file

@ -2,7 +2,7 @@
"name": "TinyTinyRSS API", "name": "TinyTinyRSS API",
"author": "Marien Fressinaud", "author": "Marien Fressinaud",
"description": "Provides an API compliant with TinyTinyRSS applications.", "description": "Provides an API compliant with TinyTinyRSS applications.",
"version": 0.1, "version": 0.2,
"entrypoint": "TTRSS_API", "entrypoint": "TTRSS_API",
"type": "system" "type": "system"
} }

View file

@ -1,7 +1,18 @@
<?php <?php
class TitleWrapExtension extends Minz_Extension { class TitleWrapExtension extends Minz_Extension {
public function install() {
return true;
}
public function uninstall() {
return true;
}
public function handleConfigureAction() {
}
public function init() { public function init() {
Minz_View::appendStyle($this->getFileUrl('title_wrap.css', 'css')); Minz_View::appendStyle($this->getFileUrl('title_wrap.css', 'css'));
} }
} }

View file

@ -1,8 +1,8 @@
{ {
"name": "Title-Wrap", "name": "Title-Wrap",
"author": "rans de Jonge, Joris Kinable", "author": "Frans de Jonge, Joris Kinable",
"description": "Applies a line-wrap to long article titles, as opposed to truncating the title when it overflows its display area.", "description": "Applies a line-wrap to long article titles, as opposed to truncating the title when it overflows its display area.",
"version": 0.1, "version": 0.2,
"entrypoint": "TitleWrap", "entrypoint": "TitleWrap",
"type": "user" "type": "user"
} }