XF 2.0 Hello World addon sample

Tom_

Member
I'm askin for your help, is there any simple demo addon anywhere? XF2 addon documents are little bit too hard for me, i need simple Hello World addon to work my own simple addons.

If someone is willing to do Hello World addon for me, I would be really grateful.
 
Here is an Hello World add-on for you with step-by-step instructions on how to create it :
  1. Edit src/config.php
    PHP:
    $config['debug'] = true;
    $config['development']['enabled'] = true;
    $config['development']['defaultAddOn'] = 'HelloWorld';
  2. On the shell within your XF 2 root php cmd.php xf-addon:create
    ID = HelloWorld
    Title = Hello World
    Version ID = 1
    Version String = 1.0.0
    Supersedes XF 1 Add-on = N
    Enable = Y
    Write JSON = Y
    Setup Required = N
  3. Got to http://<boardurl>/admin.php?template-modifications/add&type=public
    Template = PAGE_CONTAINER
    Modification Key = HelloWorld
    Description = Show "Hello World"
    Search Type = Simple Replacement
    Find = <!--XF:EXTRA_OUTPUT-->
    Replace =
    Code:
    $0
    <p>Hello World!</p>
    Add-on = Hello World
  4. Click Save
  5. Back on the shell: php cmd.php xf-addon:build-release HelloWorld
This will generate the attached Add-on which will display "Hello World!" on top of each public page.

HTH
 

Attachments

Last edited:
Back
Top Bottom