Changeset 555
- Timestamp:
- 07/07/08 17:22:49 (5 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 25 modified
-
index.php (modified) (1 diff)
-
plog-admin/_install.php (modified) (2 diffs)
-
plog-admin/_upgrade.php (modified) (17 diffs)
-
plog-admin/css/admin.css (modified) (7 diffs)
-
plog-admin/images/diag-bg.gif (added)
-
plog-admin/includes/install-form-setup-complete.php (modified) (1 diff)
-
plog-admin/includes/install-form-setup.php (modified) (5 diffs)
-
plog-admin/includes/install-functions.php (modified) (8 diffs)
-
plog-admin/index.php (modified) (1 diff)
-
plog-admin/js/ajax_editing.js (modified) (1 diff)
-
plog-admin/js/plogger.js (modified) (4 diffs)
-
plog-admin/plog-admin-functions.php (modified) (46 diffs)
-
plog-admin/plog-admin.php (modified) (3 diffs)
-
plog-admin/plog-feedback.php (modified) (9 diffs)
-
plog-admin/plog-import.php (modified) (13 diffs)
-
plog-admin/plog-manage.php (modified) (19 diffs)
-
plog-admin/plog-options.php (modified) (4 diffs)
-
plog-admin/plog-rpc.php (modified) (1 diff)
-
plog-admin/plog-themes.php (modified) (5 diffs)
-
plog-admin/plog-thumb.php (modified) (1 diff)
-
plog-admin/plog-thumbpopup.php (modified) (4 diffs)
-
plog-admin/plog-upload.php (modified) (9 diffs)
-
plog-includes/js/plog-slideshow.js (modified) (3 diffs)
-
plog-includes/plog-functions.php (modified) (40 diffs)
-
plog-load-config.php (modified) (3 diffs)
-
plogger.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r550 r555 22 22 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 23 23 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 24 <html xml:lang="<?php echo $language; ?>" lang="<?php echo $language; ?>" xmlns="http://www.w3.org/1999/xhtml"> 25 <head> 26 <?php the_gallery_head(); ?> 27 </head> 24 28 25 < html xml:lang="<?php echo $language; ?>" lang="<?php echo $language; ?>" xmlns="http://www.w3.org/1999/xhtml">29 <body> 26 30 27 <head> 28 <?php the_gallery_head(); ?> 31 <?php the_gallery(); ?> 29 32 30 </head> 31 32 <body> 33 <?php the_gallery(); ?> 34 35 </body> 36 33 </body> 37 34 </html> -
trunk/plog-admin/_install.php
r552 r555 36 36 } 37 37 ?> 38 <html> 39 <head> 40 <title>Install Plogger</title> 41 <link rel="stylesheet" type="text/css" href="css/admin.css"> 42 </head> 43 <body> 44 <img src="images/plogger.gif" alt="Plogger"> 38 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 39 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 40 <html xmlns="http://www.w3.org/1999/xhtml"> 41 <head> 42 <title>Install Plogger</title> 43 <meta http-equiv="Content-Type" content="txt/html; charset=utf-8" /> 44 <link rel="stylesheet" type="text/css" href="css/admin.css" /> 45 </head> 46 47 <body> 48 49 <div><img src="images/plogger.gif" alt="Plogger" /></div> 50 45 51 <?php 46 52 if (empty($_POST['proceed'])) { … … 50 56 } 51 57 ?> 58 52 59 </body> 53 60 </html> -
trunk/plog-admin/_upgrade.php
r551 r555 1 1 <?php 2 2 error_reporting(E_ERROR); 3 echo ' 4 <html> 5 <head> 6 <title>Upgrade Plogger</title> 7 <link rel="stylesheet" type="text/css" href="css/admin.css"> 8 </head> 9 <body> 10 <img src="images/plogger.gif" alt="Plogger"> 11 <h1>Performing Upgrade...</h1>'; 12 3 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 5 <html xmlns="http://www.w3.org/1999/xhtml"> 6 <head> 7 <title>Upgrade Plogger</title> 8 <link rel="stylesheet" type="text/css" href="css/admin.css"> 9 </head> 10 11 <body> 12 13 <div><img src="images/plogger.gif" alt="Plogger" /></div> 14 15 <h1>Performing Upgrade...</h1>'; 16 13 17 // This is the upgrade file for upgrading your Plogger gallery from Beta 1 14 18 $workdir = dirname(dirname(__FILE__)); 15 19 if (file_exists($workdir.'/plog-connect.php')) 16 20 { 17 print "Rewriting configuration files...<br />";21 print "Rewriting configuration files...<br />"; 18 22 // this check will also make sure that we can delete plog-connect when done, since deleting 19 23 // is actually _writing_ to a directory … … 61 65 function makeDirs($strPath, $mode = 0777) //creates directory tree recursively 62 66 { 63 return is_dir($strPath) or ( makeDirs(dirname($strPath), $mode) and mkdir($strPath, $mode) );67 return is_dir($strPath) or ( makeDirs(dirname($strPath), $mode) and mkdir($strPath, $mode) ); 64 68 } 65 69 … … 91 95 mysql_query($sql); 92 96 } else { 93 //print "$column does not exist<br />";97 //print "$column does not exist<br />"; 94 98 } 95 99 } … … 186 190 maybe_drop_column($config_table,"rss_thumbsize"); 187 191 188 189 192 maybe_add_column($config_table,'gallery_url',"varchar(255) NOT NULL"); 190 193 … … 195 198 mysql_query($sql); 196 199 } 197 198 200 199 201 // RSS config … … 214 216 // 215 217 maybe_add_column($config_table,'allow_fullpic',"tinyint NOT NULL default '1'"); 216 218 217 219 // comment notify 218 220 maybe_add_column($config_table,'comments_notify',"tinyint NOT NULL"); … … 231 233 maybe_add_column(TABLE_PREFIX.'albums','path',"varchar(255) NOT NULL"); 232 234 maybe_add_column(TABLE_PREFIX.'collections','path',"varchar(255) NOT NULL"); 233 234 235 235 236 // add ip and approved fields to comments table … … 277 278 echo("<p>Database has already been upgraded to support smart thumbnail caching!</p>"); 278 279 */ 279 280 280 281 echo "</ul>"; 281 282 echo "<p>Reorganizing your 'images/' folder..."; … … 290 291 $sql = "UPDATE ".TABLE_PREFIX."collections SET path = '" . strtolower(sanitize_filename($row['name'])) . "' WHERE id = " . $row['id']; 291 292 #print $sql; 292 #print "<br />";293 #print "<br />"; 293 294 mysql_query($sql); 294 } 295 } 295 296 296 297 $sql = "SELECT id,name FROM ".TABLE_PREFIX."albums"; … … 299 300 $sql = "UPDATE ".TABLE_PREFIX."albums SET path = '" . strtolower(sanitize_filename($row['name'])) . "' WHERE id = " . $row['id']; 300 301 #print $sql; 301 #print "<br />";302 #print "<br />"; 302 303 mysql_query($sql); 303 } 304 } 304 305 305 306 // loop through each image from the pictures table, get its parent album name and parent collection … … 311 312 FROM ".TABLE_PREFIX."albums a, ".TABLE_PREFIX."pictures p, ".TABLE_PREFIX."collections c 312 313 WHERE p.parent_album = a.id AND p.parent_collection = c.id"; 313 314 314 315 315 $result = mysql_query($sql) or die(mysql_error() . "<br /><br />" . $sql); 316 316 317 318 317 echo "<ul>"; 319 318 320 319 while($row = mysql_fetch_assoc($result)) { 321 320 322 321 $errors = 0; 323 322 $filename = basename($row['path']); … … 325 324 $new_path = "plog-content/images/".$directory.$filename; 326 325 if ($row['path'] == $new_path) continue; 327 echo "<li>Moving $row[path] -> $new_path</li>";328 326 echo "<li>Moving $row[path] -> $new_path</li>"; 327 329 328 // move physical file, create directory if necessary and update path in database 330 329 if (!makeDirs("plog-content/images/".$directory, 0755)) 331 echo "<ul><li>Error: Could not create directory $directory!</li></ul>";332 330 echo "<ul><li>Error: Could not create directory $directory!</li></ul>"; 331 333 332 if (!rename("images/" . $row['path'], $new_path)) { 334 333 echo "<li>Error: could not move file!</li>"; 335 334 $errors++; 336 335 } 337 else { 336 else { 338 337 $directory = mysql_real_escape_string($directory . $filename); 339 338 // update database … … 341 340 mysql_query($sql) or die("<li>Error: ".mysql_error()." in query " . $sql . "</li>"); 342 341 } 343 344 } 345 342 343 } 344 346 345 echo "</ul>"; 347 346 … … 351 350 echo "There were $errors errors, check your permissions settings."; 352 351 } 353 354 355 356 352 357 353 // convert charsets … … 366 362 { 367 363 $charset = "utf8"; 368 print "<br />";364 print "<br />"; 369 365 $tables = array("collections","albums","pictures","comments","config"); 370 366 foreach($tables as $table) { … … 372 368 $sql = "ALTER TABLE $tablename DEFAULT CHARACTER SET $charset"; 373 369 if (mysql_query($sql)) { 374 print $tablename . " converted to $charset<br />";370 print $tablename . " converted to $charset<br />"; 375 371 } else { 376 print "failed to convert $tablename to $charset<br />";372 print "failed to convert $tablename to $charset<br />"; 377 373 print mysql_error(); 378 374 } … … 380 376 } 381 377 382 echo "<p>Upgrade has completed!</p>" 378 echo "<p>Upgrade has completed!</p> 379 380 </body> 381 </html>" 383 382 ?> -
trunk/plog-admin/css/admin.css
r550 r555 59 59 h2 { 60 60 font-family: "Verdana", "Lucida Sans", "Lucida Grande", "Trebuchet MS", sans-serif; 61 font-size: 1. 0em;61 font-size: 1.2em; 62 62 margin-top: 20px; 63 63 margin-bottom: 15px; 64 64 text-decoration: underline; 65 } 66 67 h3 { 68 font-family: "Verdana", "Lucida Sans", "Lucida Grande", "Trebuchet MS", sans-serif; 69 font-size: 1.0em; 70 margin-top: 15px; 71 margin-bottom: 10px; 65 72 } 66 73 … … 152 159 } 153 160 154 tr.header t d{161 tr.header th { 155 162 padding: 6px; 156 163 } … … 162 169 } 163 170 171 tr.footer { 172 background-color: #264e75; 173 } 174 175 tr.footer td { 176 padding: 6px; 177 } 178 164 179 label { 165 180 padding: 8px; … … 189 204 text-align: center; 190 205 margin-top: 100px; 206 } 207 208 .login-error { 209 text-align: center; 210 font-size: 1.1em; 211 font-weight: bold; 212 color: #c00; 191 213 } 192 214 … … 258 280 color: #333; 259 281 margin:0; 260 padding: 0;282 padding: 0; 261 283 vertical-align: middle; 262 284 position: relative; … … 386 408 } 387 409 388 #contentList #pagination {410 #contentList .pagination { 389 411 font-size: 1.3em; 390 412 padding: 5px 3px 5px 0; … … 430 452 } 431 453 432 .editable {454 .editable { 433 455 color: #000; 434 456 background: #fff url("../images/diag-bg.gif") repeat top left; -
trunk/plog-admin/includes/install-form-setup-complete.php
r552 r555 10 10 ?> 11 11 <h1>Plogger Install</h1> 12 <form method="POST"> 13 <p>Configuration setup is now complete.<br />Click 'Install' to finish installation.</p> 14 <p>Your username is `<strong><?php echo $_SESSION['install_values']['admin_username']; ?></strong>` and your password is `<strong><?php echo $_SESSION['install_values']['admin_password']; ?></strong>`</p> 12 13 <form action="_install.php" method="post"> 14 <p>Configuration setup is now complete.</p> 15 <p>Click 'Install' to finish installation.</p> 16 <p>Your username is <strong><?php echo $_SESSION['install_values']['admin_username']; ?></strong> and your password is <strong><?php echo $_SESSION['install_values']['admin_password']; ?></strong></p> 15 17 <?php if (!empty($_SESSION["plogger_config"])) { ?> 16 <p>Before you can proceed, please <input type="submit" name="dlconfig" value="click here"/> to download configuration file for your gallery, then upload it to your webhost (into the same directory where you installed Plogger itself).</p>18 <p>Before you can proceed, please <input type="submit" name="dlconfig" value="click here" /> to download configuration file for your gallery, then upload it to your webhost (into the same directory where you installed Plogger itself).</p> 17 19 <?php } ?> 18 <p> 19 <input type="submit" name="proceed" id="proceed" value="Install"/> 20 </p> 20 <p><input type="submit" name="proceed" id="proceed" value="Install" /></p> 21 21 </form> -
trunk/plog-admin/includes/install-form-setup.php
r552 r555 10 10 ?> 11 11 <h1>Plogger Configuration Setup</h1> 12 <p>To install, simply fill out the following form. If there are any problems, you will be notified and asked to fix them before the installation will continue. After the installation has finished, you will be redirected to the Plogger admin page.</p> 12 13 <p>To install, simply fill out the following form. If there are any problems, you will be notified and asked to fix them before the installation will continue. After the installation has finished, you will be redirected to the Plogger admin page.</p> 14 13 15 <form action="_install.php" method="post"> 14 16 <input type="hidden" name="action" value="install" /> 15 17 <table> 16 18 <tr> 17 <td colspan="2"> 18 <div id="navcontainer"> 19 <h1>Database Setup</h1> 20 </div> 21 </td> 19 <td colspan="2"><h2>Database Setup</h2></td> 22 20 </tr> 23 21 <tr> … … 25 23 <td class="form_input"><input type="text" name="db_host" id="db_host" value="<?php echo $form['db_host']; ?>" /></td> 26 24 </tr> 27 28 25 <tr> 29 26 <td class="form_label"><label for="db_user">MySQL Username:</label></td> … … 31 28 </tr> 32 29 <tr> 33 <td class="form_label"><label for="db_pass word">MySQL Password:</label></td>30 <td class="form_label"><label for="db_pass">MySQL Password:</label></td> 34 31 <td class="form_input"><input type="password" name="db_pass" id="db_pass" value="<?php echo $form['db_pass']; ?>" /></td> 35 32 </tr> 36 37 33 <tr> 38 34 <td class="form_label"><label for="db_name">MySQL Database:</label></td> … … 40 36 </tr> 41 37 <tr> 42 <td colspan="2"> 43 <div id="navcontainer"> 44 <h1>Administrative Setup</h1> 45 </div> 46 </td> 38 <td colspan="2"><h2>Administrative Setup</h2></td> 47 39 </tr> 48 40 <tr> 49 <td class="form_label"><label for="gallery ">Gallery Name:</label></td>50 <td class="form_input"><input type="text" name="gallery_name" id="gallery " value="<?php echo $form['gallery_name']; ?>" /></td>41 <td class="form_label"><label for="gallery_name">Gallery Name:</label></td> 42 <td class="form_input"><input type="text" name="gallery_name" id="gallery_name" value="<?php echo $form['gallery_name']; ?>" /></td> 51 43 </tr> 52 44 <tr> 53 <td class="form_label"><label for=" username">Your e-mail:</label></td>54 <td class="form_input"><input type="text" name="admin_email" id=" email" value="<?php echo $form['admin_email']; ?>" /></td>45 <td class="form_label"><label for="admin_email">Your e-mail:</label></td> 46 <td class="form_input"><input type="text" name="admin_email" id="admin_email" value="<?php echo $form['admin_email']; ?>" /></td> 55 47 </tr> 56 48 <?php … … 60 52 <tr> 61 53 <td colspan="2"> 62 <div id="navcontainer"> 63 <h1>Safe_mode FTP workaround</h1> 64 <br />Safe mode has been detected on your server. FTP access is needed to allow Plogger to work correctly with safe_mode enabled. 65 </div> 54 <h2>Safe_mode FTP workaround</h2> 55 <p>Safe mode has been detected on your server. FTP access is needed to allow Plogger to work correctly with safe_mode enabled.</p> 66 56 </td> 67 57 </tr> -
trunk/plog-admin/includes/install-functions.php
r552 r555 18 18 $errors = check_requirements(); 19 19 if (sizeof($errors) > 0) { 20 print '<p>Plogger w ont work until the following problems are resolved</p>';20 print '<p>Plogger will not work until the following problems are resolved</p>'; 21 21 print '<ul>'; 22 22 foreach($errors as $error) { … … 24 24 } 25 25 print '</ul>'; 26 print '<form method=" GET" action="_install.php"><input type="submit" value="Try again"/></form>';26 print '<form method="get" action="_install.php"><input type="submit" value="Try again" /></form>'; 27 27 return false; 28 28 } … … 101 101 102 102 if (!$ok) { 103 print '<ul> <li>';103 print '<ul>\n<li>'; 104 104 print join("</li>\n<li>",$errors); 105 print '</li> </ul>';105 print '</li>\n</ul>'; 106 106 } else { 107 107 $password = generate_password(); … … 169 169 PRIMARY KEY (id)" 170 170 ,"Type=MyISAM $default_charset"); 171 172 171 173 172 maybe_add_table( … … 373 372 mysql_query($query) or die(mysql_error().'<br /><br />'. $query); 374 373 375 mail($config['admin_email'],"Your new gallery","You have successfully installed your new Plogger gallery. You can manage it at ${config['gallery_url']}plog-admin Username is `${config['admin_username']}` and password `${config['admin_password']}`.");376 }374 mail($config['admin_email'],"[Plogger] Your new gallery","You have successfully installed your new Plogger gallery.\n\nYou can login and manage it at ${config['gallery_url']}plog-admin.\n\nUsername: ${config['admin_username']}\nPassword: ${config['admin_password']}"); 375 } 377 376 378 377 function create_config_file($db_host,$db_user,$db_pass,$db_name,$ftp_host,$ftp_user,$ftp_pass,$ftp_path) { … … 401 400 } 402 401 403 404 402 function maybe_add_column($table,$column,$add_sql) { 405 403 $sql = "DESCRIBE $table"; … … 429 427 return "<li>dropping $column"; 430 428 } else { 431 //print "$column does not exist<br />";429 //print "$column does not exist<br />"; 432 430 } 433 431 } … … 506 504 $login = @ftp_login($connection, $user, $pass); 507 505 if (!$login) { 508 $errors[] = "Couldn't login to FTP host \"$host\" with username \"$user\" and password \"$pass\". Please check your FTP Username: and FTP Password:";506 $errors[] = "Couldn't login to FTP host \"$host\" with username \"$user\" and password \"$pass\". Please check your FTP Username: and FTP Password:"; 509 507 } else { 510 508 $checkdir = @ftp_chdir($connection, $path."plog-content/images/"); // check to see if the plog-content/images/ folder is accessible 511 509 if (!$checkdir) { 512 $errors[] = "Couldn't find the Plogger 'plog-content/images/' folder along the path \"$path\". Please check your FTP Path to Plogger Base Folder (from FTP login):";510 $errors[] = "Couldn't find the Plogger 'plog-content/images/' folder along the path \"$path\". Please check your FTP Path to Plogger Base Folder (from FTP login):"; 513 511 } 514 512 } -
trunk/plog-admin/index.php
r550 r555 3 3 require_once(dirname(dirname(__FILE__))."/plog-load-config.php"); 4 4 5 6 5 $output = ''; 7 6 8 $output .= ' 9 <html> 10 <head> 11 <title>' . plog_tr('Plogger Administrative Login') . '</title> 12 <link href="'.$config['gallery_url'].'plog-admin/css/admin.css" type="text/css" rel="stylesheet" /> 13 <script type="text/javascript" src="'.$config['gallery_url'].'plog-admin/js/plogger.js"></script> 14 </head> 15 <body id="login-page" onload="focus_first_input()"> 16 17 <div id="login"> 18 <form action="plog-upload.php" method="post"> 19 20 <div align="center"> 21 <table width="380"> 22 <tr>'; 23 24 if (isset($_REQUEST["errorcode"])){ 25 switch($_REQUEST["errorcode"]){ 26 case 1: 27 $output .= '<td colspan="2" align="center"><em>' . plog_tr('Invalid login') . '.</em></td>'; 28 break; 29 } 7 $output .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<
