How to create your first extension
Return to Extensions Gallery
rating: +3+x

An extension's code has three parts to it:

  • The name of the extension
  • Information about who created it
  • The list of instructions

Here is an example:

EXTENSION HelloWorld
CREATOR leiger
append Hello World!

The name of the extension

The name of the extension must be defined on the first line. Define it like this:

EXTENSION extension name here

The word "EXTENSION" must be upper-case. Everything else is completely free-form… whatever you write (up until the end of the line) will be shown in STE as the extension name.

Information about who created it

The name(s) of whoever created the extension are also part of the code. This must be defined on the second line, like so:

CREATOR creator name(s) here

The word "CREATOR" must be upper-case. Everything else is completely free-form… whatever you write (up until the end of the line) will be shown in STE as the list of creators.

The list of instructions

The third and subsequent lines are all reserved for your instructions to STE. A few things should be noted:

  • Each new line defines a new instruction (or statement)
  • Do not leave any line blank

The format is like this:

instruction instruction-details

For more information, please read the list of valid instructions and familiarise yourself with the extension terminology.

The details tells STE what it needs to do with the instruction. For 'append', the details tell STE what text to add to the editor. So this:

append Hello, World!

Will add the text "Hello, World!" (without the quotes) to STE.

Note that the instruction name (e.g. "append") must be in lower-case.

More instruction types will be supported in the near future.


Discussion

wdavatar?user=leiger
leiger

20 Dec 2010 14:22. Edited 2 times. (Edit, Permalink)
Hey Bryce, what do you think about the "extension submission" process?

Is it easy to understand the first time you tried it? Anything you would suggest changing, etc?

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

wdavatar?user=
(user deleted)

20 Dec 2010 15:01. Edited 1 times. (Edit, Permalink)
I just went through the process and it was a bit confusing until I got through all of the steps. The only thing I would suggest you add is a note to the initial form indicating we're going to add the code for the extension after saving the page by editing the code section.

Now that I've been through it, I won't need to know that, but it should be documented somewhere for first-timers.

For the record, I am very fired up about the direction this is going. Can't wait to see the variables implemented!

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

wdavatar?user=leiger
leiger

21 Dec 2010 01:35. Edited 1 times. (Edit, Permalink)

Ed Johnson:
The only thing I would suggest you add is a note to the initial form indicating we're going to add the code for the extension after saving the page by editing the code section.

Will do that now :)

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

wdavatar?user=bcammo
bcammo

21 Dec 2010 23:25. Edited 1 times. (Edit, Permalink)
Same as Ed, I had to think twice before working out where to put the code when there wasn't a field for it in the initial form, but now I know.
A couple of thoughts about the extension pages:

  1. given that the ID number is what people need to install the extension, I think it needs a more prominent position on the page. I'm thinking either 5: Tweet Button as the page title, or the number in a big box up next to the rate module, as well as being in the information box.
  2. I'm still not sure about this, but maybe also putting the extension logo on extension pages would help differentiate them, because currently they all look much the same.

Great job with the site, it is simple and easy to understand, and works seamlessly.

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

wdavatar?user=leiger
leiger

22 Dec 2010 00:07. Edited 1 times. (Edit, Permalink)

bcammo:
or the number in a big box up next to the rate module, as well as being in the information box.

This was my original intention before I even built the site, to have the number blown up to a large size and prominently shown. I just haven't gotten around to it yet ;-) I will see about getting that done later today.

maybe also putting the extension logo on extension pages would help differentiate them, because currently they all look much the same.

Another thing I want to do :) Not sure exactly where to put it though. I'm thinking that somewhere inside the "Description" box would be best simply because when you edit that section, you can also edit the image. Any thoughts on this? Perhaps I should just float it to the right of that box…

Great job with the site, it is simple and easy to understand, and works seamlessly.

Thanks :)

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

wdavatar?user=leiger
leiger

22 Dec 2010 00:19. Edited 0 times. (Edit, Permalink)
I've just enabled comments in the documentation category and moved this discussion here. It didn't really make much sense to have it on the Tweet Button page.

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

wdavatar?user=
(user deleted)

22 Dec 2010 07:03. Edited 0 times. (Edit, Permalink)

Code       After saving this page, scroll down to the section titled Code and edit it. You can put your extension code there.

Just saw this addition to the dataform. It's a simple solution and put in the perfect spot.

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

Post Reply

Add reply on "How to create your first extension"