[Customisation Database Commits] r449 - in /trunk/titania: contributions/index.php includes/objects/post.php includes/objects/topic.php includes/overlords/posts.php includes/tools/tracking.php styles/default/template/common/post_list.html styles/default/template/common/topic_list.html

Nathan Guse exreaction at phpbb.com
Wed Dec 23 05:57:07 GMT 2009


Author: exreaction
Date: Wed Dec 23 05:57:07 2009
New Revision: 449

Log:
Some misc things...

Modified:
    trunk/titania/contributions/index.php
    trunk/titania/includes/objects/post.php
    trunk/titania/includes/objects/topic.php
    trunk/titania/includes/overlords/posts.php
    trunk/titania/includes/tools/tracking.php
    trunk/titania/styles/default/template/common/post_list.html
    trunk/titania/styles/default/template/common/topic_list.html

Modified: trunk/titania/contributions/index.php
==============================================================================
*** trunk/titania/contributions/index.php (original)
--- trunk/titania/contributions/index.php Wed Dec 23 05:57:07 2009
***************
*** 60,72 ****
  	}
  
  	// Make sure the contrib requested is the same as the contrib loaded
! 	if ($contrib_id !== false)
  	{
! 		if ($contrib_id != titania::$contrib->contrib_id)
! 		{
! 			// Mismatch, redirect them to the new page? @todo - mtotheikle
! 			trigger_error('CONTRIB_NOT_FOUND');
! 		}
  	}
  
  	// Put the author in titania::$author
--- 60,70 ----
  	}
  
  	// Make sure the contrib requested is the same as the contrib loaded
! 	if ($contrib_id !== false && $contrib_id != titania::$contrib->contrib_id)
  	{
! 		// Mismatch
! 		// @todo redirect them to the new page
! 		trigger_error('CONTRIB_NOT_FOUND');
  	}
  
  	// Put the author in titania::$author

Modified: trunk/titania/includes/objects/post.php
==============================================================================
*** trunk/titania/includes/objects/post.php (original)
--- trunk/titania/includes/objects/post.php Wed Dec 23 05:57:07 2009
***************
*** 69,75 ****
  	 * @param object|bool|int $topic The topic object, topic_id to load it ourselves for an existing topic, boolean false for making a new post (we will create the topic object)
  	 * @param int $post_id The post_id, 0 for making a new post
  	 */
! 	public function __construct($type = 0, $topic = false, $post_id = 0)
  	{
  		// Configure object properties
  		$this->object_config = array_merge($this->object_config, array(
--- 69,75 ----
  	 * @param object|bool|int $topic The topic object, topic_id to load it ourselves for an existing topic, boolean false for making a new post (we will create the topic object)
  	 * @param int $post_id The post_id, 0 for making a new post
  	 */
! 	public function __construct($type = TITANIA_POST_DEFAULT, $topic = false, $post_id = 0)
  	{
  		// Configure object properties
  		$this->object_config = array_merge($this->object_config, array(
***************
*** 193,203 ****
  	/**
  	* Get the url for the post
  	*/
! 	public function get_url()
  	{
  		if (is_object($this->topic))
  		{
! 			return titania_url::append_url($this->topic->get_url(), array('p' => $this->post_id, '#p' => $this->post_id));
  		}
  
  		switch ($this->post_type)
--- 193,213 ----
  	/**
  	* Get the url for the post
  	*/
! 	public function get_url($action = false)
  	{
+ 		$append = array(
+ 			'p' => $this->post_id,
+ 			'#p' => $this->post_id,
+ 		);
+ 
+ 		if ($action)
+ 		{
+ 			$append['action'] = $action;
+ 		}
+ 
  		if (is_object($this->topic))
  		{
! 			return titania_url::append_url($this->topic->get_url(), $append);
  		}
  
  		switch ($this->post_type)
***************
*** 219,225 ****
  			break;
  		}
  
! 		return titania_url::build_url($page, array('p', $this->post_id, '#p' => $this->post_id));
  	}
  
  	/**
--- 229,235 ----
  			break;
  		}
  
! 		return titania_url::build_url($page, $append);
  	}
  
  	/**
***************
*** 308,313 ****
--- 318,327 ----
  				}
  			break;
  
+ 			case 'delete' :
+ 				return ($this->post_deleted) ? $this->acl_get('hard_delete', $contrib) : $this->acl_get('soft_delete', $contrib);
+ 			break;
+ 
  			case 'soft_delete' :
  				if (($is_poster && phpbb::$auth->acl_get('titania_post_delete_own')) || // Is poster and can delete own
  					($is_author && phpbb::$auth->acl_get('titania_post_mod_own')) || // Is contrib author and can moderate own
***************
*** 577,583 ****
  			'POST_TEXT'						=> $this->generate_text_for_display(),
  			//EDITED_MESSAGE
  
! 			'U_VIEW_POST'					=> $this->get_url(),
  			//U_MCP_APPROVE
  			//U_MCP_REPORT
  
--- 591,603 ----
  			'POST_TEXT'						=> $this->generate_text_for_display(),
  			//EDITED_MESSAGE
  
! 			'U_VIEW'						=> $this->get_url(),
! 			'U_EDIT'						=> $this->acl_get('edit') ? $this->get_url('edit') : '',
! 			'U_DELETE'						=> $this->acl_get('delete') ? $this->get_url('delete') : '',
! 			'U_REPORT'						=> $this->get_url('report'),
! 			'U_WARN'						=> $this->get_url('warn'),
! 			'U_INFO'						=> $this->get_url('info'),
! 			'U_QUOTE'						=> $this->acl_get('post') ? $this->get_url('quote') : '',
  			//U_MCP_APPROVE
  			//U_MCP_REPORT
  

Modified: trunk/titania/includes/objects/topic.php
==============================================================================
*** trunk/titania/includes/objects/topic.php (original)
--- trunk/titania/includes/objects/topic.php Wed Dec 23 05:57:07 2009
***************
*** 61,67 ****
  	 * @param int|string $type The type of topic ('tracker', 'queue', 'normal').  Normal/default meaning support/discussion.  Constants for the type can be sent instead of a string
  	 * @param int $topic_id The topic_id, 0 for making a new topic
  	 */
! 	public function __construct($type = 0, $topic_id = 0)
  	{
  		// Configure object properties
  		$this->object_config = array_merge($this->object_config, array(
--- 61,67 ----
  	 * @param int|string $type The type of topic ('tracker', 'queue', 'normal').  Normal/default meaning support/discussion.  Constants for the type can be sent instead of a string
  	 * @param int $topic_id The topic_id, 0 for making a new topic
  	 */
! 	public function __construct($type = TITANIA_POST_DEFAULT, $topic_id = 0)
  	{
  		// Configure object properties
  		$this->object_config = array_merge($this->object_config, array(

Modified: trunk/titania/includes/overlords/posts.php
==============================================================================
*** trunk/titania/includes/overlords/posts.php (original)
--- trunk/titania/includes/overlords/posts.php Wed Dec 23 05:57:07 2009
***************
*** 191,197 ****
  		// load the user data
  		users_overlord::load($user_ids);
  
! 		$post = new titania_post();
  
  		// Loop de loop
  		$prev_post_time = 0;
--- 191,197 ----
  		// load the user data
  		users_overlord::load($user_ids);
  
! 		$post = new titania_post($topic->topic_type, $topic);
  
  		// Loop de loop
  		$prev_post_time = 0;

Modified: trunk/titania/includes/tools/tracking.php
==============================================================================
*** trunk/titania/includes/tools/tracking.php (original)
--- trunk/titania/includes/tools/tracking.php Wed Dec 23 05:57:07 2009
***************
*** 126,132 ****
  		// Ignore
  		self::get_track_cookie();
  
! 		if (!phpbb::$user->data['is_registered']) // @todo support the option to use cookies for all
  		{
  			return;
  		}
--- 126,132 ----
  		// Ignore
  		self::get_track_cookie();
  
! 		if (!sizeof($ids) || !phpbb::$user->data['is_registered']) // @todo support the option to use cookies for all
  		{
  			return;
  		}

Modified: trunk/titania/styles/default/template/common/post_list.html
==============================================================================
*** trunk/titania/styles/default/template/common/post_list.html (original)
--- trunk/titania/styles/default/template/common/post_list.html Wed Dec 23 05:57:07 2009
***************
*** 1,24 ****
  <div class="topic-actions">
- 
  	<div class="buttons">
  	<!-- IF U_POST_REPLY -->
! 		<div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY}" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED_SHORT}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></a></div>
  	<!-- ENDIF -->
  	</div>
  
- 	<!-- IF S_DISPLAY_SEARCHBOX -->
- 		<div class="search-box">
- 			<form method="post" id="topic-search" action="{S_SEARCHBOX_ACTION}">
- 			<fieldset>
- 				<input class="inputbox search tiny"  type="text" name="keywords" id="search_keywords" size="20" value="{L_SEARCH_TOPIC}" onclick="if(this.value=='{LA_SEARCH_TOPIC}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_TOPIC}';" />
- 				<input class="button2" type="submit" value="{L_SEARCH}" />
- 				<input type="hidden" value="{TOPIC_ID}" name="t" />
- 				<input type="hidden" value="msgonly" name="sf" />
- 			</fieldset>
- 			</form>
- 		</div>
- 	<!-- ENDIF -->
- 
  	<!-- IF PAGINATION or TOTAL_POSTS -->
  		<div class="pagination">
  			<!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
--- 1,10 ----
  <div class="topic-actions">
  	<div class="buttons">
  	<!-- IF U_POST_REPLY -->
! 		<p class="ui-button"><a href="{U_POST_REPLY}" class="ui-button ui-state-default ui-corner-all"><span class="ui-icon <!-- IF S_IS_LOCKED -->ui-icon-locked<!-- ELSE -->ui-icon-pencil<!-- ENDIF -->"></span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED_SHORT}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></a></p>
  	<!-- ENDIF -->
  	</div>
  
  	<!-- IF PAGINATION or TOTAL_POSTS -->
  		<div class="pagination">
  			<!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
***************
*** 52,58 ****
  			<!-- ENDIF -->
  		<!-- ENDIF -->
  
! 			<h3 <!-- IF posts.S_FIRST_ROW -->class="first"<!-- ENDIF -->><!-- IF posts.POST_ICON_IMG --><img src="{T_ICONS_PATH}{posts.POST_ICON_IMG}" width="{posts.POST_ICON_IMG_WIDTH}" height="{posts.POST_ICON_IMG_HEIGHT}" alt="" /> <!-- ENDIF --><a href="{posts.U_VIEW_POST}">{posts.POST_SUBJECT}</a></h3>
  			<p class="author"><!-- IF S_IS_BOT -->{posts.MINI_POST_IMG}<!-- ELSE --><a href="{posts.U_MINI_POST}">{posts.MINI_POST_IMG}</a><!-- ENDIF -->{L_POST_BY_AUTHOR} <strong>{posts.USER_FULL}</strong> &raquo; {posts.POST_TIME} </p>
  
  			<!-- IF posts.S_POST_UNAPPROVED or posts.S_POST_REPORTED -->
--- 38,44 ----
  			<!-- ENDIF -->
  		<!-- ENDIF -->
  
! 			<h3 <!-- IF posts.S_FIRST_ROW -->class="first"<!-- ENDIF -->><!-- IF posts.POST_ICON_IMG --><img src="{T_ICONS_PATH}{posts.POST_ICON_IMG}" width="{posts.POST_ICON_IMG_WIDTH}" height="{posts.POST_ICON_IMG_HEIGHT}" alt="" /> <!-- ENDIF --><a href="{posts.U_VIEW}">{posts.POST_SUBJECT}</a></h3>
  			<p class="author"><!-- IF S_IS_BOT -->{posts.MINI_POST_IMG}<!-- ELSE --><a href="{posts.U_MINI_POST}">{posts.MINI_POST_IMG}</a><!-- ENDIF -->{L_POST_BY_AUTHOR} <strong>{posts.USER_FULL}</strong> &raquo; {posts.POST_TIME} </p>
  
  			<!-- IF posts.S_POST_UNAPPROVED or posts.S_POST_REPORTED -->
***************
*** 128,169 ****
  	<!-- INCLUDE posting/quickreply_editor.html -->
  <!-- ENDIF -->
  
- <!-- IF S_NUM_POSTS > 1 or PREVIOUS_PAGE -->
- 	<form id="viewtopic" method="post" action="{S_TOPIC_ACTION}">
- 
- 	<fieldset class="display-options" style="margin-top: 0; ">
- 		<!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
- 		<!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
- 		<!-- IF not S_IS_BOT -->
- 		<label>{L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS}</label>
- 		<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label> <label>{S_SELECT_SORT_DIR} <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
- 		<!-- ENDIF -->
- 	</fieldset>
- 
- 	</form>
- 	<hr />
- <!-- ENDIF -->
- 
  <div class="topic-actions">
  	<div class="buttons">
  	<!-- IF U_POST_REPLY -->
! 		<div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY}" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED_SHORT}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></a></div>
  	<!-- ENDIF -->
  	</div>
  
  	<!-- IF PAGINATION or TOTAL_POSTS -->
  		<div class="pagination">
! 			{TOTAL_POSTS}
  			<!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
  		</div>
  	<!-- ENDIF -->
! </div>
! 
! <!-- IF S_TOPIC_MOD -->
! 	<form method="post" action="{S_MOD_ACTION}">
! 	<fieldset class="quickmod">
! 		<label for="quick-mod-select">{L_QUICK_MOD}:</label> {S_TOPIC_MOD} <input type="submit" value="{L_GO}" class="button2" />
! 		{S_FORM_TOKEN}
! 	</fieldset>
! 	</form>
! <!-- ENDIF -->
\ No newline at end of file
--- 114,130 ----
  	<!-- INCLUDE posting/quickreply_editor.html -->
  <!-- ENDIF -->
  
  <div class="topic-actions">
  	<div class="buttons">
  	<!-- IF U_POST_REPLY -->
! 		<p class="ui-button"><a href="{U_POST_REPLY}" class="ui-button ui-state-default ui-corner-all"><span class="ui-icon <!-- IF S_IS_LOCKED -->ui-icon-locked<!-- ELSE -->ui-icon-pencil<!-- ENDIF -->"></span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED_SHORT}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></a></p>
  	<!-- ENDIF -->
  	</div>
  
  	<!-- IF PAGINATION or TOTAL_POSTS -->
  		<div class="pagination">
! 			<!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
  			<!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
  		</div>
  	<!-- ENDIF -->
! </div>
\ No newline at end of file

Modified: trunk/titania/styles/default/template/common/topic_list.html
==============================================================================
*** trunk/titania/styles/default/template/common/topic_list.html (original)
--- trunk/titania/styles/default/template/common/topic_list.html Wed Dec 23 05:57:07 2009
***************
*** 1,22 ****
! <!-- BEGIN topics -->
! 	<!-- IF topics.S_FIRST_ROW -->
! 		<div class="topic-actions">
! 			<div class="buttons">
! 			<!-- IF U_POST_TOPIC -->
! 				<p class="ui-button"><a href="{U_POST_TOPIC}" id="create-topic" class="ui-button ui-state-default ui-corner-all"><span class="ui-icon ui-icon-plus"></span>{L_NEW_TOPIC}</a></p>
! 			<!-- ENDIF -->
! 			</div>
  
! 			<!-- IF PAGINATION or TOTAL_POSTS -->
! 				<div class="pagination">
! 					<!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
! 					<!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
! 				</div>
! 			<!-- ENDIF -->
  		</div>
- 		<div class="clear"></div>
  	<!-- ENDIF -->
  
  	<!-- IF topics.S_TOPIC_TYPE_SWITCH and not topics.S_FIRST_ROW -->
  		</ul>
  		<span class="corners-bottom"><span></span></span></div>
--- 1,20 ----
! <div class="topic-actions">
! 	<div class="buttons">
! 	<!-- IF U_POST_TOPIC -->
! 		<p class="ui-button"><a href="{U_POST_TOPIC}" id="create-topic" class="ui-button ui-state-default ui-corner-all"><span class="ui-icon ui-icon-plus"></span>{L_NEW_TOPIC}</a></p>
! 	<!-- ENDIF -->
! 	</div>
  
! 	<!-- IF PAGINATION or TOTAL_POSTS -->
! 		<div class="pagination">
! 			<!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
! 			<!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
  		</div>
  	<!-- ENDIF -->
+ </div>
+ <div class="clear"></div>
  
+ <!-- BEGIN topics -->
  	<!-- IF topics.S_TOPIC_TYPE_SWITCH and not topics.S_FIRST_ROW -->
  		</ul>
  		<span class="corners-bottom"><span></span></span></div>
***************
*** 59,79 ****
  				</ul>
  			<span class="corners-bottom"><span></span></span></div>
  		</div>
- 
- 		<div class="topic-actions">
- 			<div class="buttons">
- 			<!-- IF U_POST_TOPIC -->
- 				<p class="ui-button"><a href="{U_POST_TOPIC}" id="create-topic" class="ui-button ui-state-default ui-corner-all"><span class="ui-icon ui-icon-plus"></span>{L_NEW_TOPIC}</a></p>
- 			<!-- ENDIF -->
- 			</div>
- 
- 			<!-- IF PAGINATION or TOTAL_POSTS -->
- 				<div class="pagination">
- 					<!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
- 					<!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
- 				</div>
- 			<!-- ENDIF -->
- 		</div>
  	<!-- ENDIF -->
  
  <!-- BEGINELSE -->
--- 57,62 ----
***************
*** 82,85 ****
  		<strong>{L_NO_TOPICS}</strong>
  		<span class="corners-bottom"><span></span></span></div>
  	</div>
! <!-- END topics -->
\ No newline at end of file
--- 65,83 ----
  		<strong>{L_NO_TOPICS}</strong>
  		<span class="corners-bottom"><span></span></span></div>
  	</div>
! <!-- END topics -->
! 
! <div class="topic-actions">
! 	<div class="buttons">
! 	<!-- IF U_POST_TOPIC -->
! 		<p class="ui-button"><a href="{U_POST_TOPIC}" id="create-topic" class="ui-button ui-state-default ui-corner-all"><span class="ui-icon ui-icon-plus"></span>{L_NEW_TOPIC}</a></p>
! 	<!-- ENDIF -->
! 	</div>
! 
! 	<!-- IF PAGINATION or TOTAL_POSTS -->
! 		<div class="pagination">
! 			<!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
! 			<!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
! 		</div>
! 	<!-- ENDIF -->
! </div>
\ No newline at end of file




More information about the customisationdb-commits mailing list