[Customisation Database Commits] r279 - in /trunk/titania: ./ includes/ includes/core/ includes/objects/ language/en/ styles/default/template/

Nathan Guse exreaction at phpbb.com
Sun Jul 5 17:02:24 UTC 2009


Author: exreaction
Date: Sun Jul  5 17:02:20 2009
New Revision: 279

Log:
URL Class

Added:
    trunk/titania/includes/core/url.php   (with props)
Modified:
    trunk/titania/.htaccess
    trunk/titania/common.php
    trunk/titania/includes/core/titania.php
    trunk/titania/includes/functions_display.php
    trunk/titania/includes/objects/author.php
    trunk/titania/includes/objects/category.php
    trunk/titania/includes/objects/contribution.php
    trunk/titania/includes/objects/rating.php
    trunk/titania/index.php
    trunk/titania/language/en/common.php
    trunk/titania/styles/default/template/category_list.html
    trunk/titania/styles/default/template/index_body.html

Modified: trunk/titania/.htaccess
==============================================================================
*** trunk/titania/.htaccess (original)
--- trunk/titania/.htaccess Sun Jul  5 17:02:20 2009
***************
*** 23,32 ****
  Rewriterule ^(mod|style|snippet|translation|contributions?)/([^/]+)/faq/([^/]+)?/?$		./contributions/index.php?c=$2&page=faq&action=$3 [NC]
  Rewriterule ^(mod|style|snippet|translation|contributions?)/([^/]+)/faq/([^/]+)/?([^/]+)?/?$		./contributions/index.php?c=$2&page=faq&f=$3&action=$4 [NC]
  
  #categories
  RewriteCond %{REQUEST_FILENAME} !-f
  Rewriterule ^([^/]+)/([^/]+)/([^/]+)/?$	./index.php?c=$3 [NC]
  RewriteCond %{REQUEST_FILENAME} !-f
  Rewriterule ^([^/]+)/([^/]+)/?$			./index.php?c=$2 [NC]
  RewriteCond %{REQUEST_FILENAME} !-f
! Rewriterule ^([^/]+)/?$					./index.php?c=$1 [NC]
\ No newline at end of file
--- 23,36 ----
  Rewriterule ^(mod|style|snippet|translation|contributions?)/([^/]+)/faq/([^/]+)?/?$		./contributions/index.php?c=$2&page=faq&action=$3 [NC]
  Rewriterule ^(mod|style|snippet|translation|contributions?)/([^/]+)/faq/([^/]+)/?([^/]+)?/?$		./contributions/index.php?c=$2&page=faq&f=$3&action=$4 [NC]
  
+ #rating
+ RewriteCond %{REQUEST_FILENAME} !-f
+ Rewriterule ^rate/?([^/]+)?$		./index.php?action=rate [NC]
+ 
  #categories
  RewriteCond %{REQUEST_FILENAME} !-f
  Rewriterule ^([^/]+)/([^/]+)/([^/]+)/?$	./index.php?c=$3 [NC]
  RewriteCond %{REQUEST_FILENAME} !-f
  Rewriterule ^([^/]+)/([^/]+)/?$			./index.php?c=$2 [NC]
  RewriteCond %{REQUEST_FILENAME} !-f
! Rewriterule ^([^/]+)/?$					./index.php?c=$1 [NC]

Modified: trunk/titania/common.php
==============================================================================
*** trunk/titania/common.php (original)
--- trunk/titania/common.php Sun Jul  5 17:02:20 2009
***************
*** 23,28 ****
--- 23,31 ----
  require TITANIA_ROOT . 'includes/core/titania.' . PHP_EXT;
  require TITANIA_ROOT . 'includes/core/phpbb.' . PHP_EXT;
  
+ // Load the URL class
+ titania::load_url();
+ 
  // Read config.php file
  titania::read_config_file(TITANIA_ROOT . 'config.' . PHP_EXT);
  
***************
*** 54,58 ****
  // If the database is not installed or outdated redirect to the installer
  if (!defined('IN_TITANIA_INSTALL') && (!isset(phpbb::$config['titania_version']) || version_compare(phpbb::$config['titania_version'], TITANIA_VERSION, '<')))
  {
! 	redirect(titania_sid('install'));
  }
\ No newline at end of file
--- 57,61 ----
  // If the database is not installed or outdated redirect to the installer
  if (!defined('IN_TITANIA_INSTALL') && (!isset(phpbb::$config['titania_version']) || version_compare(phpbb::$config['titania_version'], TITANIA_VERSION, '<')))
  {
! 	redirect(append_sid(TITANIA_ROOT . 'install.' . PHP_EXT));
  }
\ No newline at end of file

Modified: trunk/titania/includes/core/titania.php
==============================================================================
*** trunk/titania/includes/core/titania.php (original)
--- trunk/titania/includes/core/titania.php Sun Jul  5 17:02:20 2009
***************
*** 50,55 ****
--- 50,60 ----
  	public static $time;
  
  	/**
+ 	* URL Class
+ 	*/
+ 	public static $url;
+ 
+ 	/**
  	* Current User's Access level
  	*
  	* @var int $access_level Check TITANIA_ACCESS_ constants
***************
*** 75,80 ****
--- 80,100 ----
  	public static $contrib;
  	public static $author;
  
+ 	/**
+ 	* Load URL class
+ 	*/
+ 	public static function load_url()
+ 	{
+ 		if (!class_exists('titania_url'))
+ 		{
+ 			include(TITANIA_ROOT . 'includes/core/url.' . PHP_EXT);
+ 		}
+ 
+ 		self::$url = new titania_url();
+ 
+ 		self::$url->decode_url();
+ 	}
+ 
  	/*
  	 * Initialise titania:
  	 *	Session management, Cache, Language ...
***************
*** 104,109 ****
--- 124,132 ----
  		self::$absolute_path = generate_board_url(true) . '/' . self::$config->titania_script_path;
  		self::$absolute_board = generate_board_url() . '/';
  
+ 		// Set the root path for our URL class
+ 		self::$url->root_url = self::$absolute_path;
+ 
  		// Set template path and template name
  		self::$style_path = self::$absolute_path . 'styles/' . self::$config->style . '/';
  		self::$template_path = self::$style_path . 'template';
***************
*** 414,422 ****
  			return $message;
  		}
  
! 		meta_refresh(3, titania_sid('index'));
  
! 		$message = $message . '<br /><br />' . sprintf(phpbb::$user->lang['RETURN_INDEX'], '<a href="' . titania_sid('index') . '">', '</a> ');
  		trigger_error($message);
  	}
  
--- 437,445 ----
  			return $message;
  		}
  
! 		meta_refresh(3, self::$url->build_url());
  
! 		$message = $message . '<br /><br />' . sprintf(phpbb::$user->lang['RETURN_INDEX'], '<a href="' . self::$url->build_url() . '">', '</a> ');
  		trigger_error($message);
  	}
  

Added: trunk/titania/includes/core/url.php
==============================================================================
*** trunk/titania/includes/core/url.php (added)
--- trunk/titania/includes/core/url.php Sun Jul  5 17:02:20 2009
***************
*** 0 ****
--- 1,143 ----
+ <?php
+ /**
+  *
+  * @package Titania
+  * @version $Id$
+  * @copyright (c) 2009 phpBB Customisation Database Team
+  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+  *
+  */
+ 
+ /**
+  * @ignore
+  */
+ if (!defined('IN_TITANIA'))
+ {
+ 	exit;
+ }
+ 
+ /**
+ * URL handler class for Titania
+ */
+ class titania_url
+ {
+ 	/**
+ 	* Separator used in the URL
+ 	*
+ 	* @var mixed
+ 	*/
+ 	private $separator = '-';
+ 
+ 	/**
+ 	* Root URL, the Root URL to the base
+ 	*/
+ 	public $root_url = '';
+ 
+ 	/**
+ 	* Build URL by appending the needed parameters to a base URL
+ 	*
+ 	* @param string $base The base URL, Ex: customisation/mod/
+ 	* @param array $params Array of parameters we need to clean and append to the base url
+ 	*/
+ 	public function build_url($base, $params = array())
+ 	{
+ 		global $_SID;
+ 
+ 		$final_url = $this->root_url . $base;
+ 
+ 		// Append a / at the end if required
+ 		if (substr($final_url, -1) != '/')
+ 		{
+ 			$final_url .= '/';
+ 		}
+ 
+ 		// Add style= to the url data if it is in there
+ 		if (isset($_REQUEST['style']))
+ 		{
+ 			$params['style'] = request_var('style', '');
+ 		}
+ 
+ 		// Add the Session ID if required.
+ 		if ($_SID)
+ 		{
+ 			$params['sid'] = $_SID;
+ 		}
+ 
+ 		// Some quick cleanup to remove the extra separator
+ 		return str_replace('/' . $this->separator, '/', $this->append_url($final_url, $params));
+ 	}
+ 
+ 	/**
+ 	* Append parameters to a base URL
+ 	*
+ 	* Different from build_url in this does not prepare the base, nor worry about session_id.  Only use this if you've already used build_url
+ 	*
+ 	* @param string $url The URL we currently have
+ 	* @param array $params Array of parameters we need to clean and append to the base url
+ 	*/
+ 	public function append_url($url, $params = array())
+ 	{
+ 		// Extract the anchor from the end of the base if there is one
+ 		$anchor = '';
+ 		if (strpos($url, '#') !== false)
+ 		{
+ 			$anchor = substr($url, strpos($url, '#'));
+ 			$url = substr($url, 0, strpos($url, '#'));
+ 		}
+ 
+ 		// Now clean and append the items
+ 		foreach ($params as $name => $value)
+ 		{
+ 			$url .= $this->separator . $this->url_replace($name) . $this->separator . $this->url_replace($value);
+ 		}
+ 
+ 		// Now append the anchor again
+ 		$url .= $anchor;
+ 
+ 		return $url;
+ 	}
+ 
+ 	/**
+ 	* URL Replace
+ 	*
+ 	* Replaces tags and other items that could break the URL's
+ 	*/
+ 	public function url_replace($url)
+ 	{
+ 		$match = array('#', '?', '/', '\\', '\'', '&amp;', '&lt;', '&gt;', '&quot;', ':', $this->separator);
+ 
+ 		return urlencode(str_replace($match, '', $url));
+ 	}
+ 
+ 	/**
+ 	* Decode the url we are currently on and put the things in $_REQUEST/$_GET
+ 	*
+ 	* This function should be called before phpBB is initialized
+ 	*/
+ 	public function decode_url()
+ 	{
+ 		$url = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
+ 
+ 		// Remove everything before the last \
+ 		$args = substr($url, (strrpos($url, '/') + 1));
+ 
+ 		// Split up the arguments
+ 		$args = explode($this->separator, $args);
+ 
+ 		if (sizeof($args) < 2)
+ 		{
+ 			return;
+ 		}
+ 
+ 		// Go through all the arguments and put them in $_GET & $_REQUEST
+ 		for ($i = 0; $i < sizeof($args); $i+=2)
+ 		{
+ 			$name = $args[$i];
+ 			$value = $args[($i + 1)];
+ 
+ 			$_GET[$name] = $_REQUEST[$name] = $value;
+ 		}
+ 
+ 		var_export($_GET);
+ 	}
+ }

Propchange: trunk/titania/includes/core/url.php
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: trunk/titania/includes/functions_display.php
==============================================================================
*** trunk/titania/includes/functions_display.php (original)
--- trunk/titania/includes/functions_display.php Sun Jul  5 17:02:20 2009
***************
*** 37,60 ****
  *
  * @param int $type The type (check TITANIA_TYPE_ constants)
  */
! function get_contrib_type_string($type)
  {
! 	switch ($type)
  	{
! 		case TITANIA_TYPE_MOD :
! 			return phpbb::$user->lang['MODIFICATION'];
! 		break;
  
! 		case TITANIA_TYPE_STYLE :
! 			return phpbb::$user->lang['STYLE'];
! 		break;
  
! 		case TITANIA_TYPE_SNIPPET :
! 			return phpbb::$user->lang['SNIPPET'];
  		break;
  
! 		case TITANIA_TYPE_LANG_PACK :
! 			return phpbb::$user->lang['LANGUAGE_PACK'];
  		break;
  	}
  }
--- 37,94 ----
  *
  * @param int $type The type (check TITANIA_TYPE_ constants)
  */
! function get_contrib_type_string($type, $mode = 'lang')
  {
! 	switch($mode)
  	{
! 		case 'url' :
! 			switch ($type)
! 			{
! 				case TITANIA_TYPE_MOD :
! 					return 'mod';
! 				break;
  
! 				case TITANIA_TYPE_STYLE :
! 					return 'style';
! 				break;
  
! 				case TITANIA_TYPE_SNIPPET :
! 					return 'snippet';
! 				break;
! 
! 				case TITANIA_TYPE_LANG_PACK :
! 					return 'language_pack';
! 				break;
! 
! 				default :
! 					return 'contribution';
! 				break;
! 			}
  		break;
  
! 		case 'lang' :
! 			switch ($type)
! 			{
! 				case TITANIA_TYPE_MOD :
! 					return phpbb::$user->lang['MODIFICATION'];
! 				break;
! 
! 				case TITANIA_TYPE_STYLE :
! 					return phpbb::$user->lang['STYLE'];
! 				break;
! 
! 				case TITANIA_TYPE_SNIPPET :
! 					return phpbb::$user->lang['SNIPPET'];
! 				break;
! 
! 				case TITANIA_TYPE_LANG_PACK :
! 					return phpbb::$user->lang['LANGUAGE_PACK'];
! 				break;
! 
! 				default :
! 					return phpbb::$user->lang['CONTRIBUTION'];
! 				break;
! 			}
  		break;
  	}
  }
***************
*** 120,125 ****
--- 154,160 ----
  
  	$result = phpbb::$db->sql_query($sql);
  
+ 	$contrib_type = 0;
  	while ($row = phpbb::$db->sql_fetchrow($result))
  	{
  		$contrib = new titania_contribution();
***************
*** 136,149 ****
  			'CONTRIB_RATING'			=> $row['contrib_rating'],
  			'CONTRIB_RATING_COUNT'		=> $row['contrib_rating_count'],
  
! 			'U_VIEW_CONTRIB'			=> $contrib->get_url(),
  
  			'S_CONTRIB_TYPE'			=> $row['contrib_type'],
  		));
  
  		unset($contrib);
  	}
  	phpbb::$db->sql_freeresult($result);
  }
  
  /**
--- 171,193 ----
  			'CONTRIB_RATING'			=> $row['contrib_rating'],
  			'CONTRIB_RATING_COUNT'		=> $row['contrib_rating_count'],
  
! 			'U_VIEW_CONTRIB'			=> titania::$url->build_url($contrib->get_url()),
  
  			'S_CONTRIB_TYPE'			=> $row['contrib_type'],
  		));
  
+ 		$contrib_type = $row['contrib_type'];
+ 
  		unset($contrib);
  	}
  	phpbb::$db->sql_freeresult($result);
+ 
+ 	/**
+ 	* @todo add current category_id to submission url, so it shows as selected in the list
+ 	*/
+ 	phpbb::$template->assign_vars(array(
+ 		'U_SUBMIT_CONTRIB'		=> ($mode == 'category' && phpbb::$auth->acl_get('titania_contrib_submit')) ? titania::$url->build_url(get_contrib_type_string($contrib_type, 'url') . '/submit') : '',
+ 	));
  }
  
  /**

Modified: trunk/titania/includes/objects/author.php
==============================================================================
*** trunk/titania/includes/objects/author.php (original)
--- trunk/titania/includes/objects/author.php Sun Jul  5 17:02:20 2009
***************
*** 241,247 ****
  	 */
  	public function get_url()
  	{
! 		return titania::$absolute_path . 'author/' . $this->username_clean;
  	}
  
  	/**
--- 241,247 ----
  	 */
  	public function get_url()
  	{
! 		return 'author/' . $this->username_clean;
  	}
  
  	/**
***************
*** 296,305 ****
  			'AUTHOR_STYLES'					=> $this->author_styles,
  			'AUTHOR_SNIPPETS'				=> $this->author_snippets,
  
! 			'U_AUTHOR_PROFILE'				=> $this->get_url(),
  			'U_AUTHOR_PROFILE_PHPBB'		=> $this->get_phpbb_profile_url(),
  			'U_AUTHOR_PROFILE_PHPBB_COM'	=> $this->get_phpbb_com_profile_url(),
! 			'U_AUTHOR_CONTRIBUTIONS'		=> $this->get_url() . '/contributions',
  		);
  
  		if ($return)
--- 296,305 ----
  			'AUTHOR_STYLES'					=> $this->author_styles,
  			'AUTHOR_SNIPPETS'				=> $this->author_snippets,
  
! 			'U_AUTHOR_PROFILE'				=> titania::$url->build_url($this->get_url()),
  			'U_AUTHOR_PROFILE_PHPBB'		=> $this->get_phpbb_profile_url(),
  			'U_AUTHOR_PROFILE_PHPBB_COM'	=> $this->get_phpbb_com_profile_url(),
! 			'U_AUTHOR_CONTRIBUTIONS'		=> titania::$url->build_url($this->get_url() . '/contributions'),
  		);
  
  		if ($return)

Modified: trunk/titania/includes/objects/category.php
==============================================================================
*** trunk/titania/includes/objects/category.php (original)
--- trunk/titania/includes/objects/category.php Sun Jul  5 17:02:20 2009
***************
*** 170,180 ****
  	}
  
  	/**
! 	* Build view URL for a contribution
  	*/
  	public function get_url()
  	{
! 		$url = titania::$absolute_path;
  
  		$parent_list = titania::$cache->get_category_parents($this->category_id);
  
--- 170,180 ----
  	}
  
  	/**
! 	* Build view URL for a category
  	*/
  	public function get_url()
  	{
! 		$url = '';
  
  		$parent_list = titania::$cache->get_category_parents($this->category_id);
  
***************
*** 210,216 ****
  			'CATEGORY_CONTRIBS'	=> $this->category_contribs,
  			'CATEGORY_TYPE'		=> $this->category_type,
  
! 			'U_VIEW_CATEGORY'	=> $this->get_url(),
  		);
  
  		if ($return)
--- 210,216 ----
  			'CATEGORY_CONTRIBS'	=> $this->category_contribs,
  			'CATEGORY_TYPE'		=> $this->category_type,
  
! 			'U_VIEW_CATEGORY'	=> titania::$url->build_url($this->get_url()),
  		);
  
  		if ($return)

Modified: trunk/titania/includes/objects/contribution.php
==============================================================================
*** trunk/titania/includes/objects/contribution.php (original)
--- trunk/titania/includes/objects/contribution.php Sun Jul  5 17:02:20 2009
***************
*** 516,550 ****
  	*/
  	public function get_url()
  	{
! 		$url = titania::$absolute_path;
! 
! 		// For different items we will display the URL differently
! 		switch ($this->contrib_type)
! 		{
! 			case TITANIA_TYPE_MOD :
! 				$url .= 'mod/';
! 			break;
! 
! 			case TITANIA_TYPE_STYLE :
! 				$url .= 'style/';
! 			break;
! 
! 			case TITANIA_TYPE_SNIPPET :
! 				$url .= 'snippet/';
! 			break;
! 
! 			case TITANIA_TYPE_LANG_PACK :
! 				$url .= 'translation/';
! 			break;
! 
! 			default :
! 				$url .= 'contribution/';
! 			break;
! 		}
! 
! 		// Now the contrib name
! 		$url .= $this->contrib_name_clean;
! 
! 		return $url;
  	}
  }
--- 516,521 ----
  	*/
  	public function get_url()
  	{
! 		return get_contrib_type_string($this->contrib_type, 'url') . '/' . $this->contrib_name_clean;
  	}
  }

Modified: trunk/titania/includes/objects/rating.php
==============================================================================
*** trunk/titania/includes/objects/rating.php (original)
--- trunk/titania/includes/objects/rating.php Sun Jul  5 17:02:20 2009
***************
*** 192,198 ****
  	public function get_rating_string()
  	{
  		$can_rate = (phpbb::$user->data['is_registered'] && phpbb::$auth->acl_get('titania_rate') && !$this->rating_id) ? true : false;
! 		$rate_url = titania_sid('index', "action=rate&amp;type={$this->rating_type}&amp;id={$this->rating_object_id}");
  
  		// If it has not had any ratings yet, give it 1/2 the max for the rating
  		if ($this->rating_count == 0)
--- 192,198 ----
  	public function get_rating_string()
  	{
  		$can_rate = (phpbb::$user->data['is_registered'] && phpbb::$auth->acl_get('titania_rate') && !$this->rating_id) ? true : false;
! 		$rate_url = titania::$url->build_url('rate', array('type' => $this->rating_type, 'id' => $this->rating_object_id));
  
  		// If it has not had any ratings yet, give it 1/2 the max for the rating
  		if ($this->rating_count == 0)
***************
*** 207,213 ****
  			// Title will be $i/max if they've not rated it, rating/max if they have
  			$title = (($this->rating_value) ? $this->rating_value : $i) . '/' . titania::$config->max_rating;
  
! 			$final_code .= ($can_rate) ? '<a href="' . $rate_url . '&amp;value=' . $i . '">' : '';
  			$final_code .= '<img id="' . $this->rating_object_id . '_' . $i . '" ';
  			if ($this->rating_id && $i <= $this->rating) // If they have rated, show their own rating in green stars
  			{
--- 207,213 ----
  			// Title will be $i/max if they've not rated it, rating/max if they have
  			$title = (($this->rating_value) ? $this->rating_value : $i) . '/' . titania::$config->max_rating;
  
! 			$final_code .= ($can_rate) ? '<a href="' . titania::$url->append_url($rate_url, array('value' => $i)) . '">' : '';
  			$final_code .= '<img id="' . $this->rating_object_id . '_' . $i . '" ';
  			if ($this->rating_id && $i <= $this->rating) // If they have rated, show their own rating in green stars
  			{
***************
*** 229,235 ****
  		// If they have rated already we will add the remove rating icon at the end
  		if ($this->rating_id)
  		{
! 			$final_code .= ' <a href="' . $rate_url . '&amp;value=-1"><img id="' . $this->rating_object_id . '_remove" src="' . titania::$theme_path . '/images/star_remove.gif"  alt="' . phpbb::$user->lang['REMOVE_RATING'] . '" title="' . phpbb::$user->lang['REMOVE_RATING'] . '" /></a>';
  		}
  
  		$final_code .= '</span>';
--- 229,235 ----
  		// If they have rated already we will add the remove rating icon at the end
  		if ($this->rating_id)
  		{
! 			$final_code .= ' <a href="' . $rate_url . '"><img id="' . $this->rating_object_id . '_remove" src="' . titania::$theme_path . '/images/star_remove.gif"  alt="' . phpbb::$user->lang['REMOVE_RATING'] . '" title="' . phpbb::$user->lang['REMOVE_RATING'] . '" /></a>';
  		}
  
  		$final_code .= '</span>';

Modified: trunk/titania/index.php
==============================================================================
*** trunk/titania/index.php (original)
--- trunk/titania/index.php Sun Jul  5 17:02:20 2009
***************
*** 38,44 ****
  	case 'rate' :
  		$type = request_var('type', '');
  		$id = request_var('id', 0);
! 		$value = request_var('value', 0.0);
  
  		switch ($type)
  		{
--- 38,44 ----
  	case 'rate' :
  		$type = request_var('type', '');
  		$id = request_var('id', 0);
! 		$value = request_var('value', -1.0);
  
  		switch ($type)
  		{
***************
*** 46,52 ****
  				titania::load_object('author');
  				$object = new titania_author();
  				$object->load($id);
! 				$redirect = $object->get_url();
  
  				if (!$object)
  				{
--- 46,52 ----
  				titania::load_object('author');
  				$object = new titania_author();
  				$object->load($id);
! 				$redirect = titania::$url->build_url($object->get_url());
  
  				if (!$object)
  				{
***************
*** 58,64 ****
  				titania::load_object('contribution');
  				$object = new titania_contribution();
  				$object->load($id);
! 				$redirect = $object->get_url();
  
  				if (!$object)
  				{
--- 58,64 ----
  				titania::load_object('contribution');
  				$object = new titania_contribution();
  				$object->load($id);
! 				$redirect = titania::$url->build_url($object->get_url());
  
  				if (!$object)
  				{
***************
*** 90,95 ****
--- 90,100 ----
  	* Default (display category/contrib list)
  	*/
  	default :
+ 		phpbb::$template->assign_vars(array(
+ 			// Don't move this after titania_display_contribs, as it gets over-written if we are viewing a mods/styles/etc category
+ 			'U_SUBMIT_CONTRIB'		=> (phpbb::$auth->acl_get('titania_contrib_submit')) ? titania::$url->build_url('contributions/submit') : '',
+ 		));
+ 
  		titania_display_categories($category_id);
  
  		if ($category_id != 0)

Modified: trunk/titania/language/en/common.php
==============================================================================
*** trunk/titania/language/en/common.php (original)
--- trunk/titania/language/en/common.php Sun Jul  5 17:02:20 2009
***************
*** 36,41 ****
--- 36,42 ----
  // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
  
  $lang = array_merge($lang, array(
+ 'SUBMIT_CONTRIB' => 'Submit new Contribution',
  	'AUTHOR_BY'					=> 'By %s',
  
  	'BAD_RATING'				=> 'Rating attempt failed.',
***************
*** 77,90 ****
  	'STYLE'						=> 'Style',
  
  	'RETURN_LAST_PAGE'			=> 'Return to the previous page',
! 	
  	'MOVE_UP'				=> 'Move up',
  	'MOVE_DOWN'				=> 'Move down',
  	'EDIT'					=> 'Edit',
! 	
  	'ACCESS_TEAMS'				=> 'Teams',
  	'ACCESS_AUTHORS'			=> 'Authors',
  	'ACCESS_PUBLIC'				=> 'Public',
! 	
  	'ACCESS'				=> 'Access',
  ));
--- 78,91 ----
  	'STYLE'						=> 'Style',
  
  	'RETURN_LAST_PAGE'			=> 'Return to the previous page',
! 
  	'MOVE_UP'				=> 'Move up',
  	'MOVE_DOWN'				=> 'Move down',
  	'EDIT'					=> 'Edit',
! 
  	'ACCESS_TEAMS'				=> 'Teams',
  	'ACCESS_AUTHORS'			=> 'Authors',
  	'ACCESS_PUBLIC'				=> 'Public',
! 
  	'ACCESS'				=> 'Access',
  ));

Modified: trunk/titania/styles/default/template/category_list.html
==============================================================================
*** trunk/titania/styles/default/template/category_list.html (original)
--- trunk/titania/styles/default/template/category_list.html Sun Jul  5 17:02:20 2009
***************
*** 1,4 ****
--- 1,5 ----
  <!-- IF .categories -->
+ 
  <div class="forumbg forumbg-table">
  	<div class="inner"><span class="corners-top"><span></span></span>
  

Modified: trunk/titania/styles/default/template/index_body.html
==============================================================================
*** trunk/titania/styles/default/template/index_body.html (original)
--- trunk/titania/styles/default/template/index_body.html Sun Jul  5 17:02:20 2009
***************
*** 2,9 ****
--- 2,13 ----
  
  <h2 class="solo">{L_CUSTOMISATION_DATABASE}</h2>
  
+ <!-- IF U_SUBMIT_CONTRIB --><a href="{U_SUBMIT_CONTRIB}">{L_SUBMIT_CONTRIB}</a><!-- ENDIF -->
+ 
  <!-- INCLUDE category_list.html -->
  
  <!-- INCLUDE contrib_list.html -->
  
+ <!-- IF U_SUBMIT_CONTRIB --><a href="{U_SUBMIT_CONTRIB}">{L_SUBMIT_CONTRIB}</a><!-- ENDIF -->
+ 
  <!-- INCLUDE overall_footer.html -->
\ No newline at end of file




More information about the customisationdb-commits mailing list