singapore: the smallest big galery
home » forum » Installation » renaming singapore folder

You are not logged in.

#1 2009-03-03 02:10:52

troll711
Member

renaming singapore folder

ive noticed on some sites peoples galleries dont come up http://yoursite.com/singapore

how would i go about doing this for mine? i would like it to be gallery instead of sinapore

Offline

 

#2 2009-03-03 06:33:54

DC
Administrator

Re: renaming singapore folder

You can rename it, just make sure that when using the external php includer file you have the dir name that you are using in the path to the external file example: include("gallery/external.php");

DC


To code or not to code that is the question?

Did my response help you out? Consider donating by buying me a slice, Whats this? Read More!
http://www.clickcraft.net/slice.php

Offline

 

#3 2009-03-03 18:25:24

troll711
Member

Re: renaming singapore folder

DC wrote:

You can rename it, just make sure that when using the external php includer file you have the dir name that you are using in the path to the external file example: include("gallery/external.php");

DC

ok what part of this do i edit?

[php]
<?php

/**
* Alternate file to drive the gallery designed to be included within another
* page.
*
* This page will only send content-type headers if they have not already
* been sent. Placing a call to ob_start() within the including page before any
* content has been output will allow singapore to use non-default charsets.
*
* @package singapore
* @author Tamlyn Rhodes <tam at zenology dot co dot uk>
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License
* @copyright (c)2003-2005 Tamlyn Rhodes
* @version $Id: external.php,v 1.4 2006/08/07 10:04:28 thepavian Exp $
*/

//you may leave this blank as it will be automatically detected
$relativePath = "";

//check whether this file has been included by another and if
//so calculate the relative path and instantiate $sg with it
if(isset($_SERVER["SCRIPT_FILENAME"]) && realpath(__FILE__) != realpath($_SERVER["SCRIPT_FILENAME"])) {
  //split each path into chunks
  $you = explode(DIRECTORY_SEPARATOR,dirname(realpath($_SERVER["SCRIPT_FILENAME"])));
  $me  = explode(DIRECTORY_SEPARATOR,dirname(realpath(__FILE__)));
  $i=0;
  //find at what level paths first differ
  while($i<count($you) && $i<count($me) && $you[$i] == $me[$i]) $i++;
  //travel up appropriate number of directories
  for($j=$i;$j<count($you);$j++) $relativePath .= "../";
  //travel down appropriate directories
  for($j=$i;$j<count($me); $j++) $relativePath .= $me[$j]."/";

//otherwise print an error as this is not how external.php is supposed to work.
} else {
  die("This file is not intended to be used in this way. Please see the singapore integration guide.");
}
 

//include main class
require_once $relativePath."includes/singapore.class.php";

//create a wrapper
$sg = new Singapore($relativePath);

//send content-type and character encoding header
if(!headers_sent())
  header("Content-type: text/html; charset=".$sg->character_set);

//pass control over to template
@include $sg->config->base_path.$sg->config->pathto_current_template."index.tpl.php";

?>
[/php]

Last edited by troll711 (2009-03-03 18:29:32)

Offline

 

#4 2009-03-04 00:33:37

DC
Administrator

Re: renaming singapore folder

You do not need to edit any of it, this page is simply included into your existing php page that you add the include and path to ... so for example if your page name is test.php you then place a php include in your test.php page with the include and path as follows, if the dir that contains all your SGAL files was renamed to gallery then your include would be.

include("gallery/external.php");

Hope that helps.

DC


To code or not to code that is the question?

Did my response help you out? Consider donating by buying me a slice, Whats this? Read More!
http://www.clickcraft.net/slice.php

Offline

 

#5 2009-03-04 02:23:29

troll711
Member

Re: renaming singapore folder

ok i got it changed but im using the layout rounded and at the top it still says singapore how do i change that?

http://www.simplesourcemodz.com/gallery … undedred-0

Last edited by troll711 (2009-03-04 03:04:11)

Offline

 

#6 2009-03-04 03:42:27

DC
Administrator

Re: renaming singapore folder

I do not see what your saying?, it looks fine to me where does it say singapore?

DC


To code or not to code that is the question?

Did my response help you out? Consider donating by buying me a slice, Whats this? Read More!
http://www.clickcraft.net/slice.php

Offline

 

#7 2009-03-04 18:28:37

troll711
Member

Re: renaming singapore folder

http://i203.photobucket.com/albums/aa64/711TROLL/PIC.jpg

Offline

 

#8 2009-03-05 23:24:22

DC
Administrator

Re: renaming singapore folder

Sorry man I cant tell what your talking about.
but my first place to look is the admin when you click edit gallery and in the singapore.ini ...

DC


To code or not to code that is the question?

Did my response help you out? Consider donating by buying me a slice, Whats this? Read More!
http://www.clickcraft.net/slice.php

Offline

 

#9 2009-03-07 00:33:33

troll711
Member

Re: renaming singapore folder

kk thanks homie if i need anymore help ill post

Offline