HomeHelpTrac

Changeset 15472 for trunk/modules


Ignore:
Timestamp:
08/31/11 01:00:39 (9 months ago)
Author:
Anton Lesnikov
Message:
  1. Minor fixes and improvements.
  2. Studio settings
  3. Modules -> Articles settings as example.
Location:
trunk/modules/boonex/articles
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/boonex/articles/install/langs/en.php

    r15211 r15472  
    5454    '_articles_bcaption_all_categories' => 'All Categories', 
    5555    '_articles_bcaption_category' => 'Category: {0}', 
     56    '_articles_adm_stg_cpt_type' => 'Articles', 
     57    '_articles_adm_stg_cpt_category_general' => 'General', 
     58    '_articles_adm_stg_cpt_category_privacy' => 'Privacy', 
     59    '_articles_adm_stg_cpt_category_listings' => 'Listings',  
    5660    '_articles_top_menu_item' => 'Articles', 
    5761    '_articles_home_top_menu_sitem' => 'Articles Home', 
  • trunk/modules/boonex/articles/install/sql/disable.sql

    r15288 r15472  
    22DELETE FROM `sys_menu_top` WHERE `Name` IN ('Articles', '[db_prefix]_view') OR `Parent`=@iTMParentId; 
    33DELETE FROM `sys_menu_member` WHERE `Name`='Articles'; 
    4 DELETE FROM `sys_menu_admin` WHERE `name`='bx_articles'; 
    54 
    65 
     
    98 
    109 
    11 SET @iCategoryId = (SELECT `ID` FROM `sys_options_cats` WHERE `name`='Articles' LIMIT 1); 
    12 DELETE FROM `sys_options_cats` WHERE `name`='Articles' LIMIT 1; 
    13 DELETE FROM `sys_options` WHERE `kateg`=@iCategoryId OR `Name` IN ('permalinks_module_articles', 'category_auto_app_bx_articles'); 
     10DELETE FROM `sys_options` WHERE `Name` IN ('permalinks_module_articles', 'category_auto_app_bx_articles'); 
     11DELETE FROM `sys_options_types`, `sys_options_categories`, `sys_options` USING `sys_options_types`, `sys_options_categories`, `sys_options` WHERE `sys_options_types`.`id`=`sys_options_categories`.`type_id` AND `sys_options_categories`.`id`=`sys_options`.`category_id` AND `sys_options_types`.`name`='bx_articles'; 
    1412 
    1513 
  • trunk/modules/boonex/articles/install/sql/enable.sql

    r15288 r15472  
    1818INSERT INTO `sys_menu_member`(`Caption`, `Name`, `Icon`, `Link`, `Script`, `Eval`, `Order`, `Active`, `Editable`, `Deletable`, `Target`, `Position`, `Type`) VALUES 
    1919('_articles_ext_menu_item', 'Articles', '', 'modules/?r=articles/', '', '', 6, '1', 0, 0, '', 'bottom', 'link'); 
    20  
    21 SET @iOrder = (SELECT MAX(`order`) FROM `sys_menu_admin` WHERE `parent_id`='2'); 
    22 INSERT INTO `sys_menu_admin`(`parent_id`, `name`, `title`, `url`, `description`, `icon`, `icon_large`, `check`, `order`) VALUES 
    23 (2, 'bx_articles', '_articles_admin_menu_sitem', '{siteUrl}modules/?r=articles/admin/', 'For managing articles', 'modules/boonex/articles/|site_articles.png', '', '', @iOrder+1); 
    2420 
    2521 
     
    4440 
    4541 
    46 SET @iCategoryOrder = (SELECT MAX(`menu_order`) FROM `sys_options_cats`) + 1; 
    47 INSERT INTO `sys_options_cats` (`name` , `menu_order` ) VALUES ('Articles', @iCategoryOrder); 
     42SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types`) + 1; 
     43INSERT INTO `sys_options_types`(`name`, `caption`, `icon`, `order`) VALUES  
     44('bx_articles', '_articles_adm_stg_cpt_type', 'modules/boonex/articles/|mi-articles.png', @iTypeOrder); 
     45SET @iTypeId = LAST_INSERT_ID(); 
     46 
     47INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order` )   
     48VALUES (@iTypeId, 'bx_articles_general', '_articles_adm_stg_cpt_category_general', 1); 
    4849SET @iCategoryId = LAST_INSERT_ID(); 
    4950 
    50 INSERT INTO `sys_options` (`Name`, `VALUE`, `kateg`, `desc`, `Type`, `check`, `err_text`, `order_in_kateg`) VALUES 
    51 ('permalinks_module_articles', 'on', 26, 'Enable friendly articles permalink', 'checkbox', '', '', 0), 
    52 ('category_auto_app_bx_articles', 'on', 0, 'Autoapprove for categories', 'checkbox', '', '', 0), 
    53 ('articles_autoapprove', 'on', @iCategoryId, 'Publish articles automatically', 'checkbox', '', '', 1), 
    54 ('articles_comments', 'on', @iCategoryId, 'Allow comments for articles', 'checkbox', '', '', 2), 
    55 ('articles_votes', 'on', @iCategoryId, 'Allow votes for articles', 'checkbox', '', '', 3), 
    56 ('articles_index_number', '10', @iCategoryId, 'The number of articles on home page', 'digit', '', '', 4), 
    57 ('articles_member_number', '10', @iCategoryId, 'The number of articles on account page', 'digit', '', '', 5), 
    58 ('articles_snippet_length', '200', @iCategoryId, 'The length of article snippet for home and account pages', 'digit', '', '', 6), 
    59 ('articles_per_page', '10', @iCategoryId, 'The number of items shown on the page', 'digit', '', '', 7), 
    60 ('articles_rss_length', '10', @iCategoryId, 'The number of items shown in the RSS feed', 'digit', '', '', 8); 
     51INSERT INTO `sys_options` (`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES 
     52(@iCategoryId, 'articles_autoapprove', 'Publish articles automatically', 'on', 'checkbox', '', '', '', 1), 
     53(@iCategoryId, 'articles_snippet_length', 'The length of article snippet for home and account pages', '200', 'digit', '', '', '', 2); 
     54 
     55INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order` )  
     56VALUES (@iTypeId, 'bx_articles_privacy', '_articles_adm_stg_cpt_category_privacy', 2); 
     57SET @iCategoryId = LAST_INSERT_ID(); 
     58 
     59INSERT INTO `sys_options` (`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES 
     60(@iCategoryId, 'articles_comments', 'Allow comments for articles', 'on', 'checkbox', '', '', '', 1), 
     61(@iCategoryId, 'articles_votes', 'Allow votes for articles', 'on', 'checkbox', '', '', '', 2); 
     62 
     63INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order` )  
     64VALUES (@iTypeId, 'bx_articles_listings', '_articles_adm_stg_cpt_category_listings', 3); 
     65SET @iCategoryId = LAST_INSERT_ID(); 
     66 
     67INSERT INTO `sys_options` (`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES 
     68(@iCategoryId, 'articles_per_page', 'The number of items shown on the page', '10', 'digit', '', '', '', 1), 
     69(@iCategoryId, 'articles_index_number', 'The number of articles on home page', '10', 'digit', '', '', '', 2), 
     70(@iCategoryId, 'articles_member_number', 'The number of articles on account page', '10', 'digit', '', '', '', 3), 
     71(@iCategoryId, 'articles_rss_length', 'The number of items shown in the RSS feed', '10', 'digit', '', '', '', 4); 
     72 
     73INSERT INTO `sys_options` (`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES 
     74(26, 'permalinks_module_articles', 'Enable friendly articles permalink', 'on', 'checkbox', '', '', '', 0), 
     75(0, 'category_auto_app_bx_articles', 'Autoapprove for categories', 'on', 'checkbox', '', '', '', 0); 
    6176 
    6277 
Note: See TracChangeset for help on using the changeset viewer.