Page MenuHomeIn-Portal Phabricator

in-bulletin
No OneTemporary

File Metadata

Created
Mon, Feb 24, 11:21 PM

in-bulletin

Index: branches/5.1.x/units/private_messages/private_messages_config.php
===================================================================
--- branches/5.1.x/units/private_messages/private_messages_config.php (revision 13957)
+++ branches/5.1.x/units/private_messages/private_messages_config.php (revision 13958)
@@ -1,110 +1,112 @@
<?php
/**
* @version $Id$
* @package In-Bulletin
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.org/license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => 'private-message',
'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array('class' => 'PrivateMessageEventHandler', 'file' => 'private_message_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array('class' => 'PrivateMessageTagProcessor', 'file' => 'private_message_tp.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'IDField' => 'PmId',
'StatusField' => Array ('Status'),
'TitleField' => 'Subject',
'PermSection' => Array('main' => 'in-bulletin:private_messages',),
'TableName' => TABLE_PREFIX.'PrivateMessages',
'CalculatedFields' => Array (
'' => Array (
'Subject' => 'pmb.Subject',
'Body' => 'pmb.Body',
),
),
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'%3$sPrivateMessageBody pmb ON pmb.PMBodyId = %1$s.PMBodyId
LEFT JOIN '.TABLE_PREFIX.'PortalUser from_user ON from_user.PortalUserId = %1$s.FromId
LEFT JOIN '.TABLE_PREFIX.'PortalUser to_user ON to_user.PortalUserId = %1$s.ToId',
),
'ListSortings' => Array (
'' => Array(
'ForcedSorting' => Array('CreatedOn' => 'desc'),
),
),
'ItemSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'%3$sPrivateMessageBody pmb ON pmb.PMBodyId = %1$s.PMBodyId
LEFT JOIN '.TABLE_PREFIX.'PortalUser from_user ON from_user.PortalUserId = %1$s.FromId
LEFT JOIN '.TABLE_PREFIX.'PortalUser to_user ON to_user.PortalUserId = %1$s.ToId',
),
'SubItems' => Array('private-message-body'),
'CalculatedFields' => Array (
'' => Array (
'Subject' => 'pmb.Subject',
'Body' => 'pmb.Body',
'Options' => 'pmb.Options',
'FromName' => 'IF (ISNULL(from_user.Login), IF (%1$s.FromId = ' . USER_ROOT . ', "root", IF (%1$s.FromId = ' . USER_GUEST . ', "Guest", "n/a")), from_user.Login)',
'ToName' => 'IF (ISNULL(to_user.Login), IF (%1$s.ToId = ' . USER_ROOT . ', "root", IF (%1$s.ToId = ' . USER_GUEST . ', "Guest", "n/a")), to_user.Login)',
'FromFullName' => 'TRIM(CONCAT(from_user.FirstName, " ", from_user.LastName))',
'ToFullName' => 'TRIM(CONCAT(to_user.FirstName, " ", to_user.LastName))',
),
),
'Fields' => Array (
'PmId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'FromId' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!lu_error_UserNotFound!'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'required' => 1, 'default' => null),
'ToId' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!lu_error_UserNotFound!'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'required' => 1, 'default' => null),
'FolderId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'lu_Inbox', 1 => 'lu_Sent'), 'use_phrases' => 1, 'not_null' => 1, 'default' => PM_FOLDER_SENT),
'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'lu_opt_MessageUnread', 1 => 'lu_opt_MessageViewed', 2 => 'lu_opt_MessageRead', 3 => 'lu_opt_MessageReplied', 4 => 'lu_opt_MessageSent'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
'PMBodyId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
),
'VirtualFields' => Array (
'FromName' => Array ('type' => 'string', 'default' => ''),
+ 'FromFullName' => Array ('type' => 'string', 'default' => ''),
'ToName' => Array ('type' => 'string', 'default' => ''),
+ 'ToFullName' => Array ('type' => 'string', 'default' => ''),
'Subject' => Array ('type' => 'string', 'default' => ''),
'Body' => Array ('type' => 'string', 'required' => 1, 'default' => ''),
'Options' => Array ('type' => 'string', 'default' => 0),
'DisableBBCodes' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0),
'DisableSmileys' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0),
'ShowSignatures' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 1),
),
);
\ No newline at end of file
Index: branches/5.1.x/units/topics/topics_config.php
===================================================================
--- branches/5.1.x/units/topics/topics_config.php (revision 13957)
+++ branches/5.1.x/units/topics/topics_config.php (revision 13958)
@@ -1,559 +1,562 @@
<?php
/**
* @version $Id$
* @package In-Bulletin
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.org/license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => 'bb',
'ItemClass' => Array ('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'TopicsEventHandler', 'file' => 'topics_event_handler.php', 'require_classes' => Array ('kCatDBEventHandler'), 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'TopicsTagProcessor', 'file' => 'topics_tag_processor.php', 'require_classes' => Array ('kCatDBTagProcessor'), 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'ConfigPriority' => 0,
'RewritePriority' => 103,
'RewriteListener' => 'ModRewriteHelper:CategoryItemRewriteListener',
'Hooks' => Array (
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => 'cdata',
'DoSpecial' => '*',
'DoEvent' => 'OnDefineCustomFields',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'rev',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnCloneSubItem',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'fav',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnCloneSubItem',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'rel',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnCloneSubItem',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'img',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnCloneSubItem',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'ci',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnCloneSubItem',
),
),
'CatalogItem' => true,
'AdminTemplatePath' => 'topics',
'AdminTemplatePrefix' => 'topics_',
'SearchConfigPostfix' => 'topics',
'IDField' => 'TopicId',
'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events
'TitleField' => 'TopicText', // field, used in bluebar when editing existing item
'TitlePhrase' => 'la_Text_Topic', // phrase used to specify item type in relationship list
'OwnerField' => 'OwnerId', // usually it is CreatedById
'TitlePresets' => Array (
'default' => Array ( 'new_status_labels' => Array ('bb' => '!la_title_AddingTopic!'),
'edit_status_labels' => Array ('bb' => '!la_title_EditingTopic!'),
'new_titlefield' => Array ('bb' => '!la_title_NewTopic!'),
),
'topics_edit' => Array ('prefixes' => Array ('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_General!"),
'topics_categories' => Array ('prefixes' => Array ('bb', 'bb-ci_List'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Categories!"),
'topics_relations' => Array ('prefixes' => Array ('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Relations!"),
'topics_images' => Array ('prefixes' => Array ('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Images!"),
'topics_reviews' => Array ('prefixes' => Array ('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Reviews!"),
'topics_custom' => Array ('prefixes' => Array ('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Custom!"),
'images_edit' => Array ( 'prefixes' => Array ('bb', 'bb-img'),
'new_status_labels' => Array ('bb-img' => '!la_title_Adding_Image!'),
'edit_status_labels' => Array ('bb-img' => '!la_title_Editing_Image!'),
'new_titlefield' => Array ('bb-img' => '!la_title_New_Image!'),
'format' => "#bb_status# '#bb_titlefield#' - #bb-img_status# '#bb-img_titlefield#'",
),
'reviews_edit' => Array ( 'prefixes' => Array ('bb', 'bb-rev'),
'new_status_labels' => Array ('bb-rev' =>"!la_title_Adding_Review! '!la_title_New_Review!'"),
'edit_status_labels' => Array ('bb-rev' => '!la_title_Editing_Review!'),
'format' => "#bb_status# '#bb_titlefield#' - #bb-rev_status#",
),
'relations_edit' => Array ( 'prefixes' => Array ('bb', 'bb-rel'),
'new_status_labels' => Array ('bb-rel' =>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"),
'edit_status_labels' => Array ('bb-rel' => '!la_title_Editing_Relationship!'),
'format' => "#bb_status# '#bb_titlefield#' - #bb-rel_status#",
),
'tree_in-bulletin' => Array ('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Bulletin', 'Version')),
),
'EditTabPresets' => Array (
'Default' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'in-bulletin/topics/topics_edit', 'priority' => 1),
'categories' => Array ('title' => 'la_tab_Categories', 't' => 'in-bulletin/topics/topics_categories', 'priority' => 2),
'relations' => Array ('title' => 'la_tab_Relations', 't' => 'in-bulletin/topics/topics_relations', 'priority' => 3),
'images' => Array ('title' => 'la_tab_Images', 't' => 'in-bulletin/topics/topics_images', 'priority' => 4),
'reviews' => Array ('title' => 'la_tab_Reviews', 't' => 'in-bulletin/topics/topics_reviews', 'priority' => 5),
'custom' => Array ('title' => 'la_tab_Custom', 't' => 'in-bulletin/topics/topics_custom', 'priority' => 6),
),
),
'PermItemPrefix' => 'TOPIC',
'PermTabText' => 'In-Bulletin',
'PermSection' => Array ('main' => 'CATEGORY:in-bulletin:topics_list', 'search' => 'in-bulletin:configuration_search', 'custom' => 'in-bulletin:configuration_custom'),
'Sections' => Array (
/*'in-bulletin' => Array (
'parent' => 'in-portal:root',
'icon' => 'settings_in-bulletin',
'label' => 'la_title_In-Bulletin',
'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view'),
'priority' => 3.3,
'container' => true,
'type' => stTREE,
),*/
'in-bulletin:topics' => Array (
'parent' => 'in-portal:site',
'icon' => 'topics',
'label' => 'la_tab_Topics',
'url' => Array ('t' => 'catalog/advanced_view', 'anchor' => 'tab-bb.showall', 'pass' => 'm'),
'onclick' => 'setCatalogTab(\'bb.showall\')',
'permissions' => Array ('view'),
'priority' => 3.4,
'type' => stTREE,
),
// topic settings
'in-bulletin:setting_folder' => Array (
'parent' => 'in-portal:system',
'icon' => 'conf_topics',
'label' => 'la_title_In-Bulletin',
'use_parent_header' => 1,
'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view'),
'priority' => 3.5,
'container' => true,
'type' => stTREE,
),
/*'in-bulletin:inbulletin_general' => Array (
'parent' => 'in-bulletin:setting_folder',
'icon' => 'core:settings_general',
'label' => 'la_tab_GeneralSettings',
'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view', 'edit'),
'priority' => 2.9,
'type' => stTREE,
),*/
'in-bulletin:configuration_output' => Array (
'parent' => 'in-bulletin:setting_folder',
'icon' => 'core:conf_output',
'label' => 'la_tab_ConfigOutput',
'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view', 'edit'),
'priority' => 3,
'type' => stTREE,
),
'in-bulletin:configuration_search' => Array (
'parent' => 'in-bulletin:setting_folder',
'icon' => 'core:conf_search',
'label' => 'la_tab_ConfigSearch',
'url' => Array ('t' => 'config/config_search', 'module_key' => 'topics', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view', 'edit'),
'priority' => 4,
'type' => stTREE,
),
'in-bulletin:configuration_custom' => Array (
'parent' => 'in-bulletin:setting_folder',
'icon' => 'core:conf_customfields',
'label' => 'la_tab_ConfigCustom',
'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 3, 'pass_section' => true, 'pass' => 'm,cf'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 5,
'type' => stTREE,
),
),
'FilterMenu' => Array (
- 'Groups' => Array (
+ 'Groups' => Array (
Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => WHERE_FILTER),
),
'Filters' => Array (
'show_new' => Array ('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ),
'show_hot' => Array ('label' => 'la_Text_Hot', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ),
'show_pop' => Array ('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ),
'show_pick' => Array ('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ),
),
),
'CatalogSelectorName' => 'topiclist',
'ItemPropertyMappings' => Array (
'NewDays' => 'Topic_NewDays', // number of days item to be NEW
'MinPopVotes' => 'Topic_MinPopVotes', // minimum number of votes for an item to be POP
'MinPopRating' => 'Topic_MinPopRating', // minimum rating for an item to be POP
'MaxHotNumber' => 'Topic_MaxHotNumber', // maximum number of HOT items
'HotLimit' => 'Topic_HotLimit', // variable name in inp_Cache table
'ClickField' => 'Views', // item click count is stored here (in item table)
),
'ItemType' => 3, // this is used when relation to product is added from in-portal and via-versa
'ViewMenuPhrase' => 'la_title_Topics',
'CatalogTabIcon' => 'in-bulletin:icon16_topics.png',
'UsePendingEditing' => true, // item editing is controlled by TOPIC.ADD/EDIT, TOPIC.ADD/EDIT.PENDING permissions
'StatisticsInfo' => Array (
'pending' => Array (
'icon' => 'icon16_topic_pending.gif',
'label' => 'la_Text_Topics',
'js_url' => '#url#',
'url' => Array ('t' => 'catalog/advanced_view', 'SetTab' => 'bb', 'pass' => 'm,bb.showall', 'bb.showall_event' => 'OnSetFilterPattern', 'bb.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_hot=1,show_pop=1,show_pick=1'),
'status' => STATUS_PENDING,
),
),
'TableName' => TABLE_PREFIX.'Topic',
'CalculatedFields' => Array (
'' => Array (
'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.OwnerId = ' . USER_ROOT . ', "root", IF (%1$s.OwnerId = ' . USER_GUEST . ', "Guest", "n/a")), u.Login)',
'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId',
'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename',
'CategoryFilename' => TABLE_PREFIX.'Category.NamedParentPath',
'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat',
'ParentPath' => TABLE_PREFIX.'Category.ParentPath',
'AltName' => 'img.AltName',
'SameImages' => 'img.SameImages',
'LocalThumb' => 'img.LocalThumb',
'ThumbPath' => 'img.ThumbPath',
'ThumbUrl' => 'img.ThumbUrl',
'LocalImage' => 'img.LocalImage',
'LocalPath' => 'img.LocalPath',
'FullUrl' => 'img.Url',
'LastPoster' => 'IF (ISNULL(last_post.PosterAlias), "Guest", last_post.PosterAlias)',
'LastPosterId' => 'last_post.CreatedById',
),
),
'ListSQLs' => Array ( '' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'%3$sImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
LEFT JOIN '.TABLE_PREFIX.'PermCache perm ON perm.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.OwnerId = u.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'%3$sPosting last_post ON last_post.PostingId = %1$s.LastPostId
LEFT JOIN '.TABLE_PREFIX.'%3$sTopicCustomData cust ON %1$s.ResourceId = cust.ResourceId',
), // key - special, value - list select sql
'ListSortings' => Array (
'' => Array (
'ForcedSorting' => Array ('Priority' => 'desc'),
'Sorting' => Array ('TopicText' => 'asc'),
)
),
'ItemSQLs' => Array ( '' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'%3$sImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.OwnerId = u.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'%3$sPosting last_post ON last_post.PostingId = %1$s.LastPostId
LEFT JOIN '.TABLE_PREFIX.'%3$sTopicCustomData cust ON %1$s.ResourceId = cust.ResourceId'),
'SubItems' => Array ('bb-rev', 'bb-ci', 'bb-rel', 'bb-img', 'bb-cdata', 'bb-fav', 'bb-post'),
'Fields' => Array (
'TopicId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
'NotifyOwnerOnChanges' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'lu_No', 1 => 'lu_Yes'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0,
),
'Modified' => Array (
'type' => 'int',
'formatter' => 'kDateFormatter',
'required' => 1, 'default' => '#NOW#',
),
'TopicText' => Array (
'type' => 'string',
'required' => 1, 'default' => '', 'not_null' => 1,
),
'AutomaticFilename' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1),
'Posts' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Views' => Array (
'type' => 'double',
'formatter' => 'kFormatter',
'format' => '%d',
'not_null' => 1, 'default' => 0,
),
'EditorsPick' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0,
),
'Status' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (
0 => 'la_Disabled',
1 => 'la_Active',
2 => 'la_Pending',
),
'use_phrases' => 1,
'not_null' => 1, 'default' => 2,
),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'OwnerId' => Array (
'type' => 'int',
'formatter' => 'kLEFTFormatter',
'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),
'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PortalUser
WHERE `%s` = \'%s\' ',
'left_key_field' => 'PortalUserId',
'left_title_field' => 'Login',
'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),
- 'required' => 1, 'not_null' => 1, 'default' => USER_ROOT,
+ 'required' => 1, 'default' => NULL,
),
'ModifiedById' => Array (
'type' => 'int',
'formatter' => 'kLEFTFormatter',
'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),
'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PortalUser
WHERE `%s` = \'%s\' ',
'left_key_field' => 'PortalUserId',
'left_title_field' => 'Login',
'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),
- 'required' => 1, 'not_null' => 1, 'default' => USER_ROOT,
+ 'required' => 1, 'default' => NULL,
),
'ResourceId' => Array ('type' => 'int', 'default' => null),
'TopicType' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_Yes', 1 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1,
),
'CreatedOn' => Array (
'type' => 'double',
'formatter' => 'kDateFormatter',
'required' => 1, 'default' => '#NOW#',
),
'CachedReviewsQty' => Array ('type' => 'int' , 'not_null' => 1, 'default' => 0),
'CachedRating' => Array ('type' => 'string', 'not_null' => 1, 'default' => 0),
'CachedVotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'NewItem' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'use_phrases' => 1,
'options' => Array (
2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never',
),
'default' => 2, 'not_null' => 1,
),
'PopItem' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'use_phrases' => 1,
'options' => Array (
2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never',
),
'default' => 2, 'not_null' => 1,
),
'HotItem' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'use_phrases' => 1,
'options' => Array (
2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never',
),
'default' => 2, 'not_null' => 1,
),
'PostedBy' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'OrgId' => Array ('type' => 'int', 'default' => null),
'LastPostId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'LastPostDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
'TodayDate' => Array ('type' => 'string', 'default' => null),
'TodayPosts' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'MetaKeywords' => Array ('type' => 'string', 'default' => null),
'MetaDescription' => Array (
'type' => 'string',
'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
),
'VirtualFields' => Array (
'UserName' => Array ('type' => 'string', 'default' => ''),
'CategoryId' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (),
'default' => 0,
),
- 'Filename' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'Filename' => Array ('type' => 'string', 'default' => ''),
+ 'CategoryFilename' => Array ('type' => 'string', 'default' => ''),
+ 'PrimaryCat' => Array ('type' => 'int', 'default' => 0),
'CachedNavbar' => Array ('type' => 'string', 'default' => ''),
+ 'ParentPath' => Array ('type' => 'string', 'default' => ''),
'LastPoster' => Array ('type' => 'string', 'default' => ''),
'LastPosterId' => Array ('type' => 'int', 'default' => USER_GUEST),
'PostingText' => Array (
'type' => 'string',
'formatter' => 'kFormatter', 'using_fck' => 1,
'required' => 1, 'allow_html' => 1, 'default' => '',
),
'DisableBBCodes' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1,
'default' => 0,
),
'DisableSmileys' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1,
'default' => 0,
),
'ShowSignatures' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1,
'default' => 1,
),
// for primary image
'AltName' => Array ('type' => 'string', 'default' => ''),
'SameImages' => Array ('type' => 'string', 'default' => ''),
'LocalThumb' => Array ('type' => 'string', 'default' => ''),
'ThumbPath' => Array ('type' => 'string', 'default' => ''),
'ThumbUrl' => Array ('type' => 'string', 'default' => ''),
'LocalImage' => Array ('type' => 'string', 'default' => ''),
'LocalPath' => Array ('type' => 'string', 'default' => ''),
'FullUrl' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_topic.png',
0 => 'icon16_topic_disabled.png',
1 => 'icon16_topic.png',
2 => 'icon16_topic_pending.png',
'NEW' => 'icon16_topic_new.png',
),
'Fields' => Array (
'TopicId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'TopicText' => Array ('title' => 'la_col_TopicText', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 300, 'first_chars' => 290, ),
'UserName' => Array ('title' => 'la_col_PostedBy', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
'CreatedOn' => Array ('title' => 'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
'LastPostDate' => Array ('title' => 'la_col_LastPostOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'Posts' => Array ('title' => 'la_col_Posts', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
'Views' => Array ('title' => 'la_col_Views', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
),
),
'Radio' => Array (
'Icons' => Array (
'default' => 'icon16_topic.png',
0 => 'icon16_topic_disabled.png',
1 => 'icon16_topic.png',
2 => 'icon16_topic_pending.png',
'NEW' => 'icon16_topic_new.png', ),
'Selector' => 'radio',
'Fields' => Array (
'TopicId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'TopicText' => Array ('title' => 'la_col_TopicText', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 300, 'first_chars' => 290, ),
'UserName' => Array ('title' => 'la_col_PostedBy', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
'CreatedOn' => Array ('title' => 'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
'LastPostDate' => Array ('title' => 'la_col_LastPostOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'Posts' => Array ('title' => 'la_col_Posts', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
'Views' => Array ('title' => 'la_col_Views', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
),
),
),
'ConfigMapping' => Array (
'PerPage' => 'Perpage_Topics',
'ShortListPerPage' => 'Perpage_Topics_Short',
'ForceEditorPick' => 'Topic_EditorPicksAbove',
'DefaultSorting1Field' => 'Topic_SortField',
'DefaultSorting2Field' => 'Topic_SortField2',
'DefaultSorting1Dir' => 'Topic_SortOrder',
'DefaultSorting2Dir' => 'Topic_SortOrder2',
'RatingDelayValue' => 'topic_RatingDelay_Value',
'RatingDelayInterval' => 'topic_RatingDelay_Interval',
),
);
\ No newline at end of file
Index: branches/5.1.x/units/posts/posts_config.php
===================================================================
--- branches/5.1.x/units/posts/posts_config.php (revision 13957)
+++ branches/5.1.x/units/posts/posts_config.php (revision 13958)
@@ -1,117 +1,117 @@
<?php
/**
* @version $Id$
* @package In-Bulletin
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.org/license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => 'bb-post',
'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array('class' => 'PostEventHandler', 'file' => 'post_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array('class' => 'PostTagProcessor', 'file' => 'post_tp.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
),
'IDField' => 'PostingId',
'StatusField' => Array('Pending'),
'TitleField' => 'Subject',
'TableName' => TABLE_PREFIX.'Posting',
'ForeignKey' => 'TopicId',
'ParentTableKey' => 'TopicId',
'ParentPrefix' => 'bb',
'AutoDelete' => true,
'AutoClone' => true,
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'Images img ON (img.ResourceId = u.ResourceId) AND (img.DefaultImg = 1 OR img.Name = "avatar")',
),
'ItemSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.CreatedById = u.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'Images img ON (img.ResourceId = u.ResourceId) AND (img.DefaultImg = 1 OR img.Name = "avatar")',
),
'ListSortings' => Array (
'' => Array (
'ForcedSorting' => Array ('CreatedOn' => 'asc',),
),
),
'CalculatedFields' => Array (
'' => Array (
'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.CreatedById = ' . USER_ROOT . ', "root", IF (%1$s.CreatedById = ' . USER_GUEST . ', "Guest", "n/a")), u.Login)',
'AltName' => 'img.AltName',
'SameImages' => 'img.SameImages',
'LocalThumb' => 'img.LocalThumb',
'ThumbPath' => 'img.ThumbPath',
'ThumbUrl' => 'img.ThumbUrl',
'LocalImage' => 'img.LocalImage',
'LocalPath' => 'img.LocalPath',
'FullUrl' => 'img.Url',
),
),
'Fields' => Array (
'PostingId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'IPAddress' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'PosterAlias' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'Pending' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Subject' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
'PostingText' => Array ('type' => 'string', 'allow_html' => 1, 'default' => NULL),
'GraphicsUrl' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
'TopicId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'ReplyTo' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Options' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
),
'VirtualFields' => Array (
'DisableBBCodes' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0),
'DisableSmileys' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0),
'ShowSignatures' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 1),
-
+ 'UserName' => Array ('type' => 'string', 'default' => ''),
// for avatar image
'AltName' => Array('type' => 'string', 'default' => ''),
'SameImages' => Array('type' => 'string', 'default' => ''),
'LocalThumb' => Array('type' => 'string', 'default' => ''),
'ThumbPath' => Array('type' => 'string', 'default' => ''),
'ThumbUrl' => Array('type' => 'string', 'default' => ''),
'LocalImage' => Array('type' => 'string', 'default' => ''),
'LocalPath' => Array('type' => 'string', 'default' => ''),
'FullUrl' => Array('type' => 'string', 'default' => ''),
),
'ConfigMapping' => Array (
'PerPage' => 'Perpage_Postings',
),
);
\ No newline at end of file
Index: branches/5.1.x/units/poll_comments/poll_comments_config.php
===================================================================
--- branches/5.1.x/units/poll_comments/poll_comments_config.php (revision 13957)
+++ branches/5.1.x/units/poll_comments/poll_comments_config.php (revision 13958)
@@ -1,115 +1,115 @@
<?php
/**
* @version $Id$
* @package In-Bulletin
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.org/license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array ( 'Prefix' => 'poll-comment',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'PollCommentEventHandler', 'file' => 'poll_comment_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
),
'IDField' => 'CommentId',
'TableName' => TABLE_PREFIX . 'PollsComments',
'ParentPrefix' => 'poll',
'ForeignKey' => 'PollId',
'ParentTableKey' => 'PollId',
'AutoDelete' => true,
'AutoClone' => true,
'StatusField' => Array('Status'),
// key - special, value - list select sql
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser pu ON pu.PortalUserId = %1$s.CreatedById',
),
'ItemSQLs' => Array ('' => 'SELECT * FROM %s'),
'ListSortings' => Array (
'' => Array(
'ForcedSorting' => Array('Priority' => 'desc'),
'Sorting' => Array('CreatedOn' => 'desc'),
)
),
'Fields' => Array (
'CommentId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'PollId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'AnswerId' => Array ('type' => 'int', 'default' => NULL),
'CreatedById' => Array ('type' => 'int', 'formatter'=>'kLEFTFormatter',
'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),
'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),
'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'',
'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login',
- 'required' => 1, 'not_null' => 1, 'default' => USER_GUEST),
+ 'required' => 1, 'default' => NULL),
'GuestName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'GuestEmail' => Array('type' => 'string', 'max_len' => 255, 'formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'not_null' => '1', 'default' => '', 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!', 'unique'=>'!lu_email_already_exist!'),'required' => 0 ),
'CommentBody' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL, 'required' => 1),
'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'),
'UserIP' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Active', 0 => 'la_opt_Disabled', 2 => 'la_opt_Pending'), 'use_phrases' => 1, 'required' => 1, 'not_null' => 1, 'default' => 1),
),
'VirtualFields' => Array (
'CommentedByUser' => Array('type' => 'string', 'default' => ''),
'CommentedByEmail' => Array ('type' => 'string', 'default' => ''),
),
'CalculatedFields' => Array (
'' => Array (
'CommentedByUser' => 'IF( ISNULL(pu.Login), IF (%1$s.CreatedById = ' . USER_ROOT . ', \'root\', IF (%1$s.CreatedById = ' . USER_GUEST . ', \'Guest\', \'n/a\')), pu.Login )',
),
),
'ConfigMapping' => Array (
'PerPage' => 'poll_Perpage_Comments',
'CommentDelayInterval' => 'poll_CommentDelay_Value',
'CommentDelayValue' => 'poll_CommentDelay_Interval',
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
0 => 'icon16_disabled.png',
1 => 'icon16_item.png',
2 => 'icon16_pending.png',
'module' => 'core',
),
'Fields' => Array (
'CommentId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'CommentBody' => Array ('title' => 'la_col_PollComment', 'data_block' => 'grid_priority_td', 'filter_block' => 'grid_like_filter', 'width' => 250, ),
'CommentedByUser' => Array( 'title'=>'la_col_CommentedByUser', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
'CreatedOn' => Array ('title' => 'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.1.x/install/install_schema.sql
===================================================================
--- branches/5.1.x/install/install_schema.sql (revision 13957)
+++ branches/5.1.x/install/install_schema.sql (revision 13958)
@@ -1,198 +1,198 @@
CREATE TABLE Posting (
PostingId int(11) NOT NULL AUTO_INCREMENT,
IPAddress varchar(255) NOT NULL DEFAULT '',
PosterAlias varchar(255) NOT NULL DEFAULT '',
Pending tinyint(4) NOT NULL DEFAULT '0',
`Subject` varchar(255) DEFAULT NULL,
PostingText text,
GraphicsUrl varchar(255) DEFAULT NULL,
CreatedOn int(11) DEFAULT NULL,
Modified int(11) DEFAULT NULL,
ModifiedById int(11) DEFAULT NULL,
CreatedById int(11) DEFAULT NULL,
TopicId int(11) NOT NULL DEFAULT '0',
ResourceId int(11) NOT NULL DEFAULT '0',
ReplyTo int(11) NOT NULL DEFAULT '0',
`Options` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (PostingId),
KEY TopicId (TopicId),
KEY Pending (Pending),
KEY CreatedById (CreatedById),
KEY CreatedOn (CreatedOn),
KEY ModifiedOn (Modified),
KEY ModifiedById (ModifiedById)
);
CREATE TABLE Topic (
TopicId int(11) NOT NULL AUTO_INCREMENT,
NotifyOwnerOnChanges tinyint(4) NOT NULL DEFAULT '0',
Modified int(11) DEFAULT NULL,
TopicText varchar(255) NOT NULL DEFAULT '',
AutomaticFilename tinyint(3) unsigned NOT NULL DEFAULT '1',
Posts int(11) NOT NULL DEFAULT '0',
Views double(20,6) NOT NULL DEFAULT '0.000000',
EditorsPick tinyint(4) NOT NULL DEFAULT '0',
`Status` tinyint(4) unsigned NOT NULL DEFAULT '2',
Priority int(11) NOT NULL DEFAULT '0',
- OwnerId int(11) NOT NULL DEFAULT '-1',
- ModifiedById int(11) NOT NULL DEFAULT '0',
+ OwnerId int(11) DEFAULT NULL,
+ ModifiedById int(11) DEFAULT NULL,
ResourceId int(11) DEFAULT NULL,
TopicType int(11) NOT NULL DEFAULT '1',
CreatedOn int(11) DEFAULT NULL,
CachedReviewsQty int(11) NOT NULL DEFAULT '0',
CachedRating varchar(10) NOT NULL DEFAULT '0',
CachedVotesQty int(11) NOT NULL DEFAULT '0',
NewItem tinyint(4) NOT NULL DEFAULT '2',
PopItem tinyint(4) NOT NULL DEFAULT '2',
HotItem tinyint(4) NOT NULL DEFAULT '2',
PostedBy varchar(255) NOT NULL DEFAULT '',
OrgId int(11) DEFAULT NULL,
LastPostId int(11) NOT NULL DEFAULT '0',
LastPostDate int(11) DEFAULT NULL,
TodayDate date DEFAULT NULL,
TodayPosts int(11) NOT NULL DEFAULT '0',
MetaKeywords varchar(255) DEFAULT NULL,
MetaDescription text,
PRIMARY KEY (TopicId),
UNIQUE KEY ResourceId (ResourceId),
KEY OwnerId (OwnerId),
KEY ModifiedById (ModifiedById),
KEY Posts (Posts),
KEY Modified (Modified),
KEY Views (Views),
KEY EditorsPick (EditorsPick),
KEY `Status` (`Status`),
KEY Priority (Priority),
KEY CreatedOn (CreatedOn),
KEY NewItem (NewItem),
KEY PopItem (PopItem),
KEY HotItem (HotItem),
KEY LastPostId (LastPostId)
);
CREATE TABLE Censorship (
CensorshipId int(11) NOT NULL auto_increment,
BadWord varchar(80) NOT NULL default '',
Replacement varchar(80) NOT NULL default '',
PRIMARY KEY (CensorshipId)
);
CREATE TABLE Emoticon (
EmoticonId int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(20) NOT NULL DEFAULT '',
KeyStroke varchar(20) NOT NULL DEFAULT '',
Enabled int(11) NOT NULL DEFAULT '1',
EmotionImage varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (EmoticonId),
KEY Enabled (Enabled),
KEY EmotionImage (EmotionImage)
);
CREATE TABLE PrivateMessageBody (
PMBodyId int(11) unsigned NOT NULL AUTO_INCREMENT,
`Subject` varchar(255) NOT NULL DEFAULT '',
Body text,
`Options` tinyint(3) unsigned NOT NULL DEFAULT '0',
ReferenceCount smallint(5) unsigned NOT NULL DEFAULT '2',
PRIMARY KEY (PMBodyId),
KEY ReferenceCount (ReferenceCount)
);
CREATE TABLE PrivateMessages (
PmId int(11) unsigned NOT NULL AUTO_INCREMENT,
FromId int(11) unsigned DEFAULT NULL,
ToId int(11) unsigned DEFAULT NULL,
FolderId tinyint(3) NOT NULL DEFAULT '-1',
`Status` tinyint(1) unsigned NOT NULL DEFAULT '0',
PMBodyId int(11) unsigned NOT NULL DEFAULT '0',
CreatedOn int(11) unsigned DEFAULT NULL,
PRIMARY KEY (PmId),
KEY FromId (FromId),
KEY CreatedOn (CreatedOn),
KEY ToId (ToId),
KEY FolderId (FolderId)
);
CREATE TABLE TopicCustomData (
CustomDataId int(11) NOT NULL auto_increment,
ResourceId int(10) unsigned NOT NULL default '0',
KEY ResourceId (ResourceId),
PRIMARY KEY (CustomDataId)
);
CREATE TABLE Polls (
PollId int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(255) NOT NULL DEFAULT '',
l1_Question text,
l2_Question text,
l3_Question text,
l4_Question text,
l5_Question text,
Image varchar(255) NOT NULL DEFAULT '',
CreatedOn int(11) unsigned DEFAULT NULL,
StartDate int(11) unsigned DEFAULT NULL,
EndDate int(11) unsigned DEFAULT NULL,
Priority tinyint(4) NOT NULL DEFAULT '0',
RequireLogin tinyint(4) NOT NULL DEFAULT '0',
AllowMultipleVotings tinyint(4) NOT NULL DEFAULT '1',
AllowComments tinyint(4) NOT NULL DEFAULT '1',
`Status` tinyint(4) NOT NULL DEFAULT '1',
CachedVotesQty int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (PollId),
KEY `Status` (`Status`),
KEY Priority (Priority),
KEY StartDate (StartDate),
KEY EndDate (EndDate)
);
CREATE TABLE PollsAnswers (
AnswerId int(11) NOT NULL AUTO_INCREMENT,
PollId int(11) NOT NULL DEFAULT '0',
l1_Answer text,
l2_Answer text,
l3_Answer text,
l4_Answer text,
l5_Answer text,
VotesQty int(11) NOT NULL DEFAULT '0',
Priority int(11) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '1',
PRIMARY KEY (AnswerId),
KEY `Status` (`Status`),
KEY Priority (Priority),
KEY VoteCount (VotesQty),
KEY PollId (PollId)
);
CREATE TABLE PollsComments (
CommentId int(11) NOT NULL AUTO_INCREMENT,
PollId int(11) NOT NULL DEFAULT '0',
AnswerId int(11) DEFAULT NULL,
- CreatedById int(11) NOT NULL DEFAULT '-2',
+ CreatedById int(11) DEFAULT NULL,
GuestName varchar(255) NOT NULL DEFAULT '',
GuestEmail varchar(255) NOT NULL DEFAULT '',
CommentBody text,
CreatedOn int(11) DEFAULT NULL,
UserIP varchar(255) NOT NULL DEFAULT '',
Priority int(11) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '1',
PRIMARY KEY (CommentId),
KEY `Status` (`Status`),
KEY Priority (Priority),
KEY CreatedOn (CreatedOn),
KEY AnswerId (AnswerId),
KEY PollId (PollId),
KEY CreatedById (CreatedById)
);
CREATE TABLE PollsStatistics (
StatisticsId int(11) NOT NULL AUTO_INCREMENT,
PollId int(11) NOT NULL DEFAULT '0',
AnswerId int(11) NOT NULL DEFAULT '0',
CreatedById int(11) NOT NULL DEFAULT '-2',
UserIP varchar(255) NOT NULL DEFAULT '',
AnswerDate int(10) unsigned DEFAULT NULL,
PRIMARY KEY (StatisticsId),
KEY AnswerId (AnswerId,PollId),
KEY CreatedById (CreatedById),
KEY UserIP (UserIP)
);
\ No newline at end of file
Index: branches/5.1.x/install/upgrades.sql
===================================================================
--- branches/5.1.x/install/upgrades.sql (revision 13957)
+++ branches/5.1.x/install/upgrades.sql (revision 13958)
@@ -1,202 +1,211 @@
# ===== v 4.3.9 =====
ALTER TABLE Emoticon
ADD EmotionImage VARCHAR(255) NOT NULL,
ADD INDEX (EmotionImage),
DROP ImageId;
UPDATE Emoticon SET EmotionImage = CONCAT('0_',EmoticonId,'.gif') WHERE EmoticonId < 21;
# ===== v 5.0.0 =====
CREATE TABLE Polls (
PollId int(11) NOT NULL auto_increment,
`Name` varchar(255) NOT NULL default '',
l1_Question text,
l2_Question text,
l3_Question text,
l4_Question text,
l5_Question text,
Image varchar(255) NOT NULL default '',
CreatedOn int(11) unsigned NOT NULL,
StartDate int(11) unsigned NOT NULL,
EndDate int(11) unsigned default NULL,
Priority tinyint(4) NOT NULL default '0',
RequireLogin tinyint(4) NOT NULL default '0',
AllowMultipleVotings tinyint(4) NOT NULL default '1',
AllowComments tinyint(4) NOT NULL default '1',
`Status` tinyint(4) NOT NULL default '1',
CachedVotesQty int(11) NOT NULL,
PRIMARY KEY (PollId),
KEY `Status` (`Status`),
KEY Priority (Priority),
KEY StartDate (StartDate),
KEY EndDate (EndDate)
);
CREATE TABLE PollsAnswers (
AnswerId int(11) NOT NULL auto_increment,
PollId int(11) NOT NULL,
l1_Answer text,
l2_Answer text,
l3_Answer text,
l4_Answer text,
l5_Answer text,
VotesQty int(11) NOT NULL,
Priority int(11) NOT NULL default '0',
Status tinyint(4) NOT NULL default '1',
PRIMARY KEY (AnswerId),
KEY Status (Status),
KEY Priority (Priority),
KEY VoteCount (VotesQty),
KEY PollId (PollId)
);
CREATE TABLE PollsComments (
CommentId int(11) NOT NULL auto_increment,
PollId int(11) NOT NULL,
AnswerId int(11) default NULL,
CreatedById int(11) NOT NULL default '-2',
GuestName varchar(255) NOT NULL,
GuestEmail varchar(255) NOT NULL,
CommentBody text,
CreatedOn int(11) NOT NULL,
UserIP varchar(255) NOT NULL,
Priority int(11) NOT NULL,
`Status` tinyint(4) NOT NULL default '1',
PRIMARY KEY (CommentId),
KEY `Status` (`Status`),
KEY Priority (Priority),
KEY CreatedOn (CreatedOn),
KEY AnswerId (AnswerId),
KEY PollId (PollId),
KEY CreatedById (CreatedById)
);
CREATE TABLE PollsStatistics (
StatisticsId int(11) NOT NULL auto_increment,
PollId int(11) NOT NULL default '0',
AnswerId int(11) NOT NULL default '0',
CreatedById int(11) NOT NULL default '-2',
UserIP varchar(255) NOT NULL,
AnswerDate int(10) unsigned default NULL,
PRIMARY KEY (StatisticsId),
KEY AnswerId (AnswerId,PollId),
KEY CreatedById (CreatedById),
KEY UserIP (UserIP)
);
INSERT INTO ConfigurationAdmin VALUES ('poll_CommentDelay_Value', 'la_Text_Polls', 'la_prompt_DupPollComments', 'text', '', '', 60.1, 1, 1);
INSERT INTO ConfigurationAdmin VALUES ('poll_CommentDelay_Interval', 'la_Text_Polls', 'la_prompt_DupPollComments', 'select', '', '1=la_Text_Second,60=la_Text_Minute,3600=la_Text_Hour,86400=la_Text_Day,604800=la_Text_Week,2419200=la_Text_Month,29030400=la_text_Year', 60.2, 2, 1);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'poll_CommentDelay_Interval', '60', 'In-Bulletin', 'in-bulletin:configuration_output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'poll_CommentDelay_Value', '10', 'In-Bulletin', 'in-bulletin:configuration_output');
UPDATE Category SET Template = '/in-bulletin/designs/section' WHERE Template = 'inbulletin/index';
UPDATE Category SET CachedTemplate = '/in-bulletin/designs/section' WHERE CachedTemplate = 'inbulletin/index';
UPDATE ConfigurationValues SET VariableValue = '/in-bulletin/designs/section' WHERE VariableName = 'bb_CategoryTemplate';
UPDATE ConfigurationValues SET VariableValue = 'in-bulletin/designs/detail' WHERE VariableName = 'bb_ItemTemplate';
INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:topics.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:setting_folder.view', 11, 1, 1, 0);
DELETE FROM Permissions WHERE Permission LIKE 'in-bulletin:inbulletin_general.%';
UPDATE Phrase SET Module = 'In-Bulletin' WHERE ((Phrase LIKE '%Topic%' OR Phrase LIKE '%Post%' OR Phrase LIKE '%Forum%' OR Phrase LIKE '%Censor%' OR Phrase LIKE '%Smiley%' OR Phrase = 'la_title_In-Bulletin') AND (Module = 'Core'));
# ===== v 5.0.1 =====
UPDATE ConfigurationValues SET VariableValue = 'in-bulletin/topics/topic_detail' WHERE VariableName = 'bb_ItemTemplate';
UPDATE ConfigurationAdmin
SET ValueList = 'TopicText=la_opt_TopicText,Posts=la_opt_NumberOfPosts,CreatedOn=la_opt_CreatedOn,LastPostDate=la_opt_LastUpdated,Views=la_opt_TopicViews,CachedRating=la_opt_Rating,LastPoser=la_opt_LastPoster,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 3) AND (IsSystem = 0)</SQL>'
WHERE VariableName IN ('Topic_SortField', 'Topic_SortField2');
UPDATE ConfigurationAdmin
SET ValueList = 'ASC=la_common_Ascending,DESC=la_common_Descending'
WHERE VariableName IN ('Topic_SortOrder', 'Topic_SortOrder2');
UPDATE ConfigurationAdmin SET ValueList = '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year' WHERE VariableName = 'topic_ReviewDelay_Interval';
UPDATE ConfigurationAdmin SET ValueList = '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year' WHERE VariableName = 'topic_RatingDelay_Interval';
UPDATE ConfigurationAdmin SET ValueList = '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year' WHERE VariableName = 'poll_CommentDelay_Interval';
UPDATE CustomField SET FieldLabel = 'la_fld_cust_bb_ItemTemplate', Prompt = 'la_fld_cust_bb_ItemTemplate' WHERE FieldName = 'bb_ItemTemplate';
INSERT INTO Events VALUES(DEFAULT, 'TOPIC.ADD', NULL, 1, 1, NULL, 'In-Bulletin', 'la_event_topic.add', 0);
INSERT INTO Events VALUES(DEFAULT, 'TOPIC.ADD.PENDING', NULL, 1, 1, NULL, 'In-Bulletin', 'la_event_topic.add.pending', 1);
INSERT INTO Events VALUES(DEFAULT, 'TOPIC.ADD.PENDING', NULL, 1, 1, NULL, 'In-Bulletin', 'la_event_topic.add.pending', 0);
INSERT INTO Events VALUES(DEFAULT, 'TOPIC.MODIFY', NULL, 1, 1, NULL, 'In-Bulletin', 'la_event_topic.modify', 1);
INSERT INTO Events VALUES(DEFAULT, 'TOPIC.MODIFY', NULL, 1, 1, NULL, 'In-Bulletin', 'la_event_topic.modify', 0);
INSERT INTO Events VALUES(DEFAULT, 'TOPIC.MODIFY.PENDING', NULL, 1, 1, NULL, 'In-Bulletin', 'la_event_topic.modify.pending', 1);
INSERT INTO Events VALUES(DEFAULT, 'TOPIC.MODIFY.PENDING', NULL, 1, 1, NULL, 'In-Bulletin', 'la_event_topic.modify.pending', 0);
INSERT INTO Events VALUES(DEFAULT, 'TOPIC.APPROVE', NULL, 1, 0, NULL, 'In-Bulletin', 'la_event_topic.approve', 0);
UPDATE ConfigurationAdmin SET ValueList = 'style="width: 50px;"' WHERE VariableName IN ('topic_ReviewDelay_Value', 'topic_RatingDelay_Value', 'poll_CommentDelay_Value');
# ===== v 5.0.2-B1 =====
ALTER TABLE PrivateMessageBody CHANGE Body Body text NULL;
ALTER TABLE Emoticon CHANGE EmotionImage EmotionImage VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE Polls
CHANGE CreatedOn CreatedOn INT(11) UNSIGNED NULL DEFAULT NULL ,
CHANGE StartDate StartDate INT(11) UNSIGNED NULL DEFAULT NULL ,
CHANGE CachedVotesQty CachedVotesQty INT(11) NOT NULL DEFAULT '0';
ALTER TABLE PollsAnswers
CHANGE PollId PollId INT(11) NOT NULL DEFAULT '0',
CHANGE VotesQty VotesQty INT(11) NOT NULL DEFAULT '0';
ALTER TABLE PollsComments
CHANGE PollId PollId INT(11) NOT NULL DEFAULT '0',
CHANGE GuestName GuestName VARCHAR(255) NOT NULL DEFAULT '',
CHANGE GuestEmail GuestEmail VARCHAR(255) NOT NULL DEFAULT '',
CHANGE CreatedOn CreatedOn INT(11) NULL DEFAULT NULL ,
CHANGE UserIP UserIP VARCHAR(255) NOT NULL DEFAULT '',
CHANGE Priority Priority INT(11) NOT NULL DEFAULT '0';
ALTER TABLE PollsStatistics CHANGE UserIP UserIP VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE Posting
CHANGE CreatedOn CreatedOn INT(11) NULL DEFAULT NULL,
CHANGE Modified Modified INT(11) NULL DEFAULT NULL;
ALTER TABLE PrivateMessages CHANGE CreatedOn CreatedOn INT(11) UNSIGNED NULL DEFAULT NULL;
ALTER TABLE Topic
CHANGE Modified Modified INT(11) NULL DEFAULT NULL,
CHANGE CreatedOn CreatedOn INT(11) NULL DEFAULT NULL;
# ===== v 5.0.2-B2 =====
# ===== v 5.0.2-RC1 =====
# ===== v 5.0.2 =====
# ===== v 5.0.3-B1 =====
# ===== v 5.0.3-B2 =====
# ===== v 5.0.3-RC1 =====
# ===== v 5.0.3 =====
# ===== v 5.0.4-B1 =====
# ===== v 5.0.4-B2 =====
# ===== v 5.0.4 =====
# ===== v 5.1.0-B1 =====
UPDATE Modules SET Path = 'modules/in-bulletin/' WHERE `Name` = 'In-Bulletin';
DELETE FROM ConfigurationValues WHERE VariableName IN (
'Post_Sortfield', 'Post_SortOrder', 'Perpage_PrivateMessages', 'Topic_Root',
'Topic_Background1', 'Topic_Background2', 'Post_Background1', 'Post_Background2',
'Posting_SortOrder', 'Bulletin_TopCount', 'Bulletin_CatNewDays', 'Bulletin_Pick_First'
);
UPDATE ConfigurationValues SET ModuleOwner = 'In-Bulletin' WHERE VariableName = 'BBTags';
UPDATE Phrase SET Module = 'Core' WHERE Phrase = 'la_fld_Replacement';
DELETE FROM Permissions WHERE Permission LIKE 'in-bulletin:configuration_email%';
# ===== v 5.1.0-B2 =====
# ===== v 5.1.0-RC1 =====
-# ===== v 5.1.0 =====
\ No newline at end of file
+# ===== v 5.1.0 =====
+
+# ===== v 5.1.1-B1 =====
+ALTER TABLE PollsComments CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL;
+
+ALTER TABLE Topic
+ CHANGE OwnerId OwnerId INT( 11 ) NULL DEFAULT NULL ,
+ CHANGE ModifiedById ModifiedById INT( 11 ) NULL DEFAULT NULL;
+
+UPDATE Topic SET ModifiedById = NULL WHERE ModifiedById = 0;
\ No newline at end of file

Event Timeline