STE Version 3.22

Printer Friendly Version Attach Files

wdavatar?user=leiger
leiger
24 Dec 2010 01:20. Edited 6 times. (Edit, Permalink)

STE Version 3.22 has been released and will be available to download shortly.

Now, if you're filled up after a huge Christmas lunch or dinner and are just dying to get away from those relatives you only visit once a year … you can hop onto a nearby computer, load up extensions.wikidot.com, and start playing around with the new variables! What better way is there to spend your Christmas? ;-) (that was a joke, enjoy your holidays!)

Please read below the changelog for a quick FAQ on how to use the new extension variables.

This release was originally planned for tomorrow - Christmas Day - but instead I'm releasing it a day early as I finished it ahead of schedule. Merry Christmas, and thanks for using STE!

Version 3.22 (24 December 2010)

New features:

  • New extension variable: input-string - allows you to ask users to enter a value, which you can then reuse later. #78
  • New extension variable: input-int - same as above, but it returns a valid integer
  • New extension variable: input-double - same as input-int, but it allows a decimal place in the number and can be negative
  • New extension variable: input-boolean - same as above, returns either "true" or "false"
  • New extension variable: input-page - same as above, returns a valid Wikidot page fullname
  • New extension variable: input-url - same as above, returns either an absolute or relative URL (supported: http, https, ftp)

Other changes:

  • Changed how the License is displayed in the 'About STE' dialog. It is now much easier to read.
  • Added error message: If you install an extension, a future STE update removes support for an instruction that the extension uses, and then you attempt to run that extension… (effectively bypassing the checks done during installation)… a message will be displayed prompting you to update STE and re-install extensions.

Known issues:

  • Same as Version 3.21

Some quick documentation to help you get started

Some quick documentation for the new input-string variable. All other input variables act in the exact same way - the difference is in the dialog presented to the user, not in the code.

Asking user for a variable

input-string custom_title

Re-using that variable

append You chose {$custom_title} to be the page's title.

I decided to use the same syntax we are all familiar with for include variables. Hopefully this will make the syntax easier to remember!

What will happen if I try to use a variable before asking the user for it?

There won't be any ugly error messages, and the extension will still be accepted by STE and installed. It just won't be rendered. Your syntax (e.g. {$custom_title}) will appear in the STE document with the rest of the appended text instead of being replaced by some value.

What is the difference between input-string and input-int, etc?

There is no difference in terms of how you write your code.

The difference is that if you use input-int, input-double, input-boolean, input-page or input-url additional validation is done on the value that the user enters to make sure it's in the format you want.

For input-string, no validation is done whatsoever so you can use that if one of the more specialised options doesn't suit your needs.

If the user enters the wrong thing, it will ask them for the value again - and again… repeatedly until they get it right. To help them out, there is some hint text on the pop-up which changes depending on which input method you use.

Are there any restrictions on the variable names?

Yes. Any symbol that has a special meaning for regular expressions will not work. That means you cannot use any of the following:

[\^$.|?*+(){}

All other characters and symbols (including spaces!) are fine.

Will the documentation be updated soon?

I will get around to it shortly, but if anyone else wants to have a go at updating the list of valid instructions … go right ahead!

How can I see this in action before I try it myself?

I've just converted the MP3 Player into a 3.22-compatible extension. Install (or re-install) that in STE and launch it to see it in action!

I have another question!

Post it here and I'll answer ASAP :)

Included page "inc:signature" does not exist (create it now)

wdavatar?user=
(user deleted)

24 Dec 2010 03:18. Edited 0 times. (Edit, Permalink)

This release was originally planned for tomorrow - Christmas Day - but instead I'm releasing it a day early as I finished it ahead of schedule. Merry Christmas, and thanks for using STE!

Because of that alternate universe you live in and your ability to time travel, this is actually 2 days earlier than promised! :-)

Thanks again for your work on this. Merry Christmas to you and your family.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

24 Dec 2010 04:44. Edited 0 times. (Edit, Permalink)
Well, 2 days in your timezone perhaps :) Merry Christmas.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=
(user deleted)

25 Dec 2010 21:31. Edited 0 times. (Edit, Permalink)
I guess I was being too subtle in my poor attempt at some humor. Because of our time zone difference, you're always operating 15.5 hours "ahead" of me. Anyway, it was a nice surprise getting it a day early. Thanks! I hope you enjoyed your Christmas.

I just tried out your new ListPages extension and may have run into a glitch. I entered "999" for the limit on the last prompt, but the variable did not get updated:

[!--
    ListPages module Extension:

    Please either edit or delete all of the fields labelled "OPTIONAL".
--]
[[module ListPages category="article" tags="+_sticky" parent="article:_start" created_at="delete later*" order="created_at desc" perPage="10" limit="{$Results in total (limit)}"    pagetype="OPTIONAL" reverse="OPTIONAL" offset="OPTIONAL" range="OPTIONAL" rating="OPTIONAL" created_by="OPTIONAL" separate="OPTIONAL" prependLine="OPTIONAL" appendLine="OPTIONAL"]]
%%title_linked%% %%created_by_linked%% %%created_at|%c|agohover%%
[[/module]]

I also noticed I can't enter a null value when being prompted for a string value (hence the "delete later" response to the created_at prompt).
I'll do some more testing before I post a bug report.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

26 Dec 2010 07:16. Edited 0 times. (Edit, Permalink)

Ed Johnson:
I just tried out your new ListPages extension and may have run into a glitch. I entered "999" for the limit on the last prompt, but the variable did not get updated (…)

I have fixed this now by editing the module - the problem was that I was using brackets. I had completely forgotten about my own answer to "Are there any restrictions on the variable names?", above.

I also noticed I can't enter a null value when being prompted for a string value (hence the "delete later" response to the created_at prompt).

Yes, I've made it so that all values are required at this stage. In future I'm hoping to give the extension developer the ability to control whether something is required or optional.

I'll do some more testing before I post a bug report.

I appreciate this :) The more people there are looking for problems, the sooner they can be found and fixed.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

26 Dec 2010 07:21. Edited 0 times. (Edit, Permalink)
I am thinking about removing all of the additional input options except for "input-string" (and perhaps renaming it to just "input") … for simplicity, mostly.

Later, I will implement the ability to provide a "format" for the string… essentially giving you full control over what the user enters using a regular expression.

Any objections to this?

Included page "inc:signature" does not exist (create it now)

wdavatar?user=
(user deleted)

26 Dec 2010 15:40. Edited 0 times. (Edit, Permalink)

I am thinking about removing all of the additional input options except for "input-string" (and perhaps renaming it to just "input") … for simplicity, mostly.

Any objections to this?

None. I think it's a good idea. And the sooner the better (before too many extensions are written using the old options).

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

26 Dec 2010 15:58. Edited 2 times. (Edit, Permalink)
I've decided to keep some of them - the boolean one for example. There are 16 different responses that it accepts, and it automatically converts the answer into a lower-case "true" or "false". Very useful IMO and it's not something that a regex option is capable of.

I'll just put the input alternatives in the "not recommended" / experienced section so that people who want to use them still can, whilst they don't complicate the tutorials for those that just want to learn the basics.

Keeping: (for advanced users only)

  • input-int
  • input-boolean

Removing:

  • input-string
  • input-double
  • input-page
  • input-url

Completely new:

  • input (does what "input-string" used to do)

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

26 Dec 2010 16:09. Edited 0 times. (Edit, Permalink)
Oh, and all input dialogs will assume that the variable is OPTIONAL by default now. If you just press OK without typing anything in, it will be accepted and when you go to use the value it will just delete the variable code and replace it with nothing at all.

All in the next version.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=
(user deleted)

26 Dec 2010 17:11. Edited 0 times. (Edit, Permalink)
Sounds great!

Included page "inc:signature" does not exist (create it now)

Post Reply

Add reply on "STE Version 3.22"

Printer Friendly Version Attach Files

CSS Theme, Images and Code on this website are © Shane Smith 2010-2012. All forum posts by users and documentation licensed under Creative Commons BY-NC-SA 3.0 License.