Skip to content
Hossein Azizabadi edited this page Jul 19, 2013 · 7 revisions

Voltan suggestion

I use some of added options by linzongshu too

Requirement

  • Article

    • Operation
      • Create draft
        • Title/Sub title
        • Setting category
          • Multi category
        • Setting channel
          • Multi channel
        • Published at fix time
        • Setting SEO
        • Setting tags
        • Inserting photos
        • Featured image ?
        • Support Attach extra files
          • Video files : play on player under article
          • Audio files : play on player under article
          • Image files : Show as gallery under article
          • Others : download
        • Support extra fields
        • Add Tag
        • Select related articles
      • Save draft
      • Pending
      • Publish
      • Preview
    • Management
      • Searching
      • Edit article
      • Delete article
      • Active/Deactivate article
  • Category

    • Operation
      • Add category
        • Set permissions
          • Read
          • Write
          • Comment
          • vote
        • Set view options
          • Select list of articles template
            • News type
            • List type
            • Table type
            • Media type
            • Spotlight type
          • Select fields
            • Show date
            • Show hits
            • Show author
            • Show topic
            • Show topic informations
            • And more
        • Set list of articles type * List of all article from topic and all sub category * List of all articles from just main category * List of all articles from just sub category
        • Set sub category
        • Set title / information / image
    • Management
      • Edit category
      • Delete category
      • Searching
  • Spotlight

    • Operation
      • Add category
        • Select article
        • Select category (Show article to this category)
        • Set publish time
        • Set expire time
        • Set status
    • Management
      • Edit Spotlight
      • Delete Spotlight
      • Searching
  • Extra field

    • Operation
      • Add Extra field
        • Set title
        • Set image / logo
        • Set type ('text'| | |'link'| | |'currency'| | |'date'| | |'number'| | | ?)
        • Set searchable or not
    • Management
      • Edit Extra field
      • Delete Extra field
      • Change order
  • Attach

    • Operation
      • Add Attach ( Unser article or Attachment page)
    • Management
      • Edit Attach
      • Delete Attach
  • Homepage

Database design

  • link

** Description ** For join each article to some category ( multicategory system ), This is most important table on article module and all querys make on this table. for get any list of article by date / hit / vote and ... , we shuld use this table for get article list , after that get full actilce inforamtion from article table

nametypepropertydefault valuedescription
idint (10) unsigned NOT NULL auto_increment
storyint(10) unsigned NOT NULL
topicint(10) unsigned NOT NULL
publishint(10) unsigned NOT NULL
statustinyint(1) unsigned NOT NULL
authorint(10) unsigned NOT NULL
  • article
nametypepropertydefault valuedescription
idint(10)unsigned NOT NULL auto_increment
titlevarchar(255)NOT NULL
subtitlevarchar(255)NOT NULL
categoryvarchar(255)NOT NULLSave as json for just use on article page
shorttext
bodytext
markupENUM('html','text','markdown')html
seo_titlevarchar(255)NOT NULL
seo_keywordsvarchar(255)NOT NULL
seo_descriptionvarchar(255)NOT NULL
slugvarchar(255)NOT NULL
importanttinyint(1)unsigned NOT NULLOr recommended
statustinyint(1)unsigned NOT NULL
time_createint(10)unsigned NOT NULL
time_updateint(10)unsigned NOT NULL
time_publishint(10)unsigned NOT NULL
authorint(10)unsigned NOT NULL
hitsint(10)unsigned NOT NULL
imagevarchar(255)NOT NULL
image_pathvarchar(16)NOT NULLMake page by year/month
commentsint(10)unsigned NOT NULLGet information form comment module
pointint(10)NOT NULLGet information form vote module ( dont set unsigned )
countint(10)unsigned NOT NULLGet information form vote module
favoriteint(10)unsigned NOT NULLGet information form favorite module
attachtinyint(3)unsigned NOT NULLCount of attached files if > 0 get list
extratinyint(3)unsigned NOT NULLCount of extra fields if > 0 get list
related_typetinyint(3) UNSIGNED NOT NULLDEFAULT 0
pagestinyint(3) UNSIGNED NOT NULLDEFAULT 0
  • draft
nametypepropertydefault valuedescription
idint(10)unsigned NOT NULL auto_increment
articleint(10) UNSIGNED NOT NULL
titlevarchar(255)NOT NULL
subtitlevarchar(255)NOT NULL
categoryvarchar(255)NOT NULLSave as json for just use on article page
shorttext
bodytext
markupENUM('html','text','markdown')html
imagevarchar(255)NOT NULL
image_pathvarchar(16)NOT NULLMake page by year/month
authorint(10)unsigned NOT NULL
pagestinyint(3) UNSIGNED NOT NULLDEFAULT 0
categoryvarchar(255)NOT NULLSave as json for just use on article page
tagvarchar(255) NOT NULL
related_typetinyint(3) UNSIGNED NOT NULLDEFAULT 0
seo_titlevarchar(255)NOT NULL
seo_keywordsvarchar(255)NOT NULL
seo_descriptionvarchar(255)NOT NULL
slugvarchar(255)NOT NULL
time_createint(10)unsigned NOT NULL
time_updateint(10)unsigned NOT NULL
time_publishint(10)unsigned NOT NULL
time_saveint(10)unsigned NOT NULL
importanttinyint(1)unsigned NOT NULLOr recommended
statustinyint(1)unsigned NOT NULL
  • category
nametypepropertydefault valuedescription
idint(10)unsigned NOT NULL auto_increment
leftint(10) UNSIGNED NOT NULL
rightint(10) UNSIGNED NOT NULL
depthint(10) UNSIGNED NOT NULL
titlevarchar(255)NOT NULL
slugvarchar(255)NOT NULL
bodytext
markupENUM('html','text','markdown')html
imagevarchar(255)NOT NULL
image_pathvarchar(16)NOT NULL
keywordsvarchar(255)NOT NULL
descriptionvarchar(255)NOT NULL
authorint(10)unsigned NOT NULL
time_createint(10)unsigned NOT NULL
statustinyint(1)unsigned NOT NULL
inlisttinyint(1)unsigned NOT NULLdefault '1'
topic_typeenum('module','topic') NOT NULL
topic_homepageenum('type1','type2','type3') NOT NULL
topic_stylevarchar(64)NOT NULL
perpagetinyint(3)unsigned NOT NULL
columnstinyint(3)unsigned NOT NULL
show_topictinyint(1)unsigned NOT NULLdefault '1'
show_topicinfotinyint(1)unsigned NOT NULLdefault '1'
show_authortinyint(1)unsigned NOT NULLdefault '1'
show_datetinyint(1)unsigned NOT NULLdefault '1'
show_pdftinyint(1)unsigned NOT NULLdefault '1'
show_printtinyint(1)unsigned NOT NULLdefault '1'
show_mailtinyint(1)unsigned NOT NULLdefault '1'
show_navtinyint(1)unsigned NOT NULLdefault '1'
show_hitstinyint(1)unsigned NOT NULLdefault '1'
show_comstinyint(1)unsigned NOT NULLdefault '1'
  • spotlight
nametypepropertydefault valuedescription
idint(10) unsigned NOT NULL auto_increment
storyint(10) unsigned NOT NULL
topicint(10) NOT NULL
authorint(10) unsigned NOT NULL
publishint(10) unsigned NOT NULL
expireint(10) unsigned NOT NULL
statustinyint(1) unsigned NOT NULLdefault '1'
  • attach
nametypepropertydefault valuedescription
idint (10) unsigned NOT NULL auto_increment
titlevarchar (255) NOT NULL
filevarchar (255) NOT NULL
pathvarchar(16) NOT NULL
storyint(10) unsigned NOT NULL
createint(10) unsigned NOT NULL
sizeint(10) unsigned NOT NULL
typeenum('archive','image','video','audio','pdf','doc','other') NOT NULL
statustinyint(1) unsigned NOT NULL
hitsint(10) unsigned NOT NULL
  • extra field
nametypepropertydefault valuedescription
idint (10) unsigned NOT NULL auto_increment
titlevarchar (255) NOT NULL
imagevarchar (255) NOT NULL
typeenum('text','link','currency','date','number') NOT NULL
orderint(10) unsigned NOT NULL
statustinyint(1) unsigned NOT NULLdefault '1'
searchtinyint(1) unsigned NOT NULLdefault '1'
  • extra field data
nametypepropertydefault valuedescription
idint (10) unsigned NOT NULL auto_increment
fieldint(10) unsigned NOT NULL
storyint(10) unsigned NOT NULL
datavarchar(255) NOT NULL
  • related
nametypepropertydefault valuedescription
idint(10) UNSIGNED NOT NULL AUTO_INCREMENT
articleint(10) UNSIGNED NOT NULL
relatedint(10) UNSIGNED NOT NULL
ordertinyint(3) UNSIGNED NOT NULL
  • visit
nametypepropertydefault valuedescription
idint(10) UNSIGNED NOT NULL AUTO_INCREMENT
articleint(10) UNSIGNED NOT NULL
dateint(10) UNSIGNED NOT NULL
countint(10) UNSIGNED NOT NULL
  • author
nametypepropertydefault valuedescription
id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT
name` varchar(64) NOT NULL
photo` varchar(255) NOT NULL
description` text NOT NULL
uidint(10) UNSIGNED NOT NULL
countint(10) UNSIGNED NOT NULL
  • statistics
nametypepropertydefault valuedescription
id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT
articleint(10) UNSIGNED NOT NULL
visitsint(10) UNSIGNED NOT NULL
votevarchar(255) NOT NULL

Controllers

  • User side

    • Index

      • Description : list of articles for index
      • class Structure
        • class IndexController extends ActionController
        • Actions
          • index action
            • Check permition
            • Check configs
            • Check params
            • Set query informtion ( Make query by : IndexController::Articlelist )
            • Set paginator informtion ( Make query by : IndexController::ArticlePaginator )
            • Set Spotlight
            • Set view
          • Articlelist action
            • Check configs
            • Make settings
            • Get list of arctiles from link table
            • Get article information from article table
          • ArticlePaginator action
    • Category

      • Description : list of articles for each category
      • class Structure
        • class CategoryController extends IndexController
        • Actions
          • index action
            • Check permition
            • Check configs
            • Check params
            • Set query informtion ( Make query by : IndexController::Articlelist )
            • Set paginator informtion ( Make query by : IndexController::ArticlePaginator )
            • Set Spotlight
            • Set view
          • ListCategory action
            • Get list of all categoryes
            • Set view
    • Tag

      • Description : list of articles for each tag ( get from tag module )
      • class Structure
        • class TagController extends IndexController
        • Actions
          • index action
            • Check permition
            • Check configs
            • Check params
            • Set query informtion ( Make query by : IndexController::Articlelist )
            • Set paginator informtion ( Make query by : IndexController::ArticlePaginator )
            • Set Spotlight
            • Set view
          • ListTag action
            • Get list of all article module tags from tag module
            • Set view
    • Author

      • Description : list of articles for each author
      • class Structure
        • class AuthorController extends IndexController
        • Actions
          • index action
            • Check permition
            • Check configs
            • Check params
            • Set query informtion ( Make query by : IndexController::Articlelist )
            • Set paginator informtion ( Make query by : IndexController::ArticlePaginator )
            • Set Spotlight
            • Set view
          • ListAuthor action
            • Get list of all Author
            • Set view
    • Favorite

      • Description : list of favorite articles by each user ( get from tag favorite )
      • class Structure
        • class FavoriteController extends IndexController
        • Actions
          • index action
            • Check permition
            • Check configs
            • Check params
            • Set query informtion ( Make query by : IndexController::Articlelist )
            • Set paginator informtion ( Make query by : IndexController::ArticlePaginator )
            • Set Spotlight
            • Set view
    • Archive

      • Description : list of articles by selected date
      • class Structure
        • class ArchiveController extends IndexController
        • Actions
          • index action
            • Check permition
            • Check configs
            • Check params
            • Set query informtion ( Make query by : IndexController::Articlelist )
            • Set paginator informtion ( Make query by : IndexController::ArticlePaginator )
            • Set Spotlight
            • Set view
          • ListDate action
            • Get list of years and months
            • Set view
    • Article

      • Description : show / print / submit article
      • class Structure
        • class ArticleController extends ActionController
        • Actions
          • index action
            • Check permition
            • Check configs
            • Check params
            • Get article
            • Get all attach files
            • Get all extra data
            • Get all related
            • Set view
          • print action
            • Check permition
            • Check configs
            • Check params
            • Make printable verion
            • Set view
          • submit action ( If needed )
            • Check permition
            • Check configs
            • Check params
            • Get submit form
            • Set view
  • Admin aide

APIs

  • Link Api

    • LinkSet : Set articles on link table
    • LinkGet : get list of articles by category id
  • Article Api

    • ArticleCategoryList : Get all category information of this article
    • ArticlePager : Get next and prev acticles
    • Articlepage : Make multy page article
    • ArticleRelatedList : Get related articles
  • Attach Api

    • AttachCount : Get count of attached files
    • AttachList : Get List of attached files
    • AttachAdd
    • AttachDelete
  • Extra Api

    • ExtraCount : Get count of extra fields
    • ExtraGet : Get list of extra fields for show in forms
    • ExtraSet : Save extra field datas to DB
    • ExtraForm : Get and Set extra field data valuse to form
    • ExtraArticle : Get all extra field data for selected article
  • Spotlight Api

    • SpotlightList : make Spotlight list for homepage and each category
  • Category Api

    • CategorySetting : Set page setting from topic or module config
      • Column : Set column class for Setting function
      • Template : Set template for Setting function
    • CategorySet : Set article categoryes to link table
    • CategoryGet : make list and information of categorys for load articles ides from link table
  • Author Api

    • AuthorAdd : Add article and update Author
    • AuthorDelete : Delete article and update Author
    • AuthorReset : Reset author information

Clone this wiki locally