Changeset 561

Show
Ignore:
Timestamp:
07/17/08 19:26:13 (3 months ago)
Author:
sidtheduck
Message:

+ Slideshow fixes and javascript redirect to album view at end of slideshow (instead of repeat)
+ Miscellaneous small syntax edits

Location:
trunk
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • trunk/plog-admin/includes/install-functions.php

    r560 r561  
    493493        $select = @mysql_select_db($database); 
    494494        if (!$select) { 
    495                 $errors[] = "Couldn't find the database $database. MySQL error: " . mysql_error(); 
     495                $errors[] = "Couldn't find the database `$database`. MySQL error: " . mysql_error(); 
    496496 
    497497        } 
     
    504504        $connection = @ftp_connect($host); 
    505505        if (!$connection) { 
    506                 $errors[] = "Couldn't connect to FTP host \"$host\".  Please check your FTP Host:"; 
     506                $errors[] = "Couldn't connect to FTP host `$host`.  Please check your FTP Host:"; 
    507507        } else { 
    508508                $login = @ftp_login($connection, $user, $pass); 
    509509                if (!$login) { 
    510                         $errors[] = "Couldn't login to FTP host \"$host\" with username \"$user\" and password \"$pass\". Please check your FTP Username: and FTP Password:"; 
     510                        $errors[] = "Couldn't login to FTP host `$host` with username `$user` and password `$pass`. Please check your FTP Username: and FTP Password:"; 
    511511                } else { 
    512512                        $checkdir = @ftp_chdir($connection, $path."plog-content/images/"); // check to see if the plog-content/images/ folder is accessible 
    513513                        if (!$checkdir) { 
    514                                 $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):"; 
     514                                $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):"; 
    515515                        } 
    516516                } 
  • trunk/plog-admin/plog-admin-functions.php

    r558 r561  
    100100                @unlink($tmpname); 
    101101        } 
    102         $res = @chmod($final_fqfn, 0755); 
     102        $res = @chmod($final_fqfn, 0777); 
    103103 
    104104        // Get the EXIF data. 
  • trunk/plog-admin/plog-manage.php

    r558 r561  
    5858                } 
    5959 
    60                 $output .= "\n\t\t\t\t<option value=\"".$album_id."\"$selected>".SmartStripSlashes($album['collection_name']).": ".SmartStripSlashes($album['album_name'])."" ; 
     60                $output .= "\n\t\t\t\t<option value=\"".$album_id."\"".$selected.">".SmartStripSlashes($album['collection_name']).": ".SmartStripSlashes($album['album_name'])."" ; 
    6161                $output .= "</option>"; 
    6262        } 
     
    7575                        $collection = get_collection_by_id($id); 
    7676                        $collection_name = SmartStripSlashes($collection["name"]); 
    77                         $breadcrumbs = '<a href="'.$_SERVER["PHP_SELF"].'">' . plog_tr('Collections') . '</a> &raquo; ' . "<strong>$collection_name</strong>"; 
     77                        $breadcrumbs = '<a href="'.$_SERVER["PHP_SELF"].'">' . plog_tr('Collections') . '</a> &raquo; ' . "<strong>".$collection_name."</strong>"; 
    7878 
    7979                break; 
  • trunk/plog-content/themes/air/slideshow.php

    r557 r561  
    99                        slides.prefetch = 2; 
    1010                        slides.timeout = 4000; 
     11                        // slides.repeat = true; 
     12                        slides.redirect = "<?php echo generate_url("album", $GLOBALS['plogger_id'], NULL, true) ?>"; 
    1113<?php while(plogger_has_pictures()) : ?> 
    1214<?php $pic = plogger_load_picture(); ?> 
  • trunk/plog-content/themes/default/slideshow.php

    r557 r561  
    1313                                                slides.prefetch = 2; 
    1414                                                slides.timeout = 4000; 
     15                                                // slides.repeat = true; 
     16                                                slides.redirect = "<?php echo generate_url("album", $GLOBALS['plogger_id'], NULL, true) ?>"; 
    1517<?php while(plogger_has_pictures()) : ?> 
    1618<?php $pic = plogger_load_picture(); ?> 
  • trunk/plog-content/themes/lucid/slideshow.php

    r557 r561  
    1313                                                slides.prefetch = 2; 
    1414                                                slides.timeout = 4000; 
     15                                                // slides.repeat = true; 
     16                                                slides.redirect = "<?php echo generate_url("album", $GLOBALS['plogger_id'], NULL, true) ?>"; 
    1517<?php while(plogger_has_pictures()) : ?> 
    1618<?php $pic = plogger_load_picture(); ?> 
  • trunk/plog-includes/js/plog-slideshow.js

    r555 r561  
    166166        // Individual slides can override this. 
    167167        this.timeout = 3000; 
     168 
     169        // Redirect URL called at the end of the slideshow 
     170        this.redirect = false; 
    168171 
    169172        // Hook functions to be called before and after updating the slide 
     
    374377                } else if (this.repeat) { 
    375378                        this.current = 0; 
     379                } else if (this.redirect) { 
     380                        window.location = this.redirect; 
    376381                } 
    377382 
  • trunk/plog-includes/plog-functions.php

    r560 r561  
    425425        // function for generating the slideshow interface 
    426426function generate_slideshow_interface() { 
    427         global $config; 
     427        global $config, $thumbnail_config; 
    428428 
    429429        $picture_caption = plogger_get_picture_caption(); 
     
    435435        $next_url = '<a accesskey="." title="' . plog_tr('Next Image') . '" href="javascript:slides.next();"><img src="'.THEME_URL.'images/fforward.gif" width="16" height="16" alt="' . plog_tr('Next Image') . '" /></a>'; 
    436436 
    437         $output = "\t\t\t" . '<div class="large-thumb-toolbar" style="width: '.$config["max_display_size"].'px;">'.$large_link.$prev_url.$stop_url.$play_url.$next_url.'</div><!-- /large-thumb-toolbar -->'; 
     437        $output = "\t\t\t" . '<div class="large-thumb-toolbar" style="width: '.$thumbnail_config[THUMB_LARGE].'px;">'.$large_link.$prev_url.$stop_url.$play_url.$next_url.'</div><!-- /large-thumb-toolbar -->'; 
    438438 
    439439        $imgtag = '<img id="slideshow_image" class="photos-large" src="about:blank" title="'.$picture_caption.'" alt="'.$picture_caption.'" />';