1

(14 replies, posted in PunBB show off)

Well, because I purely use punBB database structure without any modification yet.

2

(14 replies, posted in PunBB show off)

I have put it in GitHub, but it is very incomplete and hopefully you won't laugh at my code. I usually do solo programming, I rarely program with other programmer.

https://github.com/invisal/punbbevolution

3

(14 replies, posted in PunBB show off)

Trace wrote:

I like the idea, don't like the interface. Maybe a repo on GitHub?

I am planning to have it on GitHub once I have some core functionality done. It would be shameful to post something that is not functional yet (4 hours of works so far). Thank for response.

4

(14 replies, posted in PunBB show off)

(Reserved)

5

(14 replies, posted in PunBB show off)

Additional Features

  • Use Gravatar as default avatar

  • Login from social network site (Facebook, etc...)

  • (Reserved for undecided features)

6

(14 replies, posted in PunBB show off)

Architecture - Database Layer

The whole script will be relied on the tiny wrapper around PDO.

Architecture - Cache
Undecided

Architecture - Post Format
Undecided, maybe using Markdown instead of BBCode.

Architecture - Extension Manager
Undecided

7

(14 replies, posted in PunBB show off)

Architecture - Override Widget's Interface

Each widget comes with its own interface, but can be override by template by
have the right file name at the template folder.

For example:

templates/default/HeaderWidget.php

<!-- Override the HeaderWidget default interface -->

8

(14 replies, posted in PunBB show off)

Architecture - Create Widget

Widget can be easily created by extend the WidgetBase class and put
it at the right folder position.

For example:

widget/Header/core.php

class HeaderWidget extends WidgetBase {
    public function load($data) {
        // do something here
        // do more thing here

        $this->show($data);
    }
}

widget/Header/template.php

    <title><?php echo $title; ?></title>
    <meta name="Keywords" content="<?php echo $meta_keyword ?>">
    <!-- etc .... -->

9

(14 replies, posted in PunBB show off)

New Interface (mock-up only)
http://s17.postimg.org/61pb72b3j/This_is_testing.png

10

(14 replies, posted in PunBB show off)

I got bored, so today I decided to reprogram the whole punBB from scratch.
Basically, it is a whole new code with the same database structure like punBB
This is what I have gotten so far. (After I finish the core functionality, I will
post the whole source code)

Architecture - Theme

  • Each page consists of collection of widget.

  • Theme is a collection of pages

http://s14.postimg.org/6rtblmnqp/page_widget.png

Simplify the code for each page by breaking down logic into many small pieces of widget.
Each widget loads it own data and has its own interface. Its interface can be overrided by
theme manager.

For example:
Code for main page

index.php

    // Load widgets
    $template->load('main', array(
        new Widget('Header', array(
                "title" => "punBB Evolution",
                "meta_desc" => "This is meta description",
                "meta_keyword" => "This is keyword"
        )),
        new Widget('ForumMenu', array("selected" => "Index")),
        new Widget('ForumList')
    ));
    
    // Process the template and all widget inside the
    // templates
    $template->show();

templates/default/main.php

<!doctype html>
<html>
    <head>
        <link rel='stylesheet' href='<?php echo $template_base ?>/styles.css'>
        <?php $this->widget("Header"); ?>
    </head>
    <body>
        <div id='punbb-wrap'>
            <?php $this->widget("ForumMenu"); ?>
            <?php $this->widget("ForumList"); ?>
        </div>
    </body>
</html>

As you can see, template (templates/default/main.php) is the one who specify the position of each widget,
while page (index.php) specify which widgets are needed.

(Continue to next post)