Page MenuHomeIn-Portal Phabricator

in-link
No OneTemporary

File Metadata

Created
Mon, Jan 6, 3:27 AM
Index: branches/5.0.x/in-link/units/link_validation/link_validation_config.php
===================================================================
--- branches/5.0.x/in-link/units/link_validation/link_validation_config.php (revision 12697)
+++ branches/5.0.x/in-link/units/link_validation/link_validation_config.php (revision 12698)
@@ -1,182 +1,182 @@
<?php
/**
* @version $Id$
* @package In-Link
* @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.net/license/ for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => 'link-validation',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'LinkValidationEventHandler', 'file' => 'link_validation_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'LinkValidationTagProcessor', 'file' => 'link_validation_tp.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'Hooks' => Array (
Array (
'Mode' => hAFTER,
'Conditional' => true,
'HookToPrefix' => 'l',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnPrepareLinkEditing',
),
),
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'RegularEvents' => Array (
'link_validation' => Array ('EventName' => 'OnCronValidation', 'RunInterval' => 3600*24, 'Type' => reAFTER),
),
'IDField' => 'LinkValidationId',
'TableName' => TABLE_PREFIX.'LinkValidation',
'StatusField' => Array ('ValidationStatus', 'LinkStatus'),
'TitlePresets' => Array (
'link_validation_list' => Array ('prefixes' => Array ('link-validation_List'), 'format' => "!la_tab_LinkValidation!"),
'link_validation_progress' => Array ('format' => '!la_tab_ValidatingLinks!'),
),
'PermSection' => Array('main' => 'in-link:link_validation'),
'Sections' => Array (
'in-link:link_validation' => Array (
'parent' => 'in-link',
'icon' => 'in-link:validate',
'label' => 'la_tab_LinkValidation',
'url' => Array('t' => 'in-link/link_validation/link_validation_list', 'pass' => 'm'),
'permissions' => Array('view', 'advanced:continue', 'advanced:restart', 'advanced:validate', 'advanced:reset'),
'priority' => 3,
'type' => stTREE,
),
),
'FilterMenu' => Array (
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array('show_valid', 'show_invalid', 'show_not_validated'), 'type' => WHERE_FILTER),
),
'Filters' => Array (
'show_valid' => Array ('label' =>'la_Text_Valid', 'on_sql' => '', 'off_sql' => '%1$s.ValidationStatus != ' . LINK_VALIDATION_VALID . ' OR %1$s.ValidationStatus IS NULL'),
'show_invalid' => Array ('label' => 'la_Text_Invalid', 'on_sql' => '', 'off_sql' => '%1$s.ValidationStatus != ' . LINK_VALIDATION_INVALID . ' OR %1$s.ValidationStatus IS NULL'),
'show_not_validated' => Array ('label' => 'la_Text_Not_Validated', 'on_sql' => '', 'off_sql' => '%1$s.ValidationStatus != ' . LINK_VALIDATION_NOT_VALIDATED . ' OR %1$s.ValidationStatus IS NOT NULL'),
)
),
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM ' . TABLE_PREFIX . 'Link l
LEFT JOIN %1$s ON %1$s.LinkId = l.LinkId
LEFT JOIN ' . TABLE_PREFIX . 'CategoryItems ci ON ci.ItemResourceId = l.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category c ON c.CategoryId = ci.CategoryId',
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('LinkValidationId' => 'desc'),
)
),
'CalculatedFields' => Array (
'' => Array (
'ForeignLinkId' => 'l.LinkId',
'LinkName' => 'l.Name',
'LinkUrl' => 'l.Url',
'LinkCreatedOn' => 'l.CreatedOn',
'LinkStatus' => 'l.Status',
'LinkValidationStatus' => 'IF(%1$s.ValidationStatus IS NULL, ' . LINK_VALIDATION_NOT_VALIDATED . ', %1$s.ValidationStatus)',
'CategoryId' => 'ci.CategoryId',
),
),
'Fields' => Array (
'LinkValidationId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'LinkId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'ValidationTime' => Array ('type' => 'float', 'formatter' => 'kDateFormatter', 'not_null' => 1, 'default' => 0),
+ 'ValidationTime' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
'ValidationCode' => Array (
'type' => 'string',
'formatter' => 'kOptionsFormatter', 'options' => Array (200 => '200 OK', 301 => '301 Moved Permanently', 302 => '302 Found', 400 => '400 Bad Request', 403 => '403 Forbidden', 404 => '404 Not Found', 500 => '500 Internal Server Error'),
'max_len' => 50, 'default' => NULL
),
'ValidationStatus' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Text_Not_Validated', 1 => 'la_Text_Valid', 2 => 'la_Text_Invalid'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
),
'VirtualFields' => Array (
'ForeignLinkId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'LinkName' => Array('type' => 'string', /*'formatter' => 'kMultiLanguage',*/ 'not_null' => 1, 'max_len' => 255, 'default' => ''),
'LinkUrl' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'LinkCreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'LinkStatus' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'LinkValidationStatus' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Text_Not_Validated', 1 => 'la_Text_Valid', 2 => 'la_Text_Invalid'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
// for category path drawing
'CategoryId' => Array ('type' => 'int', 'default' => 0),
'CachedNavbar' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_link.png',
// for valid links
LINK_VALIDATION_VALID . '_' . STATUS_DISABLED => 'icon16_valid_disabled.gif',
LINK_VALIDATION_VALID . '_' . STATUS_ACTIVE => 'icon16_valid.gif',
LINK_VALIDATION_VALID . '_' . STATUS_PENDING => 'icon16_valid_pend.gif',
// for invalid links
LINK_VALIDATION_INVALID . '_' . STATUS_DISABLED => 'icon16_invalid_disabled.gif',
LINK_VALIDATION_INVALID . '_' . STATUS_ACTIVE => 'icon16_invalid.gif',
LINK_VALIDATION_INVALID . '_' . STATUS_PENDING => 'icon16_invalid_pend.gif',
// for not validated links
LINK_VALIDATION_NOT_VALIDATED . '_' . STATUS_DISABLED => 'icon16_not_validated_disabled.gif',
LINK_VALIDATION_NOT_VALIDATED . '_' . STATUS_ACTIVE => 'icon16_not_validated.gif',
LINK_VALIDATION_NOT_VALIDATED . '_' . STATUS_PENDING => 'icon16_not_validated_pend.gif',
'_' . STATUS_DISABLED => 'icon16_not_validated_disabled.gif',
'_' . STATUS_ACTIVE => 'icon16_not_validated.gif',
'_' . STATUS_PENDING => 'icon16_not_validated_pend.gif',
),
'Fields' => Array (
'ForeignLinkId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'module' => 'In-Link', 'width' => 60, ),
'LinkName' => Array ('title' => 'la_col_LinkName', 'data_block' => 'grid_link_name_td', 'filter_block' => 'grid_like_filter', 'first_chars' => 30, 'width' => 180, ),
'LinkUrl' => Array ('title' => 'la_col_LinkUrl', 'data_block' => 'grid_url_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
'LinkValidationStatus' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 87, ),
'ValidationCode' => Array ('title' => 'la_col_ValidationCode', 'filter_block' => 'grid_options_filter', 'width' => 155, ),
'ValidationTime' => Array ('title' => 'la_col_ValidatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
'LinkCreatedOn' => Array ('title' => 'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/in-link/units/l-visits/l-visits_config.php
===================================================================
--- branches/5.0.x/in-link/units/l-visits/l-visits_config.php (revision 12697)
+++ branches/5.0.x/in-link/units/l-visits/l-visits_config.php (revision 12698)
@@ -1,85 +1,85 @@
<?php
/**
* @version $Id$
* @package In-Link
* @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.net/license/ for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => 'l-visit',
'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'EventHandlerClass' => Array('class' => 'LinkVisitEventHandler', 'file' => 'l-visit_eh.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'Hooks' => Array (
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '-item', // from OnMassDelete event
'HookToEvent' => Array('OnAfterItemDelete'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnDeleteVisits',
),
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'l',
'HookToSpecial' => '-item', // from "Catalog"
'HookToEvent' => Array('OnAfterItemDelete'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnDeleteVisits',
),
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'l',
'HookToSpecial' => 'showall-item', // from "Advanced View"
'HookToEvent' => Array('OnAfterItemDelete'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnDeleteVisits',
),
),
'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
),
'IDField' => 'VisitId',
'TableName' => TABLE_PREFIX.'LinkVisits',
'AutoDelete' => true,
'ListSQLs' => Array ('' => 'SELECT * FROM %s'),
'ItemSQLs' => Array ('' => 'SELECT * FROM %s'),
'ListSortings' => Array (
'' => Array(
'Sorting' => Array('VisitTimestamp' => 'desc'),
)
),
'Fields' => Array (
'VisitId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'ResourceId' => Array ('type' => 'int', 'default' => NULL),
'PortalUserId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'VisitTimestamp' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1, 'default' => '#NOW#'),
+ 'VisitTimestamp' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
),
);
\ No newline at end of file
Index: branches/5.0.x/in-link/units/listing_types/listing_types_config.php
===================================================================
--- branches/5.0.x/in-link/units/listing_types/listing_types_config.php (revision 12697)
+++ branches/5.0.x/in-link/units/listing_types/listing_types_config.php (revision 12698)
@@ -1,152 +1,152 @@
<?php
/**
* @version $Id$
* @package In-Link
* @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.net/license/ for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array(
'Prefix' => 'lst',
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'ListingTypesEventHandler','file'=>'listing_types_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'ListingTypesTagProcessor','file'=>'listing_types_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'AggregateTags' => Array(
Array(
'AggregateTo' => 'l',
'AggregatedTagName' => 'ListListingTypes',
'LocalTagName' => 'PrintList',
),
Array(
'AggregateTo' => 'l',
'AggregatedTagName' => 'ListingTypeField',
'LocalTagName' => 'Field',
),
),
'Hooks' => Array(),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'ListingTypeId',
'TitleField' => 'Name',
'TitlePresets' => Array(
'default' => Array( 'new_status_labels' => Array('lst'=>'!la_title_AddingPaidListingType!'),
'edit_status_labels' => Array('lst'=>'!la_title_EditingPaidListingType!'),
'new_titlefield' => Array('lst'=>'!la_title_NewPaidListingType!'),
),
'listing_type_list'=>Array( 'prefixes' => Array('lst_List'),
'format' => "!la_title_PaidListingTypes!",
),
'listing_type_edit'=>Array( 'prefixes' => Array('lst'),
'new_titlefield' => Array('lst'=>'!la_title_NewPaidListingType!'),
'format' => "#lst_status# '#lst_titlefield#' - !la_title_General!",
),
'listing_type_shop_cart'=>Array( 'prefixes' => Array('lst'),
'new_titlefield' => Array('lst'=>'!la_title_NewPaidListingType!'),
'format' => "#lst_status# '#lst_titlefield#' - !la_title_ShopCartEntry!",
),
),
'EditTabPresets' => Array (
'Default' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'in-link/paid_listings/paid_listing_type_edit', 'priority' => 1),
),
),
'PermSection' => Array('main' => 'in-link:listing_types'),
'Sections' => Array(
'in-link:listing_types' => Array(
'parent' => 'in-link:paid_listings_folder',
'icon' => 'paid_listings',
'label' => 'la_tab_ListingTypes',
'url' => Array('t' => 'in-link/paid_listings/paid_listing_types_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete'),
'priority' => 1.2, // <parent_priority>.<own_priority>, because this section replaces parent in tree
'type' => stTAB,
),
),
'TableName' => TABLE_PREFIX.'ListingTypes',
'ListSQLs' => Array( ''=>'SELECT * FROM %s',), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %s',),
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('ListingTypeId' => 'asc'),
)
),
'Fields' => Array
(
'ListingTypeId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
'Name' => Array('type' => 'string','not_null' => '1','default' => '','required' => '1'),
- 'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
+ 'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
'Duration' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'DurationType' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, 'formatter'=>'kOptionsFormatter','use_phrases' => 1,'options' => Array(1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year')),
'OnPurchaseEdPick' => Array('type' => 'int','not_null' => '1','formatter'=>'kOptionsFormatter','use_phrases' => 1,'options' => Array(3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off'), 'default' => 3),
'OnPurchaseStatus' => Array('type' => 'int','not_null' => '1','formatter'=>'kOptionsFormatter','use_phrases' => 1,'options' => Array(3 => 'la_Unchanged', 1 => 'la_Enabled', 0 => 'la_Disabled', 2 => 'la_Pending'),'default' => 3),
'OnPurchaseNew' => Array('type' => 'int','not_null' => '1','formatter'=>'kOptionsFormatter','use_phrases' => 1,'options' => Array(3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'),'default' => 3),
'OnPurchasePop' => Array('type' => 'int','not_null' => '1','formatter'=>'kOptionsFormatter','use_phrases' => 1,'options' => Array(3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'),'default' => 3),
'OnPurchaseHot' => Array('type' => 'int','not_null' => '1','formatter'=>'kOptionsFormatter','use_phrases' => 1,'options' => Array(3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'),'default' => 3),
'OnPurchasePriorityAction' => Array('type' => 'int','not_null' => '1','formatter'=>'kOptionsFormatter','use_phrases' => 1,'options' => Array(0 => 'la_DontChange', 1 => 'la_SetEqualTo', 2 => 'la_IncreaseBy', 3 => 'la_DecreaseBy'),'default' => 0),
'OnPurchasePriorityValue' => Array('type' => 'int','not_null' => '1','default' => 1),
'OnPurchaseAddToCatEnabled' => Array('type' => 'int','not_null' => '1','default' => 0),
'OnPurchaseAddToCat' => Array('type' => 'int','not_null' => '1','default' => 0),
'OnPurchaseCustomTemplate' => Array('type' => 'string','not_null' => 1,'default' => ''),
'OnExpireEdPick' => Array('type' => 'int','formatter'=>'kOptionsFormatter','use_phrases' => 1,'options' => Array(3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off'),'not_null' => '1','default' => 3),
'OnExpireNew' => Array('type' => 'int','not_null' => '1','formatter'=>'kOptionsFormatter','use_phrases' => 1,'options' => Array(3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'),'default' => 3),
'OnExpirePop' => Array('type' => 'int','not_null' => '1','formatter'=>'kOptionsFormatter','use_phrases' => 1,'options' => Array(3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'),'default' => 3),
'OnExpireHot' => Array('type' => 'int','not_null' => '1','formatter'=>'kOptionsFormatter','use_phrases' => 1,'options' => Array(3 => 'la_Unchanged', 1 => 'la_On', 0 => 'la_Off', 2 => 'la_Auto'),'default' => 3),
'OnExpirePriorityAction' => Array('type' => 'int','not_null' => '1','formatter'=>'kOptionsFormatter','use_phrases' => 1,'options' => Array(0 => 'la_DontChange', 1 => 'la_SetEqualTo', 2 => 'la_IncreaseBy', 3 => 'la_DecreaseBy'),'default' => 0),
'OnExpirePriorityValue' => Array('type' => 'int','not_null' => '1','default' => 1),
'OnExpireRemoveFromCatEnabled' => Array('type' => 'int','not_null' => '1','default' => 0),
'OnExpireRemoveFromCat' => Array('type' => 'int','not_null' => '1','default' => 0),
'OnExpireCustomTemplate' => Array('type' => 'string','not_null' => 1,'default' => ''),
'OnExpireStatus' => Array('type' => 'int','not_null' => '1','formatter'=>'kOptionsFormatter','use_phrases' => 1,'options' => Array(3 => 'la_Unchanged', 1 => 'la_Enabled', 0 => 'la_Disabled', 2 => 'la_Pending'),'default' => 3),
'RenewalReminder' => Array('type' => 'int','not_null' => '1','default' => 0),
'EnableBuying' => Array('type' => 'int','not_null' => '1','default' => 0),
'ShopCartName' => Array('type' => 'string', 'default' => null),
'Price' => Array('type' => 'double','default' => ''),
'Recurring' => Array('type' => 'int','not_null' => '1','default' => 0),
'VirtualProductId' => Array('type' => 'int','not_null' => '1','default' => 0),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array(
'default' => 'icon16_item.png',
0 => 'icon16_disbaled.png',
1 => 'icon16_item.png',
'module' => 'core',
),
'Fields' => Array(
'ListingTypeId' => Array( 'title'=>'la_col_Id' , 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60),
'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter', 'width' => 250),
'Duration' => Array( 'title'=>'la_col_Duration' , 'data_block' => 'duration_td', 'filter_block' => 'grid_like_filter', 'width' => 100),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/in-link/install/install_schema.sql
===================================================================
--- branches/5.0.x/in-link/install/install_schema.sql (revision 12697)
+++ branches/5.0.x/in-link/install/install_schema.sql (revision 12698)
@@ -1,145 +1,145 @@
CREATE TABLE Link (
LinkId int(11) NOT NULL auto_increment,
Name varchar(255) NOT NULL default '',
l1_Name varchar(255) NOT NULL default '',
l2_Name varchar(255) NOT NULL default '',
l3_Name varchar(255) NOT NULL default '',
l4_Name varchar(255) NOT NULL default '',
l5_Name varchar(255) NOT NULL default '',
AutomaticFilename tinyint(3) unsigned NOT NULL default '1',
Description text,
l1_Description text,
l2_Description text,
l3_Description text,
l4_Description text,
l5_Description text,
MetaKeywords varchar(255) default NULL,
MetaDescription text,
Url varchar(255) NOT NULL default '',
CreatedOn int(10) unsigned default NULL,
Modified int(10) unsigned default NULL,
Expire int(10) unsigned default NULL,
Hits double(20,6) NOT NULL default '0.000000',
CachedRating varchar(10) NOT NULL default '0',
CachedVotesQty int(11) NOT NULL default '0',
CachedReviewsQty int(11) NOT NULL default '0',
CreatedById int(11) NOT NULL default '-1',
ModifiedById int(11) NOT NULL default '-1',
Priority int(11) NOT NULL default '0',
`Status` tinyint(4) NOT NULL default '2',
EditorsPick tinyint(4) NOT NULL default '0',
ResourceId int(11) default NULL,
HotItem tinyint(4) NOT NULL default '2',
PopItem tinyint(4) NOT NULL default '2',
NewItem tinyint(4) NOT NULL default '2',
OrgId int(11) default NULL,
CustomTemplate varchar(255) NOT NULL default '',
ReciprocalLinkFound tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (LinkId),
UNIQUE KEY ResourceId (ResourceId),
KEY sorting (Priority,Name),
KEY Hits (Hits),
KEY Name (Name),
KEY l1_Name (l1_Name),
KEY l2_Name (l2_Name),
KEY l3_Name (l3_Name),
KEY l4_Name (l4_Name),
KEY l5_Name (l5_Name),
KEY Description (Description(5)),
KEY l1_Description (l1_Description(5)),
KEY l2_Description (l2_Description(5)),
KEY l3_Description (l3_Description(5)),
KEY l4_Description (l4_Description(5)),
KEY l5_Description (l5_Description(5)),
KEY EditorsPick (EditorsPick),
KEY CreatedOn (CreatedOn),
KEY Modified (Modified,CreatedOn),
KEY `Status` (`Status`),
KEY HotItem (HotItem),
KEY PopItem (PopItem),
KEY NewItem (NewItem)
);
CREATE TABLE LinkValidation (
- LinkValidationId int(11) NOT NULL auto_increment,
- LinkId int(11) NOT NULL default '0',
- ValidationTime double NOT NULL default '0',
- ValidationCode varchar(50) default NULL,
- ValidationStatus tinyint(4) NOT NULL default '0',
- PRIMARY KEY (LinkValidationId),
+ LinkValidationId int(11) NOT NULL AUTO_INCREMENT,
+ LinkId int(11) NOT NULL DEFAULT '0',
+ ValidationTime int(11) DEFAULT NULL,
+ ValidationCode varchar(50) DEFAULT NULL,
+ ValidationStatus tinyint(4) NOT NULL DEFAULT '0',
+ PRIMARY KEY (LinkValidationId),
UNIQUE KEY LinkId (LinkId),
KEY ValidationStatus (ValidationStatus),
KEY ValidationTime (ValidationTime)
);
CREATE TABLE Listings (
ListingId int(11) NOT NULL auto_increment,
ListingTypeId int(11) default '0',
ItemResourceId int(11) default NULL,
PurchasedOn int(11) default NULL,
ExpiresOn int(11) default NULL,
`Status` TINYINT(4) UNSIGNED NOT NULL DEFAULT '2',
PendingRenewal tinyint(4) NOT NULL default '0',
RenewalReminderSent tinyint(4) NOT NULL default '0',
PRIMARY KEY (ListingId),
KEY ListingTypeId (ListingTypeId),
KEY ItemResourceId (ItemResourceId),
KEY PurchasedOn (PurchasedOn),
KEY ExpiresOn (ExpiresOn),
KEY Status (Status),
KEY RenewalReminderSent (RenewalReminderSent)
);
CREATE TABLE ListingTypes (
- ListingTypeId int(11) NOT NULL auto_increment,
- Name varchar(255) NOT NULL default '',
- Description text NOT NULL,
- Duration int(11) NOT NULL default '0',
- DurationType int(11) NOT NULL default '0',
- OnPurchaseEdPick tinyint(4) NOT NULL default '3',
- OnPurchaseNew tinyint(4) NOT NULL default '3',
- OnPurchasePop tinyint(4) NOT NULL default '3',
- OnPurchaseHot tinyint(4) NOT NULL default '3',
- OnPurchasePriorityAction tinyint(4) NOT NULL default '0',
- OnPurchasePriorityValue tinyint(4) NOT NULL default '1',
- OnPurchaseAddToCatEnabled tinyint(4) NOT NULL default '0',
- OnPurchaseAddToCat int(11) NOT NULL default '0',
- OnPurchaseCustomTemplate varchar(255) NOT NULL default '',
- OnPurchaseStatus tinyint(4) NOT NULL default '3',
- OnExpireEdPick tinyint(4) NOT NULL default '3',
- OnExpireNew tinyint(4) NOT NULL default '3',
- OnExpirePop tinyint(4) NOT NULL default '3',
- OnExpireHot tinyint(4) NOT NULL default '3',
- OnExpirePriorityAction tinyint(4) NOT NULL default '0',
- OnExpirePriorityValue tinyint(4) NOT NULL default '1',
- OnExpireRemoveFromCatEnabled tinyint(4) NOT NULL default '0',
- OnExpireRemoveFromCat int(11) NOT NULL default '0',
- OnExpireCustomTemplate varchar(255) NOT NULL default '',
- OnExpireStatus tinyint(4) NOT NULL default '3',
- RenewalReminder int(11) NOT NULL default '0',
- EnableBuying tinyint(4) NOT NULL default '0',
- ShopCartName varchar(255) default NULL,
- Price double default NULL,
- Recurring tinyint(4) NOT NULL default '0',
- VirtualProductId int(11) NOT NULL default '0',
- PRIMARY KEY (ListingTypeId),
+ ListingTypeId int(11) NOT NULL AUTO_INCREMENT,
+ `Name` varchar(255) NOT NULL DEFAULT '',
+ Description text,
+ Duration int(11) NOT NULL DEFAULT '0',
+ DurationType int(11) NOT NULL DEFAULT '0',
+ OnPurchaseEdPick tinyint(4) NOT NULL DEFAULT '3',
+ OnPurchaseNew tinyint(4) NOT NULL DEFAULT '3',
+ OnPurchasePop tinyint(4) NOT NULL DEFAULT '3',
+ OnPurchaseHot tinyint(4) NOT NULL DEFAULT '3',
+ OnPurchasePriorityAction tinyint(4) NOT NULL DEFAULT '0',
+ OnPurchasePriorityValue tinyint(4) NOT NULL DEFAULT '1',
+ OnPurchaseAddToCatEnabled tinyint(4) NOT NULL DEFAULT '0',
+ OnPurchaseAddToCat int(11) NOT NULL DEFAULT '0',
+ OnPurchaseCustomTemplate varchar(255) NOT NULL DEFAULT '',
+ OnPurchaseStatus tinyint(4) NOT NULL DEFAULT '3',
+ OnExpireEdPick tinyint(4) NOT NULL DEFAULT '3',
+ OnExpireNew tinyint(4) NOT NULL DEFAULT '3',
+ OnExpirePop tinyint(4) NOT NULL DEFAULT '3',
+ OnExpireHot tinyint(4) NOT NULL DEFAULT '3',
+ OnExpirePriorityAction tinyint(4) NOT NULL DEFAULT '0',
+ OnExpirePriorityValue tinyint(4) NOT NULL DEFAULT '1',
+ OnExpireRemoveFromCatEnabled tinyint(4) NOT NULL DEFAULT '0',
+ OnExpireRemoveFromCat int(11) NOT NULL DEFAULT '0',
+ OnExpireCustomTemplate varchar(255) NOT NULL DEFAULT '',
+ OnExpireStatus tinyint(4) NOT NULL DEFAULT '3',
+ RenewalReminder int(11) NOT NULL DEFAULT '0',
+ EnableBuying tinyint(4) NOT NULL DEFAULT '0',
+ ShopCartName varchar(255) DEFAULT NULL,
+ Price double DEFAULT NULL,
+ Recurring tinyint(4) NOT NULL DEFAULT '0',
+ VirtualProductId int(11) NOT NULL DEFAULT '0',
+ PRIMARY KEY (ListingTypeId),
KEY VirtualProductId (VirtualProductId)
);
CREATE TABLE LinkCustomData (
CustomDataId int(11) NOT NULL auto_increment,
ResourceId int(10) unsigned NOT NULL default '0',
KEY ResourceId (ResourceId),
PRIMARY KEY (CustomDataId)
);
CREATE TABLE LinkVisits (
- VisitId int(11) NOT NULL auto_increment,
- ResourceId int(11) default NULL,
- PortalUserId int(11) NOT NULL default '0',
- VisitTimestamp int(11) NOT NULL default '0',
- PRIMARY KEY (VisitId),
+ VisitId int(11) NOT NULL AUTO_INCREMENT,
+ ResourceId int(11) DEFAULT NULL,
+ PortalUserId int(11) NOT NULL DEFAULT '0',
+ VisitTimestamp int(11) DEFAULT NULL,
+ PRIMARY KEY (VisitId),
KEY ResourceId (ResourceId),
KEY PortalUserId (PortalUserId),
KEY VisitTimestamp (VisitTimestamp)
);
Index: branches/5.0.x/in-link/install/upgrades.sql
===================================================================
--- branches/5.0.x/in-link/install/upgrades.sql (revision 12697)
+++ branches/5.0.x/in-link/install/upgrades.sql (revision 12698)
@@ -1,53 +1,58 @@
# ===== v 4.3.9 =====
INSERT INTO Events VALUES (DEFAULT, 'LINK.VALIDATION.RESULTS', NULL, 1, 0, 'In-Link', 'la_event_link.validation.results', 1);
INSERT INTO ImportScripts VALUES (DEFAULT, 'Links from CSV file [In-Link]', '', 'l', 'In-Link', '', 'CSV', '1');
UPDATE CustomField
SET ValueList = '=+||<SQL>SELECT DestAbbr AS OptionValue, DestName AS OptionName FROM <PREFIX>StdDestinations WHERE DestType = 2 AND (DestParentId = 225 OR DestParentId = 38) ORDER BY DestParentId DESC, DestAbbr ASC</SQL>'
WHERE FieldName = 'LinkState';
UPDATE CustomField
SET ValueList = '=+||<SQL>SELECT DestAbbr AS OptionValue, DestName AS OptionName FROM <PREFIX>StdDestinations WHERE DestType = 1 ORDER BY DestAbbr ASC</SQL>'
WHERE FieldName = 'LinkCountry';
# ===== v 5.0.0 =====
INSERT INTO Counters VALUES (DEFAULT, 'linkhits_count', 'SELECT ROUND(SUM(Hits)) FROM <%PREFIX%>Link', NULL, NULL, '300', '0', '|Link|');
UPDATE Category SET Template = '/in-link/designs/section' WHERE Template = 'inlink/index';
UPDATE Category SET CachedTemplate = '/in-link/designs/section' WHERE CachedTemplate = 'inlink/index';
UPDATE ConfigurationValues SET VariableValue = '/in-link/designs/section' WHERE VariableName = 'l_CategoryTemplate';
UPDATE ConfigurationValues SET VariableValue = 'in-link/designs/detail' WHERE VariableName = 'l_ItemTemplate';
INSERT INTO Permissions VALUES (DEFAULT, 'in-link:links.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-link:setting_folder.view', 11, 1, 1, 0);
DELETE FROM Permissions WHERE Permission LIKE 'in-link:inlink_general.%';
UPDATE Events SET Description = 'la_event_link.owner.modify' WHERE Description = 'la_event_link.modify.modify';
UPDATE Events SET Description = 'la_event_link.owner.modify.pending' WHERE Description = 'la_event_link.modify.modify.pending';
UPDATE Phrase SET Module = 'In-Link' WHERE ((Phrase LIKE '%Links%' OR Phrase LIKE '%Listing%') AND (Module = 'Core') AND Phrase NOT IN ('la_section_QuickLinks'));
UPDATE Phrase SET Module = 'In-Link', PhraseType = 1 WHERE ( (Phrase LIKE '%Validation%' OR Phrase LIKE 'la_title_In-Link') AND (Module = 'Core') AND Phrase NOT IN ('la_ValidationEmail', 'la_prompt_validation'));
# ===== v 5.0.1 =====
UPDATE ConfigurationValues SET VariableValue = 'in-link/links/link_detail' WHERE VariableName = 'l_ItemTemplate';
UPDATE ConfigurationAdmin SET ValueList = 'ReviewText=la_opt_CommentText,CreatedOn=la_opt_CreatedOn'
WHERE VariableName IN ('Link_ReviewsSort', 'Link_ReviewsSort2');
UPDATE ConfigurationAdmin SET ValueList = 'ASC=la_common_Ascending,DESC=la_common_Descending'
WHERE VariableName IN ('Link_ReviewsOrder', 'Link_ReviewsOrder2');
UPDATE ConfigurationAdmin SET ValueList = 'Name=la_Link_Name,Description=la_Link_Description,Url=la_Link_URL,CreatedOn=la_opt_CreatedOn,Hits=la_Link_Hits,CachedRating=la_opt_Rating,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 4) AND (IsSystem = 0)</SQL>'
WHERE VariableName IN ('Link_SortField', 'Link_SortField2');
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 IN ('link_ReviewDelay_Interval', 'link_RatingDelay_Interval');
UPDATE CustomField SET FieldLabel = 'la_fld_cust_l_ItemTemplate', Prompt = 'la_fld_cust_l_ItemTemplate' WHERE FieldName = 'l_ItemTemplate';
INSERT INTO Events VALUES(DEFAULT, 'LINK.REVIEW.ADD.PENDING', NULL, 1, 0, NULL, 'In-Link', 'la_event_link.review.add.pending', 1);
-UPDATE ConfigurationAdmin SET ValueList = 'style="width: 50px;"' WHERE VariableName IN ('link_ReviewDelay_Value', 'link_RatingDelay_Value');
\ No newline at end of file
+UPDATE ConfigurationAdmin SET ValueList = 'style="width: 50px;"' WHERE VariableName IN ('link_ReviewDelay_Value', 'link_RatingDelay_Value');
+
+# ===== v 5.0.2 =====
+ALTER TABLE ListingTypes CHANGE Description Description text NULL;
+ALTER TABLE LinkValidation CHANGE ValidationTime ValidationTime INT NULL DEFAULT NULL;
+ALTER TABLE LinkVisits CHANGE VisitTimestamp VisitTimestamp INT(11) NULL DEFAULT NULL;
\ No newline at end of file

Event Timeline