dmtrs / bliig Goto Github PK
View Code? Open in Web Editor NEWYii powered blog engine.
Yii powered blog engine.
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.
There must be a categories folder.
Each post must BELONG_TO one category.
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
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.
This may sound illy. But there must be a consideration for lynx users :)
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.
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.
Extensions must be submodules in the repository
This will be a spool thread about the administration menu:
Would be handy to show how it works and looks.
The working database schema of the project exist can be found on the protected/data/_blog.db
.
There is a need for a mysql database creation code.
Make a quick update to init.sh make all the configuration described in installation docs.
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 ).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.