Changeset - 6e11d567188a
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 14 years ago 2012-02-19 01:21:32
ohnobinki@ohnopublishing.net
Add support for manually specifying the base_uri.

This is necessary for me to continue developing on my messed up mpm_peruser
installation of slate_permutate since my apache's idea of its hostname is
wrong.
2 files changed with 8 insertions and 1 deletions:
0 comments (0 inline, 0 general)
inc/class.page.php
Show inline comments
 
@@ -38,12 +38,13 @@ set_include_path(get_include_path() . PA
 
/**
 
 * Not sure if there's a better place for this... it'd be a pita to
 
 * make a new include file like doconfig.inc but maybe that'll make
 
 * sense soon.
 
 */
 
/* defaults */
 
$base_uri = '';
 
$clean_urls = FALSE;
 
$ga_trackers = array();
 
$ga_conversions = array();
 
$feedback_emails = array('ez@ethanzonca.com, ngelderloos7@gmail.com, ohnobinki@ohnopublishing.net');
 
$use_captcha = FALSE;
 
$admin_enable_purge = FALSE;
 
@@ -694,13 +695,13 @@ class page
 
   *   index/default page.
 
   * \return
 
   *   An absolute URI referring to the specified page.
 
   */
 
  public static function uri_resolve($uri = '')
 
  {
 
    static $base_uri = '';
 
    global $base_uri;
 

	
 
    static $host = '';
 
    if (empty($host))
 
      {
 
	if (isset($_SERVER['SERVER_NAME']))
 
	  $host = $_SERVER['SERVER_NAME'];
inc/config.inc.example
Show inline comments
 
@@ -39,12 +39,18 @@
 
 * understood ../.htaccess.example and copied it to ../.htaccess .
 
 */
 
/* $clean_urls = FALSE; */
 

	
 
/**
 
 * \brief
 
 *   Specify the base URI if Slate Permutate's auto-detection doesn't work.
 
 */
 
/* $base_uri = 'http://example.com/slate_permutate/'; */
 

	
 
/**
 
 * \brief
 
 *   Custom clean URLs for schedule sharing. $clean_urls must be enabled.
 
 * 
 
 * This string should be set to a valid base URL that is rewritten
 
 * to a valid slate_permutate installation. This feature will be
 
 * extended in the future to support URL shorteners.
 
 */
0 comments (0 inline, 0 general)