[Customisation Database Commits] r724 - in /trunk/titania: contributions/ includes/objects/ includes/overlords/ language/en/ styles/default/template/authors/ styles/default/template/common/

Nathan Guse exreaction at phpbb.com
Thu Mar 11 03:18:01 GMT 2010


Author: exreaction
Date: Thu Mar 11 03:18:01 2010
New Revision: 724

Log:
U_CONTRIB_MANAGE, U_NEW_REVISION, U_QUEUE_DISCUSSION links

Modified:
    trunk/titania/contributions/details.php
    trunk/titania/contributions/index.php
    trunk/titania/includes/objects/contribution.php
    trunk/titania/includes/overlords/contribs.php
    trunk/titania/language/en/contributions.php
    trunk/titania/styles/default/template/authors/author_contributions.html
    trunk/titania/styles/default/template/common/contrib_list.html

Modified: trunk/titania/contributions/details.php
==============================================================================
*** trunk/titania/contributions/details.php (original)
--- trunk/titania/contributions/details.php Thu Mar 11 03:18:01 2010
***************
*** 29,38 ****
  // Set tracking
  titania_tracking::track(TITANIA_CONTRIB, titania::$contrib->contrib_id);
  
- if (titania::$contrib->is_author || titania::$contrib->is_active_coauthor || phpbb::$auth->acl_get('u_titania_mod_contrib_mod') || titania_types::$types[titania::$contrib->contrib_type]->acl_get('moderate'))
- {
- 	phpbb::$template->assign_var('U_NEW_REVISION', titania::$contrib->get_url('revision'));
- }
- 
  titania::page_header('CONTRIB_DETAILS');
  titania::page_footer(true, 'contributions/contribution_details.html');
\ No newline at end of file
--- 29,33 ----

Modified: trunk/titania/contributions/index.php
==============================================================================
*** trunk/titania/contributions/index.php (original)
--- trunk/titania/contributions/index.php Thu Mar 11 03:18:01 2010
***************
*** 22,27 ****
--- 22,50 ----
  // Add common lang
  titania::add_lang('contributions');
  
+ // Go to the queue discussion for this contribution item (saves us from having to figure out the URL to the topic every time we generate it)
+ if ($page == 'queue_discussion')
+ {
+ 	load_contrib();
+ 
+ 	$sql = 'SELECT * FROM ' . TITANIA_TOPICS_TABLE . '
+ 		WHERE topic_type = ' . TITANIA_QUEUE_DISCUSSION . '
+ 			AND parent_id = ' . titania::$contrib->contrib_id;
+ 	$result = phpbb::$db->sql_query($sql);
+ 	$row = phpbb::$db->sql_fetchrow($result);
+ 	phpbb::$db->sql_freeresult($result);
+ 
+ 	if ($row)
+ 	{
+ 		$topic = new titania_topic;
+ 		$topic->__set_array($row);
+ 
+ 		redirect($topic->get_url());
+ 	}
+ 
+ 	trigger_error('NO_QUEUE_DISCUSSION_TOPIC');
+ }
+ 
  // And now to load the appropriate page...
  switch ($page)
  {

Modified: trunk/titania/includes/objects/contribution.php
==============================================================================
*** trunk/titania/includes/objects/contribution.php (original)
--- trunk/titania/includes/objects/contribution.php Thu Mar 11 03:18:01 2010
***************
*** 511,517 ****
--- 511,520 ----
  			'DOWNLOAD_NAME'					=> (isset($this->download['revision_name'])) ? censor_text($this->download['revision_name']) : '',
  			'DOWNLOAD_VERSION'				=> (isset($this->download['revision_version'])) ? censor_text($this->download['revision_version']) : '',
  
+ 			'U_CONTRIB_MANAGE'				=> ($this->is_author || $this->is_active_coauthor || phpbb::$auth->acl_get('u_titania_mod_contrib_mod') || titania_types::$types[$this->contrib_type]->acl_get('moderate')) ? $this->get_url('manage') : '',
  			'U_DOWNLOAD'					=> (isset($this->download['attachment_id'])) ? titania_url::build_url('download', array('id' => $this->download['attachment_id'])): '',
+ 			'U_NEW_REVISION'				=> ($this->is_author || $this->is_active_coauthor || phpbb::$auth->acl_get('u_titania_mod_contrib_mod') || titania_types::$types[$this->contrib_type]->acl_get('moderate')) ? $this->get_url('revision') : '',
+ 			'U_QUEUE_DISCUSSION'			=> (titania::$config->use_queue && ($this->is_author || $this->is_active_coauthor || phpbb::$auth->acl_get('u_titania_mod_contrib_mod') || titania_types::$types[$this->contrib_type]->acl_get('view'))) ? $this->get_url('queue_discussion') : '',
  			'U_VIEW_CONTRIB'				=> ($this->contrib_type) ? $this->get_url() : '', // Don't cause an error while we create a contrib item
  			'U_VIEW_DEMO'					=> $this->contrib_demo,
  

Modified: trunk/titania/includes/overlords/contribs.php
==============================================================================
*** trunk/titania/includes/overlords/contribs.php (original)
--- trunk/titania/includes/overlords/contribs.php Thu Mar 11 03:18:01 2010
***************
*** 116,121 ****
--- 116,122 ----
  	 */
  	function display_contribs($mode, $id, $sort = false, $pagination = false, $blockname = 'contribs')
  	{
+ 		titania::add_lang('contributions');
  		titania::_include('functions_display', 'titania_topic_folder_img');
  
  		if ($sort === false)

Modified: trunk/titania/language/en/contributions.php
==============================================================================
*** trunk/titania/language/en/contributions.php (original)
--- trunk/titania/language/en/contributions.php Thu Mar 11 03:18:01 2010
***************
*** 52,57 ****
--- 52,58 ----
  'AUTOMOD_RESULTS' => '<strong>Please check over the Automod install results and make sure that nothing needs to be fixed.<br /><br />If an error comes up and you are certain that the error is incorrect, just hit continue below.</strong>',
  'AUTOMOD_TEST' => 'Next we will automatically test it against Automod and show you the results (this may take a few moments, so please be patient).<br /><br />Please hit continue when you are ready.',
  	'CANNOT_ADD_SELF_COAUTHOR'			=> 'You are the main author, you can not add yourself to the list of co-authors.',
+ 	'NO_QUEUE_DISCUSSION_TOPIC' => 'No Queue Discussion topic could be found.  Have you submitted any revision for this contribution yet (it will be created when you do so)?',
  	'CO_AUTHORS'						=> 'Co-Authors',
  	'CONTRIB'							=> 'Contribution',
  	'CONTRIBUTIONS'						=> 'Contributions',

Modified: trunk/titania/styles/default/template/authors/author_contributions.html
==============================================================================
*** trunk/titania/styles/default/template/authors/author_contributions.html (original)
--- trunk/titania/styles/default/template/authors/author_contributions.html Thu Mar 11 03:18:01 2010
***************
*** 16,29 ****
  		<ul class="topiclist cplist" id="modlist">
  		<!-- BEGIN contribs -->
  			<li class="row<!-- IF contribs.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
! 				<dl>
! 					<dt><a class="topictitle" href="{contribs.U_VIEW_CONTRIB}">{contribs.CONTRIB_NAME}</a></dt>
  					<dd class="type">{contribs.CONTRIB_TYPE}</dd>
  					<dd class="general">
! 						<a href="" title="{L_CONTRIB_MANAGE}"><img src="{T_TITANIA_THEME_PATH}/images/icon_settings.gif" alt="{L_CONTRIB_MANAGE}" /></a>
! 						<a href="" title="{L_NEW_REVISION}"><img src="{T_TITANIA_THEME_PATH}/images/icon_new_revision.gif" alt="{L_NEW_REVISION}" /></a>
! 						<a href="" title="{L_QUEUE_DISCUSSION}"><img src="{T_TITANIA_THEME_PATH}/images/icon_discuss.gif" alt="{L_QUEUE_DISCUSSION}" /></a>
  					</dd>
  				</dl>
  			</li>
  		<!-- END contribs -->
--- 16,31 ----
  		<ul class="topiclist cplist" id="modlist">
  		<!-- BEGIN contribs -->
  			<li class="row<!-- IF contribs.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
! 		<dl class="icon" style="background-image: url({contribs.FOLDER_IMG_SRC}); background-repeat: no-repeat;">
! 					<dt><a class="topictitle" href="{contribs.U_VIEW_CONTRIB}">{contribs.CONTRIB_NAME}</a> <!-- IF not contribs.S_CONTRIB_VALIDATED --><img src="{T_TITANIA_THEME_PATH}/images/icon_not_validated.gif" alt="{L_NOT_VALIDATED}" title="{L_NOT_VALIDATED}" /><!-- ENDIF --></dt>
  					<dd class="type">{contribs.CONTRIB_TYPE}</dd>
+ 					<!-- IF contribs.U_CONTRIB_MANAGE or contribs.U_NEW_REVISION or contribs.U_QUEUE_DISCUSSION -->
  					<dd class="general">
! 						<!-- IF contribs.U_CONTRIB_MANAGE -->&nbsp;<a href="{contribs.U_CONTRIB_MANAGE}" title="{L_CONTRIB_MANAGE}"><img src="{T_TITANIA_THEME_PATH}/images/icon_settings.gif" alt="{L_CONTRIB_MANAGE}" /></a><!-- ENDIF -->
! 						<!-- IF contribs.U_NEW_REVISION -->&nbsp;<a href="{contribs.U_NEW_REVISION}" title="{L_NEW_REVISION}"><img src="{T_TITANIA_THEME_PATH}/images/icon_new_revision.gif" alt="{L_NEW_REVISION}" /></a><!-- ENDIF -->
! 						<!-- IF contribs.U_QUEUE_DISCUSSION -->&nbsp;<a href="{contribs.U_QUEUE_DISCUSSION}" title="{L_QUEUE_DISCUSSION}"><img src="{T_TITANIA_THEME_PATH}/images/icon_discuss.gif" alt="{L_QUEUE_DISCUSSION}" /></a><!-- ENDIF -->
  					</dd>
+ 					<!-- ENDIF -->
  				</dl>
  			</li>
  		<!-- END contribs -->

Modified: trunk/titania/styles/default/template/common/contrib_list.html
==============================================================================
*** trunk/titania/styles/default/template/common/contrib_list.html (original)
--- trunk/titania/styles/default/template/common/contrib_list.html Thu Mar 11 03:18:01 2010
***************
*** 14,21 ****
  <!-- BEGIN contribs -->
  	<li class="row<!-- IF contribs.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
  		<dl class="icon" style="background-image: url({contribs.FOLDER_IMG_SRC}); background-repeat: no-repeat;">
! 			<dt><a href="{contribs.U_VIEW_CONTRIB}" class="topictitle">{contribs.CONTRIB_NAME}</a> <!-- IF not contribs.S_CONTRIB_VALIDATED --><img src="{T_TITANIA_THEME_PATH}/images/icon_not_validated.gif" alt="" /><!-- ENDIF -->
! 			</dt>
  			<dd class="author">
  				{contribs.AUTHOR_NAME_FULL}
  			</dd>
--- 14,20 ----
  <!-- BEGIN contribs -->
  	<li class="row<!-- IF contribs.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
  		<dl class="icon" style="background-image: url({contribs.FOLDER_IMG_SRC}); background-repeat: no-repeat;">
! 			<dt><a class="topictitle" href="{contribs.U_VIEW_CONTRIB}">{contribs.CONTRIB_NAME}</a> <!-- IF not contribs.S_CONTRIB_VALIDATED --><img src="{T_TITANIA_THEME_PATH}/images/icon_not_validated.gif" alt="{L_NOT_VALIDATED}" title="{L_NOT_VALIDATED}" /><!-- ENDIF --></dt>
  			<dd class="author">
  				{contribs.AUTHOR_NAME_FULL}
  			</dd>




More information about the customisationdb-commits mailing list