Changeset 550
- Timestamp:
- 06/30/08 13:45:19 (5 months ago)
- Location:
- trunk
- Files:
-
- 9 added
- 4 removed
- 69 modified
- 60 copied
- 18 moved
-
css/gallery.css (deleted)
-
dynamics.js (deleted)
-
gallery.php (modified) (1 diff)
-
graphics (deleted)
-
index.php (modified) (3 diffs)
-
lib/plogger (deleted)
-
plog-admin (moved) (moved from trunk/admin)
-
plog-admin/_install.php (moved) (moved from trunk/_install.php) (4 diffs)
-
plog-admin/_upgrade.php (moved) (moved from trunk/_upgrade.php) (16 diffs)
-
plog-admin/css (moved) (moved from trunk/css)
-
plog-admin/css/admin.css (modified) (11 diffs)
-
plog-admin/css/greybox.css (modified) (1 diff)
-
plog-admin/css/lightbox.css (modified) (1 diff)
-
plog-admin/css/tabs.css (modified) (2 diffs)
-
plog-admin/images (added)
-
plog-admin/images/ajax-loader.gif (copied) (copied from trunk/graphics/ajax-loader.gif)
-
plog-admin/images/alert.gif (copied) (copied from trunk/graphics/alert.gif)
-
plog-admin/images/auto.gif (copied) (copied from trunk/graphics/auto.gif)
-
plog-admin/images/bg.gif (copied) (copied from trunk/graphics/bg.gif)
-
plog-admin/images/button-bg.gif (copied) (copied from trunk/graphics/button-bg.gif)
-
plog-admin/images/close.gif (copied) (copied from trunk/graphics/close.gif)
-
plog-admin/images/edit.gif (copied) (copied from trunk/graphics/edit.gif)
-
plog-admin/images/folder_open.gif (copied) (copied from trunk/graphics/folder_open.gif)
-
plog-admin/images/left.gif (copied) (copied from trunk/graphics/left.gif)
-
plog-admin/images/left_on.gif (copied) (copied from trunk/graphics/left_on.gif)
-
plog-admin/images/loading.gif (copied) (copied from trunk/graphics/loading.gif)
-
plog-admin/images/login.gif (copied) (copied from trunk/graphics/login.gif)
-
plog-admin/images/new_file.gif (copied) (copied from trunk/graphics/new_file.gif)
-
plog-admin/images/overlay.png (copied) (copied from trunk/graphics/overlay.png)
-
plog-admin/images/plogger-box-add-green.png (copied) (copied from trunk/graphics/plogger-box-add-green.png)
-
plog-admin/images/plogger-box-add.png (copied) (copied from trunk/graphics/plogger-box-add.png)
-
plog-admin/images/plogger-sm.gif (copied) (copied from trunk/graphics/plogger-sm.gif)
-
plog-admin/images/plogger.gif (copied) (copied from trunk/graphics/plogger.gif)
-
plog-admin/images/right.gif (copied) (copied from trunk/graphics/right.gif)
-
plog-admin/images/right_on.gif (copied) (copied from trunk/graphics/right_on.gif)
-
plog-admin/images/rss.gif (copied) (copied from trunk/graphics/rss.gif)
-
plog-admin/images/shadow.gif (copied) (copied from trunk/graphics/shadow.gif)
-
plog-admin/images/shadowAlpha.png (copied) (copied from trunk/graphics/shadowAlpha.png)
-
plog-admin/images/table-middle.gif (copied) (copied from trunk/graphics/table-middle.gif)
-
plog-admin/images/table-top-left.gif (copied) (copied from trunk/graphics/table-top-left.gif)
-
plog-admin/images/table-top-right.gif (copied) (copied from trunk/graphics/table-top-right.gif)
-
plog-admin/images/x.gif (copied) (copied from trunk/graphics/x.gif)
-
plog-admin/includes (added)
-
plog-admin/includes/install-form-setup-complete.php (copied) (copied from trunk/lib/plogger/form_setup_complete.php) (1 diff)
-
plog-admin/includes/install-form-setup.php (copied) (copied from trunk/lib/plogger/form_setup.php) (1 diff)
-
plog-admin/includes/install-functions.php (copied) (copied from trunk/lib/plogger/install_functions.php) (11 diffs)
-
plog-admin/index.php (modified) (2 diffs)
-
plog-admin/js/ajax_editing.js (modified) (1 diff)
-
plog-admin/js/lightbox.js (modified) (1 diff)
-
plog-admin/plog-admin-functions.php (modified) (30 diffs)
-
plog-admin/plog-admin.php (modified) (2 diffs)
-
plog-admin/plog-feedback.php (modified) (2 diffs)
-
plog-admin/plog-import.php (modified) (11 diffs)
-
plog-admin/plog-manage.php (modified) (20 diffs)
-
plog-admin/plog-options.php (modified) (7 diffs)
-
plog-admin/plog-rpc.php (modified) (6 diffs)
-
plog-admin/plog-themes.php (modified) (5 diffs)
-
plog-admin/plog-thumb.php (modified) (1 diff)
-
plog-admin/plog-thumbpopup.php (modified) (2 diffs)
-
plog-admin/plog-upload.php (modified) (8 diffs)
-
plog-config-sample.php (moved) (moved from trunk/plog-config.php)
-
plog-content (added)
-
plog-content/images (moved) (moved from trunk/images)
-
plog-content/images/index.php (modified) (1 diff)
-
plog-content/themes (moved) (moved from trunk/themes)
-
plog-content/themes/air/album.php (modified) (2 diffs)
-
plog-content/themes/air/collection.php (modified) (4 diffs)
-
plog-content/themes/air/collections.php (modified) (3 diffs)
-
plog-content/themes/air/comments.php (modified) (4 diffs)
-
plog-content/themes/air/dynamics.js (modified) (4 diffs)
-
plog-content/themes/air/explorer.css (modified) (2 diffs)
-
plog-content/themes/air/footer.php (modified) (3 diffs)
-
plog-content/themes/air/gallery.css (modified) (20 diffs)
-
plog-content/themes/air/header.php (modified) (1 diff)
-
plog-content/themes/air/images/comment.gif (copied) (copied from trunk/graphics/comment.gif)
-
plog-content/themes/air/images/fforward.gif (copied) (copied from trunk/graphics/fforward.gif)
-
plog-content/themes/air/images/play.gif (copied) (copied from trunk/graphics/play.gif)
-
plog-content/themes/air/images/printer.gif (copied) (copied from trunk/graphics/printer.gif)
-
plog-content/themes/air/images/rewind.gif (copied) (copied from trunk/graphics/rewind.gif)
-
plog-content/themes/air/images/rss.gif (copied) (copied from trunk/graphics/rss.gif)
-
plog-content/themes/air/images/search.gif (copied) (copied from trunk/graphics/search.gif)
-
plog-content/themes/air/images/stop.gif (copied) (copied from trunk/graphics/stop.gif)
-
plog-content/themes/air/images/thumb-video.gif (copied) (copied from trunk/graphics/thumb-video.gif)
-
plog-content/themes/air/meta.php (modified) (1 diff)
-
plog-content/themes/air/picture.php (modified) (2 diffs)
-
plog-content/themes/air/search.php (modified) (2 diffs)
-
plog-content/themes/air/slideshow.php (modified) (6 diffs)
-
plog-content/themes/default/album.php (modified) (2 diffs)
-
plog-content/themes/default/collection.php (modified) (3 diffs)
-
plog-content/themes/default/collections.php (modified) (1 diff)
-
plog-content/themes/default/comments.php (modified) (3 diffs)
-
plog-content/themes/default/dynamics.js (modified) (4 diffs)
-
plog-content/themes/default/footer.php (modified) (2 diffs)
-
plog-content/themes/default/gallery.css (modified) (16 diffs)
-
plog-content/themes/default/head.php (modified) (1 diff)
-
plog-content/themes/default/header.php (modified) (1 diff)
-
plog-content/themes/default/images (added)
-
plog-content/themes/default/images/button-bg.gif (copied) (copied from trunk/graphics/button-bg.gif)
-
plog-content/themes/default/images/comment.gif (copied) (copied from trunk/graphics/comment.gif)
-
plog-content/themes/default/images/fforward.gif (copied) (copied from trunk/graphics/fforward.gif)
-
plog-content/themes/default/images/play.gif (copied) (copied from trunk/graphics/play.gif)
-
plog-content/themes/default/images/printer.gif (copied) (copied from trunk/graphics/printer.gif)
-
plog-content/themes/default/images/rewind.gif (copied) (copied from trunk/graphics/rewind.gif)
-
plog-content/themes/default/images/rss.gif (copied) (copied from trunk/graphics/rss.gif)
-
plog-content/themes/default/images/search.gif (copied) (copied from trunk/graphics/search.gif)
-
plog-content/themes/default/images/stop.gif (copied) (copied from trunk/graphics/stop.gif)
-
plog-content/themes/default/images/thumb-video.gif (copied) (copied from trunk/graphics/thumb-video.gif)
-
plog-content/themes/default/images/x.gif (copied) (copied from trunk/graphics/x.gif)
-
plog-content/themes/default/meta.php (modified) (1 diff)
-
plog-content/themes/default/picture.php (modified) (3 diffs)
-
plog-content/themes/default/search.php (modified) (2 diffs)
-
plog-content/themes/default/slideshow.php (modified) (5 diffs)
-
plog-content/themes/index.php (added)
-
plog-content/themes/lucid/album.php (modified) (2 diffs)
-
plog-content/themes/lucid/collection.php (modified) (2 diffs)
-
plog-content/themes/lucid/collections.php (modified) (2 diffs)
-
plog-content/themes/lucid/comments.php (modified) (3 diffs)
-
plog-content/themes/lucid/dynamics.js (modified) (4 diffs)
-
plog-content/themes/lucid/footer.php (modified) (1 diff)
-
plog-content/themes/lucid/gallery.css (modified) (3 diffs)
-
plog-content/themes/lucid/header.php (modified) (1 diff)
-
plog-content/themes/lucid/images/comment.gif (copied) (copied from trunk/graphics/comment.gif)
-
plog-content/themes/lucid/images/fforward.gif (copied) (copied from trunk/graphics/fforward.gif)
-
plog-content/themes/lucid/images/play.gif (copied) (copied from trunk/graphics/play.gif)
-
plog-content/themes/lucid/images/printer.gif (copied) (copied from trunk/graphics/printer.gif)
-
plog-content/themes/lucid/images/rewind.gif (copied) (copied from trunk/graphics/rewind.gif)
-
plog-content/themes/lucid/images/rss.gif (copied) (copied from trunk/graphics/rss.gif)
-
plog-content/themes/lucid/images/search.gif (copied) (copied from trunk/graphics/search.gif)
-
plog-content/themes/lucid/images/stop.gif (copied) (copied from trunk/graphics/stop.gif)
-
plog-content/themes/lucid/images/thumb-video.gif (copied) (copied from trunk/graphics/thumb-video.gif)
-
plog-content/themes/lucid/images/x.gif (copied) (copied from trunk/graphics/x.gif)
-
plog-content/themes/lucid/meta.php (modified) (1 diff)
-
plog-content/themes/lucid/picture.php (modified) (3 diffs)
-
plog-content/themes/lucid/search.php (modified) (2 diffs)
-
plog-content/themes/lucid/slideshow.php (added)
-
plog-content/thumbs (moved) (moved from trunk/thumbs)
-
plog-content/thumbs/index.php (modified) (1 diff)
-
plog-content/translations (moved) (moved from trunk/plog-translations)
-
plog-content/translations/index.php (modified) (1 diff)
-
plog-content/uploads (moved) (moved from trunk/uploads)
-
plog-content/uploads/index.php (modified) (1 diff)
-
plog-download.php (modified) (9 diffs)
-
plog-globals.php (modified) (3 diffs)
-
plog-includes (added)
-
plog-includes/captcha.ttf (moved) (moved from trunk/captcha.ttf)
-
plog-includes/js (added)
-
plog-includes/js/plog-slideshow.js (moved) (moved from trunk/slideshow.js)
-
plog-includes/lib (moved) (moved from trunk/lib)
-
plog-includes/plog-captcha.php (moved) (moved from trunk/plog-captcha.php) (2 diffs)
-
plog-includes/plog-comment.php (moved) (moved from trunk/plog-comment.php) (2 diffs)
-
plog-includes/plog-functions.php (moved) (moved from trunk/plog-functions.php) (66 diffs)
-
plog-includes/plog-tag-functions.php (moved) (moved from trunk/plog-tag-functions.php) (1 diff)
-
plog-load-config.php (moved) (moved from trunk/plog-load_config.php) (9 diffs)
-
plog-print.php (modified) (2 diffs)
-
plog-remote.php (modified) (8 diffs)
-
plog-rss.php (modified) (8 diffs)
-
plog-thumb.php (modified) (2 diffs)
-
plog-xml.php (modified) (21 diffs)
-
plogger.php (added)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gallery.php
r546 r550 1 1 <?php 2 #error_reporting(E_ALL); 3 include_once(dirname(__FILE__)."/plog-load_config.php"); 4 //include("plog-globals.php"); 5 //include_once("plog-functions.php"); 6 7 global $config; 8 9 // process path here - is set if mod_rewrite is in use 10 if (!empty($_REQUEST["path"])) { 11 // The following line calculates the path in the album and excludes any subdirectories if 12 // Plogger is installed in one 13 $path = join("/",array_diff(explode("/",$_SERVER["REQUEST_URI"]),explode("/",$_SERVER["PHP_SELF"]))); 14 $resolved_path = resolve_path($path); 15 if (is_array($resolved_path)) { 16 $_GET["level"] = $resolved_path["level"]; 17 $_GET["id"] = $resolved_path["id"]; 18 if (isset($resolved_path['mode'])) { 19 $_GET['mode'] = $resolved_path['mode']; 20 } 21 22 // get page number from url, if present 23 $parts = parse_url($_SERVER["REQUEST_URI"]); 24 if (isset($parts["query"])) { 25 parse_str($parts["query"],$query_parts); 26 if (!empty($query_parts["plog_page"])) $_GET["plog_page"] = $query_parts["plog_page"]; 27 } 28 $path = $parts["path"]; 29 } 30 } 31 32 // Set sorting session variables if they are passed 33 if (isset($_GET['sortby'])) { 34 $_SESSION['plogger_sortby'] = $_GET['sortby']; 35 } 36 37 if (isset($_GET['sortdir'])) { 38 $_SESSION['plogger_sortdir'] = $_GET['sortdir']; 39 } 40 41 // The three GET parameters that it accepts are 42 // $level = "collection", "album", or "picture" 43 // $id = id number of collection, album, or picture 44 // $n = starting element (for pagination) go from n to n + max_thumbs (in global config) 45 46 // use plogger specific variables to avoid name clashes if Plogger is embedded 47 48 49 50 $GLOBALS['plogger_level'] = isset($_GET["level"]) ? $_GET["level"] : ''; 51 $GLOBALS['plogger_id'] = isset($_GET["id"]) ? intval($_GET["id"]) : 0; 52 $GLOBALS['plogger_mode'] = isset($_GET["mode"]) ? $_GET["mode"] : ''; 53 54 $allowed_levels = array('collections','collection','album','picture','search'); 55 if (!in_array($GLOBALS['plogger_level'],$allowed_levels)) { 56 $GLOBALS['plogger_level'] = 'collections'; 57 } 58 59 // Some Estonian remarks was here ?!? 60 61 define('THEME_DIR', dirname(__FILE__) . '/themes/' . $config['theme_dir']); 62 define('THEME_URL', $config['theme_url']); 2 /* This is a backwords compatible file to make old installations work correctly */ 3 include_once(dirname(__FILE__)."/plogger.php"); 63 4 64 5 function the_gallery_head() { 65 plogger_head(); 66 67 $use_file = 'head.php'; 68 if (file_exists(THEME_DIR . "/" . $use_file)) { 69 include(THEME_DIR . "/" . $use_file); 70 } else { 71 include(dirname(__FILE__).'/themes/default/'.$use_file); 72 } 6 return the_plogger_gallery_head(); 73 7 } 74 8 75 9 function the_gallery(){ 76 // collections mode (show all albums within a collection) 77 // it's the default 78 $use_file = "collections.php"; 79 if ($GLOBALS['plogger_level'] == "picture"){ 80 $use_file = 'picture.php'; 81 } 82 elseif ($GLOBALS['plogger_level'] == "search"){ 83 if ($GLOBALS['plogger_mode'] == "slideshow") { 84 $use_file = 'slideshow.php'; 85 } else { 86 $use_file = 'search.php'; 87 } 88 } 89 elseif ($GLOBALS['plogger_level'] == "album") { 90 // Album level display mode (display all pictures within album) 91 if ($GLOBALS['plogger_mode'] == "slideshow") { 92 $use_file = 'slideshow.php'; 93 } else { 94 $use_file = 'album.php'; 95 } 96 } 97 else if ($GLOBALS['plogger_level'] == "collection") { 98 $use_file = 'collection.php'; 99 } 100 101 // if the theme does not have the requested file, then use the one from the default template 102 if (file_exists(THEME_DIR . "/" . $use_file)) { 103 include(THEME_DIR . "/" . $use_file); 104 } else { 105 include(dirname(__FILE__).'/themes/default/'.$use_file); 106 } 107 } 10 return the_plogger_gallery(); 11 } 108 12 ?> -
trunk/index.php
r511 r550 3 3 * Plogger - A web based photo gallery 4 4 * Copyright (C) 2005 Mike Johnson 5 * 5 * 6 6 * This program is free software; you can redistribute it and/or modify 7 7 * it under the terms of the GNU General Public License as published by 8 8 * the Free Software Foundation; either version 2 of the License, or (at 9 9 * your option) any later version. 10 * 10 * 11 11 * This program is distributed in the hope that it will be useful, but 12 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 14 * General Public License for more details. 15 * 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software … … 21 21 <?php require("gallery.php"); ?> 22 22 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 23 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">24 25 <html xml:lang="<?php echo $language; ?>" lang="<?php echo $language; ?>" xmlns="http://www.w3.org/1999/xhtml"> 23 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 24 25 <html xml:lang="<?php echo $language; ?>" lang="<?php echo $language; ?>" xmlns="http://www.w3.org/1999/xhtml"> 26 26 27 27 <head> … … 30 30 </head> 31 31 32 <body> 32 <body> 33 33 <?php the_gallery(); ?> 34 34 35 35 </body> 36 36 -
trunk/plog-admin/_install.php
r546 r550 1 1 <?php 2 2 error_reporting(E_ERROR); 3 require (dirname(__FILE__) .'/plog-globals.php');4 require (PLOGGER_DIR . 'plog-functions.php');5 require (PLOGGER_DIR . 'lib/plogger/install_functions.php');3 require_once(dirname(dirname(__FILE__)).'/plog-globals.php'); 4 require_once(PLOGGER_DIR.'plog-includes/plog-functions.php'); 5 require_once(PLOGGER_DIR.'plog-admin/includes/install-functions.php'); 6 6 7 7 // serve the config file 8 8 if (!empty($_POST['dlconfig']) && !empty($_SESSION['plogger_config'])) { 9 header('Content-type: application/octet-stream');10 header('Content-Disposition: attachment; filename="plog-config.php"');11 print $_SESSION['plogger_config'];12 die();13 } ;9 header('Content-type: application/octet-stream'); 10 header('Content-Disposition: attachment; filename="plog-config.php"'); 11 print $_SESSION['plogger_config']; 12 exit(); 13 } 14 14 15 15 // Create the SQL tables and try to proceed to the admin interface. … … 19 19 if (empty($mysql)) { 20 20 create_tables(); 21 configure_plogger($_SESSION[ "install_values"]); // undefined index install_values22 require (PLOGGER_DIR . "plog-load_config.php");21 configure_plogger($_SESSION['install_values']); // undefined index install_values 22 require_once(PLOGGER_DIR."plog-load-config.php"); 23 23 connect_db(); 24 24 $col = add_collection(plog_tr("Plogger test collection"),plog_tr("Feel free to delete it")); … … 27 27 $alb = add_album(plog_tr("Plogger test album"),plog_tr("feel free to delete it"),$col['id']); 28 28 } 29 unset($_SESSION[ "plogger_config"]);30 unset($_SESSION[ "install_values"]);31 header("Location: admin/index.php");29 unset($_SESSION['plogger_config']); 30 unset($_SESSION['install_values']); 31 header("Location: index.php"); 32 32 exit; 33 } ;34 } ;33 } 34 } 35 35 ?> 36 36 <html> … … 40 40 </head> 41 41 <body> 42 <img src=" graphics/plogger.gif" alt="Plogger">42 <img src="images/plogger.gif" alt="Plogger"> 43 43 <?php 44 44 if (empty($_POST['proceed'])) { 45 45 do_install($_POST); 46 46 } else { 47 require(PLOGGER_DIR . 'lib/plogger/form_setup_complete.php');48 } ;47 require(PLOGGER_DIR.'plog-admin/includes/install-form-setup-complete.php'); 48 } 49 49 ?> 50 50 </body> -
trunk/plog-admin/_upgrade.php
r509 r550 1 1 <?php 2 3 2 error_reporting(E_ERROR); 4 5 3 echo ' 6 4 <html> 7 5 <head> 8 6 <title>Upgrade Plogger</title> 9 <link rel="stylesheet" type="text/css" href=" admin/../css/admin.css">7 <link rel="stylesheet" type="text/css" href="css/admin.css"> 10 8 </head> 11 9 <body> 12 <img src=" graphics/plogger.gif" alt="Plogger">10 <img src="images/plogger.gif" alt="Plogger"> 13 11 <h1>Performing Upgrade...</h1>'; 14 12 15 13 // This is the upgrade file for upgrading your Plogger gallery from Beta 1 16 $workdir = getcwd();14 $workdir = dirname(dirname(__FILE__)); 17 15 if (file_exists($workdir.'/plog-connect.php')) 18 16 { … … 23 21 print $workdir . " is not writable, but I need to create a new file in it"; 24 22 exit; 25 } ;23 } 26 24 27 25 // now parse DB connection parameters out of plog-connect … … 50 48 if (!$fh) { 51 49 die("Could not write plog-config.php, please make the file writable and then try running this script again"); 52 } ;50 } 53 51 fwrite($fh,"<?php\n"); 54 52 fwrite($fh,$cfg_file); … … 57 55 58 56 unlink($workdir.'/plog-connect.php'); 59 print "Done!<br />";60 61 } ;57 print "Done!<br />"; 58 59 } 62 60 63 61 function makeDirs($strPath, $mode = 0777) //creates directory tree recursively … … 72 70 while($row = mysql_fetch_array($res,MYSQL_NUM)) { 73 71 if ($row[0] == $column) $found = true; 74 } ;72 } 75 73 if (!$found) { 76 74 print "<li>Adding new field $column to database."; … … 78 76 } else { 79 77 print "<li>$column already present in database."; 80 } ;78 } 81 79 } 82 80 … … 87 85 while($row = mysql_fetch_array($res,MYSQL_NUM)) { 88 86
