[Customisation Database Commits] [customisation-db] Allow author to warn user of no support being available. Ticket #63008.

Cesar G prototech91 at gmail.com
Sun Apr 15 12:59:56 BST 2012



commit 7e09b2654fcd56a51ac2b99493a10fa1280c7537
Author: Cesar G <prototech91 at gmail.com>
Date:   Fri Apr 13 00:02:28 2012 -0700

    Allow author to warn user of no support being available. Ticket #63008.

diff --git a/titania/common.php b/titania/common.php
index 97d7b9b..3e93a66 100644
--- a/titania/common.php
+++ b/titania/common.php
@@ -22,7 +22,7 @@ if (!defined('NOT_IN_COMMUNITY'))
 }
 
 // Version number (only used for the installer)
-define('TITANIA_VERSION', '0.3.14');
+define('TITANIA_VERSION', '0.3.15');
 
 define('PHPBB_USE_BOARD_URL_PATH', true);
 if (!defined('IN_TITANIA_INSTALL'))
diff --git a/titania/contributions/manage.php b/titania/contributions/manage.php
index b5e89a7..7e398c9 100644
--- a/titania/contributions/manage.php
+++ b/titania/contributions/manage.php
@@ -99,6 +99,7 @@ if ($screenshot->uploaded || isset($_POST['preview']) || $submit)
 		'contrib_demo'			=> (titania::$config->can_modify_style_demo_url || titania_types::$types[TITANIA_TYPE_STYLE]->acl_get('moderate') || titania::$contrib->contrib_type != TITANIA_TYPE_STYLE) ? $contrib_demo : titania::$contrib->contrib_demo,
 		'contrib_local_name' => utf8_normalize_nfc(request_var('contrib_local_name', '', true)),
 		'contrib_iso_code' => request_var('contrib_iso_code', ''),
+		'contrib_limited_support'	=> request_var('limited_support', false), 
 	));
 }
 
@@ -385,6 +386,7 @@ phpbb::$template->assign_vars(array(
 	'S_IS_MODERATOR'			=> (titania_types::$types[titania::$contrib->contrib_type]->acl_get('moderate')) ? true : false,
 	'S_CAN_EDIT_STYLE_DEMO'		=> (titania::$config->can_modify_style_demo_url || titania_types::$types[TITANIA_TYPE_STYLE]->acl_get('moderate') || titania::$contrib->contrib_type != TITANIA_TYPE_STYLE) ? true : false,
 	'S_CAN_EDIT_CONTRIB'		=> (phpbb::$auth->acl_get('u_titania_contrib_submit')) ? true : false,
+	'S_LIMITED_SUPPORT'			=> titania::$contrib->contrib_limited_support,
 
 	'CONTRIB_PERMALINK'			=> $permalink,
 	'CONTRIB_TYPE'			=> (int) titania::$contrib->contrib_type,
diff --git a/titania/includes/objects/contribution.php b/titania/includes/objects/contribution.php
index eab6994..e8e5ed0 100644
--- a/titania/includes/objects/contribution.php
+++ b/titania/includes/objects/contribution.php
@@ -135,6 +135,9 @@ class titania_contribution extends titania_message_object
 			
 			// ColorizeIt stuff
 			'contrib_clr_colors'            => array('default' => ''),
+
+			// Author does not provide support
+			'contrib_limited_support'		=> array('default' => 0),
 		));
 
 		// Hooks
@@ -430,6 +433,7 @@ class titania_contribution extends titania_message_object
 			'CONTRIB_UPDATE_DATE'			=> ($this->contrib_last_update) ? phpbb::$user->format_date($this->contrib_last_update) : '',
 			'CONTRIB_STATUS'				=> $this->contrib_status,
 			'CONTRIB_SCREENSHOT'			=> ($this->screenshots) ? $this->screenshots->preview_image() : false,
+			'CONTRIB_LIMITED_SUPPORT'		=> $this->contrib_limited_support,
 
 			'CONTRIB_LOCAL_NAME'			=> $this->contrib_local_name,
 			'CONTRIB_ISO_CODE'				=> $this->contrib_iso_code,
diff --git a/titania/includes/overlords/topics.php b/titania/includes/overlords/topics.php
index 8033d55..558f279 100644
--- a/titania/includes/overlords/topics.php
+++ b/titania/includes/overlords/topics.php
@@ -293,6 +293,9 @@ $limit_topic_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DA
 				// We also display the queue discussion topic between validators and authors in the support area
 				$sql_ary['WHERE'] .= ' AND (t.topic_type = ' . TITANIA_SUPPORT . ' OR t.topic_type = ' . TITANIA_QUEUE_DISCUSSION . ')';
 
+				// Do not display abandoned contribs in the author's support section
+				$sql_ary['WHERE'] .= 'AND contrib.contrib_limited_support = 0';
+
 				// Additional tracking for marking items as read in each contribution
 				titania_tracking::get_tracks(TITANIA_SUPPORT, $contrib_ids);
 				$topic->additional_unread_fields[] = array('type' => TITANIA_SUPPORT, 'parent_match' => true);
diff --git a/titania/includes/versions.php b/titania/includes/versions.php
index 6512988..b863537 100644
--- a/titania/includes/versions.php
+++ b/titania/includes/versions.php
@@ -663,5 +663,10 @@ $versions = array(
 			array(TITANIA_CATEGORIES_TABLE, 'category_options', array('TINT:4', 0)),
 		),
 	),
+	'0.3.15' => array(
+		'table_column_add' => array(
+			array(TITANIA_CONTRIBS_TABLE, 'contrib_limited_support', array('TINT:1', 0)),
+		),
+	),
 	// IF YOU ADD A NEW VERSION DO NOT FORGET TO INCREMENT THE VERSION NUMBER IN common.php!
 );
diff --git a/titania/language/en/contributions.php b/titania/language/en/contributions.php
index a2e3c2f..ef53a07 100644
--- a/titania/language/en/contributions.php
+++ b/titania/language/en/contributions.php
@@ -127,6 +127,9 @@ $lang = array_merge($lang, array(
 	'LICENSE'								=> 'License',
 	'LICENSE_EXPLAIN'						=> 'License to release this work under.',
 	'LICENSE_FILE_MISSING'					=> 'The package must contain a license.txt file containing the license terms either in the main directory or within one subdirectory level of the main directory.',
+	'LIMITED_SUPPORT'						=> 'No support provided',
+	'LIMITED_SUPPORT_EXPLAIN'				=> 'Display warning to users about no support being provided by author.',
+	'LIMITED_SUPPORT_WARN'					=> '<strong>Warning:</strong> The author of this contribution does not provide support for it anymore.',
 	'LOGIN_EXPLAIN_CONTRIB'					=> 'In order to create a new contribution you need to be registered',
 
 	'MANAGE_CONTRIBUTION'					=> 'Manage Contribution',
diff --git a/titania/styles/default/template/contributions/contribution_header.html b/titania/styles/default/template/contributions/contribution_header.html
index 161acb4..4bd223e 100644
--- a/titania/styles/default/template/contributions/contribution_header.html
+++ b/titania/styles/default/template/contributions/contribution_header.html
@@ -11,6 +11,14 @@
 </div>
 <!-- ENDIF -->
 
+<!-- IF CONTRIB_LIMITED_SUPPORT -->
+<div class="rules">
+	<div class="inner"><span class="corners-top"><span></span></span>
+		{L_LIMITED_SUPPORT_WARN}
+	<span class="corners-bottom"><span></span></span></div>
+</div>
+<!-- ENDIF -->
+
 <!-- IF CONTRIB_NAME --><h2 class="panel-name">{CONTRIB_NAME}<!-- IF CONTRIB_LOCAL_NAME --> / {CONTRIB_LOCAL_NAME}<!-- ENDIF --><!-- IF S_CONTRIB_CLEANED --> <img src="{T_TITANIA_THEME_PATH}/images/icon_cleaned_contrib.gif" title="{L_CLEANED_CONTRIB}" alt="{L_CLEANED_CONTRIB}" /><!-- ENDIF --></h2><!-- ENDIF -->
 <div class="tabs">
 	<ul>
diff --git a/titania/styles/default/template/contributions/contribution_manage.html b/titania/styles/default/template/contributions/contribution_manage.html
index 573171d..ab0f191 100644
--- a/titania/styles/default/template/contributions/contribution_manage.html
+++ b/titania/styles/default/template/contributions/contribution_manage.html
@@ -184,6 +184,14 @@
 					</dd>
 				</dl>
 				<!-- ENDIF -->
+				<!-- IF not S_CREATE -->
+				<dl>
+					<dt><label for="limited_support">{L_LIMITED_SUPPORT}:</label><br /><span>{L_LIMITED_SUPPORT_EXPLAIN}</span></dt>
+					<dd>
+						<input type="checkbox" id="limited_support" name="limited_support"<!-- IF S_LIMITED_SUPPORT -->checked="checked"<!-- ENDIF --> />
+					</dd>
+				</dl>
+				<!-- ENDIF -->
 			</fieldset>
 
             <!-- IF MANAGE_COLORIZEIT -->




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://code.phpbb.com/pipermail/customisationdb-commits/attachments/20120415/66bc0d52/attachment-0001.html>


More information about the customisationdb-commits mailing list