removal of data_href config variable -- it should be auto detected
git-svn-id: file:///home/shish/svn/shimmie2/trunk@304 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
e614634cf9
commit
f5ec3f861e
6 changed files with 8 additions and 5 deletions
|
@ -17,7 +17,7 @@ class Emoticons extends Extension {
|
|||
|
||||
private function bbcode_to_html($text) {
|
||||
global $config;
|
||||
$data_href = $config->get_string("data_href");
|
||||
$data_href = get_base_href();
|
||||
$text = preg_replace("/:([a-z]*?):/s", "<img src='$data_href/ext/emoticons/default/\\1.gif'>", $text);
|
||||
return $text;
|
||||
}
|
||||
|
|
|
@ -205,6 +205,10 @@ function get_memory_limit() {
|
|||
return $memory;
|
||||
}
|
||||
|
||||
function get_base_href() {
|
||||
return dirname($_SERVER['SCRIPT_NAME']);
|
||||
}
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
||||
* Debugging functions *
|
||||
|
|
|
@ -4,7 +4,7 @@ class LoadExtData extends Extension {
|
|||
if(is_a($event, 'PageRequestEvent')) {
|
||||
global $page, $config;
|
||||
|
||||
$data_href = $config->get_string("data_href", './');
|
||||
$data_href = get_base_href();
|
||||
|
||||
foreach(glob("ext/*/style.css") as $css_file) {
|
||||
$page->add_header("<link rel='stylesheet' href='$data_href/$css_file' type='text/css'>");
|
||||
|
|
|
@ -164,7 +164,6 @@ class Setup extends Extension {
|
|||
$sb->add_text_option("title", "Site title: ");
|
||||
$sb->add_text_option("front_page", "<br>Front page: ");
|
||||
$sb->add_text_option("base_href", "<br>Base URL: ");
|
||||
$sb->add_text_option("data_href", "<br>Data URL: ");
|
||||
$sb->add_text_option("contact_link", "<br>Contact URL:");
|
||||
$sb->add_choice_option("theme", $themes, "<br>Theme: ");
|
||||
// $sb->add_int_option("anon_id", "<br>Anonymous ID: "); // FIXME: create advanced options page
|
||||
|
|
|
@ -46,7 +46,7 @@ class Layout {
|
|||
global $config;
|
||||
$theme_name = $config->get_string('theme');
|
||||
$base_href = $config->get_string('base_href');
|
||||
$data_href = $config->get_string('data_href');
|
||||
$data_href = get_base_href();
|
||||
$contact_link = $config->get_string('contact_link');
|
||||
$version = $config->get_string('version');
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ class Layout {
|
|||
function display_page($page) {
|
||||
global $config;
|
||||
$theme_name = $config->get_string('theme', 'default');
|
||||
$data_href = $config->get_string('data_href', './');
|
||||
$data_href = get_base_href();
|
||||
$contact_link = $config->get_string('contact_link');
|
||||
$version = "Shimmie-".VERSION;
|
||||
|
||||
|
|
Reference in a new issue