Skip to content

Commit

Permalink
Update ask module, not complated
Browse files Browse the repository at this point in the history
  • Loading branch information
voltan committed Feb 27, 2014
1 parent 37499ec commit e0eae71
Show file tree
Hide file tree
Showing 37 changed files with 1,608 additions and 1,122 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
Ask
===

Ask module

17 changes: 0 additions & 17 deletions asset/css/front.css
Original file line number Diff line number Diff line change
@@ -1,17 +0,0 @@
.question-info ul li {
text-align: center;
}

.question-info ul li span {
display: block;
}

.question-title h3 {
vertical-align: top;
margin: 0;
padding: 0;
}

.question-author {
margin-top: 15px;
}
72 changes: 29 additions & 43 deletions config/config.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
<?php
/**
* Ask module config
* Pi Engine (http://pialog.org)
*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Copyright (c) Pi Engine http://www.xoopsengine.org
* @license http://www.xoopsengine.org/license New BSD License
* @author Hossein Azizabadi <[email protected]>
* @since 3.0
* @package Module\Ask
* @version $Id$
* @link http://code.pialog.org for the Pi Engine source repository
* @copyright Copyright (c) Pi Engine http://pialog.org
* @license http://pialog.org/license.txt New BSD License
*/

/**
* @author Hossein Azizabadi <[email protected]>
*/

return array(
Expand All @@ -24,8 +18,8 @@
'name' => 'admin'
),
array(
'title' => __('Show'),
'name' => 'show'
'title' => __('Front'),
'name' => 'front'
),
array(
'title' => __('Feed'),
Expand All @@ -48,29 +42,37 @@
),
// Show
'show_perpage' => array(
'category' => 'show',
'category' => 'front',
'title' => __('Perpage'),
'description' => __('Number of question in each page'),
'description' => __('Number of questions in each page'),
'edit' => 'text',
'filter' => 'number_int',
'value' => 10
),
'show_index' => array(
'category' => 'show',
'title' => __('Perpage'),
'description' => __('Number of last question for show in index controller'),
'edit' => 'text',
'filter' => 'number_int',
'value' => 50
),
'show_tags' => array(
'category' => 'show',
'category' => 'front',
'title' => __('Tags'),
'description' => __('Number of tags in tag controller'),
'edit' => 'text',
'filter' => 'number_int',
'value' => 50
),
'auto_approval' => array(
'title' => __('Automatic approval'),
'description' => '',
'edit' => array(
'type' => 'select',
'options' => array(
'options' => array(
0 => __('All questions and answers need admin review before publish'),
1 => __('Automatic approval all questions and answers'),
),
),
),
'filter' => 'number_int',
'value' => 1,
'category' => 'front',
),
// Feed
'feed_icon' => array(
'category' => 'feed',
Expand All @@ -97,21 +99,5 @@
'filter' => 'number_int',
'value' => 1
),
'vote_type' => array(
'category' => 'vote',
'title' => __('VoteBar type'),
'description' => '',
'filter' => 'string',
'value' => 'plus',
'edit' => array(
'type' => 'select',
'options' => array(
'options' => array(
'plus' => __('Plus'),
'star' => __('Star'),
),
),
),
),
),
);
29 changes: 8 additions & 21 deletions config/database.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,15 @@
<?php
/**
* Ask module config
* Pi Engine (http://pialog.org)
*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Copyright (c) Pi Engine http://www.xoopsengine.org
* @license http://www.xoopsengine.org/license New BSD License
* @author Hossein Azizabadi <[email protected]>
* @since 3.0
* @package Module\Ask
* @version $Id$
* @link http://code.pialog.org for the Pi Engine source repository
* @copyright Copyright (c) Pi Engine http://pialog.org
* @license http://pialog.org/license.txt New BSD License
*/

/**
* @author Hossein Azizabadi <[email protected]>
*/
return array(
// SQL schema/data file
'sqlfile' => 'sql/mysql.sql',
// Tables to be removed during uninstall, optional - the table list will be generated automatically upon installation
// will be fix
'schema' => array(
'question' => 'table',
)
'sqlfile' => 'sql/mysql.sql',
);
93 changes: 27 additions & 66 deletions config/module.php
Original file line number Diff line number Diff line change
@@ -1,79 +1,40 @@
<?php
/**
* Ask module config
* Pi Engine (http://pialog.org)
*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Copyright (c) Pi Engine http://www.xoopsengine.org
* @license http://www.xoopsengine.org/license New BSD License
* @author Hossein Azizabadi <[email protected]>
* @since 3.0
* @package Module\Ask
* @version $Id$
* @link http://code.pialog.org for the Pi Engine source repository
* @copyright Copyright (c) Pi Engine http://pialog.org
* @license http://pialog.org/license.txt New BSD License
*/

/**
* Application manifest
* @author Hossein Azizabadi <[email protected]>
*/
return array(
// Module meta
'meta' => array(
// Module title, required
'title' => __('Ask'),
// Description, for admin, optional
'description' => __('Ask and Answer'),
// Version number, required
'version' => '1.0.0-alpha.1',
// Distribution license, required
'license' => 'New BSD',
// Logo image, for admin, optional
'logo' => 'image/logo.png',
// Readme file, for admin, optional
'readme' => 'docs/readme.txt',
// Demo site link, optional
'demo' => 'http://demo.xoopsengine.org/ask',
// Module is ready for clone? Default as false
'clonable' => true,
'meta' => array(
'title' => __('Ask'),
'description' => __('Ask and Answer'),
'version' => '0.0.8',
'license' => 'New BSD',
'logo' => 'image/logo.png',
'readme' => 'docs/readme.txt',
'demo' => 'http://pialog',
'icon' => 'fa-question',
'clonable' => true,
),
// Author information
'author' => array(
// Author full name, required
'name' => 'Hossein Azizabadi',
// Email address, optional
'email' => '[email protected]',
// Website link, optional
'website' => 'http://www.xoopsengine.org',
// Credits and aknowledgement, optional
'credits' => 'Zend Framework Team; Pi Engine Team'
'author' => array(
'dev' => 'Hossein Azizabadi',
'email' => '[email protected]',
'architect' => '@voltan',
'design' => '@voltan'
),
// Module dependency: list of module directory names, optional
'dependency' => array(
// Resource
'resource' => array(
'database' => 'database.php',
'config' => 'config.php',
'page' => 'page.php',
'navigation' => 'navigation.php',
'route' => 'route.php',
),
// Maintenance actions
'maintenance' => array(
// resource
'resource' => array(
// Database meta
'database' => 'database.php',
// Module configs
'config' => 'config.php',
// ACL specs
'acl' => 'acl.php',
// Bootstrap, priority
'bootstrap' => 1,
// Search registry, 'class:method'
'search' => array('callback' => array('search', 'index')),
// View pages
'page' => 'page.php',
// Routes, first in last out; bigger priority earlier out
'route' => 'route.php',
// Navigation definition
'navigation' => 'navigation.php',
)
)
);
39 changes: 17 additions & 22 deletions config/navigation.php
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
<?php
/**
* Ask module config
* Pi Engine (http://pialog.org)
*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Copyright (c) Pi Engine http://www.xoopsengine.org
* @license http://www.xoopsengine.org/license New BSD License
* @author Hossein Azizabadi <[email protected]>
* @since 3.0
* @package Module\Ask
* @version $Id$
* @link http://code.pialog.org for the Pi Engine source repository
* @copyright Copyright (c) Pi Engine http://pialog.org
* @license http://pialog.org/license.txt New BSD License
*/

/**
* @author Hossein Azizabadi <[email protected]>
*/
return array(
'admin' => array(
'last' => array(
'label' => __('List of Question'),
'route' => 'admin',
'controller' => 'question',
'action' => 'index',
'label' => __('List of Question'),
'route' => 'admin',
'module' => 'ask',
'controller' => 'question',
'action' => 'index',
),
'tools' => array(
'label' => __('Tools'),
'route' => 'admin',
'controller' => 'tools',
'action' => 'index',
'label' => __('Tools'),
'route' => 'admin',
'module' => 'ask',
'controller' => 'tools',
'action' => 'index',
),
),
);
Loading

0 comments on commit e0eae71

Please sign in to comment.