Changeset 567 for trunk

Show
Ignore:
Timestamp:
07/24/08 13:21:29 (4 months ago)
Author:
sidtheduck
Message:

+ Fix for undefined offset for THUMB_THEME in $thumbnail_config
+ Fix for mod_rewrite checkbox issue in admin section
- Removing greybox functionality to Gallery Preview and Plogger Forums from Admin tab links (now opens in new window)

Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/plog-admin/plog-admin.php

    r563 r567  
    3939        $tabs['options']        = array('url' => 'plog-options.php','caption' => plog_tr('<em>O</em>ptions')); 
    4040        $tabs['themes']         = array('url' => 'plog-themes.php','caption' => plog_tr('<em>T</em>hemes')); 
    41         $tabs['view']           = array('url' => $config['gallery_url'],'caption' => plog_tr('<em>V</em>iew'), 'onclick' => 'return GB_show(\'Live Gallery\', \''.$config['gallery_url'].'\', 600, 800)'); 
    42         $tabs['support']        = array('url' => 'http://www.plogger.org/forum/','caption' => plog_tr('<em>S</em>upport'), 'onclick' => 'return GB_show(\'Plogger Support Forum\', \'http://www.plogger.org/forum/\', 700, 800)'); 
     41        $tabs['view']           = array('url' => $config['gallery_url'],'caption' => plog_tr('<em>V</em>iew'), 'target' => '_blank'); 
     42        $tabs['support']        = array('url' => 'http://www.plogger.org/forum/','caption' => plog_tr('<em>S</em>upport'), 'target' => '_blank'); 
    4343        $tabs['logout']         = array('url' => $_SERVER["PHP_SELF"].'?action=log_out','caption' => plog_tr('<em>L</em>og out')); 
    4444        // get the accesskey from the localization - it should be surrounded by <em> tags 
     
    9191                        if (!empty($data['onclick'])) $output .= ' onclick="'.$data['onclick'].'"'; 
    9292                        if (!empty($data['accesskey'])) $output .= ' accesskey="'.$data['accesskey'].'"'; 
     93                        if (!empty($data['target'])) $output .= ' target="'.$data['target'].'"'; 
    9394                        $output .= ' href="' . $data['url'] . '">' . $data['caption'] . '</a></li>'; 
    9495                }; 
  • trunk/plog-admin/plog-themes.php

    r566 r567  
    55require_once(PLOGGER_DIR."plog-admin/plog-admin-functions.php"); 
    66 
    7 global $inHead; 
    8 global $config; 
     7global $inHead, $config, $thumbnail_config; 
    98 
    109function read_dir($path){ 
     
    8281                if ($counter%2 == 0) $table_row_color = "color-1"; 
    8382                else $table_row_color = "color-2"; 
    84                  
    85                 // generate preview 
     83 
     84                // generate small preview thumb, update thumb if preview.png has been updated 
     85                $timestamp = @filemtime($theme_dir . $theme_folder_basename . "/preview.png"); 
     86                $thumbnail_config[THUMB_THEME]['timestamp'] = $timestamp; 
    8687                $preview_thumb = generate_thumb($theme_folder_name . "preview.png", $theme_name, THUMB_THEME); 
     88 
     89                // generate large Lightbox preview thumb, update thumb if preview.png has been updated 
     90                $thumbnail_config[THUMB_LARGE]['timestamp'] = $timestamp; 
    8791                $preview_thumb_large = generate_thumb($theme_folder_name . "preview.png", $theme_name, THUMB_LARGE); 
    88                  
     92 
    8993                // start a new table row (alternating colors) 
    9094                if ($config["theme_dir"] == $theme_folder_basename) 
  • trunk/plog-includes/plog-functions.php

    r566 r567  
    470470 
    471471        if ($config["embedded"] == 0) { 
    472         print "\t<title>" . get_head_title() . "</title>"; 
     472                print "\t<title>" . get_head_title() . "</title>"; 
    473473        } 
    474474        print "\n\t" . '<meta http-equiv="Content-Type" content="text/html;charset=' . $config['charset'] . '" />'; 
     
    11751175        $rv = ''; 
    11761176 
    1177         if ($config['use_mod_rewrite']){ 
     1177        if ($config['use_mod_rewrite'] && $level != "admin"){ 
    11781178                $args = ''; 
    11791179                // I need to give additional arguments to the url-s 
  • trunk/plog-load-config.php

    r563 r567  
    8686// had to update this for new use of links without mod_rewrite turned on (only affects the View gallery greybox in Admin) 
    8787if (strpos($config['baseurl'], "plog-admin/")) { 
    88         $config['use_mod_rewrite'] = 0; 
    8988        $config['baseurl'] = substr($config['baseurl'], 0, strpos($config['baseurl'], "plog-admin/")); 
    9089} 
     
    127126        'disabled' => $row['disabled']); 
    128127} 
     128 
     129// need to add the new theme preview thumbnail array 
     130$thumbnail_config[5] = array( 
     131        'filename_prefix' => 'theme-', 
     132        'size' => 150, 
     133        'timestamp' => 0, 
     134        'disabled' => 0); 
    129135 
    130136// debugging functions