"Hello World!" - Extension & Skeleton Tool

Discussion forum for Extension Writers regarding Extension Development.
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling
Contact:

"Hello World!" - Extension & Skeleton Tool

Post by nickvergessen » Fri Nov 15, 2013 10:48 am

*************************** UPDATE ***************************
This extension has been released as a phpBB Official Tool.
It can now be downloaded from our Extensions Database.
*************************** UPDATE ***************************


I made an as-simple-as-possible Extension that uses some of the basic mechanisms in phpBB 3.1 your extension will use aswell:
  • Events: for adding a link to a new page in the header and loading a language file globally
  • Routes and Controllers: which display the new page
  • Ext Language files: so your files are where your code is
  • Ext Style files: so your style files are where your code is
  • Migrations: Database changes similar to UMIL in 3.0
  • ACP Module
You can find the code at https://github.com/phpbb/phpbb-ext-acme-demo
To install it and see the demo:
  1. Download the .zip
  2. Create the folder ext/acme/demo/ next to your config.php
  3. Copy the content from the .zip to the new folder
  4. Go to ACP > Customise > Extensions >
    and enable the Acme Demo Extension extension
Now you should see the link in the header:
acme-demo-link.png
acme-demo-link.png (11.48 KiB) Viewed 6237 times
and if you click it, you should see the "Hello World!"
acme-demo-page.png
If you change the url from phpBB/app.php/demo/world to phpBB/app.php/demo/nickvergessen,
you will see the message "Hello nickvergessen!"

---------------------------------------------------------------------
(Updated Mar 13, 2016 by VSE)

The Extension Skeleton is an extension that you install in your development phpBB board. Once installed, you can use it to generate the starter files and directories for your own extensions.

The Extension Skeleton will ask you for some basic information about the extension you want to create, such as the name, author information, requirements, and what type of components it will use (listeners, controllers, styles, template events, unit testing, etc.). It will then generate an extension package based on your needs. It will be a working “skeleton” of the Acme Demo extension, and will be ready for you to begin to edit and update with your own code.
2015-06-27_12_48_29.png
It can be accessed via Graphic User Interface through a link in your forum’s navbar and from the Command Line Interface with the command: $ bin/phpbbcli.php extension:create

The Extension Skeleton is a great litle tool that every extension developer should have in their toolkit. It simplifies and expedites the mundane task of starting a new extension, and ensures you have a correctly configured set of composer, PHP and style files with which to begin coding your extension.
No Support via PM

User avatar
Galandas
Registered User
Posts: 731
Joined: Thu Jul 23, 2009 4:11 pm
Location: Italy
Name: Rey
Contact:

Re: "Hello World!" - Extension

Post by Galandas » Fri Nov 15, 2013 1:11 pm

Thank you!
English is not my native language My CDB Contributions My RC extensions

User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling
Contact:

Re: "Hello World!" - Extension

Post by nickvergessen » Tue Nov 19, 2013 12:22 pm

Added a migration and ACP module.
No Support via PM

nachtelb
Registered User
Posts: 150
Joined: Sun Feb 19, 2006 2:00 pm
Location: Germany
Name: Bernhard
Contact:

Re: "Hello World!" - Extension

Post by nachtelb » Wed Nov 20, 2013 7:48 am

Thank you! I will have a look on it and try to understand. :)

User avatar
Mess
Registered User
Posts: 985
Joined: Wed Jul 01, 2009 6:37 am
Name: Kim

Re: "Hello World!" - Extension

Post by Mess » Wed Nov 20, 2013 10:18 am

Thanks! :)

User avatar
ViolaF
Registered User
Posts: 1412
Joined: Tue Aug 14, 2012 11:52 pm

Re: "Hello World!" - Extension

Post by ViolaF » Sun Nov 24, 2013 12:19 pm

Thanks again for your work. Please add a little acp example as mentioned
viewtopic.php?f=461&t=2211141#p13460301

User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling
Contact:

Re: "Hello World!" - Extension

Post by nickvergessen » Mon Nov 25, 2013 8:28 am

ACP Example is already included (just no screenshot)
No Support via PM

User avatar
ViolaF
Registered User
Posts: 1412
Joined: Tue Aug 14, 2012 11:52 pm

Re: "Hello World!" - Extension

Post by ViolaF » Mon Nov 25, 2013 7:48 pm

Thanks again very much for your effort :D

User avatar
wintstar
Registered User
Posts: 280
Joined: Sat Mar 07, 2009 12:39 pm
Location: Linden/Hessen; Germany
Name: Stephan
Contact:

Re: "Hello World!" - Extension

Post by wintstar » Tue Mar 11, 2014 6:11 am

With Build #1296 there is this error message:

Code: Select all

Fatal error: Call to undefined method phpbb\controller\helper::url() in ...\ext\acme\demo\event\main_listener.php on line 61
Is this a bug?
Greeting Stephan :-)

Quote: "To achieve the possible, the impossible has to be tried again and again" (Hermann Hesse (1877-1962)).
A look into the future phpBB 3.1.0 - Board, current Builds
phpBB 3.0.13 html 5 und responsive

User avatar
Pico88
Registered User
Posts: 878
Joined: Sat Mar 07, 2009 10:24 pm
Location: Poland
Name: Lukasz

Re: "Hello World!" - Extension

Post by Pico88 » Tue Mar 11, 2014 7:56 am

url method is changed to route in the latest release, so that is why you get that error ;)
Please do not PM me for support.

User avatar
wintstar
Registered User
Posts: 280
Joined: Sat Mar 07, 2009 12:39 pm
Location: Linden/Hessen; Germany
Name: Stephan
Contact:

Re: "Hello World!" - Extension

Post by wintstar » Tue Mar 11, 2014 11:20 am

Many thanks picco88 :)
Greeting Stephan :-)

Quote: "To achieve the possible, the impossible has to be tried again and again" (Hermann Hesse (1877-1962)).
A look into the future phpBB 3.1.0 - Board, current Builds
phpBB 3.0.13 html 5 und responsive

User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling
Contact:

Re: "Hello World!" - Extension

Post by nickvergessen » Tue Mar 11, 2014 2:00 pm

Is updated now and should be running again
No Support via PM

User avatar
wintstar
Registered User
Posts: 280
Joined: Sat Mar 07, 2009 12:39 pm
Location: Linden/Hessen; Germany
Name: Stephan
Contact:

Re: "Hello World!" - Extension

Post by wintstar » Tue Mar 11, 2014 5:40 pm

Thanks nickvergessen :)
Greeting Stephan :-)

Quote: "To achieve the possible, the impossible has to be tried again and again" (Hermann Hesse (1877-1962)).
A look into the future phpBB 3.1.0 - Board, current Builds
phpBB 3.0.13 html 5 und responsive

User avatar
Stoker 4.0
Registered User
Posts: 1480
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

Re: "Hello World!" - Extension

Post by Stoker 4.0 » Sat Mar 29, 2014 1:35 pm

Required meta field 'licence' has not been set.

User avatar
PayBas
Former Team Member
Posts: 930
Joined: Thu May 25, 2006 12:37 am

Re: "Hello World!" - Extension

Post by PayBas » Sat Mar 29, 2014 2:40 pm

Stoker 4.0 wrote:Required meta field 'licence' has not been set.
Too early. Either use licence (instead of license), or wait for beta 2.

viewtopic.php?f=461&t=2234931

Post Reply

Return to “Extension Writers Discussion”

Who is online

Users browsing this forum: No registered users and 9 guests