Plugin Repository

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
cmb
Posts: 14227
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Plugin Repository

Post by cmb » Wed Jul 02, 2014 3:00 pm

svasti wrote:I'd propose that pluginauthors should be encoraged to put a desciptive file of their plugins in the same folder as the .nfo file.
Thanks for bringing this issue up again!
svasti wrote:[XML] Disadvantage: has to be transformed into a multi-array later (not a big deal).
Um, not necessarily. There is the PHP extension SimpleXML (which apparently is in widespride use; it is a prerequisite for GetSimple, for instance), which makes it very easy to deal with XML.
svasti wrote:[JSON] Disadvantage: Cannot be written by hand.
IMO it is easier to write JSON by hand, than XML, but indeed, XML is probably more accustomed to many, and there is better tool support.

However, I like to add an advantage of XML: there are XSL and XSLT, which allow to easily make the information really human readable.
svasti wrote:Considering the advantages and disadvantages I'd go for xml.
+ 1
svasti wrote:So, the seaching plugin on cmsimple-xh.org will filnd in the .nfo files where to look for plugins.xml (i.e. in the same folder)
The paths to the version.nfo files have to be "registered" there, however, but that's fine with me.
svasti wrote:Names of the plugins each with subcat: demo-url, download-url, compatibility, licence-type, cost, maintainer, author, former authors, language with subcat: keywords, description.
Okay. Do you have already a proposal for the XML DTD?
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1660
Joined: Wed Dec 17, 2008 5:08 pm

Re: Plugin Repository

Post by svasti » Wed Jul 02, 2014 3:50 pm

cmb wrote:There is the PHP extension SimpleXML
I have been playing around with this and thought that it could be quite useful.
cmb wrote:Do you have already a proposal for the XML DTD?
No, just the idea, and too many other projects.

However I think such a plugin-repository with automatic gathering of information would be quite handy.

Only if a new plugin author appears, one would have to enter his url by hand. Otherwise informations for new plugins from the known authors would be gathered automatically. The plugins.xml could be read at certain intervals and stored in the Allplugins_XH plugin, so that searching for plugins etc. would be fast.

And Allplugins_XH could in principle be installed on any CMSImple_XH site.

cmb
Posts: 14227
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Plugin Repository

Post by cmb » Wed Jul 02, 2014 6:19 pm

svasti wrote:However I think such a plugin-repository with automatic gathering of information would be quite handy.
I agree whole-heartedly.

However, I think we should concentrate on the format first. I only have superficial knowledge of XML, but I want to present a first draft for discussion:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE plugins [
    <!ELEMENT plugins (plugin*)>
    <!ELEMENT plugin (author+, license, cost, compatibility, keywords+,
        description+)>
    <!ATTLIST plugin
        name NMTOKEN #REQUIRED
        download CDATA #REQUIRED
        demo CDATA #IMPLIED>
    <!ELEMENT author (#PCDATA)>
    <!ATTLIST author
        state (maintainer|active|inactive) #REQUIRED>
    <!ELEMENT license (#PCDATA)>
    <!ELEMENT cost (#PCDATA)>
    <!ELEMENT compatibility (#PCDATA)>
    <!ELEMENT keywords (#PCDATA)>
    <!ATTLIST keywords
        lang NMTOKEN #REQUIRED>
    <!ELEMENT description (#PCDATA)>
    <!ATTLIST description
        lang NMTOKEN #REQUIRED>
]>
<plugins>
    <plugin name="Pagemanager2"
            download="http://3-magi.net/?CMSimple_XH/Pagemanager_XH">
        <author state="maintainer">Christoph M. Becker</author>
        <license>GPLv3</license>
        <cost>0</cost>
        <compatibility>CMSimple_XH ≥ 1.6</compatibility>
        <keywords lang="en">utility, pages, administration</keywords>
        <keywords lang="de">Utility, Seiten, Administration</keywords>
        <description lang="en">Pagemanager_XH simplifies the administration of
        pages of a CMSimple_XH installation. This plugin is comparable to the
        Menumanager plugin with regard to functionality, but by using a treeview
        it allows for better handling of websites with many pages. With
        Pagemanager_XH it is also possible to rearrange whole
        submenus.</description>
        <description lang="de">Pagemanager_XH vereinfacht die Verwaltung von
        Seiten in einer CMSimple_XH-Installation. Dieses Plugin ist vom
        Funktionsumfang vergleichbar mit dem Menumanager-Plugin, ist aber durch
        die Baumdarstellung auch bei umfangreichen Homepages übersichtlicher.
        Darüber hinaus können beim Pagemanager_XH ganze Menüstrukturen auf
        einmal verschoben werden.</description>
    </plugin>
</plugins>
Of course, the DTD should not be included in the actual files, but rather referenced as public DTD available on cmsimple-xh.org.

Some considerations:
  • license and cost are closely related. There is the customary "payware for commercial sites only", where the cost depends on the usage. Maybe we should remove the cost element (could be stated in the license). However, it might be nice if a user would be able to select a certain license (an enumeration would make that easy), or a maximum price. Not sure how to handle that.
  • If we restrict the compatibility to CMSimple_XH only (what doesn't imply that the plugin can't be suitable for other CMSimples), we could make license an empty element with a min and a max attribute, so the version could be easily filterable.
  • keywords and description for each language could be a single element "description" where "keywords" would be an attribute. Somehow I like this more.
  • The contents of keywords is meant as a comma separated list of keywords, similar as for HTML meta name="keywords".
  • The contents of description could be HTML or maybe some other markup language.
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1660
Joined: Wed Dec 17, 2008 5:08 pm

Re: Plugin Repository

Post by svasti » Wed Jul 02, 2014 10:12 pm

Just wondering what kind of search queries there could be finally.

cost/licence?
People could select
- free: Here plugins with GPL, Public Domain, no stated licence, Linkware would appear
- free/restricted: Here plugins free for private use, payment for other use come
- all: Here all plugins would be listed.

It seems there are some elements on which a sensible selection could be based and others that will only give information once selected. Elements useful for selection could be?
Keywords – cost – compatibility – ... what else?
cmb wrote:However, it might be nice if a user would be able to select a certain license (an enumeration would make that easy), or a maximum price
I guess there are too many different licences around. Besides at least one plugin author uses the appelation "freeware" and attaches many conditions to the use of his plugins, which I wouldn't call freeware. So what about an element licence (where conditions can be stated) with the attribute cost? E.g. cost="", cost="0 - 5 €", cost="5 €" where "-" would trigger the category free/restricted.

Compatibility seems to be a little tricky. I guess all my plugins work on cmsimple 4.x but haven'd tested it. Maybe again we could have an element "compatibility" with text (e.g. "tested on XH1.6.2 on Apache server php 5.2") plus an attribute "incompatible", e.g. incompatible="<php5.2,<XH1.6,4" (i.e. less that php 5.2, less that XH 1.6, all of CMSimple 4.x)

So for the element "description" it seems 2 attributes are coming? language and keywords?
Description in HTML is nice, but what if authors reference images in it? huge images? and supersized text? How much description is necessary to convince a person to go to see a demo? not much I guess, so full HTML may not be necessary after all. So either a limited HTML, or some kind of Markdown **bold** //italic// or allow both.

What do you mean by author maintainer/active/inactive? If an author is inactive, he will not produce a plugins.xml. But Allplugins_XH could already come with a list of such inactive autor's plugins. What if the main work has not been done by the maintainer but by someone else? What about former authors? We could again have the element author with an attribute maintainer.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<plugins>
    <plugin name="Pagemanager2"
            download="http://3-magi.net/?CMSimple_XH/Pagemanager_XH"
            demo="http://demo.cmsimple-xh.dk/">
        <author maintainer="cmb">Christoph M. Becker, based on work by Charlemagne</author>
        <license cost="0">GPLv3</license>
        <compatibility incompatible="<XH1.6,4">CMSimple_XH ≥ 1.6</compatibility>
        <description lang="en" keywords="utility,pages,administration">
        <p><b>Pagemanager_XH</b> simplifies the administration of
        pages of a CMSimple_XH installation.</p><p>This plugin is comparable to the
        <i>Menumanager</i> plugin with regard to functionality, but by using a treeview
        it allows for better handling of websites with many pages. With
        Pagemanager_XH it is also <b>possible to rearrange whole
        submenus.</b></description>
        <description lang="de" keywords="Seitenverwaltung,Seitenerstellung,Seitenhierarchie,
        neue Seiten">**Pagemanager_XH** vereinfacht die Verwaltung von
        Seiten in einer CMSimple_XH-Installation.

        Dieses Plugin ist vom Funktionsumfang vergleichbar mit dem 
       //Menumanager-Plugin,// ist aber durch
        die Baumdarstellung auch bei umfangreichen Homepages übersichtlicher.
        Darüber hinaus können beim Pagemanager_XH **ganze Menüstrukturen auf
        einmal verschoben werden.**</description>
    </plugin>
</plugins>
The HTML somehow I don't really like, I prefer the markup like in quoteoftheday.

cmb
Posts: 14227
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Plugin Repository

Post by cmb » Fri Jul 04, 2014 12:09 am

svasti wrote:cost/licence?
People could select
- free: Here plugins with GPL, Public Domain, no stated licence, Linkware would appear
- free/restricted: Here plugins free for private use, payment for other use come
- all: Here all plugins would be listed.
Maybe some user prefers payware, because of potentially better support. That might be even a company requirement. Not sure if that applies to the CMSimple(_XH) world, though.
svasti wrote:I guess there are too many different licences around. Besides at least one plugin author uses the appelation "freeware" and attaches many conditions to the use of his plugins, which I wouldn't call freeware. So what about an element licence (where conditions can be stated) with the attribute cost? E.g. cost="", cost="0 - 5 €", cost="5 €" where "-" would trigger the category free/restricted.

Compatibility seems to be a little tricky. I guess all my plugins work on cmsimple 4.x but haven'd tested it. Maybe again we could have an element "compatibility" with text (e.g. "tested on XH1.6.2 on Apache server php 5.2") plus an attribute "incompatible", e.g. incompatible="<php5.2,<XH1.6,4" (i.e. less that php 5.2, less that XH 1.6, all of CMSimple 4.x)
That seems not unreasonable.

However, we might keep a first version very basic; we can still make further improved versions (i.e. further DTDs), and most likely we can keep the processing somewhat compatible. If other developers join in, there may be other requirements and ideas.
svasti wrote:What do you mean by author maintainer/active/inactive?
I tried to address your suggestion "maintainer, author, former authors" with a single element, that could have multiple occurances. A fictive example:

Code: Select all

<author="maintainer">svasti</author> <!-- the current project leader -->
<author="active">cmb</author> <!-- a co-author -->
<author="inactive">Martin</author> <!-- a former author; maybe a former project leader -->
Not sure if that is apporpriate, but I suppose most plugins will have only a single author, anyway, so an <author> element might be sufficient (and there's no need for <maintainer>, <former-author>).
svasti wrote:The HTML somehow I don't really like, I prefer the markup like in quoteoftheday.
I agree that HTML is not the best idea. Even though it is well know to plugin authors, and easily processible with PHP, it is too flexible (you've already made some good points regarding huge images and supersized text). Additionally the content might be published elsewhere (e.g. a plugin list in a PDF[1], the wiki or as news in our forum), so some simple markup would be preferable. Not sure about the Quoteoftheday markup, but AFAIK that is a subset of Wiki markup, and I like that more than markdown, for instance.

[1] That brings me to a license issue. We should enforce some kind of free license for the plugin XML files, so they can easily be reused. Not sure, if there would apply any copyright at all (IANAL), but the issue might be worth consideration.
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1660
Joined: Wed Dec 17, 2008 5:08 pm

Re: Plugin Repository

Post by svasti » Sat Jul 05, 2014 3:25 pm

cmb wrote:I tried to address your suggestion "maintainer, author, former authors" with a single element, that could have multiple occurances.
very nice, in most cases only one entry would be needed, but there are some plugins that have an interesting history of many authors, e.g. calendar.
cmb wrote:Maybe some user prefers payware, because of potentially better support.
so there are 3 cases: free, condition, payware. There could be an attribute to licence: use="free|cond|pay" ???
cmb wrote:We should enforce some kind of free license for the plugin XML files
We state that everyone who creates an xml meant for allplugins_XH automatically uncopyrights this xml.
cmb wrote:I agree that HTML is not the best idea. ... Additionally the content might be published elsewhere (e.g. a plugin list in a PDF[1], the wiki or as news in our forum
We could go without markup. This would mean the description is fairly basic. Just enough to give people an idea if they should click the demo-URL or not. Maybe enough? Probably. Alternatively we could allow minimum markup, for newline/new paragraph, bold, italic, lists. With this one could already write a nice advertisement.
cmb wrote:we might keep a first version very basic
I think the xml should be as simple as practically possible, for otherwise some autors may not fill it in. Some authors may be just happy to write a plugin but they may not care to advertise it.

cmb
Posts: 14227
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Plugin Repository

Post by cmb » Sat Jul 05, 2014 4:15 pm

svasti wrote:so there are 3 cases: free, condition, payware. There could be an attribute to licence: use="free|cond|pay" ???
Great idea!
svasti wrote:We could go without markup. This would mean the description is fairly basic. Just enough to give people an idea if they should click the demo-URL or not. Maybe enough? Probably. Alternatively we could allow minimum markup, for newline/new paragraph, bold, italic, lists. With this one could already write a nice advertisement.
I think at least some basic markup is appropriate (bold, italics, paragraphs). Not sure if we need lists, but I would like links, too. And what about screenshots? Shall we add an extra element (<screenshot>) for it?
svasti wrote:I think the xml should be as simple as practically possible, for otherwise some autors may not fill it in. Some authors may be just happy to write a plugin but they may not care to advertise it.
ACK
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1660
Joined: Wed Dec 17, 2008 5:08 pm

Re: Plugin Repository

Post by svasti » Sat Jul 05, 2014 6:36 pm

cmb wrote:bold, italics, paragraphs ... links, too.
That makes it easy.
cmb wrote:Shall we add an extra element (<screenshot>) for it?
Yes, that is more flexible then authors adding images in their description. We could have the attribute view="backend|frontend", so an author could provide several screenshots. Another advantage of <screeshot> is that the results of a plugin query can be handled in a flexible way: The plugin could at first just Name, licence and description plus a button "more" which could open screenshots, etc.

cmb
Posts: 14227
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Plugin Repository

Post by cmb » Sun Jul 06, 2014 5:42 pm

Well, so a second draft:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE plugins [
    <!ELEMENT plugins (plugin*)>
    <!ELEMENT plugin (author+, license, compatibility, screenshot*,
        keywords+, description+)>
    <!ATTLIST plugin
        name NMTOKEN #REQUIRED
        download CDATA #REQUIRED
        demo CDATA #IMPLIED>
    <!ELEMENT author (#PCDATA)>
    <!ATTLIST author
        state (maintainer|active|inactive) #REQUIRED>
    <!ELEMENT license (#PCDATA)>
    <!ATTLIST license
        use (free|cond|pay) #REQUIRED>
    <!ELEMENT compatibility (#PCDATA)>
    <!ELEMENT screenshot EMPTY>
    <!ATTLIST screenshot
        url CDATA #REQUIRED
        view (frontend|backend) #REQUIRED>
    <!ELEMENT keywords (#PCDATA)>
    <!ATTLIST keywords
        lang NMTOKEN #REQUIRED>
    <!ELEMENT description (#PCDATA)>
    <!ATTLIST description
        lang NMTOKEN #REQUIRED>
]>
<plugins>
    <plugin name="Pagemanager2"
            download="http://3-magi.net/?CMSimple_XH/Pagemanager_XH">
        <author state="maintainer">Christoph M. Becker</author>
        <license use="free">GPLv3</license>
        <compatibility>CMSimple_XH ≥ 1.6</compatibility>
        <screenshot
        url="http://3-magi.net/plugins/pagemanager/help/pagemanager.png"
        view="backend"/>
        <keywords lang="en">utility, pages, administration</keywords>
        <keywords lang="de">Utility, Seiten, Administration</keywords>
        <description lang="en">//Pagemanager_XH// simplifies the administration
        of pages of a CMSimple_XH installation.

        This plugin is comparable to the
        [[http://cmsimplewiki.com/doku.php/plugins/menumanager|Menumanager
        plugin]] with regard to functionality, but by using a treeview it allows
        for better handling of websites with many pages. With Pagemanager_XH it
        is also possible to **rearrange whole submenus**.</description>
        <description lang="de">//Pagemanager_XH// vereinfacht die Verwaltung von
        Seiten in einer CMSimple_XH-Installation.

        Dieses Plugin ist vom Funktionsumfang vergleichbar mit dem
        [[http://cmsimplewiki.com/doku.php/plugins/menumanager|Menumanager-Plugin]],
        ist aber durch die Baumdarstellung auch bei umfangreichen Homepages
        übersichtlicher. Darüber hinaus können beim Pagemanager_XH **ganze
        Menüstrukturen auf einmal verschoben werden**.</description>
    </plugin>
</plugins>
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1660
Joined: Wed Dec 17, 2008 5:08 pm

Re: Plugin Repository

Post by svasti » Mon Jul 07, 2014 3:25 pm

cmb wrote:<!ELEMENT compatibility (#PCDATA)>
Da kann man ja jetzt ungeordneten Text reinschreiben, z.B. "all versions" oder "php5.2 + XH >= 5.3" oder "cmsimple3.2, 4x, XH". Wie sieht es mit Suchzwecken aus?

Aber sind Sucheingaben für diese Feld wirklich so wichtig? Normalerweise suchen nur Leute mit aktuellem XH nach neuen Plugins. Wessen Seite läuft und nicht aktuell ist, der sucht normalerweise keine neuen Plugins ... angenommen, jemand hat cmsimple3.4, da denke ich nicht, dass er nach neuen Plugins sucht. Und die 4.0-Leute werden von ihrem System bedient, von XH-Plugins wird da ja inzwischen abgeraten. Für die brauchen wir inzwischen wohl keine speziellen Suchmasken vorzusehen.

Ich schätze also, dass kaum jemand im kommenden Allplugins_XH eine Suche nach Kompatibilität beginnen wird. Also kann compatibility wohl ohne Attribute auskommen.

Post Reply