1 (edited by frankpeng 2011-11-22 17:34)

Topic: Hello World Extension

Hi, guys!

In order to make our own extensions, we have to make a hello world extension to get started.

This is my hello world extension. It inserts a new column in table topics. You can confirm it by looking at it in the database after installing it.
Then you can uninstall, the column will disappear.

It has only two files: index.html and manifest.xml

please name the folder as pun_helloworld and put in extensions directory



<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension SYSTEM "ext-1.0.dtd">

** author: pccom.frank@hotmail.com

<extension engine="1.0">
        <title>frank helloworld extension </title>
        <description>Insert a column into database</description>

if (!$forum_db->field_exists('topics', 'helloworld'))
        $forum_db->add_field('topics', 'helloworld', 'varchar(255)', false, '');


$forum_db->drop_field('topics', 'helloworld');


Some one please make a better hello world to display something.