Index: releases/5.2.2-B2/admin_templates/user_item_tab.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/user_item_tab.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/user_item_tab.tpl	(revision 16629)
@@ -0,0 +1,34 @@
+<inp2:m_RequireLogin permissions="in-portal:user_list.view" system="1"/>
+<inp2:m_DefineElement name="catalog_tab">
+	<inp2:m_if check="m_ParamEquals" name="tab_init" value="" inverse="inverse">
+		<inp2:m_if check="m_ParamEquals" name="tab_init" value="1">
+			<div id="topics_div" prefix="<inp2:m_param name="prefix"/>" view_template="in-bulletin/user_item_tab" edit_template="in-bulletin/topics/topics_edit" dep_buttons="new_topic" category_id="-1" class="catalog-tab"><!-- IE minimal height problem fix --></div>
+			<script type="text/javascript">$Catalog.registerTab('topics');</script>
+		</inp2:m_if>
+		<inp2:m_if check="m_ParamEquals" name="tab_init" value="2">
+			<inp2:adm_CatalogTab render_as="item_tab" prefix="$prefix" title_property="$title_property"/>
+		</inp2:m_if>
+	<inp2:m_else/>
+		<inp2:m_include t="incs/blocks"/>
+		<inp2:m_include t="incs/in-portal"/>
+		<inp2:m_include t="categories/ci_blocks"/>
+		<inp2:$prefix_InitList grid="$grid_name"/>
+
+		$Catalog.setItemCount('<inp2:m_param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount/>');
+		$Catalog.setCurrentCategory('<inp2:m_param name="prefix"/>', <inp2:m_get name="m_cat_id" js_escape="1"/>);
+		$Catalog.saveSearch('<inp2:m_Param name="prefix"/>', '<inp2:$prefix_SearchKeyword js_escape="1"/>', '<inp2:m_Param name="grid_name"/>');
+
+		<inp2:m_RenderElement name="grid_js" PrefixSpecial="$prefix" IdField="TopicId" grid="$grid_name" menu_filters="yes"/>
+
+		Grids['<inp2:m_param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit','delete'));
+		$Catalog.setViewMenu('<inp2:m_param name="prefix"/>');
+		#separator#
+		<!-- topics tab: begin -->
+		<inp2:m_RenderElement name="kernel_form" form_name="topics_form"/>
+			<inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="TopicId" grid="$grid_name" menu_filters="yes"/>
+		<inp2:m_RenderElement name="kernel_form_end"/>
+		<!-- topics tab: end -->
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:bb_InitCatalogTab render_as="catalog_tab" default_grid="Default" radio_grid="Radio"/>

Property changes on: releases/5.2.2-B2/admin_templates/user_item_tab.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.7
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/catalog_tab.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/catalog_tab.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/catalog_tab.tpl	(revision 16629)
@@ -0,0 +1,56 @@
+<inp2:m_RequireLogin permissions="in-portal:browse.view" system="1"/>
+<inp2:m_DefineElement name="catalog_tab">
+	<inp2:m_if check="m_ParamEquals" name="tab_init" value="" inverse="inverse">
+		<!--##<inp2:m_if check="m_ParamEquals" name="tab_init" value="1">
+			a_toolbar.AddButton(
+				new ToolBarButton(
+					'in-bulletin:new_topic',
+					'<inp2:m_phrase label="la_ToolTip_NewTopic" escape="1"/>',
+					add_item,
+					true
+		 		)
+		 	);
+		</inp2:m_if>##-->
+
+		<inp2:m_if check="m_ParamEquals" name="tab_init" value="2">
+			<div id="topics_div" prefix="<inp2:m_param name="prefix"/>" view_template="in-bulletin/catalog_tab" edit_template="in-bulletin/topics/topics_edit" category_id="-1" dep_buttons="new_topic" class="catalog-tab"><!-- IE minimal height problem fix --></div>
+			<script type="text/javascript">$Catalog.registerTab('topics');</script>
+		</inp2:m_if>
+
+		<inp2:m_if check="m_ParamEquals" name="tab_init" value="3">
+			$Catalog.setItemCount('<inp2:m_Param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount grid="$grid_name"/>');
+		</inp2:m_if>
+	<inp2:m_else/>
+		<inp2:lang.current_SetContentType content_type="text/plain"/>
+		<inp2:m_include t="incs/blocks"/>
+		<inp2:m_include t="incs/in-portal"/>
+		<inp2:m_include t="categories/ci_blocks"/>
+
+		<inp2:$prefix_InitList grid="$grid_name"/>
+
+		$Catalog.setItemCount('<inp2:m_param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount/>');
+		$Catalog.setCurrentCategory('<inp2:m_param name="prefix"/>', <inp2:m_get name="m_cat_id" js_escape="1"/>);
+		$Catalog.saveSearch('<inp2:m_Param name="prefix"/>', '<inp2:$prefix_SearchKeyword js_escape="1"/>', '<inp2:m_Param name="grid_name"/>');
+
+		<inp2:m_RenderElement name="grid_js" PrefixSpecial="$prefix" IdField="TopicId" grid="$grid_name" menu_filters="yes"/>
+		<inp2:m_RenderElement name="grid_search_buttons" PrefixSpecial="$prefix" grid="$grid_name" ajax="1"/>
+		<inp2:m_if check="m_ParamEquals" name="tab_dependant" value="yes">
+			Grids['<inp2:m_param name="prefix"/>'].AddAlternativeGrid('<inp2:m_param name="cat_prefix"/>', true);
+		</inp2:m_if>
+		Grids['<inp2:m_param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6'));
+		<inp2:m_RenderElement name="reflect_catalog_buttons"/>
+
+		$Catalog.setViewMenu('<inp2:m_param name="prefix"/>');
+		<inp2:m_if check="m_ParamEquals" name="tab_mode" value="single">
+			Grids['<inp2:m_param name="prefix"/>'].DblClick = function() {return false};
+		</inp2:m_if>
+		#separator#
+		<!-- topics tab: begin -->
+		<inp2:m_RenderElement name="kernel_form" form_name="topics_form"/>
+			<inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="TopicId" grid="$grid_name" menu_filters="yes"/>
+		<inp2:m_RenderElement name="kernel_form_end"/>
+		<!-- topics tab: end -->
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:bb_InitCatalogTab render_as="catalog_tab" default_grid="Default" radio_grid="Radio"/>

Property changes on: releases/5.2.2-B2/admin_templates/catalog_tab.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9.2.5
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/topics/topics_relations.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/topics/topics_relations.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/topics/topics_relations.tpl	(revision 16629)
@@ -0,0 +1,105 @@
+<inp2:adm_SetPopupSize width="880" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="bb" section="in-portal:browse" title_preset="topics_relations" pagination="1" pagination_prefix="bb-rel" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('bb','<inp2:bb_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('bb','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('bb', '<inp2:bb_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('bb', '<inp2:bb_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				//Relations related:
+				a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Relation" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
+						function() {
+							openSelector('bb-rel', '<inp2:adm_SelectorLink prefix="bb-rel" selection_mode="single" tab_prefixes="all" no_amp="1" js_escape="1"/>', 'TargetId', '950x600');
+						} ) );
+
+				function edit()
+	  			{
+	  				std_edit_temp_item('bb-rel', 'in-bulletin/topics/relations_edit');
+	  			}
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('bb-rel')
+						} ) );
+
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+							submit_event('bb-rel','OnMassApprove');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+							submit_event('bb-rel','OnMassDecline');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="bb_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="bb_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="bb_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="bb-rel" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="bb-rel" IdField="RelationshipId" grid="Default"/>
+<script type="text/javascript">
+	Grids['bb-rel'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline') );
+</script>
+<input type="hidden" name="TargetId" id="TargetId" value="<inp2:m_get name="TargetId"/>">
+<input type="hidden" name="TargetType" id="TargetType" value="<inp2:m_get name="TargetType"/>">
+<inp2:m_include t="incs/footer"/>
+
+<script type="text/javascript">
+	var $env = document.getElementById('sid').value+'-:m<inp2:m_get name="m_cat_id" js_escape="1"/>-1-1-1-s';
+</script>

Property changes on: releases/5.2.2-B2/admin_templates/topics/topics_relations.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.3
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/topics/topics_edit.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/topics/topics_edit.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/topics/topics_edit.tpl	(revision 16629)
@@ -0,0 +1,104 @@
+<inp2:adm_SetPopupSize width="880" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="bb" section="in-portal:browse" title_preset="topics_edit" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('bb','<inp2:bb_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('bb','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('bb', '<inp2:bb_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('bb', '<inp2:bb_NextId/>');
+						}
+				 ) );
+
+				//a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="bb_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="bb_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="bb_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:bb_SaveWarning name="grid_save_warning"/>
+<inp2:bb_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="la_section_Topic"/>
+			<inp2:m_RenderElement name="inp_id_label" prefix="bb" field="TopicId" title="la_fld_Id"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="bb" field="TopicText" title="la_fld_Subject" size="70"/>
+
+			<inp2:m_if check="bb_FieldEquals" name="Posts" value="0">
+				<inp2:m_RenderElement name="inp_edit_textarea" prefix="bb" field="PostingText" title="la_fld_MessageBody" control_options="{min_height: 100}" cols="70" rows="8"/>
+			</inp2:m_if>
+
+			<inp2:m_RenderElement name="inp_edit_user" prefix="bb" field="OwnerId" title="la_fld_PostedBy" size="40"/>
+			<inp2:m_RenderElement name="inp_edit_options" prefix="bb" field="CategoryId" title="la_fld_ParentSection" display_original="1"/>
+
+		<inp2:m_RenderElement name="subsection" title="la_section_Properties"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="bb" field="TopicType" title="la_fld_TopicType"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="bb" field="Status" title="la_fld_Status"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="bb" field="NewItem" title="la_fld_New"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="bb" field="HotItem" title="la_fld_Hot"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="bb" field="PopItem" title="la_fld_Pop"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="bb" field="EditorsPick" title="la_fld_EditorsPick"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="bb" field="Priority" title="la_fld_Priority" size="4"/>
+			<inp2:m_RenderElement name="inp_edit_date_time" prefix="bb" field="CreatedOn" title="la_fld_CreatedOn"/>
+			<inp2:m_RenderElement name="inp_edit_date_time" prefix="bb" field="Modified" title="la_fld_Modified"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="bb" field="MetaKeywords" title="la_fld_MetaKeywords" size="70"/>
+			<inp2:m_RenderElement name="inp_edit_textarea" prefix="bb" field="MetaDescription" title="la_fld_MetaDescription" control_options="{min_height: 100}" cols="70" rows="8"/>
+
+		<inp2:m_RenderElement name="subsection" title="la_section_Counters"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="bb" field="CachedRating" title="la_fld_Rating" hint_label="la_prompt_RatingLimits" size="4"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="bb" field="CachedVotesQty" title="la_fld_Votes" hint_label="la_prompt_VoteLimits" size="4"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="bb" field="Views" title="la_fld_Views" hint_label="la_prompt_HitLimits" size="4"/>
+			<input type="hidden" name="Views_original" id="Views_original" value="<inp2:bb_Field name="Views" db="db" />" />
+
+		<!-- custom fields: begin -->
+		<inp2:m_include t="incs/custom_blocks"/>
+		<inp2:cf.general_PrintList render_as="cv_row_block" SourcePrefix="bb" value_field="Value" per_page="-1" grid="Default" />
+		<!-- custom fields: end -->
+
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<script type="text/javascript">
+	disable_categories('<inp2:bb_InputName name="CategoryId"/>', <inp2:bb_AllowedCategoriesJSON/>);
+</script>
+
+<inp2:m_include t="incs/footer"/>

Property changes on: releases/5.2.2-B2/admin_templates/topics/topics_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5.2.6
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/topics/topics_categories.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/topics/topics_categories.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/topics/topics_categories.tpl	(revision 16629)
@@ -0,0 +1,84 @@
+<inp2:adm_SetPopupSize width="880" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="bb" section="in-portal:browse" title_preset="topics_categories" pagination="1" pagination_prefix="bb-ci" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+  				function edit(){ }
+
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('bb','<inp2:bb_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('bb','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('bb', '<inp2:bb_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('bb', '<inp2:bb_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				//Category related:
+				a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Category" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
+						function() {
+							openSelector('bb', '<inp2:adm_SelectorLink prefix="bb" selection_mode="multi" tab_prefixes="none" no_amp="1" js_escape="1"/>', 'ItemCategory');
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('bb-ci')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('setprimary', '<inp2:m_phrase label="la_ToolTip_SetPrimary" escape="1"/>', function() {
+							submit_event('bb-ci','OnSetPrimary');
+						}
+				 ) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="bb_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="bb_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="bb_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="bb-ci" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="grid_checkbox_category_td">
+	<inp2:CategoryName field="$field" primary_title="la_PrimaryCategory" no_special="1"/>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="bb-ci" IdField="CategoryId" grid="Default"/>
+<script type="text/javascript">
+	Grids['bb-ci'].SetDependantToolbarButtons( new Array('delete','setprimary') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: releases/5.2.2-B2/admin_templates/topics/topics_categories.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.4
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/topics/relations_edit.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/topics/relations_edit.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/topics/relations_edit.tpl	(revision 16629)
@@ -0,0 +1,76 @@
+<inp2:adm_SetPopupSize width="750" height="400"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="bb" section="in-portal:browse" title_preset="relations_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('bb-rel','<inp2:bb-rel_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('bb-rel','OnCancel');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+						go_to_id('bb-rel', '<inp2:bb-rel_PrevId/>');
+					}
+				));
+
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+						go_to_id('bb-rel', '<inp2:bb-rel_NextId/>');
+					}
+				));
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="bb-rel_IsSingle">
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="bb-rel_IsLast">
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="bb-rel_IsFirst">
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_include t="categories/ci_blocks"/>
+
+<inp2:bb-rel_SaveWarning name="grid_save_warning"/>
+<inp2:bb-rel_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="la_section_Relation"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="bb-rel" field="SourceId"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="bb-rel" field="SourceType"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="bb-rel" field="TargetId"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="bb-rel" field="TargetType"/>
+
+			<inp2:m_RenderElement name="inp_id_label" prefix="bb-rel" field="RelationshipId" title="la_fld_Id"/>
+			<inp2:m_RenderElement name="inp_edit_relation" prefix="bb-rel" field="TargetId" title="la_fld_TargetId"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="bb-rel" field="Type" title="la_fld_RelationshipType"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="bb-rel" field="Enabled" title="la_fld_Enabled"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="bb-rel" field="Priority" title="la_fld_Priority" size="4"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: releases/5.2.2-B2/admin_templates/topics/relations_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4.2.4
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/topics/review_edit.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/topics/review_edit.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/topics/review_edit.tpl	(revision 16629)
@@ -0,0 +1,77 @@
+<inp2:adm_SetPopupSize width="750" height="400"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="bb" section="in-portal:browse" title_preset="reviews_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('bb-rev','<inp2:bb-rev_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('bb-rev','OnCancel');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+						go_to_id('bb-rev', '<inp2:bb-rev_PrevId/>');
+					}
+				));
+
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+						go_to_id('bb-rev', '<inp2:bb-rev_NextId/>');
+					}
+				));
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="bb-rev_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="bb-rev_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="bb-rev_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:bb-rev_SaveWarning name="grid_save_warning"/>
+<inp2:bb-rev_ErrorWarning name="form_error_warning"/>
+
+<inp2:m_RenderElement name="inp_edit_hidden" prefix="bb-rev" field="ItemId"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="la_Text_Review"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox_allow_html" prefix="bb-rev" field="TextFormat"/>
+			<inp2:m_RenderElement name="inp_id_label" prefix="bb-rev" field="ReviewId" title="la_fld_Id"/>
+			<inp2:m_RenderElement name="inp_edit_user" prefix="bb-rev" field="CreatedById" title="la_fld_CreatedById" class="text"/>
+			<inp2:m_RenderElement name="inp_edit_textarea" prefix="bb-rev" field="ReviewText" title="la_fld_ReviewText" cols="70" rows="8"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="bb-rev" field="HelpfulCount" title="la_fld_HelpfulCount" style="width: 50px;"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="bb-rev" field="NotHelpfulCount" title="la_fld_NotHelpfulCount" style="width: 50px;"/>
+
+		<inp2:m_RenderElement name="subsection" title="la_Text_General"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="bb-rev" field="Status" title="la_fld_Status"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="bb-rev" field="Priority" title="la_fld_Priority" size="3" class="text"/>
+			<inp2:m_RenderElement name="inp_edit_date_time" prefix="bb-rev" field="CreatedOn" title="la_fld_CreatedOn" size="20" class="text"/>
+			<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: releases/5.2.2-B2/admin_templates/topics/review_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.3
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/topics/images_edit.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/topics/images_edit.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/topics/images_edit.tpl	(revision 16629)
@@ -0,0 +1,87 @@
+<inp2:adm_SetPopupSize width="750" height="670"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="bb" section="in-portal:browse" title_preset="images_edit"/>
+
+<inp2:m_include t="incs/image_blocks"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('bb-img','<inp2:bb-img_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('bb-img','OnCancel');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+						go_to_id('bb-img', '<inp2:bb-img_PrevId/>');
+					}
+				));
+
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+						go_to_id('bb-img', '<inp2:bb-img_NextId/>');
+					}
+				));
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="bb-img_IsSingle">
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="bb-img_IsLast">
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="bb-img_IsFirst">
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:bb-img_SaveWarning name="grid_save_warning"/>
+<inp2:bb-img_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="la_section_Image"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="bb-img" field="ResourceId"/>
+			<inp2:m_RenderElement name="inp_label" prefix="bb-img" field="ImageId" title="la_fld_Id"/>
+
+			<inp2:m_RenderElement name="inp_edit_box" prefix="bb-img" field="Name" title="la_fld_Name" size="40"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="bb-img" field="AltName" title="la_fld_AltValue" size="40"/>
+
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="bb-img" field="Enabled" title="la_fld_Enabled" onchange="check_primary()" />
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="bb-img" field="DefaultImg" title="la_fld_Primary" onchange="check_status()" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="bb-img" field="Priority" title="la_fld_Priority" size="5"/>
+
+		<inp2:m_RenderElement name="subsection" title="la_section_ThumbnailImage"/>
+			<inp2:m_RenderElement name="thumbnail_section" prefix="bb-img"/>
+
+		<inp2:m_RenderElement name="subsection" title="la_section_FullSizeImage"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="bb-img" field="SameImages" title="la_fld_SameAsThumb" onchange="toggle_fullsize()"/>
+			<inp2:m_RenderElement name="fullsize_section" prefix="bb-img"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<script type="text/javascript">
+	<inp2:m_RenderElement name="images_edit_js" prefix="bb-img"/>
+	toggle_fullsize();
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: releases/5.2.2-B2/admin_templates/topics/images_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4.2.4
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/topics/topics_custom.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/topics/topics_custom.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/topics/topics_custom.tpl	(revision 16629)
@@ -0,0 +1,72 @@
+<inp2:adm_SetPopupSize width="880" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="bb" section="in-portal:browse" title_preset="topics_custom" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('bb','<inp2:bb_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('bb','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('bb', '<inp2:bb_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('bb', '<inp2:bb_NextId/>');
+						}
+				 ) );
+
+				function edit(){ }
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="bb_IsSingle">
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="bb_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="bb_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="ml_selector" prefix="bb"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:bb_SaveWarning name="grid_save_warning"/>
+<inp2:bb_ErrorWarning name="form_error_warning"/>
+
+<inp2:m_include t="incs/custom_blocks"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:cf.all_PrintList render_as="cv_row_block" SourcePrefix="bb" value_field="Value" per_page="-1" grid="Default" original_title="la_section_OriginalValues" display_original="1"/>
+
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<input type="hidden" name="cf_type" value="<inp2:bb_UnitOption name='ItemType'/>"/>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: releases/5.2.2-B2/admin_templates/topics/topics_custom.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4.2.5
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/topics/topics_reviews.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/topics/topics_reviews.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/topics/topics_reviews.tpl	(revision 16629)
@@ -0,0 +1,114 @@
+<inp2:adm_SetPopupSize width="880" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="bb" section="in-portal:browse" title_preset="topics_reviews" pagination="1" pagination_prefix="bb-rev" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('bb','<inp2:bb_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('bb','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('bb', '<inp2:bb_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('bb', '<inp2:bb_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				//Pricing related:
+				a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewReview" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
+						function() {
+							std_new_item('bb-rev', 'in-bulletin/topics/review_edit')
+						} ) );
+
+				function edit()
+	  			{
+	  				std_edit_temp_item('bb-rev', 'in-bulletin/topics/review_edit');
+	  			}
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('bb-rev')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+							submit_event('bb-rev','OnMassApprove');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+							submit_event('bb-rev','OnMassDecline');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+				a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
+							submit_event('bb-rev','OnMassMoveUp');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
+							submit_event('bb-rev','OnMassMoveDown');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarSeparator('sep5') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="bb_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="bb_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="bb_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="bb-rev" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="reviewtext_checkbox_td">
+	<inp2:Field field="$field" no_special="no_special" cut_first="100"/>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="bb-rev" IdField="ReviewId" grid="Default"/>
+<script type="text/javascript">
+	Grids['bb-rev'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','move_up','move_down') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: releases/5.2.2-B2/admin_templates/topics/topics_reviews.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.3
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/topics/topics_images.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/topics/topics_images.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/topics/topics_images.tpl	(revision 16629)
@@ -0,0 +1,107 @@
+<inp2:adm_SetPopupSize width="880" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="bb" section="in-portal:browse" title_preset="topics_images" pagination="1" pagination_prefix="bb-img" tab_preset="Default"/>
+
+<inp2:m_include t="incs/image_blocks"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+
+  				function edit()
+	  			{
+	  				std_edit_temp_item('bb-img', 'in-bulletin/topics/images_edit');
+	  			}
+
+  				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('bb','<inp2:bb_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('bb','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('bb', '<inp2:bb_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('bb', '<inp2:bb_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+
+
+				a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Images" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
+						function() {
+							std_new_item('bb-img', 'in-bulletin/topics/images_edit')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('bb-img')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
+							submit_event('bb-img','OnMassMoveUp');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
+							submit_event('bb-img','OnMassMoveDown');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('setprimary', '<inp2:m_phrase label="la_ToolTip_SetPrimary" escape="1"/>', function() {
+							submit_event('bb-img','OnSetPrimary');
+						}
+				 ) );
+
+				  a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="bb_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="bb_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="bb_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="bb-img" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="bb-img" IdField="ImageId" grid="Default"/>
+<script type="text/javascript">
+	Grids['bb-img'].SetDependantToolbarButtons( new Array('edit','delete','move_up','move_down','setprimary') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: releases/5.2.2-B2/admin_templates/topics/topics_images.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4.2.5
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/polls/poll_edit.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/polls/poll_edit.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/polls/poll_edit.tpl	(revision 16629)
@@ -0,0 +1,110 @@
+<inp2:adm_SetPopupSize width="900" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" section="in-bulletin:polls" prefix="poll" title_preset="poll_edit" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('poll','<inp2:poll_SaveEvent/>');
+						}
+					) );
+
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							cancel_edit('poll', 'OnCancelEdit','<inp2:poll_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton(
+								new ToolBarButton(
+									'prev',
+									'<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>',
+									function() {
+										go_to_id('poll', '<inp2:poll_PrevId/>');
+									}
+								)
+							);
+
+							a_toolbar.AddButton(
+								new ToolBarButton(
+									'next',
+									'<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>',
+									function() {
+										go_to_id('poll', '<inp2:poll_NextId/>');
+									}
+								)
+							);
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+
+				a_toolbar.AddButton( new ToolBarButton('reset', '<inp2:m_phrase label="la_ToolTip_ResetVotes" escape="1"/>', function() {
+							submit_event('poll', 'OnResetVotes');
+						}
+				 ) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="poll_IsSingle">
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="poll_IsLast">
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="poll_IsFirst">
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+
+			</script>
+
+			<script src="js/swfobject.js" type="text/javascript"></script>
+			<script type="text/javascript" src="<inp2:m_Compress files='js/uploader/upload_manager.js|js/uploader/uploader.js'/>"></script>
+		</td>
+
+		<inp2:m_RenderElement name="ml_selector" prefix="poll"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:poll_SaveWarning name="grid_save_warning"/>
+<inp2:poll_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="la_section_General"/>
+
+			<inp2:m_RenderElement name="inp_label" prefix="poll" field="PollId" title="la_fld_Id"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="poll" field="Name" title="la_fld_Name" size="50"/>
+
+			<inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="poll" field="Question" title="la_fld_Question" control_options="{min_height: 100}" cols="70" rows="5"/>
+
+			<inp2:m_RenderElement name="inp_edit_swf_upload" prefix="poll" field="Image" title="la_fld_Image"/>
+
+		<inp2:m_RenderElement name="subsection" title="la_section_Properties"/>
+
+			<inp2:m_RenderElement name="inp_edit_date_time" prefix="poll" field="CreatedOn" title="la_fld_CreatedOn"/>
+			<inp2:m_RenderElement name="inp_edit_date_time" prefix="poll" field="StartDate" title="la_fld_StartDate"/>
+			<inp2:m_RenderElement name="inp_edit_date_time" prefix="poll" field="EndDate" title="la_fld_EndDate"/>
+
+			<inp2:m_RenderElement name="inp_edit_box" prefix="poll" field="Priority" title="la_fld_Priority" size="5"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="poll" field="RequireLogin" title="la_fld_RequireLogin"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="poll" field="AllowComments" title="la_fld_AllowComments"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="poll" field="AllowMultipleVotings" title="la_fld_AllowMultipleVotings"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="poll" field="CachedVotesQty" title="la_fld_Votes" size="5"/>
+
+			<inp2:m_RenderElement name="inp_edit_options" prefix="poll" field="Status" title="la_fld_Status"/>
+			<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>

Property changes on: releases/5.2.2-B2/admin_templates/polls/poll_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.5
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/polls/poll_list.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/polls/poll_list.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/polls/poll_list.tpl	(revision 16629)
@@ -0,0 +1,89 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" section="in-bulletin:polls" prefix="poll" title_preset="poll_list" pagination="1"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+	  	<td>
+	  		<script type="text/javascript">
+	  			//do not rename - this function is used in default grid for double click!
+	  			function edit()
+	  			{
+	  				std_edit_item('poll', 'in-bulletin/polls/poll_edit');
+	  			}
+
+	  			var a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewPoll" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
+						function() {
+							std_precreate_item('poll', 'in-bulletin/polls/poll_edit');
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('poll')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton(
+					new ToolBarButton(
+						'approve',
+						'<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>',
+						function() {
+							submit_event('poll', 'OnMassApprove');
+						}
+					)
+				);
+
+				a_toolbar.AddButton(
+					new ToolBarButton(
+						'decline',
+						'<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>',
+						function() {
+							submit_event('poll', 'OnMassDecline');
+						}
+					)
+				);
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
+							submit_event('poll','OnMassMoveUp');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
+							submit_event('poll','OnMassMoveDown');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="poll" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="poll_expire_td" no_special="">
+	<inp2:m_if check="Field" name="$field">
+		<inp2:Field field="$field" grid="$grid" no_special="$no_special" format="$format"/>
+	<inp2:m_else/>
+		<inp2:m_phrase name="la_Never"/>
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="poll" IdField="PollId" grid="Default"/>
+<script type="text/javascript">
+	Grids['poll'].SetDependantToolbarButtons( new Array('edit','delete', 'approve', 'decline', 'move_up', 'move_down') );
+</script>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: releases/5.2.2-B2/admin_templates/polls/poll_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.6
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/polls/answer_edit.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/polls/answer_edit.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/polls/answer_edit.tpl	(revision 16629)
@@ -0,0 +1,96 @@
+<inp2:adm_SetPopupSize width="550" height="400"/>
+<inp2:m_include t="incs/header"/>
+
+<inp2:m_RenderElement name="combined_header" section="in-bulletin:polls" prefix="poll" title_preset="answer_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('poll-answer','<inp2:poll-answer_SaveEvent/>');
+						}
+					) );
+
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							cancel_edit('poll-answer', 'OnCancel','<inp2:poll-answer_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
+						}
+				 ) );
+
+				 a_toolbar.AddButton(
+					new ToolBarButton(
+						'reset_edit',
+						'<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>',
+						function() {
+							reset_form('poll-answer', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
+						}
+					)
+				);
+
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton(
+								new ToolBarButton(
+									'prev',
+									'<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>',
+									function() {
+										go_to_id('poll-answer', '<inp2:poll-answer_PrevId/>');
+									}
+								)
+							);
+
+							a_toolbar.AddButton(
+								new ToolBarButton(
+									'next',
+									'<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>',
+									function() {
+										go_to_id('poll-answer', '<inp2:poll-answer_NextId/>');
+									}
+								)
+							);
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="poll-answer_IsSingle">
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="poll-answer_IsLast">
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="poll-answer_IsFirst">
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="ml_selector" prefix="poll-answer" />
+	</tr>
+</tbody>
+</table>
+
+<inp2:poll-answer_SaveWarning name="grid_save_warning"/>
+<inp2:poll-answer_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="la_section_General"/>
+
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="poll-answer" field="PollId"/>
+			<inp2:m_RenderElement name="inp_label" prefix="poll-answer" field="AnswerId" title="la_fld_Id"/>
+			<inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="poll-answer" field="Answer" title="la_fld_PollAnswer" control_options="{min_height: 100}" cols="70" rows="5"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="poll-answer" field="Priority" title="la_fld_Priority" size="5"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="poll-answer" field="VotesQty" title="la_fld_Votes" size="5"/>
+			<inp2:m_RenderElement name="inp_edit_options" prefix="poll-answer" field="Status" title="la_fld_Status"/>
+			<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: releases/5.2.2-B2/admin_templates/polls/answer_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.5
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/polls/comment_edit.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/polls/comment_edit.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/polls/comment_edit.tpl	(revision 16629)
@@ -0,0 +1,96 @@
+<inp2:adm_SetPopupSize width="650" height="400"/>
+<inp2:m_include t="incs/header"/>
+
+<inp2:m_RenderElement name="combined_header" section="in-bulletin:polls" prefix="poll" title_preset="comment_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('poll-comment','<inp2:poll-comment_SaveEvent/>');
+						}
+					) );
+
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							cancel_edit('poll-comment', 'OnCancel','<inp2:poll-comment_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
+						}
+				 ) );
+
+
+				 a_toolbar.AddButton(
+					new ToolBarButton(
+						'reset_edit',
+						'<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>',
+						function() {
+							reset_form('poll-comment', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
+						}
+					)
+				);
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton(
+								new ToolBarButton(
+									'prev',
+									'<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>',
+									function() {
+										go_to_id('poll-comment', '<inp2:poll_PrevId/>');
+									}
+								)
+							);
+
+							a_toolbar.AddButton(
+								new ToolBarButton(
+									'next',
+									'<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>',
+									function() {
+										go_to_id('poll-comment', '<inp2:poll_NextId/>');
+									}
+								)
+							);
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="poll-comment_IsSingle">
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="poll-comment_IsLast">
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="poll-comment_IsFirst">
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:poll-comment_SaveWarning name="grid_save_warning"/>
+<inp2:poll-comment_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="la_section_General"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="poll-comment" field="PollId"/>
+			<inp2:m_RenderElement name="inp_label" prefix="poll-comment" field="CommentId" title="la_fld_Id"/>
+			<inp2:m_RenderElement name="inp_edit_user" prefix="poll-comment" field="CreatedById" title="la_fld_CreatedById" class="text"/>
+			<inp2:m_RenderElement name="inp_edit_textarea" prefix="poll-comment" field="CommentBody" title="la_fld_PollComment" control_options="{min_height: 100}" cols="70" rows="5"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="poll-comment" field="GuestName" title="la_fld_PollGuestName" size="40"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="poll-comment" field="GuestEmail" title="la_fld_PollGuestEmail" size="40"/>
+			<inp2:m_RenderElement name="inp_edit_date_time" prefix="poll-comment" field="CreatedOn" title="la_fld_CreatedOn"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="poll-comment" field="Priority" title="la_fld_Priority" size="5"/>
+			<inp2:m_RenderElement name="inp_edit_options" prefix="poll-comment" field="Status" title="la_fld_Status"/>
+			<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: releases/5.2.2-B2/admin_templates/polls/comment_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.4
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/polls/poll_edit_answers.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/polls/poll_edit_answers.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/polls/poll_edit_answers.tpl	(revision 16629)
@@ -0,0 +1,152 @@
+<inp2:adm_SetPopupSize width="900" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" section="in-bulletin:polls" prefix="poll" title_preset="poll_edit_answers" tab_preset="Default" pagination="1" pagination_prefix="poll-answer"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+	  	<td>
+	  		<script type="text/javascript">
+	  			var a_toolbar = new ToolBar();
+
+	  			a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('poll','<inp2:poll_SaveEvent/>');
+						}
+					) );
+
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							cancel_edit('poll', 'OnCancelEdit','<inp2:poll_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton(
+								new ToolBarButton(
+									'prev',
+									'<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>',
+									function() {
+										go_to_id('poll', '<inp2:poll_PrevId/>');
+									}
+								)
+							);
+
+							a_toolbar.AddButton(
+								new ToolBarButton(
+									'next',
+									'<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>',
+									function() {
+										go_to_id('poll', '<inp2:poll_NextId/>');
+									}
+								)
+							);
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				function edit()
+	  			{
+	  				std_edit_item('poll-answer', 'in-bulletin/polls/answer_edit');
+	  			}
+
+
+				a_toolbar.AddButton(
+								new ToolBarButton(
+									'new_item',
+									'<inp2:m_phrase label="la_ToolTip_New_Answer" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
+									function() {
+										std_new_item('poll-answer', 'in-bulletin/polls/answer_edit')
+									}
+								)
+							);
+
+							a_toolbar.AddButton(
+								new ToolBarButton(
+									'edit',
+									'<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>',
+									edit
+								)
+							);
+
+							a_toolbar.AddButton(
+								new ToolBarButton(
+									'delete',
+									'<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+									function() {
+										std_delete_items('poll-answer')
+									}
+								)
+							);
+
+
+
+
+				a_toolbar.AddButton(
+					new ToolBarButton(
+						'approve',
+						'<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>',
+						function() {
+							submit_event('poll-answer', 'OnMassApprove');
+						}
+					)
+				);
+
+				a_toolbar.AddButton(
+					new ToolBarButton(
+						'decline',
+						'<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>',
+						function() {
+							submit_event('poll-answer', 'OnMassDecline');
+						}
+					)
+				);
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
+							submit_event('poll-answer','OnMassMoveUp');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
+							submit_event('poll-answer','OnMassMoveDown');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="poll_IsSingle">
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="poll_IsLast">
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="poll_IsFirst">
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="poll-answer" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="poll-answer" IdField="AnswerId" grid="Default"/>
+<script type="text/javascript">
+	Grids['poll-answer'].SetDependantToolbarButtons( new Array('edit','delete', 'approve', 'decline', 'move_up', 'move_down') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: releases/5.2.2-B2/admin_templates/polls/poll_edit_answers.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.3
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/polls/poll_edit_comments.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/polls/poll_edit_comments.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/polls/poll_edit_comments.tpl	(revision 16629)
@@ -0,0 +1,152 @@
+<inp2:adm_SetPopupSize width="900" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" section="in-bulletin:polls" prefix="poll" title_preset="poll_edit_comments" tab_preset="Default" pagination="1" pagination_prefix="poll-comment"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+	  	<td>
+	  		<script type="text/javascript">
+	  			var a_toolbar = new ToolBar();
+
+	  			a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('poll','<inp2:poll_SaveEvent/>');
+						}
+					) );
+
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							cancel_edit('poll', 'OnCancelEdit','<inp2:poll_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton(
+								new ToolBarButton(
+									'prev',
+									'<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>',
+									function() {
+										go_to_id('poll', '<inp2:poll_PrevId/>');
+									}
+								)
+							);
+
+							a_toolbar.AddButton(
+								new ToolBarButton(
+									'next',
+									'<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>',
+									function() {
+										go_to_id('poll', '<inp2:poll_NextId/>');
+									}
+								)
+							);
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				function edit()
+	  			{
+	  				std_edit_temp_item('poll-comment', 'in-bulletin/polls/comment_edit');
+	  			}
+
+
+				a_toolbar.AddButton(
+								new ToolBarButton(
+									'new_item',
+									'<inp2:m_phrase label="la_ToolTip_New_Comment" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
+									function() {
+										std_new_item('poll-comment', 'in-bulletin/polls/comment_edit')
+									}
+								)
+							);
+
+							a_toolbar.AddButton(
+								new ToolBarButton(
+									'edit',
+									'<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>',
+									edit
+								)
+							);
+
+							a_toolbar.AddButton(
+								new ToolBarButton(
+									'delete',
+									'<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+									function() {
+										std_delete_items('poll-comment')
+									}
+								)
+							);
+
+
+
+
+				a_toolbar.AddButton(
+					new ToolBarButton(
+						'approve',
+						'<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>',
+						function() {
+							submit_event('poll-comment', 'OnMassApprove');
+						}
+					)
+				);
+
+				a_toolbar.AddButton(
+					new ToolBarButton(
+						'decline',
+						'<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>',
+						function() {
+							submit_event('poll-comment', 'OnMassDecline');
+						}
+					)
+				);
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
+							submit_event('poll-comment','OnMassMoveUp');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
+							submit_event('poll-comment','OnMassMoveDown');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="poll_IsSingle">
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="poll_IsLast">
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="poll_IsFirst">
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="poll-comment" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="poll-comment" IdField="CommentId" grid="Default"/>
+<script type="text/javascript">
+	Grids['poll-comment'].SetDependantToolbarButtons( new Array('edit','delete', 'approve', 'decline', 'move_up', 'move_down') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: releases/5.2.2-B2/admin_templates/polls/poll_edit_comments.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.4
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/img/toolbar/toolbar-sprite.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: releases/5.2.2-B2/admin_templates/img/toolbar/toolbar-sprite.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/img/toolbar/toolbar-sprite.css
===================================================================
--- releases/5.2.2-B2/admin_templates/img/toolbar/toolbar-sprite.css	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/img/toolbar/toolbar-sprite.css	(revision 16629)
@@ -0,0 +1,9 @@
+.in-bulletin-toolbar-sprite {
+	background: url("@templates_base@/../../modules/in-bulletin/admin_templates/img/toolbar/toolbar-sprite.png") repeat-x scroll 0 0 transparent;
+	border: 0 none;
+	cursor: pointer;
+	padding: 0;
+}
+#in-bulletin-tb-new_topic { background-position: -0px -0px; }
+#in-bulletin-tb-new_topic.hover { background-position: -32px -0px; }
+#in-bulletin-tb-new_topic.disabled { background-position: -64px -0px; }

Property changes on: releases/5.2.2-B2/admin_templates/img/toolbar/toolbar-sprite.css
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/img/logo_bg.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: releases/5.2.2-B2/admin_templates/img/logo_bg.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/img/itemicons/icon16_topic.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: releases/5.2.2-B2/admin_templates/img/itemicons/icon16_topic.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/img/itemicons/icon16_topic_pending.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: releases/5.2.2-B2/admin_templates/img/itemicons/icon16_topic_pending.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/img/itemicons/icon16_topic_disabled.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: releases/5.2.2-B2/admin_templates/img/itemicons/icon16_topic_disabled.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/img/itemicons/icon16_topic_new.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: releases/5.2.2-B2/admin_templates/img/itemicons/icon16_topic_new.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/img/itemicons/icon16_topics.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: releases/5.2.2-B2/admin_templates/img/itemicons/icon16_topics.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/img/icons/icon24_topics.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: releases/5.2.2-B2/admin_templates/img/icons/icon24_topics.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/img/icons/icon24_conf_censorship.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: releases/5.2.2-B2/admin_templates/img/icons/icon24_conf_censorship.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/img/icons/icon24_conf_topics.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: releases/5.2.2-B2/admin_templates/img/icons/icon24_conf_topics.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/img/icons/icon24_polls.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: releases/5.2.2-B2/admin_templates/img/icons/icon24_polls.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/img/icons/icon24_conf_smileys.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: releases/5.2.2-B2/admin_templates/img/icons/icon24_conf_smileys.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/emoticons/emoticon_edit.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/emoticons/emoticon_edit.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/emoticons/emoticon_edit.tpl	(revision 16629)
@@ -0,0 +1,74 @@
+<inp2:adm_SetPopupSize width="550" height="400"/>
+<inp2:m_include t="incs/header"/>
+
+<inp2:m_RenderElement name="combined_header" section="in-bulletin:configuration_emoticon"  prefix="emoticon" title_preset="emoticon_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('emoticon', '<inp2:emoticon_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							cancel_edit('emoticon', 'OnCancelEdit','<inp2:emoticon_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
+						}
+				 ) );
+
+			 a_toolbar.AddButton( new ToolBarButton('reset_edit', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
+						reset_form('emoticon', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
+					}
+			 	) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('emoticon', '<inp2:emoticon_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('emoticon', '<inp2:emoticon_NextId/>');
+						}
+				 ) );
+
+
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="emoticon_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="emoticon_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="emoticon_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:emoticon_SaveWarning name="grid_save_warning"/>
+<inp2:emoticon_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+<table class="edit-form">
+		<inp2:m_RenderElement name="inp_id_label" prefix="emoticon" field="EmoticonId" title="la_fld_Id"/>
+		<inp2:m_RenderElement name="inp_edit_box" prefix="emoticon" field="Name" title="la_fld_Name"/>
+		<inp2:m_RenderElement name="inp_edit_box" prefix="emoticon" field="KeyStroke" title="la_fld_KeyStroke"/>
+		<inp2:m_RenderElement name="inp_edit_checkbox" prefix="emoticon" field="Enabled" title="la_fld_Enabled"/>
+		<inp2:m_RenderElement name="inp_edit_upload" prefix="emoticon" field="EmotionImage" title="la_fld_Image"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>

Property changes on: releases/5.2.2-B2/admin_templates/emoticons/emoticon_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.4
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/emoticons/emoticon_list.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/emoticons/emoticon_list.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/emoticons/emoticon_list.tpl	(revision 16629)
@@ -0,0 +1,48 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" section="in-bulletin:configuration_emoticon" prefix="emoticon" title_preset="emoticon_list" pagination="1"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+	  	<td>
+	  		<script type="text/javascript">
+	  			//do not rename - this function is used in default grid for double click!
+	  			function edit()
+	  			{
+	  				std_edit_item('emoticon', 'in-bulletin/emoticons/emoticon_edit');
+	  			}
+
+	  			var a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
+						function() {
+							std_precreate_item('emoticon', 'in-bulletin/emoticons/emoticon_edit');
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('emoticon')
+						} ) );
+
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="emoticon" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="emoticon" IdField="EmoticonId" grid="Default"/>
+<script type="text/javascript">
+	Grids['emoticon'].SetDependantToolbarButtons( new Array('edit','delete') );
+</script>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: releases/5.2.2-B2/admin_templates/emoticons/emoticon_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.5
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/category_properties.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/category_properties.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/category_properties.tpl	(revision 16629)
@@ -0,0 +1,2 @@
+<inp2:m_RenderElement name="subsection" title="la_In-bulletin"/>
+<inp2:m_RenderElement name="inp_edit_box" prefix="c" field="cust_bb_ItemTemplate" type_field="cust_bb_ItemTemplate" title="la_fld_cust_bb_ItemTemplate" size="50"/>

Property changes on: releases/5.2.2-B2/admin_templates/category_properties.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.1
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/censorship/censorship_edit.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/censorship/censorship_edit.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/censorship/censorship_edit.tpl	(revision 16629)
@@ -0,0 +1,68 @@
+<inp2:adm_SetPopupSize width="550" height="400"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" section="in-bulletin:configuration_censorship" prefix="censorship" title_preset="censorship_edit"/>
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('censorship', '<inp2:censorship_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							cancel_edit('censorship', 'OnCancelEdit','<inp2:censorship_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
+						}
+				 ) );
+
+			 a_toolbar.AddButton( new ToolBarButton('reset_edit', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
+						reset_form('censorship', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
+					}
+			 	) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('censorship', '<inp2:censorship_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('censorship', '<inp2:censorship_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="censorship_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="censorship_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="censorship_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:censorship_SaveWarning name="grid_save_warning"/>
+<inp2:censorship_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="inp_id_label" prefix="censorship" field="CensorshipId" title="la_fld_Id"/>
+		<inp2:m_RenderElement name="inp_edit_box" prefix="censorship" field="BadWord" title="la_fld_BadWord"/>
+		<inp2:m_RenderElement name="inp_edit_box" prefix="censorship" field="Replacement" title="la_fld_Replacement"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: releases/5.2.2-B2/admin_templates/censorship/censorship_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.5
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/admin_templates/censorship/censorship_list.tpl
===================================================================
--- releases/5.2.2-B2/admin_templates/censorship/censorship_list.tpl	(nonexistent)
+++ releases/5.2.2-B2/admin_templates/censorship/censorship_list.tpl	(revision 16629)
@@ -0,0 +1,49 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="censorship" section="in-bulletin:configuration_censorship" title_preset="censorship_list" pagination="1"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+	  	<td>
+	  		<script type="text/javascript">
+	  			//do not rename - this function is used in default grid for double click!
+	  			function edit()
+	  			{
+	  				std_edit_item('censorship', 'in-bulletin/censorship/censorship_edit');
+	  			}
+
+	  			var a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
+						function() {
+							std_precreate_item('censorship', 'in-bulletin/censorship/censorship_edit');
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('censorship')
+						} ) );
+
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="censorship" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="censorship" IdField="CensorshipId" grid="Default"/>
+<script type="text/javascript">
+	Grids['censorship'].SetDependantToolbarButtons( new Array('edit','delete') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: releases/5.2.2-B2/admin_templates/censorship/censorship_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.5
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/units/topics/topics_config.php
===================================================================
--- releases/5.2.2-B2/units/topics/topics_config.php	(nonexistent)
+++ releases/5.2.2-B2/units/topics/topics_config.php	(revision 16629)
@@ -0,0 +1,585 @@
+<?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', 'build_event' => 'OnBuild'),
+	'TagProcessorClass' => Array ('class' => 'TopicsTagProcessor', 'file' => 'topics_tag_processor.php', 'build_event' => 'OnBuild'),
+
+	'AutoLoad' => true,
+
+	'QueryString' => Array (
+		1 => 'id',
+		2 => 'Page',
+		3 => 'PerPage',
+		4 => 'event',
+		5 => 'mode',
+	),
+
+	'ConfigPriority' => 0,
+
+	'RewritePriority' => 103,
+	'RewriteListener' => 'CategoryItemRewrite:RewriteListener',
+
+	'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',
+		),
+
+		array(
+			'Mode' => hBEFORE,
+			'Conditional' => false,
+			'HookToPrefix' => 'user-profile',
+			'HookToSpecial' => '*',
+			'HookToEvent' => array('OnAfterConfigRead'),
+			'DoPrefix' => '',
+			'DoSpecial' => '*',
+			'DoEvent' => 'OnModifyUserProfileConfig',
+		),
+	),
+
+	'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', 'add', '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', 'add', '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 (
+			Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => kDBList::HAVING_FILTER),
+			Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => kDBList::HAVING_FILTER),
+			Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => kDBList::HAVING_FILTER),
+			Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => kDBList::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',
+	'CustomDataTableName' => TABLE_PREFIX . 'TopicCustomData',
+
+	'CalculatedFields' => Array (
+		'' => Array (
+			'UserName' => 'IF (ISNULL(u.Username), IF (%1$s.OwnerId = ' . USER_ROOT . ', "root", IF (%1$s.OwnerId = ' . USER_GUEST . ', "Guest", "n/a")), IF(u.Username = "", u.Email, u.Username))',
+			'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId',
+			'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename',
+			'CategoryFilename' => TABLE_PREFIX.'Categories.NamedParentPath',
+			'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat',
+			'ParentPath' => TABLE_PREFIX.'Categories.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
+				{PERM_JOIN}
+				LEFT JOIN '.TABLE_PREFIX.'Categories ON '.TABLE_PREFIX.'Categories.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
+				LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
+				LEFT JOIN '.TABLE_PREFIX.'Users 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',
+	),
+
+	'ListSortings' => Array (
+		'' => Array (
+			'ForcedSorting' => Array ('EditorsPick' => 'desc', '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.'Categories ON '.TABLE_PREFIX.'Categories.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
+				LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
+				LEFT JOIN '.TABLE_PREFIX.'Users 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 . 'Users WHERE %s',
+			'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD,
+			'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),
+			'sample_value' => 'Guest', '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 . 'Users WHERE %s',
+			'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD,
+			'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),
+			'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', 'default' => null),
+	),
+
+	'VirtualFields' => Array (
+		'Relevance' => Array ('type' => 'float', 'default' => 0),
+		'UserName' => Array ('type' => 'string', 'default' => ''),
+		'CategoryId' => Array (
+			'type' => 'int',
+			'formatter' => 'kOptionsFormatter',
+			'options' => Array (),
+			'default' => 0,
+		),
+		'Filename' => Array ('type' => 'string', 'default' => ''),
+		'CategoryFilename' => Array ('type' => 'string', 'default' => ''),
+		'PrimaryCat' => Array ('type' => 'int', 'default' => 0),
+		'IsHot' => Array ('type' => 'int', 'default' => 0),
+		'IsNew' => Array ('type' => 'int', 'default' => 0),
+		'IsPop' => 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' => 0,
+		),
+
+		// 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' => 'column:la_fld_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, ),
+				'Priority' => Array ('filter_block' => 'grid_range_filter', 'width' => 65),
+				'UserName' => Array ('title' => 'column:la_fld_PostedBy', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+				'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ),
+				'Status' => Array ('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 ('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' => 'column:la_fld_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, ),
+				'Priority' => Array ('filter_block' => 'grid_range_filter', 'width' => 65),
+				'UserName' => Array ('title' => 'column:la_fld_PostedBy', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+				'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ),
+				'Status' => Array ('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 ('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',
+	),
+);

Property changes on: releases/5.2.2-B2/units/topics/topics_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.46.2.14
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/topics/topics_tag_processor.php
===================================================================
--- releases/5.2.2-B2/units/topics/topics_tag_processor.php	(nonexistent)
+++ releases/5.2.2-B2/units/topics/topics_tag_processor.php	(revision 16629)
@@ -0,0 +1,122 @@
+<?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!');
+
+	class TopicsTagProcessor extends kCatDBTagProcessor {
+
+		function TopicLink($params)
+		{
+			return $this->ItemLink($params, 'topic');
+		}
+
+		function ListTopics($params)
+		{
+			return $this->PrintList2($params);
+		}
+
+		function PostingLink($params)
+		{
+			$item_id = getArrayValue($params, 'posting_id');
+			if (!$item_id) {
+				$item_id = $this->Application->GetVar($this->Prefix.'_post_id');
+			}
+			$params[$this->Prefix.'_post_id'] = $item_id;
+			return $this->TopicLink($params);
+		}
+
+		function PostingDeleteLink($params)
+		{
+			$params['Action'] = 'bb_post_delete';
+			return $this->PostingLink($params);
+		}
+
+		/**
+		 * Returns topic replies count
+		 *
+		 * @param Array $params
+		 * @return int
+		 */
+		function TopicReplies($params)
+		{
+			$object = $this->getObject($params);
+
+			// -1 - don't count post created together with topic
+			return $object->GetDBField('Posts') ? $object->GetDBField('Posts') - 1 : 0;
+		}
+
+		/**
+		 * Returns topic lock statis
+		 *
+		 * @param Array $params
+		 * @return bool
+		 */
+		function IsLocked($params)
+		{
+			$object = $this->getObject($params);
+
+			return $object->GetDBField('TopicType') == 0;
+		}
+
+		function LockToggleLink($params)
+		{
+			$params[$this->Prefix.'_event'] = 'OnTopicLockToggle';
+			$params['pass'] = 'm,'.$this->Prefix;
+
+			return $this->Application->ProcessParsedTag('m', 'Link', $params);
+		}
+
+		/**
+		 * Detects if current user is subscribed to new topics in this category
+		 *
+		 * @param Array $params
+		 * @return bool
+		 */
+		function SubscribedToCategoryTopics($params)
+		{
+			static $subscribed = null;
+
+			if ( !isset($subscribed) ) {
+				/** @var PostHelper $post_helper */
+				$post_helper = $this->Application->recallObject('PostHelper');
+
+				$subscribed = $post_helper->getSubscriptionManager('CategoryTopics')->subscribed();
+			}
+
+			return $subscribed;
+		}
+
+		/**
+		 * Detects if current user is subscribed to this topic posts
+		 *
+		 * @param Array $params
+		 * @return bool
+		 */
+		function SubscribedToTopicPosts($params)
+		{
+			static $subscribed = null;
+
+			if ( !isset($subscribed) ) {
+				/** @var kDBItem $object */
+				$object = $this->getObject($params);
+
+				/** @var PostHelper $post_helper */
+				$post_helper = $this->Application->recallObject('PostHelper');
+
+				$subscribed = $post_helper->getSubscriptionManager('TopicPosts', Array ($object->GetID()))->subscribed();
+			}
+
+			return $subscribed;
+		}
+	}
\ No newline at end of file

Property changes on: releases/5.2.2-B2/units/topics/topics_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5.2.2
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/topics/topics_event_handler.php
===================================================================
--- releases/5.2.2-B2/units/topics/topics_event_handler.php	(nonexistent)
+++ releases/5.2.2-B2/units/topics/topics_event_handler.php	(revision 16629)
@@ -0,0 +1,348 @@
+<?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!');
+
+	class TopicsEventHandler extends kCatDBEventHandler {
+
+		/**
+		 * Checks topic lock permission
+		 *
+		 * @param kEvent $event
+		 * @return bool
+		 * @access public
+		 */
+		public function CheckPermission(kEvent $event)
+		{
+			if ( $event->Name == 'OnTopicLockToggle' ) {
+				/** @var kCatDBItem $object */
+				$object = $event->getObject();
+
+				if ( !$object->isLoaded() ) {
+					$event->status = kEvent::erPERM_FAIL;
+					return false;
+				}
+
+				$category_id = $object->GetDBField('CategoryId');
+				$perm_status = $this->Application->CheckPermission('TOPIC.LOCK', 0, $category_id);
+
+				if ( !$perm_status ) {
+					$event->status = kEvent::erPERM_FAIL;
+				}
+
+				return $perm_status;
+			}
+
+			if ( $event->Name == 'OnToogleCategoryTopicsSubscribe' || $event->Name == 'OnToogleTopicPostsSubscribe' ) {
+				return $this->Application->LoggedIn();
+			}
+
+			return parent::CheckPermission($event);
+		}
+
+		/**
+		 * Lock or unlock topic
+		 *
+		 * @param kEvent $event
+		 */
+		function OnToggleLock($event)
+		{
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			$new_type = $object->GetDBField('TopicType') ? 0 : 1;
+			$object->SetDBField('TopicType', $new_type);
+			$object->Update();
+		}
+
+		/**
+		 * Cache topic owner
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnBeforeItemUpdate(kEvent $event)
+		{
+			parent::OnBeforeItemUpdate($event);
+
+			$this->cacheItemOwner($event, 'OwnerId', 'PostedBy');
+		}
+
+		/**
+		 * Cache topic owner
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnBeforeItemCreate(kEvent $event)
+		{
+			parent::OnBeforeItemCreate($event);
+
+			$this->cacheItemOwner($event, 'OwnerId', 'PostedBy');
+
+			/** @var kCatDBItem $object */
+			$object = $event->getObject();
+
+			if ( !$object->GetDBField('TodayDate') ) {
+				$object->SetDBField('TodayDate', adodb_date('Y-m-d'));
+			}
+
+			/** @var PostHelper $post_helper */
+			$post_helper = $this->Application->recallObject('PostHelper');
+
+			$object->SetDBField('TopicText', $post_helper->CensorText($object->GetDBField('TopicText')));
+		}
+
+		/**
+		 * Creates 1st post when topic is created
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnAfterItemCreate(kEvent $event)
+		{
+			parent::OnAfterItemCreate($event);
+
+			if ( $event->Special == '-item' ) {
+				// don't create first post when cloning
+				return ;
+			}
+
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			/** @var kDBItem $post */
+			$post = $this->Application->recallObject($event->Prefix . '-post', null, Array ('skip_autoload' => true));
+
+			$post->SetDBField('Pending', $object->GetDBField('Status') == STATUS_ACTIVE ? 0 : 1);
+			$post->SetDBField('Subject', '');
+			$post->SetDBField('PostingText', $object->GetDBField('PostingText'));
+
+			$post->SetDBField('ShowSignatures', $object->GetDBField('ShowSignatures'));
+			$post->SetDBField('DisableSmileys', $object->GetDBField('DisableSmileys'));
+			$post->SetDBField('DisableBBCodes', $object->GetDBField('DisableBBCodes'));
+
+			$post->Create();
+
+			// need to update category topic count here
+		}
+
+		/**
+		 * Approves 1st post when topic got approved
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnAfterItemUpdate(kEvent $event)
+		{
+			parent::OnAfterItemUpdate($event);
+
+			if ( !$this->Application->isAdminUser ) {
+				return;
+			}
+
+			/** @var kCatDBItem $object */
+			$object = $event->getObject();
+
+			if ( $object->GetDBField('Posts') == 1 ) {
+				/** @var kDBItem $post */
+				$post = $this->Application->recallObject($event->Prefix . '-post', null, Array ('skip_autoload' => true));
+
+				$main_status = $object->GetDBField('Status');
+				$post->Load($object->GetDBField('LastPostId'));
+				if ( $post->isLoaded() ) {
+					$post->SetDBField('Pending', $main_status == STATUS_ACTIVE ? 0 : 1);
+					$post->Update();
+				}
+			}
+		}
+
+		/**
+		 * Makes first post body field non-required when topic has posts already
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnAfterItemLoad(kEvent $event)
+		{
+			parent::OnAfterItemLoad($event);
+
+			/** @var kCatDBItem $object */
+			$object = $event->getObject();
+
+			if ( $object->GetDBField('Posts') > 0 || !$this->Application->isAdminUser ) {
+				$object->setRequired('PostingText', false);
+			}
+		}
+
+		/**
+		 * Locks or unlocks topic
+		 *
+		 * @param kEvent $event
+		 */
+		function OnTopicLockToggle($event)
+		{
+			/** @var kCatDBItem $object */
+			$object = $event->getObject();
+
+			$topic_type = $object->GetDBField('TopicType');
+			$object->SetDBField('TopicType', $topic_type == 1 ? 0 : 1);
+			$object->Update();
+		}
+
+		/**
+		 * Sets default values to posting options based on persistent session
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnAfterConfigRead(kEvent $event)
+		{
+			parent::OnAfterConfigRead($event);
+
+			if ( !$this->Application->LoggedIn() ) {
+				return;
+			}
+
+			$fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
+			$fields['NotifyOwnerOnChanges']['default'] = (int)$this->Application->RecallPersistentVar('owner_notify');
+			$this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
+
+			$virtual_fields = $this->Application->getUnitOption($event->Prefix, 'VirtualFields');
+			$virtual_fields['DisableBBCodes']['default'] = (int)!$this->Application->RecallPersistentVar('bbcode');
+			$virtual_fields['DisableSmileys']['default'] = (int)!$this->Application->RecallPersistentVar('smileys');
+			$virtual_fields['ShowSignatures']['default'] = (int)$this->Application->RecallPersistentVar('show_sig');
+			$this->Application->setUnitOption($event->Prefix, 'VirtualFields', $virtual_fields);
+		}
+
+		/**
+		 * [HOOK] Allows to add cloned subitem to given prefix
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnCloneSubItem(kEvent $event)
+		{
+			parent::OnCloneSubItem($event);
+
+			if ( $event->MasterEvent->Prefix == 'rev' ) {
+				$clones = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'Clones');
+				$subitem_prefix = $event->Prefix . '-' . $event->MasterEvent->Prefix;
+
+				$clones[$subitem_prefix]['ConfigMapping'] = Array (
+					'PerPage'				=>	'Perpage_TopicReviews',
+
+					'ReviewDelayInterval'	=>	'topic_ReviewDelay_Interval',
+					'ReviewDelayValue'		=>	'topic_ReviewDelay_Value',
+				);
+
+				$this->Application->setUnitOption($event->MasterEvent->Prefix, 'Clones', $clones);
+			}
+		}
+
+		/**
+		 * Subscribes/unsubscribes to new topics in given current category
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnToogleCategoryTopicsSubscribe(kEvent $event)
+		{
+			/** @var PostHelper $post_helper */
+			$post_helper = $this->Application->recallObject('PostHelper');
+
+			$manager = $post_helper->getSubscriptionManager('CategoryTopics');
+
+			if ( $manager->subscribed() ) {
+				$manager->unsubscribe();
+			}
+			else {
+				$manager->subscribe();
+			}
+		}
+
+		/**
+		 * Subscribes/unsubscribes to new posts in current topic
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnToogleTopicPostsSubscribe(kEvent $event)
+		{
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			/** @var PostHelper $post_helper */
+			$post_helper = $this->Application->recallObject('PostHelper');
+
+			$manager = $post_helper->getSubscriptionManager('TopicPosts', Array ($object->GetID()));
+
+			if ( $manager->subscribed() ) {
+				$manager->unsubscribe();
+			}
+			else {
+				$manager->subscribe();
+			}
+		}
+
+		/**
+		 * Adds fields for forum preferences.
+		 *
+		 * @param kEvent $event Event.
+		 *
+		 * @return void
+		 */
+		protected function OnModifyUserProfileConfig(kEvent $event)
+		{
+			$checkbox_field = array(
+				'type' => 'int',
+				'formatter' => 'kOptionsFormatter', 'options' => array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+				'default' => 0,
+			);
+			$text_field = array('type' => 'string', 'default' => '');
+
+			$new_virtual_fields = array(
+				'show_sig' => $checkbox_field,
+				'Perpage_Topics' => $text_field,
+				'Perpage_Postings' => $text_field,
+				'owner_notify' => $checkbox_field,
+				'bb_pm_notify' => $checkbox_field,
+				'bbcode' => $checkbox_field,
+				'smileys' => $checkbox_field,
+				'bb_signatures' => $checkbox_field,
+				'my_signature' => $text_field,
+			);
+
+			$virtual_fields = $this->Application->getUnitOption(
+				$event->MasterEvent->Prefix,
+				'VirtualFields',
+				array()
+			);
+			$this->Application->setUnitOption(
+				$event->MasterEvent->Prefix,
+				'VirtualFields',
+				array_merge($virtual_fields, $new_virtual_fields)
+			);
+		}
+
+	}

Property changes on: releases/5.2.2-B2/units/topics/topics_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.15.2.6
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/poll_comments/poll_comments_config.php
===================================================================
--- releases/5.2.2-B2/units/poll_comments/poll_comments_config.php	(nonexistent)
+++ releases/5.2.2-B2/units/poll_comments/poll_comments_config.php	(revision 16629)
@@ -0,0 +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' => '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.'Users pu ON pu.PortalUserId = %1$s.CreatedById',
+	),
+
+	'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 . 'Users WHERE %s',
+			'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD,
+			'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', 'required' => 1, 'default' => NULL),
+		'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.Username), IF (%1$s.CreatedById = ' . USER_ROOT . ', \'root\', IF (%1$s.CreatedById = ' . USER_GUEST . ', \'Guest\', \'n/a\')), IF(pu.Username = "", pu.Email, pu.Username))',
+		),
+	),
+
+	'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' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+				'CommentBody' => Array ('title' => 'column:la_fld_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 ('filter_block' => 'grid_date_range_filter', 'width' => 145,  ),
+				'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
+			),
+		),
+	),
+);

Property changes on: releases/5.2.2-B2/units/poll_comments/poll_comments_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.4
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/poll_comments/poll_comment_eh.php
===================================================================
--- releases/5.2.2-B2/units/poll_comments/poll_comment_eh.php	(nonexistent)
+++ releases/5.2.2-B2/units/poll_comments/poll_comment_eh.php	(revision 16629)
@@ -0,0 +1,176 @@
+<?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!');
+
+	class PollCommentEventHandler extends kDBEventHandler {
+
+		/**
+		 * Allows to override standard permission mapping
+		 *
+		 * @return void
+		 * @access protected
+		 * @see kEventHandler::$permMapping
+		 */
+		protected function mapPermissions()
+		{
+			parent::mapPermissions();
+
+			$permissions = Array (
+				'OnCreateAjax'	=>	Array ('self' => true, 'subitem' => true,),
+				'OnItemBuild'	=>	Array ('self' => true, 'subitem' => true,),
+			);
+
+			$this->permMapping = array_merge($this->permMapping, $permissions);
+		}
+
+		/**
+		 * Occurs, when config was parsed, allows to change config data dynamically
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnAfterConfigRead(kEvent $event)
+		{
+			parent::OnAfterConfigRead($event);
+
+			if ( $this->Application->RecallVar('user_id') == USER_GUEST ) {
+				// make Guest Name and Email required for guests
+				$fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
+				$fields['GuestName']['required'] = 1;
+				$fields['GuestEmail']['required'] = 1;
+				$this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
+			}
+		}
+
+		/**
+		 * Applies special filter, that allows to select all commented from current poll
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 * @see kDBEventHandler::OnListBuild()
+		 */
+		protected function SetCustomQuery(kEvent $event)
+		{
+			parent::SetCustomQuery($event);
+
+			if ( $this->Application->isAdminUser ) {
+				return;
+			}
+
+			/** @var kDBList $object */
+			$object = $event->getObject();
+
+			$object->addFilter('comment_status', '%1$s.Status = ' . STATUS_ACTIVE);
+		}
+
+		/**
+		 * Occurs before creating item
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnBeforeItemCreate(kEvent $event)
+		{
+			if ( !$this->Application->isAdmin ) {
+				/** @var kDBItem $object */
+				$object = $event->getObject();
+
+				$parent_info = $object->getLinkedInfo($event->Special);
+				$poll_id = $parent_info['ParentId'];
+
+				if ( $poll_id ) {
+					/** @var SpamHelper $spam_helper */
+					$spam_helper = $this->Application->recallObject('SpamHelper');
+
+					$spam_helper->InitHelper($poll_id, 'PollComment', 0); // ResourceId used for SpamControl only
+
+					if ( $spam_helper->InSpamControl() ) {
+						$event->status = kEvent::erFAIL;
+						$object->SetError('CommentBody', 'too_frequent', 'lu_error_AlreadyCommented');
+						return ;
+					}
+
+					$object->SetDBField('PollId', $poll_id); // PollId
+				}
+
+				$object->SetDBField('CreatedById', $this->Application->RecallVar('user_id'));
+				$object->SetDBField('UserIP', $this->Application->getClientIp());
+				$object->SetDBField('Status', STATUS_ACTIVE);
+			}
+
+			parent::OnBeforeItemCreate($event);
+		}
+
+		/**
+		 * Updates item review counter
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnCreate(kEvent $event)
+		{
+			parent::OnCreate($event);
+
+			if ( !$this->Application->isAdmin && $event->status == kEvent::erSUCCESS ) {
+				$event->setRedirectParam('opener', 's');
+				$event->setRedirectParam('pass', 'm,poll');
+			}
+		}
+
+		/**
+		 * Wrapper for OnCreate event
+		 *
+		 * @param kEvent $event
+		 *
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnCreateAjax(kEvent $event)
+		{
+			/** @var AjaxFormHelper $ajax_form_helper */
+			$ajax_form_helper = $this->Application->recallObject('AjaxFormHelper');
+
+			$ajax_form_helper->transitEvent($event, 'OnCreate');
+		}
+
+		/**
+		 * Protects against spam
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnAfterItemCreate(kEvent $event)
+		{
+			parent::OnAfterItemCreate($event);
+
+			if ( !$this->Application->isAdminUser ) {
+				/** @var SpamHelper $spam_helper */
+				$spam_helper = $this->Application->recallObject('SpamHelper');
+
+				/** @var kDBItem $object */
+				$object = $event->getObject();
+
+				$comment_settings = 'poll_CommentDelay_Value:poll_CommentDelay_Interval';
+				$spam_helper->InitHelper($object->GetDBField('PollId'), 'PollComment', $comment_settings);
+				$spam_helper->AddToSpamControl();
+			}
+		}
+
+	}
\ No newline at end of file

Property changes on: releases/5.2.2-B2/units/poll_comments/poll_comment_eh.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/private_messages/private_message_eh.php
===================================================================
--- releases/5.2.2-B2/units/private_messages/private_message_eh.php	(nonexistent)
+++ releases/5.2.2-B2/units/private_messages/private_message_eh.php	(revision 16629)
@@ -0,0 +1,303 @@
+<?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!');
+
+	class PrivateMessageEventHandler extends kDBEventHandler {
+
+		/**
+		 * Allows to override standard permission mapping
+		 *
+		 * @return void
+		 * @access protected
+		 * @see kEventHandler::$permMapping
+		 */
+		protected function mapPermissions()
+		{
+			parent::mapPermissions();
+
+			$permissions = Array (
+				'OnItemBuild' => Array ('self' => true),
+				'OnCreate' => Array ('self' => true),
+				'OnDelete' => Array ('self' => true),
+			);
+
+			$this->permMapping = array_merge($this->permMapping, $permissions);
+		}
+
+		/**
+		 * Applies folder & message owner filter to message list
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 * @see kDBEventHandler::OnListBuild()
+		 */
+		protected function SetCustomQuery(kEvent $event)
+		{
+			parent::SetCustomQuery($event);
+
+			$folder_id = $this->Application->GetVar('folder_id');
+
+			if ( $folder_id === false ) {
+				$folder_id = PM_FOLDER_INBOX;
+				$this->Application->SetVar('folder_id', $folder_id);
+			}
+
+			/** @var kDBList $object */
+			$object = $event->getObject();
+
+			$user_id = $this->Application->RecallVar('user_id');
+
+			if ( $folder_id == PM_FOLDER_INBOX ) {
+				$object->addFilter('owner_filter', '%1$s.ToId = ' . $user_id);
+			}
+			else {
+				$object->addFilter('owner_filter', '%1$s.FromId = ' . $user_id);
+			}
+
+			$object->addFilter('folder_filter', '%1$s.FolderId = ' . $folder_id);
+		}
+
+		/**
+		 * Puts message to Sent folder
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnBeforeItemCreate(kEvent $event)
+		{
+			parent::OnBeforeItemCreate($event);
+
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			if ( $object->GetDBField('FolderId') != PM_FOLDER_SENT ) {
+				// when creating "Inbox" message (from "Sent" message) don't reset folder & status
+				return ;
+			}
+
+			$user_id = $this->Application->RecallVar('user_id');
+			$object->SetDBField('FromId', $user_id);
+			$object->SetDBField('FolderId', PM_FOLDER_SENT);
+			$object->SetDBField('Status', PM_STATUS_READ);
+		}
+
+		/**
+		 * Creates 1st post when topic is created
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnAfterItemCreate(kEvent $event)
+		{
+			parent::OnAfterItemCreate($event);
+
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			$this->Application->emailUser('PM.ADD', $object->GetDBField('ToId'));
+
+			if ( $object->GetDBField('FolderId') != PM_FOLDER_SENT ) {
+				// 1. create message in sender's "Sent" folder (this method only for this step)
+				// 2. create message body (shared)
+				// 3. create message copy in recipient's "Inbox" folder
+				return ;
+			}
+
+			/** @var kDBItem $message_body */
+			$message_body = $this->Application->recallObject($event->Prefix . '-body', null, Array ('skip_autoload' => true));
+
+			// 1. create message body (for sender & recipient)
+			$copy_fields = Array ('Subject', 'Body', 'ShowSignatures', 'DisableSmileys', 'DisableBBCodes');
+			$message_body->SetDBFieldsFromHash($object->GetFieldValues(), $copy_fields);
+
+			$body_created = $message_body->Create();
+			if ( $body_created ) {
+				// 2. link body with message
+				$object->SetDBField('PMBodyId', $message_body->GetID());
+				$object->Update();
+
+				// 3. create message in recipient's Inbox folder
+				$object->SetDBField('FolderId', PM_FOLDER_INBOX);
+				$object->SetDBField('Status', PM_STATUS_UNREAD);
+				$object->Create();
+			}
+		}
+
+		/**
+		 * Sets post options to virtual fields
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnAfterItemLoad(kEvent $event)
+		{
+			parent::OnAfterItemLoad($event);
+
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			/** @var PostHelper $post_helper */
+			$post_helper = $this->Application->recallObject('PostHelper');
+
+			$options_map = $post_helper->getOptionsMap();
+			$post_options = $object->GetDBField('Options');
+
+			foreach ($options_map as $option_name => $field_name) {
+				$option_value = $post_helper->GetPostOption($option_name, $post_options);
+				$object->SetDBField($field_name, (int)$option_value);
+			}
+		}
+
+		/**
+		 * Goes to next_template after post creation
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnCreate(kEvent $event)
+		{
+			parent::OnCreate($event);
+
+			if ( $event->status == kEvent::erSUCCESS && !$this->Application->isAdmin ) {
+				$event->SetRedirectParam('opener', 's');
+				$event->redirect = $this->Application->GetVar('next_template');
+			}
+		}
+
+		/**
+		 * Prevents user from deleting other user private messages
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnBeforeItemDelete(kEvent $event)
+		{
+			parent::OnBeforeItemDelete($event);
+
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			$user_id = $this->Application->RecallVar('user_id');
+			$owner_field = ($object->GetDBField('FolderId') == PM_FOLDER_INBOX) ? 'ToId' : 'FromId';
+
+			if ( $object->GetDBField($owner_field) != $user_id ) {
+				$event->status = kEvent::erFAIL;
+			}
+		}
+
+		/**
+		 * Updates reference counter in message body record
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnAfterItemDelete(kEvent $event)
+		{
+	    	parent::OnAfterItemDelete($event);
+
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			$body_idfield = $this->Application->getUnitOption($event->Prefix . '-body', 'IDField');
+			$body_table = $this->Application->getUnitOption($event->Prefix . '-body', 'TableName');
+
+			$sql = 'UPDATE ' . $body_table . '
+	    			SET ReferenceCount = ReferenceCount - 1
+	    			WHERE ' . $body_idfield . ' = ' . $object->GetDBField('PMBodyId');
+			$this->Conn->Query($sql);
+		}
+
+		/**
+		 * Sets default values to posting options based on persistent session
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnAfterConfigRead(kEvent $event)
+		{
+			parent::OnAfterConfigRead($event);
+
+			if ( !$this->Application->LoggedIn() ) {
+				return;
+			}
+
+			$virtual_fields = $this->Application->getUnitOption($event->Prefix, 'VirtualFields');
+			$virtual_fields['DisableBBCodes']['default'] = (int)!$this->Application->RecallPersistentVar('bbcode');
+			$virtual_fields['DisableSmileys']['default'] = (int)!$this->Application->RecallPersistentVar('smileys');
+			$virtual_fields['ShowSignatures']['default'] = (int)$this->Application->RecallPersistentVar('show_sig');
+			$this->Application->setUnitOption($event->Prefix, 'VirtualFields', $virtual_fields);
+		}
+
+		/**
+		 * Checks, that current user is recipient or sender of viewed message
+		 *
+		 * @param kEvent $event
+		 * @return bool
+		 * @access protected
+		 */
+		protected function checkItemStatus(kEvent $event)
+		{
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			if ( !$object->isLoaded() ) {
+				return true;
+			}
+
+			$user_id = $this->Application->RecallVar('user_id');
+			return ($object->GetDBField('FromId') == $user_id) || ($object->GetDBField('ToId') == $user_id);
+		}
+
+		/**
+		 * Prepares new reply & new message form
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnNew(kEvent $event)
+		{
+			parent::OnNew($event);
+
+			$reply_to = $this->Application->GetVar('reply_to');
+			$user_id = $this->Application->GetVar('user_id');
+
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			if ( $reply_to > 0 ) {
+				// reply to message
+				/** @var kDBItem $source_msg */
+				$source_msg = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
+
+				$source_msg->Load($reply_to);
+
+				$object->SetDBField('ToId', $source_msg->GetDBField('FromId'));
+				$object->SetDBField('Subject', 'Re: ' . $source_msg->GetDBField('Subject'));
+			}
+			elseif ( $user_id > 0 ) {
+				// send message to any user by id
+				$object->SetDBField('ToId', $user_id);
+			}
+		}
+	}

Property changes on: releases/5.2.2-B2/units/private_messages/private_message_eh.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2.2.2
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/private_messages/private_message_tp.php
===================================================================
--- releases/5.2.2-B2/units/private_messages/private_message_tp.php	(nonexistent)
+++ releases/5.2.2-B2/units/private_messages/private_message_tp.php	(revision 16629)
@@ -0,0 +1,164 @@
+<?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!');
+
+	class PrivateMessageTagProcessor extends kDBTagProcessor {
+
+		/**
+		 * Checks if private message is unread
+		 *
+		 * @param Array $params
+		 * @return bool
+		 */
+		function IsNew($params)
+		{
+			/** @var kDBItem $object */
+			$object = $this->getObject($params);
+
+			return $object->GetDBField('Status') < PM_STATUS_READ;
+		}
+
+		/**
+		 * Allows to check what folder is currently active
+		 *
+		 * @param Array $params
+		 * @return bool
+		 */
+		function FolderSelected($params)
+		{
+			$folder_mapping = Array ('inbox' => PM_FOLDER_INBOX, 'sent' => PM_FOLDER_SENT);
+
+			return (int)$this->Application->GetVar('folder_id') == $folder_mapping[ strtolower($params['folder']) ];
+		}
+
+		/**
+		 * Creates link to specific private message folder
+		 *
+		 * @param Array $params
+		 * @return string
+		 */
+		function FolderLink($params)
+		{
+			$folder_mapping = Array ('inbox' => PM_FOLDER_INBOX, 'sent' => PM_FOLDER_SENT);
+			$params['folder_id'] = $folder_mapping[ strtolower($params['folder']) ];
+			unset($params['folder']);
+
+			return $this->Application->ProcessParsedTag('m', 'Link', $params);
+		}
+
+		function MessageSubject($params)
+		{
+			/** @var kDBItem $object */
+			$object = $this->getObject($params);
+
+			$params['field'] = 'Subject';
+			$value = $this->Field($params);
+
+			if (!$value && isset($params['empty_title'])) {
+				return '['.$this->Application->Phrase($params['empty_title']).']';
+			}
+
+			return $value;
+		}
+
+		function MessageBody($params)
+		{
+			$object = $this->getObject($params);
+
+			/** @var PostHelper $post_helper */
+			$post_helper = $this->Application->recallObject('PostHelper');
+
+			// 2. parse post body
+			$sub_blocks = Array (
+				'smileys' => $params['smiley_render_as'],
+				'bbcode' => $params['bbcode_render_as'],
+			);
+
+			return $post_helper->parsePostBody($object->GetDBField('Body'), $object->GetDBField('Options'), $sub_blocks);
+		}
+
+		function DeleteLink($params)
+		{
+			$params['pass'] = 'm,'.$this->getPrefixSpecial();
+			$params[$this->getPrefixSpecial().'_event'] = 'OnDelete';
+			return $this->Application->ProcessParsedTag('m', 'Link', $params);
+		}
+
+		function ReplyLink($params)
+		{
+			$params['reply_to'] = $this->Application->GetVar($this->getPrefixSpecial().'_id');
+			return $this->Application->ProcessParsedTag('m', 'Link', $params);
+		}
+
+		/**
+		 * User can reply message only in case, when it is not it's own message
+		 *
+		 * @param Array $params
+		 * @return bool
+		 */
+		function CanReplyMessage($params)
+		{
+			/** @var kDBItem $object */
+			$object = $this->getObject($params);
+
+			return $object->GetDBField('FromId') != $this->Application->RecallVar('user_id');
+		}
+
+		/**
+		 * Marks private message as read
+		 *
+		 * @param Array $params
+		 */
+		function MarkAsRead($params)
+		{
+			/** @var kDBItem $object */
+			$object = $this->getObject($params);
+
+			if ($object->GetDBField('Status') < PM_STATUS_READ) {
+				$object->SetDBField('Status', PM_STATUS_READ);
+				$object->Update();
+			}
+		}
+
+		/**
+		 * Returns link to private message sender/recipient public profile
+		 *
+		 * @param Array $params
+		 * @return string
+		 */
+		function ProfileLink($params)
+		{
+			$user_field = strtolower($params['type']) == 'from' ? 'FromId' : 'ToId';
+			unset($params['type']);
+
+			$object = $this->getObject($params);
+			$params['user_id'] = $object->GetDBField($user_field);
+
+			return $this->Application->ProcessParsedTag('m', 'Link', $params);
+		}
+
+		/**
+		 * Returns link for sending private message from user's public profile page
+		 *
+		 * @param Array $params
+		 * @return string
+		 */
+		function SendMessageLink($params)
+		{
+			$params['user_id'] = $this->Application->GetVar('user_id');
+			return $this->Application->ProcessParsedTag('m', 'Link', $params);
+		}
+
+	}
\ No newline at end of file

Property changes on: releases/5.2.2-B2/units/private_messages/private_message_tp.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2.2.4
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/private_messages/private_messages_config.php
===================================================================
--- releases/5.2.2-B2/units/private_messages/private_messages_config.php	(nonexistent)
+++ releases/5.2.2-B2/units/private_messages/private_messages_config.php	(revision 16629)
@@ -0,0 +1,102 @@
+<?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.'Users from_user ON from_user.PortalUserId = %1$s.FromId
+				LEFT JOIN '.TABLE_PREFIX.'Users to_user ON to_user.PortalUserId = %1$s.ToId',
+	),
+
+	'ListSortings' => Array (
+		'' => Array (
+			'ForcedSorting' => Array ('CreatedOn' => 'desc'),
+		),
+	),
+
+	'SubItems' => Array ('private-message-body'),
+
+	'CalculatedFields' => Array (
+		'' => Array (
+			'Subject' => 'pmb.Subject',
+			'Body' => 'pmb.Body',
+			'Options' => 'pmb.Options',
+
+			'FromName' => 'IF (ISNULL(from_user.Username), IF (%1$s.FromId = ' . USER_ROOT . ', "root", IF (%1$s.FromId = ' . USER_GUEST . ', "Guest", "n/a")), IF(from_user.Username = "", from_user.Email, from_user.Username))',
+			'ToName' => 'IF (ISNULL(to_user.Username), IF (%1$s.ToId = ' . USER_ROOT . ', "root", IF (%1$s.ToId = ' . USER_GUEST . ', "Guest", "n/a")), IF(to_user.Username = "", to_user.Email, to_user.Username))',
+
+			'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.'Users WHERE %s', 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, '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.'Users WHERE %s', 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, '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),
+	),
+);

Property changes on: releases/5.2.2-B2/units/private_messages/private_messages_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.3
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/helpers/post_helper.php
===================================================================
--- releases/5.2.2-B2/units/helpers/post_helper.php	(nonexistent)
+++ releases/5.2.2-B2/units/helpers/post_helper.php	(revision 16629)
@@ -0,0 +1,464 @@
+<?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!');
+
+	class PostHelper extends kHelper {
+
+		var $postOptionBits = Array (
+			'show_sig' => 128,
+			'disable_bbcode' => 64,
+			'disable_smileys' => 32,
+		);
+
+		/**
+		 * Checks if specific option is set for post
+		 *
+		 * @param string $option_name
+		 * @param Array $options
+		 * @return bool
+		 */
+		function GetPostOption($option_name, $options)
+		{
+			if (!isset($this->postOptionBits[$option_name])) {
+				return false;
+			}
+
+			$option_bit = $this->postOptionBits[$option_name];
+			return ($options & $option_bit) == $option_bit;
+		}
+
+		/**
+		 * Sets given option bit (by name) to post options
+		 *
+		 * @param string $option_name
+		 * @param int $option_value
+		 * @param Array $options
+		 * @return bool
+		 */
+		function SetPostOption($option_name, $option_value, &$options)
+		{
+			if (!isset($this->postOptionBits[$option_name])) {
+				return false;
+			}
+
+			$option_bit = $this->postOptionBits[$option_name];
+			if ($option_value) {
+				$options |= $option_bit;
+			}
+			else {
+				$options = $options &~ $option_bit;
+			}
+
+			return true;
+		}
+
+		/**
+		 * Returns post options map to virtual field names
+		 *
+		 * @return Array
+		 */
+		function getOptionsMap()
+		{
+			$options_map = Array (
+				'show_sig' => 'ShowSignatures',
+				'disable_smileys' => 'DisableSmileys',
+				'disable_bbcode' => 'DisableBBCodes',
+			);
+
+			return $options_map;
+		}
+
+		/**
+	     * @return void
+	     * @param int $date
+	     * @desc Set any field to category & all it's parent categories
+	     */
+		 function PropagateCategoryField($category_id, $field_name, $field_value)
+		 {
+			 $id_field = $this->Application->getUnitOption('c', 'IDField');
+			 $table_name = $this->Application->getUnitOption('c', 'TableName');
+
+			 $sql = 'SELECT ParentPath
+		 			FROM ' . $table_name . '
+		 			WHERE ' . $id_field . ' = ' . $category_id;
+			 $parent_path = $this->Conn->GetOne($sql);
+
+			 $parent_categories = explode('|', substr($parent_path, 1, -1));
+			 if ( !$parent_categories ) {
+				 return;
+			 }
+
+			 $fields_hash = Array ($field_name => $field_value);
+
+			 $this->Conn->doUpdate($fields_hash, $table_name, $id_field . ' IN (' . implode(',', $parent_categories) . ')');
+		 }
+
+		/**
+		 * Sets today posts count & today date for topic
+		 *
+		 * @param kCatDBItem $object
+		 * @param int $post_date
+		 * @param int $increment_by
+		 * @return bool
+		 */
+		function updateTodayPostsCount(&$object, $post_date, $increment_by = 1)
+		{
+			$date_now = adodb_date('Y-m-d');
+
+			if (adodb_date('Y-m-d', $post_date) != $date_now) {
+				return true;
+			}
+
+			// last post update date was today or not
+			$today_posts = ($date_now == $object->GetDBField('TodayDate')) ? $object->GetDBField('TodayPosts') : 0;
+
+			$object->SetDBField('TodayDate', $date_now);
+			$object->SetDBField('TodayPosts', $today_posts + $increment_by);
+
+			return $object->Update();
+		}
+
+		function updatePostCount($topic_id, $increment = 1)
+		{
+			$id_field = $this->Application->getUnitOption('bb', 'IDField');
+			$table_name = $this->Application->getUnitOption('bb', 'TableName');
+
+			// helps in case, when 2 (or more) users tries to post in same topic at same time
+			$sql = 'UPDATE '.$table_name.'
+					SET Posts = Posts '.($increment > 0 ? '+' : '-').' '.abs($increment).'
+					WHERE '.$id_field.' = '.$topic_id;
+			$this->Conn->Query($sql);
+
+			// returns new value
+			$sql = 'SELECT Posts
+					FROM '.$table_name.'
+					WHERE '.$id_field.' = '.$topic_id;
+			return $this->Conn->GetOne($sql);
+		}
+		/**
+		 * Replaces all special formatting in post before displaing it to user
+		 *
+		 * @param string $post_body
+		 * @param int $post_options bit array of post options
+		 * @param Array $sub_blocks block names for rendering smileys & bbcodes
+		 * @return string
+		 */
+		function parsePostBody($post_body, $post_options, $sub_blocks)
+		{
+			// 1. escape all html sequences
+			$post_body = htmlspecialchars($post_body, ENT_NOQUOTES, CHARSET); // don't touch quotes in bbcode attribute values
+
+			// 2. replace censored words
+			$post_body = $this->CensorText($post_body);
+
+			// 3. replace bb codes
+        	if (!$this->GetPostOption('disable_bbcode', $post_options)) {
+        		$post_body = $this->replaceBBCodes($post_body, $sub_blocks['bbcode']);
+        	}
+
+			// 4. replace smileys
+        	if (!$this->GetPostOption('disable_smileys', $post_options)) {
+        		$post_body = $this->replaceSmileys($post_body, $sub_blocks['smileys']);
+        	}
+
+        	// 5. add enters (because we don't use HTML in post body)
+        	$post_body = nl2br($post_body);
+
+        	// 6. replace quoted text
+			return $this->replacePostQuote($post_body, $sub_blocks['quote']);
+		}
+
+		function replacePostQuote($text, $render_as)
+		{
+			if (preg_match('/\[quote id=([\d]+)\](.*)\[\/quote\]/s', $text, $regs)) {
+				/** @var kDBItem $post */
+				$post = $this->Application->recallObject('bb-post.-item', null, Array ('skip_autoload' => true));
+
+				$post->Load($regs[1]);
+
+				$block_params = Array ('name' => $render_as, 'PrefixSpecial' => 'bb-post.-item', 'Prefix' => 'bb-post', 'Special' => '-item', 'strip_nl' => 2);
+				$parsed_quote = $this->Application->ParseBlock($block_params);
+				return str_replace($regs[0], $parsed_quote, $text);
+			}
+
+			return $text;
+		}
+
+		/**
+		 * Replaces bad words with good words (censorship process)
+		 *
+		 * @param string $text
+		 * @return string
+		 */
+		function CensorText($text)
+		{
+			static $censor_words = null;
+
+			if (!isset($censor_words)) {
+				$sql = 'SELECT Replacement, BadWord
+						FROM '.TABLE_PREFIX.'Censorship';
+				$censor_words = $this->Conn->GetCol($sql, 'BadWord');
+			}
+
+			foreach ($censor_words as $replace_from => $replace_to) {
+				$text = str_replace($replace_from, $replace_to, $text);
+			}
+
+			return $text;
+		}
+
+		function replaceSmileys($text, $smiley_element)
+		{
+			static $smileys = null;
+
+			if (!isset($smileys)) {
+				$sql = 'SELECT em.EmotionImage, em.KeyStroke
+						FROM '.TABLE_PREFIX.'Emoticon em
+						WHERE em.Enabled = 1
+						ORDER BY CHAR_LENGTH(em.KeyStroke) DESC';
+				$smileys = $this->Conn->GetCol($sql, 'KeyStroke');
+			}
+
+			$block_params = Array ('name' => $smiley_element, 'smiley_url' => '#SMILEY_URL#');
+			$smiley_mask = trim($this->Application->ParseBlock($block_params));
+
+			$base_url = rtrim($this->Application->BaseURL(),'/');
+			foreach ($smileys as $key_stoke => $image_url) {
+				if (strpos($text, $key_stoke) === false) {
+					continue;
+				}
+
+				$smiley_html = str_replace('#SMILEY_URL#', $base_url.SMILEYS_PATH.$image_url, $smiley_mask);
+				$text = str_replace($key_stoke, $smiley_html, $text);
+			}
+
+			return $text;
+		}
+
+		/**
+		 * Sort params by name and then by length
+		 *
+		 * @param string $a
+		 * @param string $b
+		 * @return int
+		 * @access private
+		 */
+		function CmpParams($a, $b)
+		{
+			list ($a, ) = explode(':', $a);
+			list ($b, ) = explode(':', $b);
+
+			$a_len = strlen($a);
+			$b_len = strlen($b);
+			if ($a_len == $b_len) return 0;
+			return $a_len > $b_len ? -1 : 1;
+		}
+
+		function replaceBBCodes($text, $bbcode_element)
+		{
+		  	// convert phpbb bbcodes to in-bulletin bbcodes
+		  	$text = $this->preformatBBCodes($text);
+
+		  	$tags_defs = explode(';', $this->Application->ConfigValue('BBTags')); // 'b:;i:;u:;ul:type|align;font:color|face|size;url:href;img:src|border';
+
+		  	usort($tags_defs, Array (&$this, 'CmpParams'));
+
+		  	foreach($tags_defs as $tag) {
+		  		list ($tag_name, $tag_params) = explode(':', $tag);
+		  		$tag_params = $tag_params ? array_flip(explode('|', $tag_params)) : 0;
+
+				$text = preg_replace('/\['.$tag_name.'(.*)\](.*)\[\/'.$tag_name.' *\]/Uise','$this->checkBBCodeAttribs("'.$tag_name.'",\'$1\',\'$2\',$tag_params);', $text);
+		  	}
+
+		  	// additional processing for [url], [*], [img] bbcode
+			$text = preg_replace('/<url>(.*)<\/url>/Usi','<url href="$1">$1</url>',$text);
+			$text = preg_replace('/<font>(.*)<\/font>/Usi','$1',$text); // skip empty fonts
+		  	$text = str_replace(	Array('<url','</url>','[*]'),
+		  							Array('<a target="_blank"','</a>','<li>'),
+		  							$text);
+
+		  	// bbcode [code]xxx[/code] processing
+		  	$text = preg_replace('/\[code\](.*)\[\/code\]/Uise', "\$this->replaceCodeBBCode('$1', '".$bbcode_element."')", $text);
+		  	return $text;
+		}
+
+		/**
+		 * Convert phpbb url bbcode to valid in-bulletin's format
+		 *
+		 * @param string $text
+		 * @return string
+		 */
+		function preformatBBCodes($text)
+		{
+			// 1. urls
+			$text = preg_replace('/\[url=(.*)\](.*)\[\/url\]/Ui','[url href="$1"]$2[/url]',$text);
+			$text = preg_replace('/\[url\](.*)\[\/url\]/Ui','[url href="$1"]$1[/url]',$text);
+
+			// 2. images
+			$text = preg_replace('/\[img\](.*)\[\/img\]/Ui','[img src="$1" border="0"][/img]',$text);
+
+			// 3. color
+			$text = preg_replace('/\[color=(.*)\](.*)\[\/color\]/Ui','[font color="$1"]$2[/font]',$text);
+
+			// 4. size
+			$text = preg_replace('/\[size=(.*)\](.*)\[\/size\]/Ui','[font size="$1"]$2[/font]',$text);
+
+			// 5. lists
+			$text = preg_replace('/\[list(.*)\](.*)\[\/list\]/Uis','[ul]$2[/ul]',$text);
+
+			// 6. email to link
+			$text = preg_replace('/\[email\](.*)\[\/email\]/Ui','[url href="mailto:$1"]$1[/url]',$text);
+
+			//7. b tag
+			$text = preg_replace('/\[(b|i|u):(.*)\](.*)\[\/(b|i|u):(.*)\]/Ui','[$1]$3[/$4]',$text);
+
+			//8. code tag
+			$text = preg_replace('/\[code:(.*)\](.*)\[\/code:(.*)\]/Uis','[code]$2[/code]',$text);
+
+			return $text;
+		}
+
+		/**
+		 * Removes not allowed params from tag and returns result
+		 *
+		 * @param string $BBCode bbcode to check
+		 * @param string $TagParams params string entered by user
+		 * @param string $TextInside text between opening and closing bbcode tag
+		 * @param string $ParamsAllowed list of allowed parameter names ("|" separated)
+		 * @return string
+		 */
+		function checkBBCodeAttribs($BBCode, $TagParams, $TextInside, $ParamsAllowed)
+		{
+			// unescape escaped quotes in tag
+			$TagParams = str_replace('\"', '"', $TagParams);
+			$TextInside = str_replace('\"', '"', $TextInside);
+
+			$params_extracted = preg_match_all('/ +([^=]*)=["\']?([^ "\']*)["\']?/is', $TagParams, $extracted_params, PREG_SET_ORDER);
+
+			if ($ParamsAllowed && $params_extracted) {
+				$ret = Array();
+				foreach ($extracted_params as $param) {
+					$param_name = strtolower(trim( $param[1] ));
+					$param_value = trim($param[2]);
+
+					// 1. prevent hacking
+					if ($BBCode == 'url' && $param_name == 'href') {
+						if (strpos(strtolower($param_value), 'script:') !== false) {
+							// script tag found in "href" parameter of "url" bbcode (equals to hacking) -> remove bbcode
+							return $TextInside;
+						}
+					}
+
+					// 2. leave only allowed params & remove all not allowed
+					if (isset($ParamsAllowed[$param_name])) {
+						$ret[] = $param_name.'="'.$param_value.'"';
+					}
+				}
+
+				$ret = count($ret) ? ' '.implode(' ', $ret) : '';
+				return '<'.$BBCode.$ret.'>'.$TextInside.'</'.$BBCode.'>';
+			}
+
+			return '<'.$BBCode.'>'.$TextInside.'</'.$BBCode.'>';
+		}
+
+		function highlightCode($code, $strip_tabs = 0)
+		{
+			if ($strip_tabs) {
+				$code = preg_replace('/(\t){'.$strip_tabs.'}(.*)/', '\\2', $code);
+			}
+
+			$code = str_replace( Array('\\', '/') , Array('_no_match_string_', '_n_m_s_'), $code);
+			$code = highlight_string('<?php'.$code.'?>', true);
+			$code = str_replace( Array('_no_match_string_', '_n_m_s_'), Array('\\', '/'), $code);
+			$code = preg_replace('/&lt;\?(.*)php(.*)\?&gt;/Us', '\\2', $code);
+
+			$code = preg_replace('/<code><font color="(.*)">([\r\n]+)/si', '<code><font color="\\1">', $code);
+			$code = preg_replace('/([\r\n]+)<\/font>([\r\n]+)<\/code>/si', '</font></code>', $code);
+
+			return $code;
+		}
+
+		/**
+		 * Replaces [code]php code[/code] bbcode in post
+		 *
+		 * @param string $input_string code line to highlight
+		 * @param string $bbcode_element block name used for bbcode descoration
+		 * @return string
+		 * @see    parsePostBody about why we unescape here.
+		 */
+		function replaceCodeBBCode($input_string, $bbcode_element)
+		{
+			static $bbcode_mask = null;
+
+			if (!isset($bbcode_mask)) {
+				$block_params = Array ('name' => $bbcode_element, 'bb_code' => '#BB_CODE#');
+				$bbcode_mask = trim($this->Application->ParseBlock($block_params));
+			}
+
+			$input_string = trim(str_replace('\"', '"', kUtil::unescape($input_string, kUtil::ESCAPE_HTML)));
+			$input_string = $this->highlightCode($input_string);
+			$input_string = preg_replace("/\r<br \/>/s", "\r", $input_string); // undo nl2br added in highlighting
+			$input_string = str_replace('#BB_CODE#', $input_string, $bbcode_mask);
+
+			return $input_string;
+		}
+
+		/**
+		 * Returns subscription manager by name
+		 *
+		 * @param string $name
+		 * @param array $arguments
+		 * @return kSubscriptionManager
+		 * @throws InvalidArgumentException
+		 */
+		public function getSubscriptionManager($name, $arguments = Array ())
+		{
+			if ( $name != 'CategoryTopics' && $name != 'TopicPosts' ) {
+				throw new InvalidArgumentException('Unknown subscription manager "' . $name . '"');
+			}
+
+			/** @var kSubscriptionManager $manager */
+			$manager = $this->Application->makeClass('kSubscriptionManager');
+
+			$fields_hash = Array ();
+
+			$user_id = isset($arguments[1]) ? $arguments[1] : $this->Application->RecallVar('user_id');
+
+			switch ( $name ) {
+				case 'CategoryTopics':
+					$category_id = isset($arguments[0]) ? $arguments[0] : $this->Application->GetVar('m_cat_id');
+
+					$fields_hash = Array (
+						'EmailTemplateId' => $manager->getEmailTemplateId('TOPIC.ADD.SUB'),
+						'UserId' => $user_id,
+						'CategoryId' => $category_id,
+					);
+					break;
+
+				case 'TopicPosts':
+					$fields_hash = Array (
+						'EmailTemplateId' => $manager->getEmailTemplateId('POST.ADD.SUB'),
+						'UserId' => $user_id,
+						'ParentItemId' => $arguments[0],
+					);
+					break;
+			}
+
+			$manager->add($fields_hash);
+
+			return $manager;
+		}
+	}

Property changes on: releases/5.2.2-B2/units/helpers/post_helper.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.6
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/helpers/helpers_config.php
===================================================================
--- releases/5.2.2-B2/units/helpers/helpers_config.php	(nonexistent)
+++ releases/5.2.2-B2/units/helpers/helpers_config.php	(revision 16629)
@@ -0,0 +1,24 @@
+<?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' => 'in-bulletin-helpers',
+	'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
+
+	'RegisterClasses' => Array (
+		Array ('pseudo' => 'PostHelper', 'class' => 'PostHelper', 'file' => 'post_helper.php', 'build_event' => ''),
+	),
+);
\ No newline at end of file

Property changes on: releases/5.2.2-B2/units/helpers/helpers_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.1
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/posts/post_eh.php
===================================================================
--- releases/5.2.2-B2/units/posts/post_eh.php	(nonexistent)
+++ releases/5.2.2-B2/units/posts/post_eh.php	(revision 16629)
@@ -0,0 +1,453 @@
+<?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!');
+
+	class PostEventHandler extends kDBEventHandler {
+
+		/**
+		 * Checks topic-post modify and delete permissions
+		 *
+		 * @param kEvent $event
+		 * @return bool
+		 * @access public
+		 */
+		public function CheckPermission(kEvent $event)
+		{
+			$events = Array ('OnUpdate', 'OnDelete');
+
+			if ( in_array($event->Name, $events) ) {
+				return true;
+			}
+
+			return parent::CheckPermission($event);
+		}
+
+		/**
+		 * Sets default values
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnBeforeItemCreate(kEvent $event)
+		{
+			parent::OnBeforeItemCreate($event);
+
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			$user_id = $this->Application->RecallVar('user_id');
+
+			$now = adodb_mktime();
+
+			$object->SetDBField('CreatedById', $user_id);
+			$object->SetDBField('CreatedOn_date', $now);
+			$object->SetDBField('CreatedOn_time', $now);
+
+			$object->SetDBField('ModifiedById', $user_id);
+			$object->SetDBField('Modified_date', $now);
+			$object->SetDBField('Modified_time', $now);
+
+			$object->SetDBField('IPAddress', $this->Application->getClientIp());
+
+			$sql = 'SELECT Username
+					FROM ' . TABLE_PREFIX . 'Users
+					WHERE PortalUserId = ' . $user_id;
+			$object->SetDBField('PosterAlias', $this->Conn->GetOne($sql));
+
+			// set post options
+			/** @var PostHelper $post_helper */
+			$post_helper = $this->Application->recallObject('PostHelper');
+
+			$options_map = $post_helper->getOptionsMap();
+			$post_options = $object->GetDBField('Options');
+			foreach ($options_map as $option_name => $field_name) {
+				$option_value = $object->GetDBField($field_name);
+				$post_helper->SetPostOption($option_name, $option_value, $post_options);
+			}
+			$object->SetDBField('Options', $post_options);
+
+			$table_info = $object->getLinkedInfo($event->Special, true);
+			$object->SetDBField($table_info['ForeignKey'], $table_info['ParentId']);
+		}
+
+		/**
+		 * Checks if user has permission on post
+		 *
+		 * @param kEvent $event
+		 * @param string $permissions
+		 */
+		function checkPostPermission($event, $permissions)
+		{
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			$sql = 'SELECT ci.CategoryId, p.CreatedById
+					FROM '.$object->TableName.' p
+					LEFT JOIN '.TABLE_PREFIX.'Topic t ON t.TopicId = p.TopicId
+					LEFT JOIN '.TABLE_PREFIX.'CategoryItems ci ON ci.ItemResourceId = t.ResourceId AND ci.PrimaryCat = 1
+					WHERE p.'.$object->IDField.' = '.$object->GetID();
+			$post_info = $this->Conn->GetRow($sql);
+
+			/** @var kPermissionsHelper $perm_helper */
+			$perm_helper = $this->Application->recallObject('PermissionsHelper');
+
+			$is_owner = $post_info['CreatedById'] == $this->Application->RecallVar('user_id');
+			$params['permissions'] = 'TOPIC.REPLY.MODIFY|TOPIC.REPLY.OWNER.MODIFY';
+			$params['cat_id'] = $post_info['CategoryId'];
+			return $perm_helper->TagPermissionCheck($params, $is_owner);
+		}
+
+		/**
+		 * Sets post options before post update
+		 * Ensures, that only user with permission will update topic
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnBeforeItemUpdate(kEvent $event)
+		{
+			parent::OnBeforeItemUpdate($event);
+
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			$perm_status = $this->checkPostPermission($event, 'TOPIC.REPLY.MODIFY|TOPIC.REPLY.OWNER.MODIFY');
+			if ( !$perm_status ) {
+				$event->status = kEvent::erFAIL;
+				return;
+			}
+
+			/** @var PostHelper $post_helper */
+			$post_helper = $this->Application->recallObject('PostHelper');
+
+			$options_map = $post_helper->getOptionsMap();
+			$post_options = $object->GetDBField('Options');
+			foreach ($options_map as $option_name => $field_name) {
+				$option_value = $object->GetDBField($field_name);
+				$post_helper->SetPostOption($option_name, $option_value, $post_options);
+			}
+			$object->SetDBField('Options', $post_options);
+		}
+
+		/**
+		 * Notifies admin about post change
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnAfterItemUpdate(kEvent $event)
+		{
+			parent::OnAfterItemUpdate($event);
+
+			$this->Application->emailAdmin('POST.MODIFY');
+		}
+
+		/**
+		 * Checks, that user can delete post
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnBeforeItemDelete(kEvent $event)
+		{
+			parent::OnBeforeItemDelete($event);
+
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			if ( !$this->checkPostPermission($event, 'TOPIC.REPLY.OWNER.DELETE|TOPIC.REPLY.DELETE') ) {
+				$event->status = kEvent::erFAIL;
+			}
+		}
+
+		/**
+		 * Sets post options to virtual fields
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnAfterItemLoad(kEvent $event)
+		{
+			parent::OnAfterItemLoad($event);
+
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			/** @var PostHelper $post_helper */
+			$post_helper = $this->Application->recallObject('PostHelper');
+
+			$options_map = $post_helper->getOptionsMap();
+			$post_options = $object->GetDBField('Options');
+
+			foreach ($options_map as $option_name => $field_name) {
+				$option_value = $post_helper->GetPostOption($option_name, $post_options);
+				$object->SetDBField($field_name, (int)$option_value);
+			}
+		}
+
+		/**
+		 * Updates cached post counter in topic
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnAfterItemCreate(kEvent $event)
+		{
+			parent::OnAfterItemCreate($event);
+
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			$parent_prefix = $this->Application->getUnitOption($event->Prefix, 'ParentPrefix');
+
+			/** @var kCatDBItem $main_object */
+			$main_object = $this->Application->recallObject($parent_prefix);
+
+			if ( $this->Application->LoggedIn() ) {
+				// Update user posts counter.
+				$user_posts = $this->Application->RecallPersistentVar('bb_posts');
+				$this->Application->StorePersistentVar('bb_posts', $user_posts + 1);
+			}
+
+			/** @var PostHelper $post_helper */
+			$post_helper = $this->Application->recallObject('PostHelper');
+
+			$category_id = $this->Application->GetVar('m_cat_id');
+			$post_helper->PropagateCategoryField($category_id, 'Modified', $object->GetDBField('CreatedOn'));
+
+			if ( !$this->Application->isAdmin && $main_object->GetDBField('Posts') ) {
+				// don't send any email events when in admin OR new topic just added (0 posts)
+
+				$user_notified = false; // don't send POST.ADD event twice to same user (in case if owner adds new post)
+				if ( $main_object->GetDBField('NotifyOwnerOnChanges') ) {
+					$user_notified = $main_object->GetDBField('OwnerId');
+					$this->Application->emailUser('POST.ADD', $user_notified);
+				}
+
+				$post_owner_id = $object->GetDBField('CreatedById');
+				if ( ($post_owner_id > 0) && ($user_notified != $post_owner_id) ) {
+					$this->Application->emailUser('POST.ADD', $post_owner_id);
+				}
+
+				$this->Application->emailAdmin('POST.ADD');
+			}
+
+			$post_helper->updateTodayPostsCount($main_object, $object->GetDBField('CreatedOn'), +1);
+			$this->updateTopicInfo($event, $main_object);
+
+			$topic_id = $object->GetDBField('TopicId');
+			$posts_count = $post_helper->updatePostCount($topic_id, +1);
+			$main_object->SetDBField('Posts', $posts_count);
+
+			// auto-lock topic after N number of posts (if option enabled)
+			$auto_lock = $this->Application->ConfigValue('AutoTopicLockPosts');
+
+			if ( (int)$auto_lock > 0 ) {
+				if ( $posts_count >= $auto_lock ) {
+					// user has unlocked topic after $auto_lock and posts again -> ensure that topic will be locked again
+					$this->Application->HandleEvent(new kEvent($parent_prefix . ':OnTopicLockToggle'));
+				}
+			}
+		}
+
+		/**
+		 * Update last post info in topic
+		 *
+		 * @param kEvent $event
+		 * @param kCatDBItem $main_object
+		 */
+		function updateTopicInfo($event, &$main_object)
+		{
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			$main_object->SetDBField('Modified_date', $object->GetDBField('Modified'));
+			$main_object->SetDBField('Modified_time', $object->GetDBField('Modified'));
+
+			$main_object->SetDBField('LastPostId', $object->GetID());
+
+			$main_object->SetDBField('LastPostDate_date', $object->GetDBField('CreatedOn'));
+			$main_object->SetDBField('LastPostDate_time', $object->GetDBField('CreatedOn'));
+
+			$main_object->Update();
+		}
+
+		/**
+		 * Goes to next_template after post creation
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnCreate(kEvent $event)
+		{
+			parent::OnCreate($event);
+
+			if ( $event->status == kEvent::erSUCCESS && !$this->Application->isAdmin ) {
+				$event->SetRedirectParam('opener', 's');
+				$event->redirect = $this->Application->GetVar('next_template');
+			}
+		}
+
+		/**
+		 * Goes to next_template after post editing
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnUpdate(kEvent $event)
+		{
+			parent::OnUpdate($event);
+
+			if ($event->status == kEvent::erSUCCESS && !$this->Application->isAdmin) {
+				$event->SetRedirectParam('opener', 's');
+				$event->redirect = $this->Application->GetVar('next_template');
+				$event->SetRedirectParam('pass', 'm,bb');
+			}
+		}
+
+		/**
+		 * Moves reference to last post in topic, when it is deleted
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnAfterItemDelete(kEvent $event)
+		{
+			parent::OnAfterItemDelete($event);
+
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			$topic_id = $object->GetDBField('TopicId');
+			if ( !$topic_id ) {
+				// deleting post from non-existing topic
+				return;
+			}
+
+			/** @var PostHelper $post_helper */
+			$post_helper = $this->Application->recallObject('PostHelper');
+
+			// update posts count in topic
+			$post_helper->updatePostCount($topic_id, -1);
+
+			// update post owner posts counter
+			$sql = 'UPDATE ' . TABLE_PREFIX . 'UserPersistentSessionData
+					SET VariableValue = IF (VariableValue > 0, VariableValue - 1, 0)
+					WHERE (PortalUserId = ' . $object->GetDBField('CreatedById') . ') AND (VariableName = "bb_posts")';
+			$this->Conn->Query($sql);
+
+
+			/** @var kCatDBItem $main_object */
+			$main_object = $this->Application->recallObject('bb.-item', null, Array ('skip_autoload' => true));
+
+			$main_object->Load($topic_id);
+
+			if ( !$main_object->isLoaded() ) {
+				// this is topic deletion proccess, when all it's posts are deleted too
+				return;
+			}
+
+			$post_helper->updateTodayPostsCount($main_object, $object->GetDBField('CreatedOn'), -1);
+
+			if ( $main_object->GetDBField('LastPostId') == $object->GetID() ) {
+				$sql = 'SELECT PostingId, CreatedOn
+						FROM ' . $object->TableName . '
+						WHERE TopicId = ' . $topic_id . '
+						ORDER BY PostingId DESC';
+				$last_post = $this->Conn->GetRow($sql);
+
+				$fields_hash = Array (
+					'LastPostId' => $last_post['PostingId'],
+					'LastPostDate' => $last_post['CreatedOn'],
+				);
+				$this->Conn->doUpdate($fields_hash, $main_object->TableName, $main_object->IDField . ' = ' . $topic_id);
+			}
+		}
+
+		/**
+		 * Sets default values to posting options based on persistent session
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnAfterConfigRead(kEvent $event)
+		{
+			parent::OnAfterConfigRead($event);
+
+			if ( !$this->Application->LoggedIn() ) {
+				return;
+			}
+
+			$virtual_fields = $this->Application->getUnitOption($event->Prefix, 'VirtualFields');
+			$virtual_fields['DisableBBCodes']['default'] = (int)!$this->Application->RecallPersistentVar('bbcode');
+			$virtual_fields['DisableSmileys']['default'] = (int)!$this->Application->RecallPersistentVar('smileys');
+			$virtual_fields['ShowSignatures']['default'] = (int)$this->Application->RecallPersistentVar('show_sig');
+			$this->Application->setUnitOption($event->Prefix, 'VirtualFields', $virtual_fields);
+		}
+
+		/**
+		 * Deletes items & preserves clean env
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnDelete(kEvent $event)
+		{
+			parent::OnDelete($event);
+
+			if ( $event->status == kEvent::erSUCCESS && !$this->Application->isAdmin ) {
+				$parent_prefix = $this->Application->getUnitOption($event->Prefix, 'ParentPrefix');
+				$event->SetRedirectParam('pass', 'm,' . $parent_prefix);
+			}
+		}
+
+		/**
+		 * Prepares new reply form
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnNew(kEvent $event)
+		{
+			parent::OnNew($event);
+
+			$reply_to = $this->Application->GetVar('reply_to');
+
+			if ( $reply_to > 0 ) {
+				/** @var kDBItem $object */
+				$object = $event->getObject();
+
+				/** @var kDBItem $source_post */
+				$source_post = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
+
+				$source_post->Load($reply_to);
+
+				$object->SetDBField('Subject', 'Re: ' . $source_post->GetDBField('Subject'));
+				$object->SetDBField('PostingText', '[quote id=' . $reply_to . ']' . $source_post->GetDBField('PostingText') . '[/quote]');
+			}
+		}
+	}

Property changes on: releases/5.2.2-B2/units/posts/post_eh.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5.2.2
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/posts/post_tp.php
===================================================================
--- releases/5.2.2-B2/units/posts/post_tp.php	(nonexistent)
+++ releases/5.2.2-B2/units/posts/post_tp.php	(revision 16629)
@@ -0,0 +1,326 @@
+<?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!');
+
+	class PostTagProcessor extends kDBTagProcessor {
+
+		function ListPosts($params)
+		{
+			$parent_prefix = $this->Application->getUnitOption($this->Prefix, 'ParentPrefix');
+
+			/** @var kCatDBItem $main_object */
+			$main_object = $this->Application->recallObject($parent_prefix);
+
+			if ($main_object->isLoaded()) {
+				$main_object->RegisterHit();
+			}
+
+			return $this->PrintList2($params);
+		}
+
+		/**
+		 * Returns link to post author public profile
+		 *
+		 * @param Array $params
+		 * @return string
+		 */
+		function ProfileLink($params)
+		{
+			$object = $this->getObject($params);
+			$params['user_id'] = $object->GetDBField('CreatedById');
+
+			return $this->Application->ProcessParsedTag('m', 'Link', $params);
+		}
+
+		function PosterField($params)
+		{
+			static $posters = null;
+
+			/** @var kDBItem $object */
+			$object = $this->getObject($params);
+
+			/** @var UsersItem $poster */
+			$poster = $this->Application->recallObject('u.poster', null, Array('skip_autoload' => true));
+
+			if ( !isset($posters) ) {
+				$poster_ids = array_unique( $object->GetCol('CreatedById') );
+
+				$sql = 	$poster->GetSelectSQL() . '
+						WHERE ' . $poster->TableName . '.' . $poster->IDField . ' IN (' . implode(',', $poster_ids) . ')';
+				$posters = $this->Conn->Query($sql, $poster->IDField);
+			}
+
+			$poster_id = $object->GetDBField('CreatedById');
+
+			if ($poster_id <= 0) {
+				// guest and root users
+				return '';
+			}
+
+			if ($poster->GetID() != $poster_id) {
+				// previous poster differs from requested
+				$poster->LoadFromHash( $posters[$poster_id] );
+			}
+
+			return $this->Application->ProcessParsedTag('u.poster', 'Field', $params);
+		}
+
+		/**
+		 * Checks if post is made by real user (not Guest or root)
+		 *
+		 * @param Array $params
+		 * @return bool
+		 */
+		function PosterFound($params)
+		{
+			$object = $this->getObject($params);
+
+			return $object->GetDBField('CreatedById') > 0;
+		}
+
+		/**
+		 * Posts count created by current poster
+		 *
+		 * @param Array $params
+		 * @return int
+		 */
+		function PosterPostsCount($params)
+		{
+			static $posts_count = null;
+
+			$object = $this->getObject($params);
+
+			if (!isset($posts_count)) {
+				$poster_ids = array_unique($object->GetCol('CreatedById'));
+
+				$sql = 'SELECT VariableValue, PortalUserId
+						FROM '.TABLE_PREFIX.'UserPersistentSessionData
+						WHERE PortalUserId IN ('.implode(',', $poster_ids).') AND VariableName = "bb_posts"';
+				$posts_count = $this->Conn->GetCol($sql, 'PortalUserId');
+			}
+
+			return $posts_count[$object->GetDBField('CreatedById')];
+		}
+
+		function PostSubject($params)
+		{
+			$object = $this->getObject($params);
+
+			/** @var PostHelper $post_helper */
+			$post_helper = $this->Application->recallObject('PostHelper');
+
+			return $post_helper->CensorText( $object->GetDBField('Subject') );
+		}
+
+		function PostBody($params)
+		{
+			$object = $this->getObject($params);
+
+			/** @var PostHelper $post_helper */
+			$post_helper = $this->Application->recallObject('PostHelper');
+
+			$body = $object->GetDBField('PostingText');
+
+			// 2. parse post body
+			$sub_blocks = Array (
+                	'smileys' => $params['smiley_render_as'],
+                	'bbcode' => $params['bbcode_render_as'],
+                	'quote' => $params['quote_render_as'],
+                );
+			$body = $post_helper->parsePostBody($body, $object->GetDBField('Options'), $sub_blocks);
+
+			return $body;
+		}
+
+		/**
+		 * Checks if poster signature needs to be shown together with post.
+		 *
+		 * @param array $params Tag params.
+		 *
+		 * @return boolean
+		 */
+		protected function ShowPostSignature(array $params)
+		{
+			static $show_signatures;
+
+			if ( !isset($show_signatures) ) {
+				if ( $this->Application->LoggedIn() ) {
+					$show_signatures = $this->Application->RecallPersistentVar('bb_signatures');
+				}
+				else {
+					$show_signatures = false;
+				}
+			}
+
+			if ( !$show_signatures ) {
+				return false;
+			}
+
+			/** @var kDBItem $object */
+			$object = $this->getObject($params);
+
+			/** @var PostHelper $post_helper */
+			$post_helper = $this->Application->recallObject('PostHelper');
+
+			// Show poster signature in this post.
+			if ( $post_helper->GetPostOption('show_sig', $object->GetDBField('Options')) ) {
+				// Don't show signature when it is empty.
+				$signature = $this->getUserSignature($object->GetDBField('CreatedById'));
+
+				return strlen(trim($signature)) ? true : false;
+			}
+
+			return false;
+		}
+
+		/**
+		 * Returns parsed poster (from current post) signature
+		 *
+		 * @param Array $params
+		 * @return string
+		 */
+		function PostSignature($params)
+		{
+			$object = $this->getObject($params);
+
+			/** @var PostHelper $post_helper */
+			$post_helper = $this->Application->recallObject('PostHelper');
+
+			$sub_blocks = Array (
+				'smileys' => $params['smiley_render_as'],
+				'bbcode' => $params['bbcode_render_as'],
+			);
+
+			$signature = $this->getUserSignature($object->GetDBField('CreatedById'));
+			return $post_helper->parsePostBody($signature, $object->GetDBField('Options'), $sub_blocks);
+		}
+
+		/**
+		 * Returns user signature (cached for all viewed posts on page)
+		 *
+		 * @param int $user_id
+		 * @return string
+		 */
+		function getUserSignature($user_id)
+		{
+			static $user_signatures = null;
+
+			$object = $this->getObject();
+
+			if (!isset($user_signatures)) {
+				$poster_ids = array_unique($object->GetCol('CreatedById'));
+
+				$sql = 'SELECT VariableValue, PortalUserId
+						FROM '.TABLE_PREFIX.'UserPersistentSessionData
+						WHERE PortalUserId IN ('.implode(',', $poster_ids).') AND VariableName = "my_signature"';
+				$user_signatures = $this->Conn->GetCol($sql, 'PortalUserId');
+			}
+
+			$poster_id = $object->GetDBField('CreatedById');
+			return isset($user_signatures[$poster_id]) ? $user_signatures[$poster_id] : '';
+		}
+
+		/**
+		 * Creates link to individual post in topic
+		 *
+		 * @param Array $params
+		 * @return string
+		 */
+		function PostLink($params)
+		{
+			$params['pass'] = 'm,bb,bb-post';
+
+			return $this->Application->ProcessParsedTag('m', 'Link', $params);
+		}
+
+		function ReplyQuotedLink($params)
+		{
+			$object = $this->getObject($params);
+
+			$params['pass'] = 'm,bb';
+			$params['reply_to'] = $object->GetID();
+
+			return $this->Application->ProcessParsedTag('m', 'Link', $params);
+		}
+
+		/**
+		 * Checks if user have one of required permissions
+		 *
+		 * @param Array $params
+		 * @return bool
+		 */
+		function HasPermission($params)
+		{
+			static $category_path = null;
+
+			if (!isset($category_path)) {
+				// get topic category
+				$parent_prefix = $this->Application->getUnitOption($this->Prefix, 'ParentPrefix');
+				$parent_item = $this->Application->recallObject($parent_prefix, null, Array ('raise_warnings' => 0));
+				$category_path = $parent_item->isLoaded() ? $parent_item->GetDBField('ParentPath') : $this->Application->GetVar('m_cat_id');
+			}
+
+			/** @var kPermissionsHelper $perm_helper */
+			$perm_helper = $this->Application->recallObject('PermissionsHelper');
+
+			$params['raise_warnings'] = 0;
+
+			/** @var kDBItem $object */
+			$object = $this->getObject($params);
+
+			// 1. category restriction
+			$params['cat_id'] = $category_path;
+
+			// 2. owner restriction
+			$is_owner = $object->GetDBField('CreatedById') == $this->Application->RecallVar('user_id');
+
+			return $perm_helper->TagPermissionCheck($params, $is_owner);
+		}
+
+		function CategoryItemCount($params)
+		{
+			/** @var kCountHelper $count_helper */
+			$count_helper = $this->Application->recallObject('CountHelper');
+
+			return $count_helper->CategoryItemCount('bb', $params, 'SUM(Posts)'); //  - COUNT(TopicId)
+		}
+
+		function ItemCount($params)
+		{
+			/** @var kCountHelper $count_helper */
+			$count_helper = $this->Application->recallObject('CountHelper');
+
+			$today_only = isset($params['today']) && $params['today'];
+			return $count_helper->ItemCount('bb', $today_only, 'SUM(Posts)'); // - COUNT(TopicId)
+		}
+
+		/**
+		 * Preserve main item id in subitem pagination url
+		 *
+		 * @param Array $params
+		 * @return string
+		 */
+		function PageLink($params)
+		{
+			/** @var kDBList $object */
+			$object = $this->getObject($params);
+
+			$parent_info = $object->getLinkedInfo();
+			if ($parent_info['ParentId'] > 0) {
+				$params['pass'] = 'm,'.$this->getPrefixSpecial().','.$parent_info['ParentPrefix'];
+			}
+			return parent::PageLink($params);
+		}
+	}

Property changes on: releases/5.2.2-B2/units/posts/post_tp.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4.2.7
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/posts/posts_config.php
===================================================================
--- releases/5.2.2-B2/units/posts/posts_config.php	(nonexistent)
+++ releases/5.2.2-B2/units/posts/posts_config.php	(revision 16629)
@@ -0,0 +1,111 @@
+<?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.'Users u ON %1$s.CreatedById = u.PortalUserId
+				LEFT JOIN '.TABLE_PREFIX.'CatalogImages 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.Username), IF (%1$s.CreatedById = ' . USER_ROOT . ', "root", IF (%1$s.CreatedById = ' . USER_GUEST . ', "Guest", "n/a")), IF(u.Username = "", u.Email, u.Username))',
+
+			'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.'Users WHERE %s', 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, '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.'Users WHERE %s', 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, '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' => 0),
+		'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',
+	),
+);

Property changes on: releases/5.2.2-B2/units/posts/posts_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6.2.3
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/polls/poll_tp.php
===================================================================
--- releases/5.2.2-B2/units/polls/poll_tp.php	(nonexistent)
+++ releases/5.2.2-B2/units/polls/poll_tp.php	(revision 16629)
@@ -0,0 +1,126 @@
+<?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!');
+
+	class PollTagProcessor extends kDBTagProcessor {
+
+		/**
+		 * Allows to tell if user from current ip has voted already for current poll
+		 *
+		 * @param Array $params
+		 * @return bool
+		 */
+		function HasVoted($params)
+		{
+			/** @var kDBItem $object */
+			$object = $this->getObject($params);
+
+			if ( !$object->GetDBField('AllowMultipleVotings') ) {
+				$where_clause = Array (
+					'PollId = ' . $object->GetID(),
+					'CreatedById = ' . $this->Application->RecallVar('user_id'),
+					'UserIP = ' . $this->Conn->qstr($this->Application->getClientIp()),
+				);
+
+				$sql = 'SELECT StatisticsId
+						FROM ' . TABLE_PREFIX . 'PollsStatistics
+						WHERE (' . implode(') AND (', $where_clause) . ')';
+
+				return $this->Conn->GetOne($sql) > 0;
+			}
+
+			return false;
+		}
+
+		/**
+		 * Allows to tell if user from current ip has voted already for current poll
+		 *
+		 * @param Array $params
+		 * @return bool
+		 */
+		function HasCommented($params)
+		{
+			/** @var kDBItem $object */
+			$object = $this->getObject($params);
+
+			/** @var SpamHelper $spam_helper */
+			$spam_helper = $this->Application->recallObject('SpamHelper');
+
+			$spam_helper->InitHelper($object->GetID(), 'PollComment', 0); // PollId used for SpamControl only
+
+			return $spam_helper->InSpamControl();
+		}
+
+		/**
+		 * Prints out only filled in answers of current poll
+		 *
+		 * @param Array $params
+		 * @return string
+		 */
+		function PrintPoll($params)
+		{
+			$object = $this->getObject($params);
+
+			$sql = 'SELECT COUNT(AnswerNum), AnswerNum
+					FROM '.TABLE_PREFIX.'PollsStatistics
+					WHERE PollId = '.$object->GetID().'
+					GROUP BY AnswerNum';
+			$statistics = $this->Conn->GetCol($sql, 'AnswerNum');
+
+			$total_votes = array_sum($statistics);
+
+			$block_params = $this->prepareTagParams($params);
+			$block_params['name'] = $params['render_as'];
+
+			$i = 1;
+			$ret = '';
+			while ($i < 8) {
+				$answer = $object->GetDBField('Answer'.$i);
+				if ($answer) {
+					$answer_votes = isset($statistics[$i]) ? $statistics[$i] : 0;
+					if ($total_votes > 0) {
+						$block_params['percent'] = round((100 * $answer_votes) / $total_votes, 0);
+					}
+					else {
+						$block_params['percent'] = 0;
+					}
+
+					$block_params['answer'] = $answer;
+					$block_params['answer_num'] = $i;
+
+					$ret .= $this->Application->ParseBlock($block_params);
+				}
+				$i++;
+			}
+
+			return $ret;
+		}
+
+		/**
+		 * Prints link to comments of of current poll
+		 *
+		 * @param Array $params
+		 * @return string
+		 */
+		function CommentsLink($params)
+		{
+			$object = $this->getObject($params);
+
+			$params['pass'] = 'm,poll';
+			$params['poll_id']	= $object->GetID();
+
+		 	return $this->Application->ProcessParsedTag('m', 'Link', $params);
+		}
+	}
\ No newline at end of file

Property changes on: releases/5.2.2-B2/units/polls/poll_tp.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/polls/poll_eh.php
===================================================================
--- releases/5.2.2-B2/units/polls/poll_eh.php	(nonexistent)
+++ releases/5.2.2-B2/units/polls/poll_eh.php	(revision 16629)
@@ -0,0 +1,171 @@
+<?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!');
+
+	class PollEventHandler extends kDBEventHandler {
+
+		/**
+		 * Allows to override standard permission mapping
+		 *
+		 * @return void
+		 * @access protected
+		 * @see kEventHandler::$permMapping
+		 */
+		protected function mapPermissions()
+		{
+			parent::mapPermissions();
+
+			$permissions = Array (
+				'OnResetVotes'	=>	Array ('self' => 'edit'),
+				'OnMakeVote'	=>	Array ('self' => true),
+				'OnItemBuild'	=>	Array ('self' => true),
+			);
+
+			$this->permMapping = array_merge($this->permMapping, $permissions);
+		}
+
+		/**
+		 * Applies special filter, that allows to select all poll from given date range
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 * @see kDBEventHandler::OnListBuild()
+		 */
+		protected function SetCustomQuery(kEvent $event)
+		{
+			parent::SetCustomQuery($event);
+
+			if ( $this->Application->isAdminUser ) {
+				return;
+			}
+
+			/** @var kDBList $object */
+			$object = $event->getObject();
+
+			$object->addFilter('poll_range_filter', '(%1$s.StartDate <= ' . adodb_mktime() . ') AND (%1$s.EndDate >= ' . adodb_mktime() . ' OR EndDate IS NULL)');
+			$object->addFilter('poll_status', '(%1$s.Status = ' . STATUS_ACTIVE . ')');
+		}
+
+		/**
+		 * Reset votes statistics for current poll
+		 *
+		 * @param kEvent $event
+		 */
+		function OnResetVotes($event)
+		{
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			$sql = 'DELETE FROM '.TABLE_PREFIX.'PollsStatistics
+					WHERE '.$object->IDField.' = '.$object->GetID();
+			$this->Conn->Query($sql);
+
+
+			$poll_answers_table = $this->Application->getUnitOption('poll-answer', 'TableName');
+			$poll_answers_table = $this->Application->GetTempName($poll_answers_table);
+
+			$sql = 'UPDATE '.$poll_answers_table.' SET VotesQty = 0
+						WHERE '.$object->IDField.' = '.$object->GetID();
+			$this->Conn->Query($sql);
+		}
+
+		/**
+		 * Sets resource id
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnBeforeItemCreate(kEvent $event)
+		{
+			parent::OnBeforeItemCreate($event);
+
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			$object->SetDBField('ResourceId', $this->Application->NextResourceId());
+		}
+
+		/**
+		 * Make vote to current poll
+		 *
+		 * @param kEvent $event
+		 */
+		function OnMakeVote($event)
+		{
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			$poll_answer_id = $this->Application->GetVar('option_id');
+
+			if (!$poll_answer_id) {
+				$event->redirect = false;
+				return ;
+			}
+
+			$ip_address = $this->Application->getClientIp();
+
+			if (!$object->GetDBField('AllowMultipleVotings')) {
+				$sql = 'SELECT StatisticsId
+						FROM '.TABLE_PREFIX.'PollsStatistics
+						WHERE PollId = '.$object->GetID().' AND UserIP = '.$this->Conn->qstr($ip_address);
+				$voted = $this->Conn->GetOne($sql) > 0;
+			}
+
+			if (!$voted) {
+				$user_id = $this->Application->RecallVar('user_id');
+				$fields_hash = 	Array (
+										'PollId'		=>	$object->GetID(),
+										'AnswerId'		=>	$poll_answer_id,
+										'UserIP'		=>	$ip_address,
+										'CreatedById'	=>	$user_id,
+										'AnswerDate'	=>	adodb_mktime(),
+								);
+
+				$this->Conn->doInsert($fields_hash, TABLE_PREFIX.'PollsStatistics');
+
+				$poll_table = $this->Application->getUnitOption('poll', 'TableName');
+				$this->Conn->Query('UPDATE '.$poll_table.' SET CachedVotesQty = CachedVotesQty + 1
+										WHERE PollId = '.$object->GetID());
+
+				// update table with answers
+				$poll_answers_table = $this->Application->getUnitOption('poll-answer', 'TableName');
+				$this->Conn->Query('UPDATE '.$poll_answers_table.' SET VotesQty = VotesQty + 1
+										WHERE PollId = '.$object->GetID().' AND AnswerId = '.$poll_answer_id);
+			}
+			$event->setEventParam('PollId', $this->Application->GetVar('poll_id'));
+			$event->redirect = false;
+		}
+
+		/**
+		 * Cleanup by removing items from PollStatistics before Poll is deleted
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnAfterItemDelete(kEvent $event)
+		{
+			parent::OnAfterItemDelete($event);
+
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			$sql = 'DELETE FROM ' . TABLE_PREFIX . 'PollsStatistics
+					WHERE PollId = ' . $object->GetID();
+			$this->Conn->Query($sql);
+		}
+	}
\ No newline at end of file

Property changes on: releases/5.2.2-B2/units/polls/poll_eh.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/polls/polls_config.php
===================================================================
--- releases/5.2.2-B2/units/polls/polls_config.php	(nonexistent)
+++ releases/5.2.2-B2/units/polls/polls_config.php	(revision 16629)
@@ -0,0 +1,172 @@
+<?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',
+	'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+	'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+	'EventHandlerClass' => Array ('class' => 'PollEventHandler', 'file' => 'poll_eh.php', 'build_event' => 'OnBuild'),
+	'TagProcessorClass' => Array ('class' => 'PollTagProcessor', 'file' => 'poll_tp.php', 'build_event' => 'OnBuild'),
+	'AutoLoad' => true,
+
+	'QueryString' => Array (
+		1 => 'id',
+		2 => 'Page',
+		3 => 'PerPage',
+		4 => 'event',
+		5 => 'mode',
+	),
+
+	'IDField' => 'PollId',
+
+	'TitleField' => 'Name',
+	'StatusField' => Array ('Status'),
+
+	'TitlePresets' => Array (
+		'default' => Array (
+			'new_status_labels' => Array ('poll' => '!la_title_Adding_Poll!'),
+			'edit_status_labels' => Array ('poll' => '!la_title_Editing_Poll!'),
+			'new_titlefield' => Array ('poll' => '!la_title_NewPoll!'),
+		),
+
+		'poll_list' => Array ('prefixes' => Array ('poll_List'), 'format' => "!la_title_Polls!",	),
+		'poll_edit' => Array ('prefixes' => Array ('poll'), 'format' => "#poll_status# '#poll_titlefield#' - !la_title_General!",	),
+		'poll_edit_answers' => Array ('prefixes' => Array ('poll', 'poll-answer_List'), 'format' => "#poll_status# '#poll_titlefield#' - !la_title_PollAnswers!"),
+
+		'poll_edit_comments' => Array ('prefixes' => Array ('poll', 'poll-comment_List'), 'format' => "#poll_status# '#poll_titlefield#' - !la_title_PollComments!"),
+
+		'answer_edit' => Array (
+			'prefixes' => Array ('poll', 'poll-answer'),
+			'new_status_labels' => Array ('poll-answer' => '!la_title_Adding_Answer!'),
+			'edit_status_labels' => Array ('poll-answer' => '!la_title_Editing_Answer!'),
+			'new_titlefield' => Array ('poll-answer' => '!la_title_New_Answer!'),
+			'format' => "#poll_status# '#poll_titlefield#' - #poll-answer_status# '#poll-answer_titlefield#'"
+		),
+
+		'comment_edit' => Array (
+			'prefixes' => Array ('poll', 'poll-comment'),
+			'new_status_labels' => Array ('poll-comment' => '!la_title_Adding_Comment!'),
+			'edit_status_labels' => Array ('poll-comment' => '!la_title_Editing_Comment!'),
+			'new_titlefield' => Array ('poll-comment' => '!la_title_NewComment!'),
+			'format' => "#poll_status# '#poll_titlefield#' - #poll-comment_status#",
+		),
+	),
+
+	'PermSection' => Array ('main' => 'in-bulletin:polls'),
+
+	'Sections' => Array (
+		'in-bulletin:polls' => Array (
+			'parent' => 'in-portal:site',
+			'icon' => 'polls',
+			'label' => 'la_title_Polls',
+			'url' => Array ('t' => 'in-bulletin/polls/poll_list', 'pass' => 'm'),
+			'permissions' => Array ('view', 'add', 'edit', 'delete'),
+			'priority' => 3.6,
+			'type' => stTREE,
+		),
+	),
+
+	'TableName' => TABLE_PREFIX.'Polls',
+
+	'ListSQLs' => Array (
+		'' => '	SELECT %1$s.* %2$s
+				FROM %1$s',
+	),
+
+	'ListSortings' => Array (
+		'' => Array (
+			'Sorting' => Array ('PollId' => 'asc'),
+		)
+	),
+
+	'Fields' => Array (
+		'PollId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
+		'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'required' => 1, 'max_len' => 255),
+		'Question' => Array (
+			'type' => 'string',
+			'formatter' => 'kMultiLanguage', 'using_fck' => 1,
+			'default' => null, 'required' => 1,
+		),
+		'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'),
+		'StartDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'),
+		'EndDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
+		'Image' => Array (
+			'type' => 'string',
+			'formatter' => 'kPictureFormatter',
+			'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => IMAGES_PATH . 'polls/',
+			'file_types' => '*.jpg;*.jpeg;*.gif;*.png;*.bmp', 'files_description' => '!la_hint_ImageFiles!',
+			'multiple' => false, 'thumb_format' => 'resize:200x200',
+			'max_len' => 255, 'not_null' => 1, 'default' => ''
+		),
+		'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+		'RequireLogin' => Array (
+			'type' => 'int',
+			'formatter' => 'kOptionsFormatter',
+			'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1,
+			'default' => 0, 'not_null' => 1,
+		),
+		'AllowComments' => Array (
+			'type' => 'int',
+			'formatter' => 'kOptionsFormatter',
+			'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1,
+			'default' => 1, 'not_null' => 1,
+		),
+		'AllowMultipleVotings' => Array (
+			'type' => 'int',
+			'formatter' => 'kOptionsFormatter',
+			'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1,
+			'default' => 1, 'not_null' => 1,
+		),
+		'CachedVotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+		'Status' => Array (
+			'type' => 'int',
+			'formatter' => 'kOptionsFormatter',
+			'options' => Array (0 => 'la_opt_Disabled', 1 => 'la_opt_Active',), 'use_phrases' => 1,
+			'required' => 1, 'default' => 1, 'not_null' => 1,
+		),
+	),
+
+	'SubItems' => Array ('poll-answer', 'poll-comment'),
+
+	'EditTabPresets' => Array (
+		'Default' => Array (
+			Array ('title' => 'la_tab_General', 't' => 'in-bulletin/polls/poll_edit', 'priority' => 1),
+			Array ('title' => 'la_tab_PollAnswers', 't' => 'in-bulletin/polls/poll_edit_answers', 'priority' => 2),
+			Array ('title' => 'la_tab_PollUserComments', 't' => 'in-bulletin/polls/poll_edit_comments', 'priority' => 3),
+		),
+	),
+
+	'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 (
+				'PollId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+				'Name' => Array ('data_block' => 'grid_priority_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
+				'StartDate' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145,  ),
+				'EndDate' => Array ('data_block' => 'poll_expire_td', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
+				'CachedVotesQty' => Array ('title' => 'la_col_VoteCount', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+				'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
+//				'DaysActive' => Array ('title' => 'la_col_NumberOfDaysActive', 'filter_block' => 'grid_range_filter',),
+			),
+		),
+	),
+);

Property changes on: releases/5.2.2-B2/units/polls/polls_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.7
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/private_message_body/private_message_body_eh.php
===================================================================
--- releases/5.2.2-B2/units/private_message_body/private_message_body_eh.php	(nonexistent)
+++ releases/5.2.2-B2/units/private_message_body/private_message_body_eh.php	(revision 16629)
@@ -0,0 +1,64 @@
+<?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!');
+
+	class PrivateMessageBodyEventHandler extends kDBEventHandler {
+
+		/**
+		 * Sets default values
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnBeforeItemCreate(kEvent $event)
+		{
+			parent::OnBeforeItemCreate($event);
+
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			// set post options
+			/** @var PostHelper $post_helper */
+			$post_helper = $this->Application->recallObject('PostHelper');
+
+			$options_map = $post_helper->getOptionsMap();
+			$post_options = $object->GetDBField('Options');
+			foreach ($options_map as $option_name => $field_name) {
+				$option_value = $object->GetDBField($field_name);
+				$post_helper->SetPostOption($option_name, $option_value, $post_options);
+			}
+			$object->SetDBField('Options', $post_options);
+		}
+
+		/**
+		 * Deletes message body only when no message is using it
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnBeforeItemDelete(kEvent $event)
+		{
+			parent::OnBeforeItemDelete($event);
+
+			/** @var kDBItem $object */
+			$object = $event->getObject();
+
+			if ( $object->GetDBField('ReferenceCount') > 0 ) {
+				$event->status = kEvent::erFAIL;
+			}
+		}
+	}
\ No newline at end of file

Property changes on: releases/5.2.2-B2/units/private_message_body/private_message_body_eh.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/private_message_body/private_message_body_config.php
===================================================================
--- releases/5.2.2-B2/units/private_message_body/private_message_body_config.php	(nonexistent)
+++ releases/5.2.2-B2/units/private_message_body/private_message_body_config.php	(revision 16629)
@@ -0,0 +1,63 @@
+<?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-body',
+	'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+	'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+	'EventHandlerClass' => Array ('class' => 'PrivateMessageBodyEventHandler', 'file' => 'private_message_body_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' => 'PMBodyId',
+
+	'TitleField' => 'Subject',
+
+	'TableName' => TABLE_PREFIX.'PrivateMessageBody',
+
+	'ForeignKey' => 'PMBodyId',
+	'ParentTableKey' => 'PMBodyId',
+	'ParentPrefix' => 'private-message',
+	'AutoDelete' => true,
+	'AutoClone' => true,
+
+	'ListSQLs' => Array (
+		'' => '	SELECT %1$s.* %2$s
+				FROM %1$s',
+	),
+
+	'Fields' => Array (
+		'PMBodyId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+		'Subject' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+		'Body' => Array ('type' => 'string', 'default' => NULL),
+		'Options' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+		'ReferenceCount' => Array ('type' => 'int', 'not_null' => 1, 'default' => 2),
+	),
+
+	'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),
+	),
+);
\ No newline at end of file

Property changes on: releases/5.2.2-B2/units/private_message_body/private_message_body_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/emoticons/emoticons_config.php
===================================================================
--- releases/5.2.2-B2/units/emoticons/emoticons_config.php	(nonexistent)
+++ releases/5.2.2-B2/units/emoticons/emoticons_config.php	(revision 16629)
@@ -0,0 +1,109 @@
+<?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' => 'emoticon',
+	'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+	'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+	'EventHandlerClass' => Array ('class' => 'EmoticonEventHandler', 'file' => 'emoticon_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',
+		5 => 'mode',
+	),
+
+	'IDField' => 'EmoticonId',
+
+	'TableName' => TABLE_PREFIX.'Emoticon',
+
+	'TitleField' => 'Name',
+
+	'TitlePresets' => Array (
+		'default' => Array (
+			'new_status_labels' => Array ('emoticon' => '!la_title_AddingSmiley!'),
+			'edit_status_labels' => Array ('emoticon' => '!la_title_EditingSmiley!'),
+		),
+
+		'emoticon_list' => Array ('prefixes' => Array ('emoticon_List'), 'format' => "!la_tab_ConfigSmileys!"),
+		'emoticon_edit' => Array ('prefixes' => Array ('emoticon'), 'format' => "#emoticon_status# '#emoticon_titlefield#'"),
+	),
+
+	'PermSection' => Array ('main' => 'in-bulletin:configuration_emoticon'),
+
+	'Sections' => Array (
+		'in-bulletin:configuration_emoticon' => Array (
+			'parent' => 'in-bulletin:setting_folder',
+			'icon' => 'conf_smileys',
+			'label' => 'la_tab_ConfigSmileys',
+			'url' => Array ('t' => 'in-bulletin/emoticons/emoticon_list', 'pass' => 'm'),
+			'permissions' => Array ('view', 'add', 'edit'),
+			'priority' => 2,
+			'type' => stTREE,
+		),
+	),
+
+	'ListSQLs' => Array (
+		'' => '	SELECT %1$s.* %2$s
+				FROM %1$s',
+	),
+
+	'ListSortings' => Array (
+		'' => Array (
+			'Sorting' => Array ('Name' => 'desc'),
+		)
+	),
+
+	'Fields' => Array (
+		'EmoticonId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+		'Name' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'required' => 1, 'default' => ''),
+		'KeyStroke' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'required' => 1, 'default' => ''),
+		'Enabled' => Array (
+			'type' => 'int',
+			'formatter' => 'kOptionsFormatter',
+			'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1,
+			'default' => 1, 'not_null' => 1,
+		),
+		'EmotionImage' => Array (
+			'type' => 'string', 'max_len' => 255,
+			'formatter' => 'kUploadFormatter', 'allowed_types' => Array ('image/jpeg', 'image/jpg', 'image/gif', 'image/png', 'image/pjpeg', 'image/bmp', 'image/x-ms-bmp'),
+			'upload_dir' => SMILEYS_PATH,
+			'not_null' => 1, 'required' => 1, 'default' => '',
+		),
+	),
+
+	'Grids' => Array (
+		'Default' => Array (
+			'Icons' => Array (
+				'default' => 'icon16_item.png',
+				0 => 'icon16_disabled.png',
+				1 => 'icon16_item.png',
+				'module' => 'core',
+			),
+			'Fields' => Array (
+				'EmoticonId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
+				'Name' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
+				'KeyStroke' => Array ('filter_block' => 'grid_like_filter', 'width' => 100, ),
+				'EmotionImage' => Array ('title' => 'column:la_fld_Image', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+			),
+		),
+	),
+);

Property changes on: releases/5.2.2-B2/units/emoticons/emoticons_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.7
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/emoticons/emoticon_eh.php
===================================================================
--- releases/5.2.2-B2/units/emoticons/emoticon_eh.php	(nonexistent)
+++ releases/5.2.2-B2/units/emoticons/emoticon_eh.php	(revision 16629)
@@ -0,0 +1,38 @@
+<?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!');
+
+	class EmoticonEventHandler extends kDBEventHandler {
+
+		/**
+		 * Deletes image file
+		 *
+		 * @param kEvent $event
+		 * @return void
+		 * @access protected
+		 */
+		protected function OnAfterItemDelete(kEvent $event)
+		{
+			parent::OnAfterItemDelete($event);
+
+			$object = $event->getObject();
+
+			$emoticon_file = $object->GetField('EmotionImage', 'full_path');
+			if ( $emoticon_file ) {
+				@unlink($emoticon_file);
+			}
+		}
+
+	}
\ No newline at end of file

Property changes on: releases/5.2.2-B2/units/emoticons/emoticon_eh.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/poll_answers/poll_answers_config.php
===================================================================
--- releases/5.2.2-B2/units/poll_answers/poll_answers_config.php	(nonexistent)
+++ releases/5.2.2-B2/units/poll_answers/poll_answers_config.php	(revision 16629)
@@ -0,0 +1,85 @@
+<?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-answer',
+
+	'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+	'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+	'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
+	'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+	'AutoLoad' => true,
+
+	'QueryString' => Array (
+		1 => 'id',
+		2 => 'Page',
+		3 => 'PerPage',
+		4 => 'event',
+	),
+
+	'IDField' => 'AnswerId',
+	'TableName' => TABLE_PREFIX . 'PollsAnswers',
+
+	'ParentPrefix' => 'poll',
+	'ForeignKey' => 'PollId',
+	'ParentTableKey' => 'PollId',
+	'AutoDelete' => true,
+	'AutoClone' => true,
+
+	'TitleField' => 'Answer',
+	'StatusField' => Array ('Status'),
+
+	// key - special, value - list select sql
+	'ListSQLs' => Array (
+		'' => '	SELECT %1$s.* %2$s
+				FROM %1$s',
+	),
+
+	'ListSortings' => Array (
+		'' => Array (
+			'ForcedSorting' => Array ('Priority' => 'desc'),
+			'Sorting' => Array ('Answer' => 'asc'),
+		)
+	),
+
+	'Fields' => Array (
+		'AnswerId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+		'PollId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+		'Answer' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'using_fck' => 1, 'default' => '', 'required' => 1),
+		'VotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+		'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'), 'use_phrases' => 1, 'required' => 1, 'not_null' => 1, 'default' => 1),
+	),
+
+	'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 (
+				'AnswerId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+				'Answer' => Array ('data_block' => 'grid_priority_td', 'filter_block' => 'grid_like_filter', 'width' => 300, ),
+				'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
+				'VotesQty' => Array ('title' => 'la_col_VoteCount', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+			),
+		),
+	),
+);
\ No newline at end of file

Property changes on: releases/5.2.2-B2/units/poll_answers/poll_answers_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/censorship/censorship_config.php
===================================================================
--- releases/5.2.2-B2/units/censorship/censorship_config.php	(nonexistent)
+++ releases/5.2.2-B2/units/censorship/censorship_config.php	(revision 16629)
@@ -0,0 +1,96 @@
+<?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' => 'censorship',
+	'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+	'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+	'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
+	'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
+
+	'AutoLoad' => true,
+
+	'QueryString' => Array (
+		1 => 'id',
+		2 => 'Page',
+		3 => 'PerPage',
+		4 => 'event',
+		5 => 'mode',
+	),
+
+	'IDField' => 'CensorshipId',
+
+	'TableName' => TABLE_PREFIX.'Censorship',
+
+	'TitleField' => 'BadWord',
+
+	'TitlePresets' => Array (
+		'default' => Array (
+			'new_status_labels' => Array ('censorship' => '!la_title_AddingCensorship!'),
+			'edit_status_labels' => Array ('censorship' => '!la_title_EditingCensorship!'),
+		),
+
+		'censorship_list' => Array ('prefixes' => Array ('censorship_List'), 'format' => "!la_tab_ConfigCensorship!"),
+		'censorship_edit' => Array ('prefixes' => Array ('censorship'), 'format' => "#censorship_status# '#censorship_titlefield#'"),
+	),
+
+	'PermSection' => Array ('main' => 'in-bulletin:configuration_censorship'),
+
+	'Sections' => Array (
+		'in-bulletin:configuration_censorship' => Array (
+			'parent' => 'in-bulletin:setting_folder',
+			'icon' => 'conf_censorship',
+			'label' => 'la_tab_ConfigCensorship',
+			'url' => Array ('t' => 'in-bulletin/censorship/censorship_list', 'pass' => 'm'),
+			'permissions' => Array ('view', 'add', 'edit', 'delete'),
+			'priority' => 1,
+			'type' => stTREE,
+		),
+	),
+
+	'ListSQLs' => Array (
+		'' => '	SELECT %1$s.* %2$s
+				FROM %1$s',
+	),
+
+	'ListSortings' => Array (
+		'' => Array (
+			'Sorting' => Array ('BadWord' => 'asc'),
+		)
+	),
+
+	'Fields' => Array (
+		'CensorshipId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+		'BadWord' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''),
+		'Replacement' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''),
+	),
+
+	'Grids' => Array (
+		'Default' => Array (
+			'Icons' => Array (
+				'default' => 'icon16_item.png',
+				0 => 'icon16_disabled.png',
+				1 => 'icon16_item.png',
+				'module' => 'core',
+			),
+			'Fields' => Array (
+				'CensorshipId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter',  'width' => 50),
+				'BadWord' => Array ('filter_block' => 'grid_like_filter', 'width' => 250),
+				'Replacement' => Array ('filter_block' => 'grid_like_filter', 'width' => 250),
+			),
+		),
+	),
+);
\ No newline at end of file

Property changes on: releases/5.2.2-B2/units/censorship/censorship_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.3
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/units/.htaccess
===================================================================
--- releases/5.2.2-B2/units/.htaccess	(nonexistent)
+++ releases/5.2.2-B2/units/.htaccess	(revision 16629)
@@ -0,0 +1 @@
+deny from all
\ No newline at end of file

Property changes on: releases/5.2.2-B2/units/.htaccess
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/install/upgrades.sql
===================================================================
--- releases/5.2.2-B2/install/upgrades.sql	(nonexistent)
+++ releases/5.2.2-B2/install/upgrades.sql	(revision 16629)
@@ -0,0 +1,284 @@
+# ===== 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 =====
+
+# ===== 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;
+
+# ===== v 5.1.1-B2 =====
+
+# ===== v 5.1.1-RC1 =====
+
+# ===== v 5.1.1 =====
+
+# ===== v 5.1.2-B1 =====
+
+# ===== v 5.1.2-RC1 =====
+
+# ===== v 5.1.2 =====
+
+# ===== v 5.1.3-B1 =====
+
+# ===== v 5.1.3-B2 =====
+
+# ===== v 5.1.3-RC1 =====
+UPDATE ConfigurationValues
+SET VariableValue = 'in-bulletin/topics/topic_detail'
+WHERE VariableName = 'bb_ItemTemplate' AND VariableValue = 'in-bulletin/designs/detail';
+
+# ===== v 5.1.3-RC2 =====
+
+# ===== v 5.1.3 =====
+UPDATE Phrase
+SET `Module` = 'Core'
+WHERE PhraseKey = 'LA_FLD_REQUIRELOGIN';
+
+# ===== v 5.2.0-B1 =====
+UPDATE SearchConfig
+SET DisplayName = REPLACE(DisplayName, 'lu_', 'lc_')
+WHERE DisplayName IN (
+	'lu_field_notifyowneronchanges', 'lu_field_topicid', 'lu_field_ownerid',
+	'lu_field_topictext', 'lu_field_postedby', 'lu_field_lastpostid'
+);
+
+DELETE FROM LanguageLabels
+WHERE PhraseKey IN ('LA_POSTS_NEWDAYS_PROMPT');
+
+DELETE FROM SystemSettings
+WHERE VariableName IN ('Topic_Highlight_OpenTag', 'Topic_Highlight_CloseTag', 'Posts_NewDays');
+
+# ===== v 5.2.0-B2 =====
+UPDATE Topic main_table
+SET main_table.CachedReviewsQty = (SELECT COUNT(*) FROM <%TABLE_PREFIX%>CatalogReviews review_table WHERE review_table.ItemId = main_table.ResourceId);
+
+# ===== v 5.2.0-B3 =====
+INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient, BindToSystemEvent) VALUES(DEFAULT, 'POST.ADD.SUB', NULL, 1, 0, 'In-Bulletin', 'Post Added (for subscribers)', 0, 1, 0, 'bb-post:OnCreate');
+INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient, BindToSystemEvent) VALUES(DEFAULT, 'TOPIC.ADD.SUB', NULL, 1, 0, 'In-Bulletin', 'Topic Added (for subscribers)', 0, 1, 0, 'bb:OnCreate');
+
+# ===== v 5.2.0-RC1 =====
+
+# ===== v 5.2.0 =====
+INSERT INTO Permissions VALUES(DEFAULT, 'in-bulletin:configuration_output.add', 11, 1, 1, 0);
+
+# ===== v 5.2.1-B1 =====
+
+# ===== v 5.2.1-B2 =====
+UPDATE Modules
+SET ClassNamespace = 'Intechnic\\InPortal\\Modules\\InBulletin'
+WHERE `Name` = 'In-Bulletin';
+
+# ===== v 5.2.1-RC1 =====
+
+# ===== v 5.2.1 =====
+
+# ===== v 5.2.2-B1 =====
+
+# ===== v 5.2.2-B2 =====
+UPDATE Modules
+SET ClassNamespace = 'InPortal\\Modules\\InBulletin'
+WHERE `Name` = 'In-Bulletin';

Property changes on: releases/5.2.2-B2/install/upgrades.sql
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.12
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/install/install_data.sql
===================================================================
--- releases/5.2.2-B2/install/install_data.sql	(nonexistent)
+++ releases/5.2.2-B2/install/install_data.sql	(revision 16629)
@@ -0,0 +1,229 @@
+# Section "in-bulletin:configuration_output":
+INSERT INTO SystemSettings VALUES(DEFAULT, 'Topic_SortOrder', 'desc', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 10.01, 2, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'Topic_SortField', 'LastPostDate', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield_prompt', 'select', '', '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>CustomFields WHERE (Type = 3) AND (IsSystem = 0)</SQL>', 10.01, 1, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'Topic_SortOrder2', 'desc', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield2_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 10.02, 2, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'Topic_SortField2', 'Posts', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_sortfield2_prompt', 'select', '', '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>CustomFields WHERE (Type = 3) AND (IsSystem = 0)</SQL>', 10.02, 1, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'Perpage_Topics', '5', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_perpage_prompt', 'text', '', '', 10.03, 0, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'Perpage_Topics_Short', '3', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_perpage_short_prompt', 'text', '', '', 10.04, 0, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'Topic_NewDays', '6', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_newdays_prompt', 'text', '', '', 10.05, 0, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'Topic_MinPopRating', '3', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_fld_Topic_MinPopRating', 'text', '', '', 10.06, 0, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'Topic_MinPopVotes', '8', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_fld_Topic_MinPopVotes', 'text', '', '', 10.07, 0, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'Topic_MaxHotNumber', '3', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_fld_Topic_MaxHotNumber', 'text', '', '', 10.08, 0, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'Topic_EditorPicksAbove', '1', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_topic_editorpicksabove_prompt', 'checkbox', '', '', 10.09, 0, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'topic_ReviewDelay_Interval', '60', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_DupReviews', 'select', '', '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', 10.1, 2, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'topic_ReviewDelay_Value', '10', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_DupReviews', 'text', '', 'style="width: 50px;"', 10.1, 1, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'topic_RatingDelay_Interval', '3600', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_DupRating', 'select', '', '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', 10.11, 2, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'topic_RatingDelay_Value', '1', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_DupRating', 'text', '', 'style="width: 50px;"', 10.11, 1, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'AutoTopicLockPosts', '0', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Topics', 'la_prompt_PostsToLock', 'text', NULL, NULL, 10.12, 0, 0, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'Perpage_Postings', '25', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_posts_subheading', 'la_posts_perpage_prompt', 'text', '', '', 20.01, 0, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'Perpage_TopicReviews', '10', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Reviews', 'la_review_perpage_prompt', 'text', NULL, NULL, 30.01, 0, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'bb_CategoryTemplate', '/in-bulletin/designs/section', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 40.01, 0, 0, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'bb_ItemTemplate', 'in-bulletin/topics/topic_detail', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_section_Templates', 'la_fld_ItemTemplate', 'text', '', '', 40.02, 0, 0, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'bb_MaxImageCount', '5', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_section_ImageSettings', 'la_config_MaxImageCount', 'text', '', '', 50.01, 0, 0, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'bb_ThumbnailImageWidth', '120', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_section_ImageSettings', 'la_config_ThumbnailImageWidth', 'text', '', '', 50.02, 0, 0, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'bb_ThumbnailImageHeight', '120', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_section_ImageSettings', 'la_config_ThumbnailImageHeight', 'text', '', '', 50.03, 0, 0, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'bb_FullImageWidth', '450', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_section_ImageSettings', 'la_config_FullImageWidth', 'text', '', '', 50.04, 0, 0, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'bb_FullImageHeight', '450', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_section_ImageSettings', 'la_config_FullImageHeight', 'text', '', '', 50.05, 0, 0, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'poll_CommentDelay_Value', '10', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Polls', 'la_prompt_DupPollComments', 'text', '', 'style="width: 50px;"', 60.1, 1, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'poll_CommentDelay_Interval', '60', 'In-Bulletin', 'in-bulletin:configuration_output', 'la_Text_Polls', 'la_prompt_DupPollComments', 'select', '', '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', 60.2, 2, 1, NULL);
+
+# Section "in-bulletin:configuration_search":
+INSERT INTO SystemSettings VALUES(DEFAULT, 'SearchRel_Increase_topics', '30', 'In-Bulletin', 'in-bulletin:configuration_search', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'SearchRel_Keyword_topics', '90', 'In-Bulletin', 'in-bulletin:configuration_search', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 0, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'SearchRel_Pop_topics', '5', 'In-Bulletin', 'in-bulletin:configuration_search', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 0, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'SearchRel_Rating_topics', '5', 'In-Bulletin', 'in-bulletin:configuration_search', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 0, 1, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'SearchRel_Increase_posts', '30', 'In-Bulletin', 'in-bulletin:configuration_search', '', '', '', NULL, NULL, 0, 0, 0, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'SearchRel_Keyword_posts', '90', 'In-Bulletin', 'in-bulletin:configuration_search', '', '', '', NULL, NULL, 0, 0, 0, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'SearchRel_Pop_posts', '5', 'In-Bulletin', 'in-bulletin:configuration_search', '', '', '', NULL, NULL, 0, 0, 0, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'SearchRel_Rating_posts', '5', 'In-Bulletin', 'in-bulletin:configuration_search', '', '', '', NULL, NULL, 0, 0, 0, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'Search_ShowMultiple_topics', '0', 'In-Bulletin', 'in-bulletin:configuration_search', 'la_config_ShowMultiple', 'la_Text_MultipleShow', 'text', NULL, NULL, 0, 0, 1, NULL);
+
+INSERT INTO SystemSettings VALUES(DEFAULT, 'BBTags', 'b:;i:;u:;ul:type|align;font:color|face|size;url:href;img:src|border', 'In-Bulletin', '', '', '', '', NULL, NULL, 0, 0, 0, NULL);
+
+INSERT INTO Emoticon VALUES (1, 'Happy Smile', ':)', 1, '');
+INSERT INTO Emoticon VALUES (2, 'Big Grin', ':grin:', 1, '');
+INSERT INTO Emoticon VALUES (3, 'Wink', ';)', 1, '');
+INSERT INTO Emoticon VALUES (4, 'Scared', ':scared:', 1, '');
+INSERT INTO Emoticon VALUES (5, 'Teasing', ':eek:', 1, '');
+INSERT INTO Emoticon VALUES (6, 'Cool', ':cool:', 1, '');
+INSERT INTO Emoticon VALUES (7, 'Angry', ':@', 1, '');
+INSERT INTO Emoticon VALUES (8, 'Squint', ':squint:', 1, '');
+INSERT INTO Emoticon VALUES (9, 'Oops', ':o', 1, '');
+INSERT INTO Emoticon VALUES (10, 'Sad', ':(', 1, '');
+INSERT INTO Emoticon VALUES (11, 'Cry', ':cry:', 1, '');
+INSERT INTO Emoticon VALUES (12, 'Smirk', ';]', 1, '');
+INSERT INTO Emoticon VALUES (13, 'Happy sleep', ':sleep:', 1, '');
+INSERT INTO Emoticon VALUES (14, 'Very angry', ':x', 1, '');
+INSERT INTO Emoticon VALUES (15, 'Geek', ':geek:', 1, '');
+INSERT INTO Emoticon VALUES (16, 'Upset', ';(', 1, '');
+INSERT INTO Emoticon VALUES (17, 'LOL', ':lol:', 1, '');
+INSERT INTO Emoticon VALUES (18, 'Yawn', ':O', 1, '');
+INSERT INTO Emoticon VALUES (19, 'Thinking', ':hm:', 1, '');
+INSERT INTO Emoticon VALUES (20, 'Secret', ':|', 1, '');
+
+UPDATE Emoticon SET EmotionImage = CONCAT('0_',EmoticonId,'.gif');
+
+INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.ADD', NULL, 1, 1, 'In-Bulletin', 'Topic Added', 1, 1, 1);
+INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.ADD', NULL, 1, 1, 'In-Bulletin', 'Topic Added', 0, 1, 1);
+INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.ADD.PENDING', NULL, 1, 1, 'In-Bulletin', 'Add Pending Topic', 1, 1, 1);
+INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.ADD.PENDING', NULL, 1, 1, 'In-Bulletin', 'Add Pending Topic', 0, 1, 1);
+INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.MODIFY', NULL, 1, 1, 'In-Bulletin', 'Modify Topic', 1, 1, 1);
+INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.MODIFY', NULL, 1, 1, 'In-Bulletin', 'Modify Topic', 0, 1, 1);
+INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.MODIFY.PENDING', NULL, 1, 1, 'In-Bulletin', 'Topic Modifications Pending', 1, 1, 1);
+INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.MODIFY.PENDING', NULL, 1, 1, 'In-Bulletin', 'Topic Modifications Pending', 0, 1, 1);
+INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.APPROVE', NULL, 1, 0, 'In-Bulletin', 'Approve Topic', 0, 1, 1);
+INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'POST.ADD', NULL, 1, 1, 'In-Bulletin', 'Post Added', 1, 1, 1);
+INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'POST.MODIFY', NULL, 1, 1, 'In-Bulletin', 'Post Modified', 1, 1, 1);
+INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'POST.ADD', NULL, 1, 0, 'In-Bulletin', 'Post Added', 0, 1, 1);
+INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'PM.ADD', NULL, 1, 0, 'In-Bulletin', 'New Private Message', 0, 1, 1);
+INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient, BindToSystemEvent) VALUES(DEFAULT, 'POST.ADD.SUB', NULL, 1, 0, 'In-Bulletin', 'Post Added (for subscribers)', 0, 1, 0, 'bb-post:OnCreate');
+INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient, BindToSystemEvent) VALUES(DEFAULT, 'TOPIC.ADD.SUB', NULL, 1, 0, 'In-Bulletin', 'Topic Added (for subscribers)', 0, 1, 0, 'bb:OnCreate');
+
+INSERT INTO ItemTypes VALUES (3, 'In-Bulletin', 'bb', 'Topic', 'TopicText', 'OwnerId', 'Views', 'CachedRating', 'la_ItemTab_Topics', 1, '', 'clsTopic', 'Topic');
+INSERT INTO ItemTypes VALUES (30, 'In-Bulletin', 'posting', 'Posting', 'Subject', 'CreatedById', NULL, NULL, 'la_ItemTab_Posts', 0, '', '', 'Post');
+
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.VIEW', 'la_PermName_Topic.View_desc', 'In-Bulletin', 1);
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.ADD', 'la_PermName_Topic.Add_desc', 'In-Bulletin', 1);
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.ADD.PENDING', 'la_PermName_Topic.Add.Pending_desc', 'In-Bulletin', 1);
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.DELETE', 'la_PermName_Topic.Delete_desc', 'In-Bulletin', 1);
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.MODIFY', 'la_PermName_Topic.Modify_desc', 'In-Bulletin', 1);
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.REPLY.DELETE', 'la_PermName_Topic.Reply.Delete_desc', 'In-Bulletin', 1);
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.REPLY.VIEW', 'la_PermName_Topic.Reply.View_desc', 'In-Bulletin', 1);
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.REPLY.ADD', 'la_PermName_Topic.Reply.Add_desc', 'In-Bulletin', 1);
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.REPLY.MODIFY', 'la_PermName_Topic.Reply.Modify_desc', 'In-Bulletin', 1);
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.RATE', 'la_PermName_Topic.Rate_desc', 'In-Bulletin', 1);
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.REVIEW', 'la_PermName_Topic.Review_desc', 'In-Bulletin', 1);
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.REPLY.OWNER.MODIFY', 'la_PermName_Topic.Reply.Owner.Modify_desc', 'In-Bulletin', 1);
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.REPLY.OWNER.DELETE', 'la_PermName_Topic.Reply.Owner.Delete_desc', 'In-Bulletin', 1);
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.OWNER.DELETE', 'la_PermName_Topic.Owner.Delete_desc', 'In-Bulletin', 1);
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.MODIFY.PENDING', 'la_PermName_Topic.Modify.Pending_desc', 'In-Bulletin', 1);
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.OWNER.MODIFY.PENDING', 'la_PermName_Topic.Owner.Modify.Pending_desc', 'In-Bulletin', 1);
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.OWNER.MODIFY', 'la_PermName_Topic.Owner.Modify_desc', 'In-Bulletin', 1);
+INSERT INTO CategoryPermissionsConfig VALUES (DEFAULT, 'TOPIC.LOCK', 'la_PermName_Topic.Lock_desc', 'In-Bulletin', 1);
+
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT count(*) FROM <%prefix%>Topic WHERE Status=1', NULL, 'la_prompt_ActiveTopics', 0, 1);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) AS TotalTopics FROM <%prefix%>Topic', NULL, 'la_prompt_TopicsTotal', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) AS ActiveTopics FROM <%prefix%>Topic WHERE Status = 1', NULL, 'la_prompt_TopicsActive', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) AS PendingTopics FROM <%prefix%>Topic WHERE Status = 2', NULL, 'la_prompt_TopicsPending', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) AS DisabledTopics FROM <%prefix%>Topic WHERE Status = 0', NULL, 'la_prompt_TopicsDisabled', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) AS NewTopics FROM <%prefix%>Topic WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name="Topic_NewDays"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewTopics', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) FROM <%prefix%>Topic WHERE EditorsPick = 1', NULL, 'la_prompt_EditorsPickTopics', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) AS HotTopics FROM <%prefix%>Topic WHERE (HotItem = 1) OR (Posts >= <%m:config name="Topic_MaxHotNumber"%> AND (HotItem = 2) )', NULL, 'la_prompt_HotTopics', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) AS PopularTopics FROM <%prefix%>Topic WHERE (PopItem = 1) OR ( (CachedRating >= <%topic:hit_count type="top"%>) AND <%topic:hit_count type="top"%> AND (PopItem = 2) )', NULL, 'la_prompt_PopularTopics', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="AVG(CachedRating)" type="currency" precision="2"%> FROM <%prefix%>Topic WHERE CachedRating > 0', NULL, 'la_prompt_TopicAverageRating', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT MAX(Views) AS MaxTopicHits FROM <%prefix%>Topic', NULL, 'la_prompt_MaxTopicHits', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT MAX(CachedVotesQty) AS MaxTopicVotes FROM <%prefix%>Topic', NULL, 'la_prompt_MaxTopicVotes', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>Topic', NULL, 'la_prompt_NewestTopicDate', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="time"%> FROM <%prefix%>Topic', NULL, 'la_prompt_NewestTopicTime', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>Topic', NULL, 'la_prompt_LastUpdatedTopicDate', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="MAX(Modified)" type="time"%> FROM <%prefix%>Topic', NULL, 'la_prompt_LastUpdatedTopicTime', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) FROM <%prefix%>CatalogReviews WHERE Module = \'<%modules:get_current%>\'', NULL, 'la_prompt_TopicReviews', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) AS TotalPosts FROM <%prefix%>Posting', NULL, 'la_prompt_PostsTotal', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>Posting', NULL, 'la_prompt_NewestPostDate', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="time"%> FROM <%prefix%>Posting', NULL, 'la_prompt_NewestPostTime', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>Posting', NULL, 'la_prompt_LastUpdatedPostDate', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="MAX(Modified)" type="time"%> FROM <%prefix%>Posting', NULL, 'la_prompt_LastUpdatedPostTime', 0, 2);
+
+INSERT INTO SearchConfig VALUES ('Topic', 'NotifyOwnerOnChanges', 0, 1, 'lu_fielddesc_topic_notifyowneronchanges', 'lc_field_notifyowneronchanges', 'In-Bulletin', 'la_text_topic', 1, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'TopicId', 0, 1, 'lu_fielddesc_topic_topicid', 'lc_field_topicid', 'In-Bulletin', 'la_text_topic', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'Priority', 0, 1, 'lu_fielddesc_topic_priority', 'lc_field_priority', 'In-Bulletin', 'la_text_topic', 8, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'OwnerId', 0, 1, 'lu_fielddesc_topic_ownerid', 'lc_field_ownerid', 'In-Bulletin', 'la_text_topic', 9, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'Modified', 0, 1, 'lu_fielddesc_topic_modified', 'lc_field_modified', 'In-Bulletin', 'la_text_topic', 2, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'TopicText', 1, 1, 'lu_fielddesc_topic_topictext', 'lc_field_topictext', 'In-Bulletin', 'la_text_topic', 3, DEFAULT, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'Posts', 0, 1, 'lu_fielddesc_topic_posts', 'lu_field_posts', 'In-Bulletin', 'la_text_topic', 4, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'Views', 0, 1, 'lu_fielddesc_topic_views', 'lu_field_views', 'In-Bulletin', 'la_text_topic', 5, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'EditorsPick', 0, 1, 'lu_fielddesc_topic_editorspick', 'lc_field_EditorsPick', 'In-Bulletin', 'la_text_topic', 6, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'Status', 0, 1, 'lu_fielddesc_topic_status', 'lc_field_status', 'In-Bulletin', 'la_text_topic', 7, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'ModifiedById', 0, 1, 'lu_fielddesc_topic_modifiedbyid', 'lc_field_modifiedbyid', 'In-Bulletin', 'la_text_topic', 10, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'ResourceId', 0, 1, 'lu_fielddesc_topic_resourceid', 'lc_field_resourceid', 'In-Bulletin', 'la_text_topic', 11, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'TopicType', 0, 1, 'lu_fielddesc_topic_topictype', 'lu_field_topictype', 'In-Bulletin', 'la_text_topic', 12, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'CreatedOn', 0, 1, 'lu_fielddesc_topic_createdon', 'lc_field_createdon', 'In-Bulletin', 'la_text_topic', 13, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'CachedReviewsQty', 0, 1, 'lu_fielddesc_topic_cachedreviewsqty', 'lc_field_cachedreviewsqty', 'In-Bulletin', 'la_text_topic', 14, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'CachedRating', 0, 1, 'lu_fielddesc_topic_cachedrating', 'lc_field_cachedrating', 'In-Bulletin', 'la_text_topic', 15, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'CachedVotesQty', 0, 1, 'lu_fielddesc_topic_cachedvotesqty', 'lc_field_cachedvotesqty', 'In-Bulletin', 'la_text_topic', 16, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'NewItem', 0, 1, 'lu_fielddesc_topic_newitem', 'lc_field_newitem', 'In-Bulletin', 'la_text_topic', 17, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'PopItem', 0, 1, 'lu_fielddesc_topic_popitem', 'lc_field_popitem', 'In-Bulletin', 'la_text_topic', 18, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'HotItem', 0, 1, 'lu_fielddesc_topic_hotitem', 'lc_field_hotitem', 'In-Bulletin', 'la_text_topic', 19, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'PostedBy', 0, 1, 'lu_fielddesc_topic_postedby', 'lc_field_postedby', 'In-Bulletin', 'la_text_topic', 20, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'OrgId', 0, 1, 'lu_fielddesc_topic_orgid', 'lc_field_orgid', 'In-Bulletin', 'la_text_topic', 21, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Topic', 'LastPostId', 0, 1, 'lu_fielddesc_topic_lastpostid', 'lc_field_lastpostid', 'In-Bulletin', 'la_text_topic', 22, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.VIEW', 14, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.VIEW', 14, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 12, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.VIEW', 12, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.VIEW', 12, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.ADD', 12, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.OWNER.MODIFY', 12, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.OWNER.DELETE', 12, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.OWNER.DELETE', 12, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.OWNER.MODIFY.PENDING', 12, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.OWNER.MODIFY', 12, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 13, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.VIEW', 13, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.ADD', 13, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.VIEW', 13, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.ADD', 13, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.RATE', 13, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REVIEW', 13, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.OWNER.MODIFY', 13, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.OWNER.DELETE', 13, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.OWNER.MODIFY', 13, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 11, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.VIEW', 11, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.ADD', 11, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.DELETE', 11, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.MODIFY', 11, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.DELETE', 11, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.VIEW', 11, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.ADD', 11, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.MODIFY', 11, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.RATE', 11, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REVIEW', 11, 1, 0, {TopicCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.VIEW', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.ADD', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.ADD.PENDING', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.DELETE', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.MODIFY', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.DELETE', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.VIEW', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.ADD', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.MODIFY', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.RATE', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REVIEW', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.OWNER.MODIFY', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.OWNER.DELETE', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.OWNER.DELETE', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.MODIFY.PENDING', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.OWNER.MODIFY.PENDING', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.OWNER.MODIFY', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.LOCK', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin.view', 11, 1, 1, 0);
+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);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_output.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_output.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_output.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_search.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_search.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_censorship.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_censorship.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_censorship.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_censorship.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_emoticon.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_emoticon.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_emoticon.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_custom.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_custom.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_custom.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_custom.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:polls.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:polls.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:polls.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:polls.delete', 11, 1, 1, 0);
+
+#INSERT INTO ImportScripts VALUES (DEFAULT, 'In-Bulletin', 'phpbb', 'phpbb_import', 'phpBB 2.x', 'phpBB', 'user_regular,init_cat', 1, 'db');
+
+INSERT INTO CustomFields VALUES (DEFAULT, 1, 'bb_ItemTemplate', 'la_fld_cust_bb_ItemTemplate', 0, 'la_title_SystemCF', 'la_fld_cust_bb_ItemTemplate', 'text', NULL, '', 0, 0, 1, 0);
+
+INSERT INTO Modules VALUES ('In-Bulletin', 'modules/in-bulletin/', 'InPortal\\Modules\\InBulletin', 'bb', DEFAULT, 1, 3, 'in-bulletin/', {TopicCatId}, NULL, NULL);

Property changes on: releases/5.2.2-B2/install/install_data.sql
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.10
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/install/upgrades.php
===================================================================
--- releases/5.2.2-B2/install/upgrades.php	(nonexistent)
+++ releases/5.2.2-B2/install/upgrades.php	(revision 16629)
@@ -0,0 +1,102 @@
+<?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!');
+
+	$upgrade_class = 'InBulletinUpgrades';
+
+	/**
+	 * Class, that holds all upgrade scripts for "In-Bulletin" module
+	 *
+	 */
+	class InBulletinUpgrades extends kUpgradeHelper {
+
+		public function __construct()
+		{
+			parent::__construct();
+
+			$this->dependencies = Array (
+				'4.3.9' => Array ('Core' => '4.3.9'),
+				'5.0.0' => Array ('Core' => '5.0.0'),
+				'5.0.1' => Array ('Core' => '5.0.1'),
+				'5.0.2-B1' => Array ('Core' => '5.0.2-B1'),
+				'5.0.2-B2' => Array ('Core' => '5.0.2-B2'),
+				'5.0.2-RC1' => Array ('Core' => '5.0.2-RC1'),
+				'5.0.2' => Array ('Core' => '5.0.2'),
+				'5.0.3-B1' => Array ('Core' => '5.0.3-B1'),
+				'5.0.3-B2' => Array ('Core' => '5.0.3-B2'),
+				'5.0.3-RC1' => Array ('Core' => '5.0.3-RC1'),
+				'5.0.3' => Array ('Core' => '5.0.3'),
+				'5.0.4-B1' => Array ('Core' => '5.0.4-B1'),
+				'5.0.4-B2' => Array ('Core' => '5.0.4-B2'),
+				'5.0.4' => Array ('Core' => '5.0.4'),
+				'5.1.0-B1' => Array ('Core' => '5.1.0-B1'),
+				'5.1.0-B2' => Array ('Core' => '5.1.0-B2'),
+				'5.1.0-RC1' => Array ('Core' => '5.1.0-RC1'),
+				'5.1.0' => Array ('Core' => '5.1.0'),
+				'5.1.1-B1' => Array ('Core' => '5.1.1-B1'),
+				'5.1.1-B2' => Array ('Core' => '5.1.1-B2'),
+				'5.1.1-RC1' => Array ('Core' => '5.1.1-RC1'),
+				'5.1.1' => Array ('Core' => '5.1.1'),
+				'5.1.2-B1' => Array ('Core' => '5.1.2-B1'),
+				'5.1.2-RC1' => Array ('Core' => '5.1.2-RC1'),
+				'5.1.2' => Array ('Core' => '5.1.2'),
+				'5.1.3-B1' => Array ('Core' => '5.1.3-B1'),
+				'5.1.3-B2' => Array ('Core' => '5.1.3-B2'),
+				'5.1.3-RC1' => Array ('Core' => '5.1.3-RC1'),
+				'5.1.3-RC2' => Array ('Core' => '5.1.3-RC2'),
+				'5.1.3' => Array ('Core' => '5.1.3'),
+				'5.2.0-B1' => Array ('Core' => '5.2.0-B1'),
+				'5.2.0-B2' => Array ('Core' => '5.2.0-B2'),
+				'5.2.0-B3' => Array ('Core' => '5.2.0-B3'),
+				'5.2.0-RC1' => Array ('Core' => '5.2.0-RC1'),
+				'5.2.0' => Array ('Core' => '5.2.0'),
+				'5.2.1-B1' => Array ('Core' => '5.2.1-B1'),
+				'5.2.1-B2' => Array ('Core' => '5.2.1-B2'),
+				'5.2.1-RC1' => Array ('Core' => '5.2.1-RC1'),
+				'5.2.1' => Array ('Core' => '5.2.1'),
+				'5.2.2-B1' => Array ('Core' => '5.2.2-B1'),
+			);
+		}
+
+		/**
+		 * Changes table structure, where multilingual fields of TEXT type are present
+		 *
+		 * @param string $mode when called mode {before, after)
+		 */
+		function Upgrade_5_0_0($mode)
+		{
+			if ($mode == 'after') {
+				$root_category = $this->Application->findModule('Name', 'In-Bulletin', 'RootCat');
+
+				$sql = 'UPDATE ' . $this->Application->getUnitOption('c', 'TableName') . '
+						SET UseMenuIconUrl = 1, MenuIconUrl = "in-bulletin/img/menu_topics.gif"
+						WHERE ' . $this->Application->getUnitOption('c', 'IDField') . ' = ' . $root_category;
+				$this->Conn->Query($sql);
+
+				$this->_updateDetailTemplate('bb', 'inbulletin/post_list', 'in-bulletin/designs/detail');
+			}
+		}
+
+		/**
+		 * Update to 5.0.1, update details template
+		 *
+		 * @param string $mode when called mode {before, after)
+		 */
+		function Upgrade_5_0_1($mode)
+		{
+			if ($mode == 'after') {
+				$this->_updateDetailTemplate('bb', 'in-bulletin/designs/detail', 'in-bulletin/topics/topic_detail');
+			}
+		}
+	}

Property changes on: releases/5.2.2-B2/install/upgrades.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.3
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/install/english.lang
===================================================================
--- releases/5.2.2-B2/install/english.lang	(nonexistent)
+++ releases/5.2.2-B2/install/english.lang	(revision 16629)
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LANGUAGES Version="6">
+	<LANGUAGE Encoding="base64" PackName="English" LocalName="English" DateFormat="m/d/Y" ShortDateFormat="m/d" TimeFormat="g:i A" ShortTimeFormat="g:i A" InputDateFormat="m/d/Y" InputTimeFormat="g:i:s A" DecimalPoint="." ThousandSep="," UnitSystem="2" Locale="en-US" UserDocsUrl="http://docs.in-portal.org/eng/index.php">
+		<EMAILDESIGNS>
+			<HTML>JGJvZHkNCjxici8+PGJyLz4NCg0KU2luY2VyZWx5LDxici8+PGJyLz4NCg0KV2Vic2l0ZSBhZG1pbmlzdHJhdGlvbi4NCg0KPCEtLSMjIDxpbnAyOmVtYWlsLWxvZ19JdGVtTGluayB0ZW1wbGF0ZT0icGxhdGZvcm0vbXlfYWNjb3VudC9lbWFpbCIvPiAjIy0tPg==</HTML>
+		</EMAILDESIGNS>
+		<PHRASES>
+			<PHRASE Label="la_col_CommentedByUser" Module="In-Bulletin" Type="1">VXNlcg==</PHRASE>
+			<PHRASE Label="la_col_LastPostOn" Module="In-Bulletin" Type="1">TGFzdCBQb3N0IE9u</PHRASE>
+			<PHRASE Label="la_col_ModifiedDate" Module="In-Bulletin" Type="1">RGF0ZS9UaW1l</PHRASE>
+			<PHRASE Label="la_col_NumberOfDaysActive" Module="In-Bulletin" Type="1">RGF5cyBBY3RpdmU=</PHRASE>
+			<PHRASE Label="la_col_Posts" Module="In-Bulletin" Type="1">UmVwbGllcw==</PHRASE>
+			<PHRASE Label="la_col_TopicText" Module="In-Bulletin" Type="1">VG9waWM=</PHRASE>
+			<PHRASE Label="la_col_VoteCount" Module="In-Bulletin" Type="1">Vm90ZXM=</PHRASE>
+			<PHRASE Label="la_fld_AllowComments" Module="In-Bulletin" Type="1">QWxsb3cgQ29tbWVudHM=</PHRASE>
+			<PHRASE Label="la_fld_AllowMultipleVotings" Module="In-Bulletin" Type="1">QWxsb3cgTXVsdGlwbGUgVm90aW5ncw==</PHRASE>
+			<PHRASE Label="la_fld_BadWord" Module="In-Bulletin" Type="1" Column="Q2Vuc29yZWQgV29yZA==">Q2Vuc29yZWQgV29yZA==</PHRASE>
+			<PHRASE Label="la_fld_cust_bb_ItemTemplate" Module="In-Bulletin" Type="1">VG9waWNzIEl0ZW0gVGVtcGxhdGU=</PHRASE>
+			<PHRASE Label="la_fld_EndDate" Module="In-Bulletin" Type="1" Column="RW5kIERhdGU=">RW5kIERhdGU=</PHRASE>
+			<PHRASE Label="la_fld_KeyStroke" Module="In-Bulletin" Type="1" Column="S2V5IFN0cm9rZQ==">S2V5IFN0cm9rZQ==</PHRASE>
+			<PHRASE Label="la_fld_PollAnswer" Module="In-Bulletin" Type="1">QW5zd2Vy</PHRASE>
+			<PHRASE Label="la_fld_PollComment" Module="In-Bulletin" Type="1" Column="Q29tbWVudA==">Q29tbWVudA==</PHRASE>
+			<PHRASE Label="la_fld_PollGuestEmail" Module="In-Bulletin" Type="1">R3Vlc3QgRW1haWw=</PHRASE>
+			<PHRASE Label="la_fld_PollGuestName" Module="In-Bulletin" Type="1">R3Vlc3QgTmFtZQ==</PHRASE>
+			<PHRASE Label="la_fld_PostedBy" Module="In-Bulletin" Type="1" Column="UG9zdGVy">UG9zdGVkIEJ5</PHRASE>
+			<PHRASE Label="la_fld_Question" Module="In-Bulletin" Type="1">UXVlc3Rpb24=</PHRASE>
+			<PHRASE Label="la_fld_TopicType" Module="In-Bulletin" Type="1">VG9waWMgTG9ja2Vk</PHRASE>
+			<PHRASE Label="la_fld_Topic_MaxHotNumber" Module="In-Bulletin" Type="1">TWF4aW11bSBudW1iZXIgb2YgSE9UIHRvcGljcw==</PHRASE>
+			<PHRASE Label="la_fld_Topic_MinPopRating" Module="In-Bulletin" Type="1">TWluaW11bSByYXRpbmcgdG8gY29uc2lkZXIgdG9waWMgUE9Q</PHRASE>
+			<PHRASE Label="la_fld_Topic_MinPopVotes" Module="In-Bulletin" Type="1">TWluaW11bSBudW1iZXIgb2YgcG9zdHMgdG8gY29uc2lkZXIgdG9waWMgUE9Q</PHRASE>
+			<PHRASE Label="la_fld_Views" Module="In-Bulletin" Type="1" Column="Vmlld3M=">Vmlld3M=</PHRASE>
+			<PHRASE Label="la_In-bulletin" Module="In-Bulletin" Type="1">SW4tQnVsbGV0aW4=</PHRASE>
+			<PHRASE Label="la_ItemTab_Topics" Module="In-Bulletin" Type="1">VG9waWNz</PHRASE>
+			<PHRASE Label="la_opt_LastPoster" Module="In-Bulletin" Type="1">TGFzdCBQb3N0ZXI=</PHRASE>
+			<PHRASE Label="la_opt_LastUpdated" Module="In-Bulletin" Type="1">TGFzdCBVcGRhdGVk</PHRASE>
+			<PHRASE Label="la_opt_NumberOfPosts" Module="In-Bulletin" Type="1">TnVtYmVyIG9mIFBvc3Rz</PHRASE>
+			<PHRASE Label="la_opt_TopicText" Module="In-Bulletin" Type="1">VG9waWMgVGV4dA==</PHRASE>
+			<PHRASE Label="la_opt_TopicViews" Module="In-Bulletin" Type="1">VG9waWMgVmlld3M=</PHRASE>
+			<PHRASE Label="la_PermName_Topic.Add.Pending_desc" Module="In-Bulletin" Type="1">QWRkIFBlbmRpbmcgVG9waWM=</PHRASE>
+			<PHRASE Label="la_PermName_Topic.Add_desc" Module="In-Bulletin" Type="1">QWRkIFRvcGlj</PHRASE>
+			<PHRASE Label="la_PermName_Topic.Delete_desc" Module="In-Bulletin" Type="1">RGVsZXRlIFRvcGlj</PHRASE>
+			<PHRASE Label="la_PermName_Topic.Lock_desc" Module="In-Bulletin" Type="1">TG9jay9VbmxvY2sgVG9waWNz</PHRASE>
+			<PHRASE Label="la_PermName_Topic.Modify.Pending_desc" Module="In-Bulletin" Type="1">TW9kaWZ5IFRvcGljIFBlbmRpbmc=</PHRASE>
+			<PHRASE Label="la_PermName_Topic.Modify_desc" Module="In-Bulletin" Type="1">TW9kaWZ5IFRvcGlj</PHRASE>
+			<PHRASE Label="la_PermName_Topic.Owner.Delete_desc" Module="In-Bulletin" Type="1">VG9waWMgT3duZXIgRGVsZXRl</PHRASE>
+			<PHRASE Label="la_PermName_Topic.Owner.Modify.Pending_desc" Module="In-Bulletin" Type="1">T3duZXIgTW9kaWZ5IFRvcGljIFBlbmRpbmc=</PHRASE>
+			<PHRASE Label="la_PermName_Topic.Owner.Modify_desc" Module="In-Bulletin" Type="1">VG9waWMgT3duZXIgTW9kaWZ5</PHRASE>
+			<PHRASE Label="la_PermName_Topic.Rate_desc" Module="In-Bulletin" Type="1">UmF0ZSBUb3BpYw==</PHRASE>
+			<PHRASE Label="la_PermName_Topic.Reply.Add_desc" Module="In-Bulletin" Type="1">QWRkIFRvcGljIFJlcGx5</PHRASE>
+			<PHRASE Label="la_PermName_Topic.Reply.Delete_desc" Module="In-Bulletin" Type="1">RGVsZXRlIFRvcGlj</PHRASE>
+			<PHRASE Label="la_PermName_Topic.Reply.Modify_desc" Module="In-Bulletin" Type="1">UmVwbHkgVG9waWMgTW9kaWZ5</PHRASE>
+			<PHRASE Label="la_PermName_Topic.Reply.Owner.Delete_desc" Module="In-Bulletin" Type="1">UG9zdCBPd25lciBEZWxldGU=</PHRASE>
+			<PHRASE Label="la_PermName_Topic.Reply.Owner.Modify_desc" Module="In-Bulletin" Type="1">UG9zdCBPd25lciBNb2RpZnk=</PHRASE>
+			<PHRASE Label="la_PermName_Topic.Reply.View_desc" Module="In-Bulletin" Type="1">VmlldyBUb3BpYyBSZXBseQ==</PHRASE>
+			<PHRASE Label="la_PermName_Topic.Review_desc" Module="In-Bulletin" Type="1">Q29tbWVudCBUb3BpYw==</PHRASE>
+			<PHRASE Label="la_PermName_Topic.View_desc" Module="In-Bulletin" Type="1">VmlldyBUb3BpYw==</PHRASE>
+			<PHRASE Label="la_posts_perpage_prompt" Module="In-Bulletin" Type="1">TnVtYmVyIG9mIHBvc3RzIHBlciBwYWdl</PHRASE>
+			<PHRASE Label="la_posts_subheading" Module="In-Bulletin" Type="1">UG9zdHM=</PHRASE>
+			<PHRASE Label="la_prompt_ActiveTopics" Module="In-Bulletin" Type="1">QWN0aXZlIFRvcGljcw==</PHRASE>
+			<PHRASE Label="la_prompt_DupPollComments" Module="In-Bulletin" Type="1">QWxsb3cgRHVwbGljYXRlIENvbW1lbnRz</PHRASE>
+			<PHRASE Label="la_prompt_EditorsPickTopics" Module="In-Bulletin" Type="1">RWRpdG9yIFBpY2sgVG9waWNz</PHRASE>
+			<PHRASE Label="la_prompt_HotTopics" Module="In-Bulletin" Type="1">SG90IFRvcGljcw==</PHRASE>
+			<PHRASE Label="la_prompt_LastUpdatedPostDate" Module="In-Bulletin" Type="1">TGFzdCBVcGRhdGVkIFBvc3QgRGF0ZQ==</PHRASE>
+			<PHRASE Label="la_prompt_LastUpdatedPostTime" Module="In-Bulletin" Type="1">TGFzdCBVcGRhdGVkIFBvc3QgVGltZQ==</PHRASE>
+			<PHRASE Label="la_prompt_LastUpdatedTopicDate" Module="In-Bulletin" Type="1">TGFzdCBVcGRhdGVkIFRvcGljIERhdGU=</PHRASE>
+			<PHRASE Label="la_prompt_LastUpdatedTopicTime" Module="In-Bulletin" Type="1">TGFzdCBVcGRhdGVkIFRvcGljIFRpbWU=</PHRASE>
+			<PHRASE Label="la_prompt_MaxTopicHits" Module="In-Bulletin" Type="1">VG9waWMgTWF4aW11bSBIaXRz</PHRASE>
+			<PHRASE Label="la_prompt_MaxTopicVotes" Module="In-Bulletin" Type="1">VG9waWMgTWF4aW11bSBWb3Rlcw==</PHRASE>
+			<PHRASE Label="la_prompt_NewestPostDate" Module="In-Bulletin" Type="1">TmV3ZXN0IFBvc3QgRGF0ZQ==</PHRASE>
+			<PHRASE Label="la_prompt_NewestPostTime" Module="In-Bulletin" Type="1">TmV3ZXN0IFBvc3QgVGltZQ==</PHRASE>
+			<PHRASE Label="la_prompt_NewestTopicDate" Module="In-Bulletin" Type="1">TmV3ZXN0IFRvcGljIERhdGU=</PHRASE>
+			<PHRASE Label="la_prompt_NewestTopicTime" Module="In-Bulletin" Type="1">TmV3ZXN0IFRvcGljIFRpbWU=</PHRASE>
+			<PHRASE Label="la_prompt_NewTopics" Module="In-Bulletin" Type="1">TmV3IFRvcGljcw==</PHRASE>
+			<PHRASE Label="la_prompt_PopularTopics" Module="In-Bulletin" Type="1">UG9wdWxhciBUb3BpY3M=</PHRASE>
+			<PHRASE Label="la_prompt_PostsToLock" Module="In-Bulletin" Type="1">UG9zdHMgdG8gbG9jaw==</PHRASE>
+			<PHRASE Label="la_prompt_PostsTotal" Module="In-Bulletin" Type="1">VG90YWwgUG9zdHM=</PHRASE>
+			<PHRASE Label="la_prompt_TopicAverageRating" Module="In-Bulletin" Type="1">VG9waWNzIEF2ZXJhZ2UgUmF0aW5n</PHRASE>
+			<PHRASE Label="la_prompt_TopicReviews" Module="In-Bulletin" Type="1">VG90YWwgVG9waWMgQ29tbWVudHM=</PHRASE>
+			<PHRASE Label="la_prompt_TopicsActive" Module="In-Bulletin" Type="1">QWN0aXZlIFRvcGljcw==</PHRASE>
+			<PHRASE Label="la_prompt_TopicsDisabled" Module="In-Bulletin" Type="1">RGlzYWJsZWQgVG9waWNz</PHRASE>
+			<PHRASE Label="la_prompt_TopicsPending" Module="In-Bulletin" Type="1">UGVuZGluZyBUb3BpY3M=</PHRASE>
+			<PHRASE Label="la_prompt_TopicsTotal" Module="In-Bulletin" Type="1">VG90YWwgVG9waWNz</PHRASE>
+			<PHRASE Label="la_prompt_TopicsUsers" Module="In-Bulletin" Type="1">VG90YWwgVXNlcnMgd2l0aCBUb3BpY3M=</PHRASE>
+			<PHRASE Label="la_section_Topic" Module="In-Bulletin" Type="1">VG9waWM=</PHRASE>
+			<PHRASE Label="la_tab_ConfigCensorship" Module="In-Bulletin" Type="1">Q2Vuc29yc2hpcA==</PHRASE>
+			<PHRASE Label="la_tab_ConfigSmileys" Module="In-Bulletin" Type="1">U21pbGV5cw==</PHRASE>
+			<PHRASE Label="la_tab_PollAnswers" Module="In-Bulletin" Type="1">QW5zd2Vycw==</PHRASE>
+			<PHRASE Label="la_tab_PollUserComments" Module="In-Bulletin" Type="1">VXNlciBDb21tZW50cw==</PHRASE>
+			<PHRASE Label="la_tab_Topics" Module="In-Bulletin" Type="1">VG9waWNz</PHRASE>
+			<PHRASE Label="la_Text_Polls" Module="In-Bulletin" Type="1">UG9sbCBTZXR0aW5ncw==</PHRASE>
+			<PHRASE Label="la_Text_Topic" Module="In-Bulletin" Type="1">VG9waWM=</PHRASE>
+			<PHRASE Label="la_Text_Topics" Module="In-Bulletin" Type="1">VG9waWNz</PHRASE>
+			<PHRASE Label="la_title_AddingCensorship" Module="In-Bulletin" Type="1">QWRkaW5nIENlbnNvcnNoaXA=</PHRASE>
+			<PHRASE Label="la_title_AddingSmiley" Module="In-Bulletin" Type="1">QWRkaW5nIFNtaWxleQ==</PHRASE>
+			<PHRASE Label="la_title_AddingTopic" Module="In-Bulletin" Type="1">QWRkaW5nIFRvcGlj</PHRASE>
+			<PHRASE Label="la_title_Adding_Answer" Module="In-Bulletin" Type="1">QWRkaW5nIEFuc3dlcg==</PHRASE>
+			<PHRASE Label="la_title_Adding_Comment" Module="In-Bulletin" Type="1">QWRkaW5nIENvbW1lbnQ=</PHRASE>
+			<PHRASE Label="la_title_Adding_Poll" Module="In-Bulletin" Type="1">QWRkaW5nIFBvbGw=</PHRASE>
+			<PHRASE Label="la_title_EditingCensorship" Module="In-Bulletin" Type="1">RWRpdGluZyBDZW5zb3JzaGlw</PHRASE>
+			<PHRASE Label="la_title_EditingSmiley" Module="In-Bulletin" Type="1">RWRpdGluZyBTbWlsZXk=</PHRASE>
+			<PHRASE Label="la_title_EditingTopic" Module="In-Bulletin" Type="1">RWRpdGluZyBUb3BpYw==</PHRASE>
+			<PHRASE Label="la_title_Editing_Answer" Module="In-Bulletin" Type="1">RWRpdGluZyBBbnN3ZXI=</PHRASE>
+			<PHRASE Label="la_title_Editing_Comment" Module="In-Bulletin" Type="1">RWRpdGluZyBDb21tZW50</PHRASE>
+			<PHRASE Label="la_title_Editing_Poll" Module="In-Bulletin" Type="1">RWRpdGluZyBQb2xs</PHRASE>
+			<PHRASE Label="la_title_In-Bulletin" Module="In-Bulletin" Type="1">VG9waWNz</PHRASE>
+			<PHRASE Label="la_title_NewComment" Module="In-Bulletin" Type="1">TmV3IENvbW1lbnQ=</PHRASE>
+			<PHRASE Label="la_title_NewPoll" Module="In-Bulletin" Type="1">TmV3IFBvbGw=</PHRASE>
+			<PHRASE Label="la_title_NewTopic" Module="In-Bulletin" Type="1">TmV3IFRvcGlj</PHRASE>
+			<PHRASE Label="la_title_New_Answer" Module="In-Bulletin" Type="1">TmV3IEFuc3dlcg==</PHRASE>
+			<PHRASE Label="la_title_PollAnswers" Module="In-Bulletin" Type="1">UG9sbCBBbnN3ZXJz</PHRASE>
+			<PHRASE Label="la_title_PollComments" Module="In-Bulletin" Type="1">VXNlciBDb21tZW50cw==</PHRASE>
+			<PHRASE Label="la_title_Polls" Module="In-Bulletin" Type="1">UG9sbHM=</PHRASE>
+			<PHRASE Label="la_title_Topics" Module="In-Bulletin" Type="1">VG9waWNz</PHRASE>
+			<PHRASE Label="la_ToolTip_NewPoll" Module="In-Bulletin" Type="1">TmV3IFBvbGw=</PHRASE>
+			<PHRASE Label="la_ToolTip_NewTopic" Module="In-Bulletin" Type="1">TmV3IFRvcGlj</PHRASE>
+			<PHRASE Label="la_ToolTip_New_Answer" Module="In-Bulletin" Type="1">TmV3IEFuc3dlcg==</PHRASE>
+			<PHRASE Label="la_ToolTip_New_Comment" Module="In-Bulletin" Type="1">TmV3IENvbW1lbnQ=</PHRASE>
+			<PHRASE Label="la_ToolTip_ResetVotes" Module="In-Bulletin" Type="1">UmVzZXQgVm90ZXM=</PHRASE>
+			<PHRASE Label="la_topic_editorpicksabove_prompt" Module="In-Bulletin" Type="1">RGlzcGxheSBlZGl0b3IgcGlja3MgYWJvdmUgcmVndWxhciB0b3BpY3M=</PHRASE>
+			<PHRASE Label="la_topic_newdays_prompt" Module="In-Bulletin" Type="1">TmV3IFRvcGljcyAoRGF5cyk=</PHRASE>
+			<PHRASE Label="la_topic_perpage_prompt" Module="In-Bulletin" Type="1">TnVtYmVyIG9mIHRvcGljcyBwZXIgcGFnZQ==</PHRASE>
+			<PHRASE Label="la_topic_perpage_short_prompt" Module="In-Bulletin" Type="1">VG9waWNzIFBlciBQYWdlIChTaG9ydGxpc3Qp</PHRASE>
+			<PHRASE Label="la_topic_sortfield2_prompt" Module="In-Bulletin" Type="1">QW5kIHRoZW4gYnk=</PHRASE>
+			<PHRASE Label="la_topic_sortfield_prompt" Module="In-Bulletin" Type="1">U29ydCB0b3BpY3MgYnk=</PHRASE>
+			<PHRASE Label="lc_field_lastpostid" Module="In-Bulletin" Type="2">TGFzdCBQb3N0IElE</PHRASE>
+			<PHRASE Label="lc_field_postedby" Module="In-Bulletin" Type="2">UG9zdGVkIEJ5</PHRASE>
+			<PHRASE Label="lc_field_topicid" Module="In-Bulletin" Type="2">VG9waWMgSUQ=</PHRASE>
+			<PHRASE Label="lc_field_topictext" Module="In-Bulletin" Type="2">VG9waWMgVGV4dA==</PHRASE>
+		</PHRASES>
+		<EVENTS>
+			<EVENT Event="PM.ADD" Type="0">
+				<SUBJECT>TmV3IFByaXZhdGUgTWVzc2FnZQ==</SUBJECT>
+				<HTMLBODY>WW91IGhhdmUgYSBuZXcgcHJpdmF0ZSBtZXNzYWdlIGhhcyBhcnJpdmVkLg==</HTMLBODY>
+			</EVENT>
+			<EVENT Event="POST.ADD" Type="0">
+				<SUBJECT>TmV3IFRvcGljIFJlcGx5IGhhcyBiZWVuIGFkZGVk</SUBJECT>
+				<HTMLBODY>TmV3IHJlcGx5IGhhcyBiZWVuIGFkZGVkIHRvIG9uZSBvZiB5b3VyIHRvcGljczogPGEgaHJlZj0iPGlucDI6YmJfVG9waWNMaW5rIHRlbXBsYXRlPSJfX2RlZmF1bHRfXyIvPiI+PGlucDI6YmJfRmllbGQgbmFtZT0iVG9waWNUZXh0Ii8+PC9hPg==</HTMLBODY>
+			</EVENT>
+			<EVENT Event="POST.ADD" Type="1">
+				<SUBJECT>TmV3IFRvcGljIFJlcGx5IGhhcyBiZWVuIEFkZGVk</SUBJECT>
+				<HTMLBODY>TmV3IHJlcGx5IGhhcyBiZWVuIGFkZGVkIHRvIHRoZSBUb3BpYzogIDxhIGhyZWY9IjxpbnAyOmJiX1RvcGljTGluayB0ZW1wbGF0ZT0iX19kZWZhdWx0X18iLz4iPjxpbnAyOmJiX0ZpZWxkIG5hbWU9IlRvcGljVGV4dCIvPjwvYT4=</HTMLBODY>
+			</EVENT>
+			<EVENT Event="POST.ADD.SUB" Type="0">
+				<SUBJECT>TmV3IFJlcGx5IGhhcyBiZWVuIGFkZGVkIHRvIFRvcGljICI8aW5wMjpiYl9GaWVsZCBuYW1lPSdUb3BpY1RleHQnLz4i</SUBJECT>
+				<HTMLBODY>TmV3IHJlcGx5IGhhcyBiZWVuIGFkZGVkIHRvIDxhIGhyZWY9IjxpbnAyOmJiX1RvcGljTGluayB0ZW1wbGF0ZT0nX19kZWZhdWx0X18nLz4iPjxpbnAyOmJiX0ZpZWxkIG5hbWU9IlRvcGljVGV4dCIvPjwvYT4gdG9waWMuPGJyLz4NCjxici8+DQo8YnIvPg0KU3ViamVjdDogPGlucDI6RmllbGQgbmFtZT0iU3ViamVjdCIvPjxici8+DQpNZXNzYWdlOjxici8+DQo8aW5wMjpGaWVsZCBuYW1lPSJQb3N0aW5nVGV4dCIgbmwyYnI9IjEiLz4=</HTMLBODY>
+			</EVENT>
+			<EVENT Event="POST.MODIFY" Type="1">
+				<SUBJECT>UG9zdCBoYXMgYmVlbiBNb2RpZmllZA==</SUBJECT>
+				<HTMLBODY>QSBwb3N0IGhhcyBiZWVuIG1vZGlmaWVkLg==</HTMLBODY>
+			</EVENT>
+			<EVENT Event="TOPIC.ADD" Type="0">
+				<SUBJECT>TmV3IFRvcGljICI8aW5wMjpiYl9GaWVsZCBuYW1lPSJUb3BpY1RleHQiLz4iIGhhcyBiZWVuIHN1Ym1pdHRlZA==</SUBJECT>
+				<HTMLBODY>TmV3IFRvcGljIGhhcyBiZWVuIHN1Ym1pdHRlZCBvbiA8aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+PGJyPjxicj4NCg0KVG9waWM6IDxpbnAyOmJiX0ZpZWxkIG5hbWU9IlRvcGljVGV4dCIvPg==</HTMLBODY>
+			</EVENT>
+			<EVENT Event="TOPIC.ADD" Type="1">
+				<SUBJECT>TmV3IFRvcGljICI8aW5wMjpiYl9GaWVsZCBuYW1lPSJUb3BpY1RleHQiLz4iIGhhcyBiZWVuIHN1Ym1pdHRlZA==</SUBJECT>
+				<HTMLBODY>TmV3IFRvcGljIGhhcyBiZWVuIHN1Ym1pdHRlZCBvbiA8aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+PGJyPjxicj4NCg0KVG9waWM6IDxpbnAyOmJiX0ZpZWxkIG5hbWU9IlRvcGljVGV4dCIvPg==</HTMLBODY>
+			</EVENT>
+			<EVENT Event="TOPIC.ADD.PENDING" Type="0">
+				<SUBJECT>TmV3IHRvcGljICI8aW5wMjpiYl9GaWVsZCBuYW1lPSJUb3BpY1RleHQiLz4iIGlzIHBlbmRpbmc=</SUBJECT>
+				<HTMLBODY>WW91ciB0b3BpYyBpcyByZWNlaXZlZCBhbmQgcGVuZGluZyBmb3IgYWRtaW5pc3RyYXRpdmUgYXBwcm92YWw8YnI+PGJyPg0KDQpUb3BpYzogPGlucDI6YmJfRmllbGQgbmFtZT0iVG9waWNUZXh0Ii8+</HTMLBODY>
+			</EVENT>
+			<EVENT Event="TOPIC.ADD.PENDING" Type="1">
+				<SUBJECT>TmV3IFRvcGljICI8aW5wMjpiYl9GaWVsZCBuYW1lPSJUb3BpY1RleHQiLz4iIGlzIHBlbmRpbmc=</SUBJECT>
+				<HTMLBODY>TmV3IHRvcGljIGhhcyBiZWVuIHN1Ym1pdHRlZCBhbmQgcGVuZGluZyBmb3IgeW91ciBhcHByb3ZhbC48YnI+PGJyPg0KDQpUb3BpYzogPGlucDI6YmJfRmllbGQgbmFtZT0iVG9waWNUZXh0Ii8+</HTMLBODY>
+			</EVENT>
+			<EVENT Event="TOPIC.ADD.SUB" Type="0">
+				<SUBJECT>TmV3IFRvcGljICI8aW5wMjpiYl9GaWVsZCBuYW1lPSdUb3BpY1RleHQnLz4iIGhhcyBiZWVuIHN1Ym1pdHRlZA==</SUBJECT>
+				<HTMLBODY>TmV3IFRvcGljIDxhIGhyZWY9IjxpbnAyOmJiX1RvcGljTGluayB0ZW1wbGF0ZT0nX19kZWZhdWx0X18nLz4iPjxpbnAyOmJiX0ZpZWxkIG5hbWU9IlRvcGljVGV4dCIvPjwvYT4gaGFzIGJlZW4gc3VibWl0dGVkIG9uIDxpbnAyOm1fTGluayB0ZW1wbGF0ZT0iaW5kZXgiLz48YnIvPg0KPGJyLz4NCjxici8+DQo8aW5wMjpiYl9GaWVsZCBuYW1lPSJQb3N0aW5nVGV4dCIgbmwyYnI9IjEiLz4=</HTMLBODY>
+			</EVENT>
+			<EVENT Event="TOPIC.APPROVE" Type="0">
+				<SUBJECT>VG9waWMgIjxpbnAyOmJiX0ZpZWxkIG5hbWU9IlRvcGljVGV4dCIvPiIgaXMgYXBwcm92ZWQ=</SUBJECT>
+				<HTMLBODY>WW91ciB0b3BpYyBoYXMgYmVlbiBhcHByb3ZlZCBvbiA8aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+PGJyPjxicj4NCg0KVG9waWM6IDxpbnAyOmJiX0ZpZWxkIG5hbWU9IlRvcGljVGV4dCIvPg==</HTMLBODY>
+			</EVENT>
+			<EVENT Event="TOPIC.MODIFY" Type="0">
+				<SUBJECT>VG9waWMgVXBkYXRlZCAiPGlucDI6YmJfRmllbGQgbmFtZT0iVG9waWNUZXh0Ii8+Ig==</SUBJECT>
+				<HTMLBODY>WW91ciB0b3BpYyBoYXMgYmVlbiB1cGRhdGVkLjxicj48YnI+DQoNClRvcGljOiA8aW5wMjpiYl9GaWVsZCBuYW1lPSJUb3BpY1RleHQiLz4NCg0K</HTMLBODY>
+			</EVENT>
+			<EVENT Event="TOPIC.MODIFY" Type="1">
+				<SUBJECT>VG9waWMgVXBkYXRlZCBUb3BpYyAiPGlucDI6YmJfRmllbGQgbmFtZT0iVG9waWNUZXh0Ii8+Ig==</SUBJECT>
+				<HTMLBODY>VXNlciB1cGRhdGVkIHRoZSB0b3BpYy48YnI+PGJyPg0KDQpUb3BpYzogPGlucDI6YmJfRmllbGQgbmFtZT0iVG9waWNUZXh0Ii8+</HTMLBODY>
+			</EVENT>
+			<EVENT Event="TOPIC.MODIFY.PENDING" Type="0">
+				<SUBJECT>VG9waWMgTW9kaWZpY2F0aW9ucyAiPGlucDI6YmJfRmllbGQgbmFtZT0iVG9waWNUZXh0Ii8+IiBwZW5kaW5n</SUBJECT>
+				<HTMLBODY>VG9waWMgbW9kaWZpY2F0aW9ucyBhcmUgcGVuZGluZyBmb3IgYWRtaW5pc3RyYXRpdmUgYXBwcm92YWwuPGJyPjxicj4NCg0KVG9waWM6IDxpbnAyOmJiX0ZpZWxkIG5hbWU9IlRvcGljVGV4dCIvPg==</HTMLBODY>
+			</EVENT>
+			<EVENT Event="TOPIC.MODIFY.PENDING" Type="1">
+				<SUBJECT>VG9waWMgTW9kaWZpY2F0aW9ucyAiPGlucDI6YmJfRmllbGQgbmFtZT0iVG9waWNUZXh0Ii8+IiBwZW5kaW5n</SUBJECT>
+				<HTMLBODY>VXNlciBzdWJtaXR0ZWQgdG8gdG9waWMgbW9kaWZpY2F0aW9ucyBhbmQgcGVuZGluZyBmb3IgYXBwcm92YWwuPGJyPjxicj4NCg0KVG9waWM6IDxpbnAyOmJiX0ZpZWxkIG5hbWU9IlRvcGljVGV4dCIvPg==</HTMLBODY>
+			</EVENT>
+		</EVENTS>
+	</LANGUAGE>
+</LANGUAGES>
\ No newline at end of file

Property changes on: releases/5.2.2-B2/install/english.lang
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.9
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/install/prerequisites.php
===================================================================
--- releases/5.2.2-B2/install/prerequisites.php	(nonexistent)
+++ releases/5.2.2-B2/install/prerequisites.php	(revision 16629)
@@ -0,0 +1,80 @@
+<?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!');
+
+	$prerequisite_class = 'InBulletinPrerequisites';
+
+	/**
+	 * Class, that holds all prerequisite scripts for "In-Bulletin" module
+	 *
+	 */
+	class InBulletinPrerequisites extends kHelper {
+
+		/**
+		 * Install toolkit instance
+		 *
+		 * @var kInstallToolkit
+		 */
+		var $_toolkit = null;
+
+		/**
+		 * Sets common instance of installator toolkit
+		 *
+		 * @param kInstallToolkit $instance
+		 */
+		function setToolkit(&$instance)
+		{
+			$this->_toolkit =& $instance;
+		}
+
+		/**
+		 * Checks minimal version, that could be upgradeable
+		 *
+		 * @param Array $versions
+		 * @param string $mode when called mode {install, upgrade, standalone)
+		 * @return Array
+		 */
+		function CheckPrerequisites($versions, $mode)
+		{
+			$errors = Array ();
+
+			if ($mode == 'standalone') {
+				if (!$this->Application->isModuleEnabled('In-Portal')) {
+					$errors[] = 'Please install or enable "In-Portal" module first';
+				}
+			}
+
+			if ($mode == 'upgrade') {
+				$sql = 'SELECT Version
+						FROM ' . TABLE_PREFIX . 'Modules
+						WHERE Name = "In-Portal"';
+				$inportal_version = $this->Conn->GetOne($sql);
+
+				if ($inportal_version === false) {
+					// only, when In-Portal was installed
+					return $errors;
+				}
+
+				$min_version = '4.3.1';
+
+				$current_version = $this->_toolkit->ConvertModuleVersion($inportal_version);
+				$needed_version = $this->_toolkit->ConvertModuleVersion($min_version);
+				if ($current_version < $needed_version) {
+					$errors[] = 'Please upgrade "In-Portal" to version ' . $min_version;
+				}
+			}
+
+			return $errors;
+		}
+	}

Property changes on: releases/5.2.2-B2/install/prerequisites.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.3
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/install/install_order.txt
===================================================================
--- releases/5.2.2-B2/install/install_order.txt	(nonexistent)
+++ releases/5.2.2-B2/install/install_order.txt	(revision 16629)
@@ -0,0 +1 @@
+104
\ No newline at end of file

Property changes on: releases/5.2.2-B2/install/install_order.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/install/module_info.xml
===================================================================
--- releases/5.2.2-B2/install/module_info.xml	(nonexistent)
+++ releases/5.2.2-B2/install/module_info.xml	(revision 16629)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<module_info>
+	<name>In-Bulletin</name>
+	<description>Discussion Forum</description>
+	<image>modules/in-bulletin/install/img/icon_discussion_forum.gif</image>
+</module_info>
\ No newline at end of file

Property changes on: releases/5.2.2-B2/install/module_info.xml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/install/install_schema.sql
===================================================================
--- releases/5.2.2-B2/install/install_schema.sql	(nonexistent)
+++ releases/5.2.2-B2/install/install_schema.sql	(revision 16629)
@@ -0,0 +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) 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) 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

Property changes on: releases/5.2.2-B2/install/install_schema.sql
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.6
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/install/.htaccess
===================================================================
--- releases/5.2.2-B2/install/.htaccess	(nonexistent)
+++ releases/5.2.2-B2/install/.htaccess	(revision 16629)
@@ -0,0 +1 @@
+deny from all
\ No newline at end of file

Property changes on: releases/5.2.2-B2/install/.htaccess
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/install/remove_schema.sql
===================================================================
--- releases/5.2.2-B2/install/remove_schema.sql	(nonexistent)
+++ releases/5.2.2-B2/install/remove_schema.sql	(revision 16629)
@@ -0,0 +1,11 @@
+DROP TABLE Posting;
+DROP TABLE Topic;
+DROP TABLE Censorship;
+DROP TABLE Emoticon;
+DROP TABLE PrivateMessageBody;
+DROP TABLE PrivateMessages;
+DROP TABLE TopicCustomData;
+DROP TABLE Polls;
+DROP TABLE PollsAnswers;
+DROP TABLE PollsComments;
+DROP TABLE PollsStatistics;
\ No newline at end of file

Property changes on: releases/5.2.2-B2/install/remove_schema.sql
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/install/img/.htaccess
===================================================================
--- releases/5.2.2-B2/install/img/.htaccess	(nonexistent)
+++ releases/5.2.2-B2/install/img/.htaccess	(revision 16629)
@@ -0,0 +1 @@
+allow from all
\ No newline at end of file

Property changes on: releases/5.2.2-B2/install/img/.htaccess
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: releases/5.2.2-B2/install/img/icon_discussion_forum.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: releases/5.2.2-B2/install/img/icon_discussion_forum.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: releases/5.2.2-B2/install.php
===================================================================
--- releases/5.2.2-B2/install.php	(nonexistent)
+++ releases/5.2.2-B2/install.php	(revision 16629)
@@ -0,0 +1,58 @@
+<?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.
+*/
+$module_folder = 'modules/in-bulletin';
+
+if ( !defined('IS_INSTALL') ) {
+	// separate module install
+	define('IS_INSTALL', 1);
+	define('ADMIN', 1);
+	define('FULL_PATH', realpath(dirname(__FILE__) . '/../..'));
+
+	include_once(FULL_PATH . '/core/kernel/startup.php');
+	require_once FULL_PATH . '/core/install/install_toolkit.php';
+
+	$constants_file = FULL_PATH . '/' . $module_folder . '/constants.php';
+
+	if ( file_exists($constants_file) ) {
+		require_once $constants_file;
+	}
+
+	$toolkit = new kInstallToolkit();
+}
+else {
+	// install, using installation wizard
+	/** @var kInstallToolkit $toolkit */
+	$toolkit =& $this->toolkit;
+}
+
+$application =& kApplication::Instance();
+$application->Init();
+
+if ( $application->RecallVar('user_id') != USER_ROOT ) {
+	die('restricted access!');
+}
+
+$category =& $toolkit->createModuleCategory('Forums', 'Discussion Forums', '#in-bulletin/section_design#', 'in-bulletin/img/menu_topics.gif');
+
+$toolkit->RunSQL('/' . $module_folder . '/install/install_schema.sql');
+$toolkit->RunSQL('/' . $module_folder . '/install/install_data.sql', '{TopicCatId}', $category->GetID());
+$toolkit->ImportLanguage('/' . $module_folder . '/install/english', isset($constants_file));
+
+$toolkit->SetModuleRootCategory(basename($module_folder), $category->GetID());
+
+//$toolkit->linkCustomFields(basename($module_folder), 'bb', 3); // to create Custom Fields for Topics
+$toolkit->linkCustomFields('KERNEL', 'c', 1); // to create ItemTemplate custom field
+$toolkit->setModuleItemTemplate($category, 'bb', '#in-bulletin/item_design#');
+
+$toolkit->finalizeModuleInstall($module_folder, true);

Property changes on: releases/5.2.2-B2/install.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2/constants.php
===================================================================
--- releases/5.2.2-B2/constants.php	(nonexistent)
+++ releases/5.2.2-B2/constants.php	(revision 16629)
@@ -0,0 +1,23 @@
+<?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.
+*/
+
+	// Private Message Statuses: 0 - Unread, 1 - Viewed', 2 - Read, 3 - Replyed, 4 - Sent
+	define('PM_STATUS_UNREAD', 0);
+	define('PM_STATUS_READ', 2);
+
+	// Private Message Folders
+	define('PM_FOLDER_INBOX', 0);
+	define('PM_FOLDER_SENT', -1);
+
+	define('SMILEYS_PATH', IMAGES_PATH.'emoticons/');
\ No newline at end of file

Property changes on: releases/5.2.2-B2/constants.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: releases/5.2.2-B2
===================================================================
--- releases/5.2.2-B2	(nonexistent)
+++ releases/5.2.2-B2	(revision 16629)

Property changes on: releases/5.2.2-B2
___________________________________________________________________
Added: bugtraq:logregex
## -0,0 +1,2 ##
+(?:[Bb]ugs?|[Ii]ssues?|[Rr]eports?|[Ff]ixe?s?|[Rr]esolves?)+\s+(?:#?(?:\d+)[,\.\s]*)+
+(\d+)
\ No newline at end of property
Added: bugtraq:url
## -0,0 +1 ##
+http://tracker.in-portal.org/view.php?id=%BUGID%
\ No newline at end of property
Added: bugtraq:warnifnoissue
## -0,0 +1 ##
+false
\ No newline at end of property
Added: svn:mergeinfo
## -0,0 +0,11 ##
   Merged /modules/in-bulletin/releases/5.0.2:r13079-13092
   Merged /modules/in-bulletin/releases/5.1.1:r14075-14087
   Merged /modules/in-bulletin/branches/5.0.x:r12744-13726
   Merged /modules/in-bulletin/releases/5.0.3:r13509-13547
   Merged /modules/in-bulletin/releases/5.1.2:r14311-14567
   Merged /in-bulletin/releases/5.0.1:r12620-12652
   Merged /modules/in-bulletin/branches/5.1.x:r13839-14550
   Merged /modules/in-bulletin/releases/5.0.4:r13727-13743
   Merged /modules/in-bulletin/releases/5.1.3:r14551-14580
   Merged /in-bulletin/branches/5.0.x:r12120-12743
   Merged /modules/in-bulletin/branches/5.3.x:r15655,15970,16216
Added: tsvn:autoprops
## -0,0 +1,19 ##
+*.php = svn:eol-style=LF;svn:keywords=Id
+*.tpl = svn:eol-style=LF
+*.sql = svn:eol-style=LF
+*.lang = svn:eol-style=LF
+*.sh = svn:eol-style=LF;svn:executable
+*.txt = svn:eol-style=LF
+*.html = svn:eol-style=LF
+*.htm = svn:eol-style=LF
+*.css = svn:eol-style=LF
+*.js = svn:eol-style=LF
+*.xml = svn:eol-style=LF
+.htaccess = svn:eol-style=LF
+.smsignore = svn:eol-style=LF
+COPYRIGHT = svn:eol-style=LF
+CREDITS = svn:eol-style=LF
+INSTALL = svn:eol-style=LF
+LICENSE = svn:eol-style=LF
+LICENSES = svn:eol-style=LF
+README = svn:eol-style=LF
\ No newline at end of property