A few overall extension questions

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

A few overall extension questions

Postby Gooly » Fri Sep 16, 2011 11:38 am

Being busy with the last hand on my first extension, I have a few questions left:

  • How can I create these 'help items' in the configuration panel? (The blue circles with white exclamation mark with a help text)
  • Where can I find more information about the validation options in the configuration fields?
    (Like:
    Code: Select all
    'validation' => 'ifany|string|minlen=1|maxlen=5'
    )
    If possible, I want to validate for decimal input only, highest and lowest possible (decimal) value and I'm wondering what this 'ifany' validates
  • What is the correct procedure to submit my extension?
  • Are there any document conventions described?
That's the trouble with reality,
it's taken far too seriously
User avatar
Gooly
 
Posts: 77
Joined: Thu Nov 19, 2009 5:52 pm
Location: Lat 52° 4' 11.4874" Lon 4° 17' 28.001"

Re: A few overall extension questions

Postby Harm10 » Fri Sep 16, 2011 2:45 pm

The help items are jtips. Search for jtip to find examples.

As far as I know there is no documentation for the possible validations.
Be sure to add the enable javascript line at the end (see example in other extensions) to activate the validations.
Ifany means that the validation allows an empty field. If there is something then it should adhere to the rules you specify.
I have to look whether there are validations for decimal values.

The guidelines (incl where to send it) are described at http://extensions.pivotx.net/page/extensions-guidelines
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: A few overall extension questions

Postby Gooly » Fri Sep 16, 2011 8:06 pm

Thanks Harm
Quite a nifty thing, this jtips. However, I still don't know how to insert it in the admin $form array :-)
Well, the documentation is clear and most of the fields are self-explaining, so I don't expect any problems without them.

Thanks for the link, it helped a lot. The documentation is ready, the code is clean (at least, to me it looks like that).
A bit more testing and I'm ready to submit.
That's the trouble with reality,
it's taken far too seriously
User avatar
Gooly
 
Posts: 77
Joined: Thu Nov 19, 2009 5:52 pm
Location: Lat 52° 4' 11.4874" Lon 4° 17' 28.001"

Re: A few overall extension questions

Postby hansfn » Fri Sep 16, 2011 8:09 pm

I see Harm is back from vacation ;-)

So you don't have to search too much:

1) To get the tooltip, use

Code: Select all
  'text' => makeJtip('Label', 'Help text')

2) To validate integers, use

Code: Select all
  'validation' => 'integer|min=1|max=10'

4) Not sure what you meant? We have some coding standards.
hansfn
Developer
 
Posts: 3280
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: A few overall extension questions

Postby Gooly » Fri Sep 16, 2011 9:10 pm

Thanks. Now I'm able to add the finishing touch.
With document conventions I meant the format for the (help) documentation.
But I watched a few other documents from other extensions and copied the style as much as possible
(I have one main header, a few subheaders and strong text for sub-sub headers in an "Introduction, Usage, Configuration, Additional info, Tips" - setup) all together wrapped in an index.markdown in a docs directory.

Tomorrow I will add the tooltips were needed end check the code for the cosing standards. And do some extra tests.
That's the trouble with reality,
it's taken far too seriously
User avatar
Gooly
 
Posts: 77
Joined: Thu Nov 19, 2009 5:52 pm
Location: Lat 52° 4' 11.4874" Lon 4° 17' 28.001"

Re: A few overall extension questions

Postby Harm10 » Sat Sep 17, 2011 12:49 pm

hansfn wrote:I see Harm is back from vacation ;-)
2 weeks already................ BTW I visited Norway! Beautiful country!
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)


Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 1 guest

cron