diff --git a/.gitignore b/.gitignore index 72316d3d..ffb1acf6 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ sql.log shimmie.log !lib/images ext/admin +ext/amazon_s3 ext/artists ext/autocomplete ext/ban_words @@ -28,6 +29,7 @@ ext/handle_flash ext/handle_ico ext/handle_mp3 ext/handle_svg +ext/holiday ext/home ext/image_hash_ban ext/ipban @@ -44,6 +46,7 @@ ext/random_image ext/rating ext/regen_thumb ext/report_image +ext/resize ext/res_limit ext/rss_comments ext/rss_images @@ -56,7 +59,7 @@ ext/tagger ext/tag_history ext/text_score ext/tips -ext/amazon_s3 +ext/twitter_soc ext/upload_cmd ext/wiki ext/word_filter @@ -69,4 +72,4 @@ ext/zoom /ext/twitter_soc/script.js /ext/twitter_soc/style.css /ext/twitter_soc/test.php -/ext/twitter_soc/theme.php \ No newline at end of file +/ext/twitter_soc/theme.php diff --git a/README.txt b/README.txt index 97d8955a..622d90a9 100644 --- a/README.txt +++ b/README.txt @@ -40,10 +40,10 @@ Installation Upgrade from 2.3.X ~~~~~~~~~~~~~~~~~~ The database connection setting in config.php has changed; now using -PDO DSN format [1] rather than ADODB URI [2] +PDO DSN format rather than ADODB URI: - [1] :user=;password=;host=;dbname= - [2] ://:@/ + OLD: $database_dsn = "://:@/"; + NEW: define("DATABASE_DSN", ":user=;password=;host=;dbname="); The rest should be automatic, just unzip into a clean folder and copy across config.php, images and thumbs folders from the old version. This diff --git a/contrib/artists/main.php b/contrib/artists/main.php index cb11b40d..ada1b4e5 100644 --- a/contrib/artists/main.php +++ b/contrib/artists/main.php @@ -43,8 +43,8 @@ class Artists implements Extension { if ($event instanceof PageRequestEvent) $this->handle_commands($event); - - if($event instanceof SearchTermParseEvent) { + + if ($event instanceof SearchTermParseEvent) { $matches = array(); if(preg_match("/^author=(.*)$/", $event->term, $matches)) { $char = $matches[1]; diff --git a/contrib/browser_search/main.php b/contrib/browser_search/main.php index 0b458a64..fc113121 100755 --- a/contrib/browser_search/main.php +++ b/contrib/browser_search/main.php @@ -36,7 +36,6 @@ class BrowserSearch implements Extension { // First, we need to build all the variables we'll need $search_title = $config->get_string('title'); - //$search_form_url = $config->get_string('base_href'); //make_link('post/list'); $search_form_url = make_link('post/list/{searchTerms}'); $suggenton_url = make_link('browser_search/')."{searchTerms}"; $icon_b64 = base64_encode(file_get_contents("favicon.ico")); diff --git a/contrib/forum/theme.php b/contrib/forum/theme.php index ea460b47..40b015d9 100644 --- a/contrib/forum/theme.php +++ b/contrib/forum/theme.php @@ -83,8 +83,6 @@ class ForumTheme extends Themelet { global $config, $page/*, $user*/; $theme_name = $config->get_string('theme'); - $data_href = $config->get_string('base_href'); - $base_href = $config->get_string('base_href'); $html = ""; $n = 0; diff --git a/contrib/handle_flash/theme.php b/contrib/handle_flash/theme.php index a0e8cbb4..aec6bb9f 100644 --- a/contrib/handle_flash/theme.php +++ b/contrib/handle_flash/theme.php @@ -9,6 +9,7 @@ class FlashFileHandlerTheme extends Themelet { codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' height='{$image->height}' width='{$image->width}' + wmode='opaque' > @@ -16,6 +17,7 @@ class FlashFileHandlerTheme extends Themelet { pluginspage='http://www.macromedia.com/go/getflashplayer' height='{$image->height}' width='{$image->width}' + wmode='opaque' type='application/x-shockwave-flash'> "; $page->add_block(new Block("Flash Animation", $html, "main", 0)); diff --git a/contrib/holiday/main.php b/contrib/holiday/main.php new file mode 100644 index 00000000..598e2a89 --- /dev/null +++ b/contrib/holiday/main.php @@ -0,0 +1,33 @@ + + * Link: http://www.codeanimu.net + * License: GPLv2 + * Description: Use an additional stylesheet on certain holidays. + */ +class Holiday extends SimpleExtension { + public function onInitExt(Event $event) { + global $config; + $config->set_default_bool("holiday_aprilfools", false); + } + + public function onSetupBuilding(Event $event) { + global $config; + $sb = new SetupBlock("Holiday Theme"); + $sb->add_bool_option("holiday_aprilfools", "Enable April Fools"); + $event->panel->add_block($sb); + } + + public function onPageRequest(Event $event) { + global $config; + $date = /*date('d/m') == '01/01' ||date('d/m') == '14/02' || */date('d/m') == '01/04'/* || date('d/m') == '24/12' || date('d/m') == '25/12' || date('d/m') == '31/12'*/; + if($date){ + if($config->get_bool("holiday_aprilfools")){ + $this->theme->display_holiday($date); + } + } + } + +} +?> diff --git a/themes/lite/holidays/style_aprilfools.css b/contrib/holiday/stylesheets/aprilfools.css similarity index 67% rename from themes/lite/holidays/style_aprilfools.css rename to contrib/holiday/stylesheets/aprilfools.css index 0f3f3080..9250c688 100644 --- a/themes/lite/holidays/style_aprilfools.css +++ b/contrib/holiday/stylesheets/aprilfools.css @@ -1,18 +1,8 @@ - /* - If you wish to play about with colors, the main two colors to replace are: - Main color: #CEDFF0 - Secondary color: #E3EFFA - */ - BODY { - background: #F0F7FF; - font-family: sans-serif; - font-size: 14px; - margin: 0px; /* It's a bit crazy but, april fools is supposed to be crazy. This flips the entire page upside down. TODO: Add a way for the user to disable this */ - + -webkit-transform: rotate(-180deg); /*Safari*/ -moz-transform: rotate(-180deg); /*Firefox*/ -o-transform: rotate(-180deg); /*Opera*/ diff --git a/contrib/holiday/theme.php b/contrib/holiday/theme.php new file mode 100644 index 00000000..2012f3ee --- /dev/null +++ b/contrib/holiday/theme.php @@ -0,0 +1,20 @@ +"; + $page->add_html_header("$csssheet"); + } + } +} +?> diff --git a/contrib/home/main.php b/contrib/home/main.php index f46c6238..b6172016 100644 --- a/contrib/home/main.php +++ b/contrib/home/main.php @@ -28,14 +28,13 @@ class Home extends SimpleExtension { public function onPageRequest(PageRequestEvent $event) { global $config, $page; if($event->page_matches("home")) { - $base_href = $config->get_string('base_href'); - $data_href = get_base_href(); + $base_href = get_base_href(); $sitename = $config->get_string('title'); $theme_name = $config->get_string('theme'); $body = $this->get_body(); - $this->theme->display_page($page, $sitename, $data_href, $theme_name, $body); + $this->theme->display_page($page, $sitename, $base_href, $theme_name, $body); } } @@ -58,8 +57,7 @@ class Home extends SimpleExtension { // returns just the contents of the body global $database; global $config; - $base_href = $config->get_string('base_href'); - $data_href = get_base_href(); + $base_href = get_base_href(); $sitename = $config->get_string('title'); $contact_link = $config->get_string('contact_link'); $counter_dir = $config->get_string('home_counter', 'default'); @@ -71,7 +69,7 @@ class Home extends SimpleExtension { $counter_text = ""; for($n=0; $nset_mode("data"); $page->set_data(<< $sitename - +