Giter VIP home page Giter VIP logo

bliig's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bliig's Issues

update post

When user is at post/view and has access to edit the post there should be a update post link to the operations as well.

sharebox extension

ShareBox extension has been added to the the post views. It is not working though because there is no proper url set.
The issue is that the Post::model()->$url is like "/bliig/post/1/Foo" which need to be binded with the "http://domain.com/webapp"
And idea is to use parse_url to $this->createAbsoluteUrl and get the protocol and domain and then concatenate that with what is returned form the first one

post view

There are 2 view files at the moment _shortview.php and _view.php where the header part is the same.

    <div class="title">
    <?php $this->beginWidget('ext.EReplacer', array(
        'bag'=>'{}',
        'data'=>Yii::app()->params['icons'],
        'replace'=>'(isset($data[$el])) ? "<img src=\''.Yii::app()->request->baseUrl.'/".$data[$el]."\' />" : null;'
    ));?>
            <?php echo CHtml::link(CHtml::encode($data->title), $data->url); ?>
    <?php $this->endWidget(); ?>

    <?php if(!Yii::app()->user->isGuest) {
        echo CHtml::link(
            CHtml::image(Yii::app()->request->baseUrl."/data/16/page_edit.png", 
                'Edit',
                array('style'=>'float: right;',)
            ), $this->createUrl('update', array('id'=>$data->id))); 
    } ?>

    </div>
    <div class="author">
            posted by <?php echo $data->author->username . ' on ' . date('F j, Y',$data->create_time); ?>
    </div>

This means that each change that appears in this part must occur to both files. The same happens with the nav part

    <div class="nav">
            <b>Tags:</b>
            <?php echo implode(', ', $data->tagLinks); ?>
            <br/>
            <?php echo CHtml::link('Permalink', $data->url); ?> |
            <?php echo CHtml::link("Comments ({$data->commentCount})",$data->url.'#comments'); ?> |
            Last updated on <?php echo date('F j, Y',$data->update_time); ?>
    </div>

There must be 1 file with the head and the foot and maybe 1 or 2 other for the content.

preview button

Add a preview button to the post/create and post/update to open a CJuiDialog and preview the post. This way user can preview what is going to submit.

users profile

There is a creation need for a users profile.
Then there is to update each time user's name appears to point to the users profile.

admin menu

This will be a spool thread about the administration menu:

  • Add update post when in view post.

Demo

Would be handy to show how it works and looks.

update init.sh

Make a quick update to init.sh make all the configuration described in installation docs.

update database structure

The database structure is pretty simple but my opinion is that it must be changed to the following style:

CREATE TABLE tbl_comment
(
         id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
        content TEXT NOT NULL,
        status INTEGER NOT NULL,
        create_time INTEGER,
        author VARCHAR(128) NOT NULL,
        email VARCHAR(128) NOT NULL,
        url VARCHAR(128),
        post_id INTEGER NOT NULL,
        CONSTRAINT FK_comment_post FOREIGN KEY (post_id)
                REFERENCES tbl_post (id) ON DELETE CASCADE ON UPDATE RESTRICT
 );

CREATE TABLE tbl_comment
(
        id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
        co_content TEXT NOT NULL,
        co_status INTEGER NOT NULL,
        co_create_time INTEGER,
        us_author VARCHAR(128) NOT NULL,
        co_email VARCHAR(128) NOT NULL,
        co_url VARCHAR(128),
        po_id INTEGER NOT NULL,
        CONSTRAINT FK_comment_post FOREIGN KEY (post_id)
                REFERENCES tbl_post (id) ON DELETE CASCADE ON UPDATE RESTRICT
 );

So there will be more easy to read. co_ stands for comment, us_ stands for user ( the tbl_user will have all it's field start with us_ as well), po_ stands for posts ( same for the rest of the tables ).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.