Changeset 573 for trunk

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

+ fix for ticket #89 - RSS feed for picture comments
+ fix for backward compatibility of themes slideshow.php and the slideshow functions
+ adding plogger_get_picture_filename() function from PieperLy? on the forums
+ general syntax cleaning and updating index.php to include plogger.php instead of gallery.php (deprecated)

Location:
trunk
Files:
11 modified

Legend:

Unmodified
Added
Removed
  • trunk/gallery.php

    r555 r573  
    44 
    55function the_gallery_head() { 
    6         return the_plogger_gallery_head(); 
     6        return the_plogger_head(); 
    77} 
    88 
  • trunk/index.php

    r555 r573  
    1919 */ 
    2020?> 
    21 <?php require("gallery.php"); ?> 
     21<?php require("plogger.php"); ?> 
    2222<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    2323        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
    2424<html xml:lang="<?php echo $language; ?>" lang="<?php echo $language; ?>" xmlns="http://www.w3.org/1999/xhtml"> 
    2525<head> 
    26 <?php the_gallery_head(); ?> 
     26<?php the_plogger_head(); ?> 
    2727</head> 
    2828 
    2929<body> 
    3030 
    31 <?php the_gallery(); ?> 
     31<?php the_plogger_gallery(); ?> 
    3232 
    3333</body> 
  • trunk/plog-admin/index.php

    r571 r573  
    3636                </tr>' . "\n"; 
    3737                break; 
    38                 } 
    3938        } 
     39} 
    4040$output .= "\n\t\t" . '<tr> 
    4141                        <td><label for="plog-username"><strong>' . plog_tr('Username') . ':</strong></label></td> 
  • trunk/plog-content/themes/air/comments.php

    r557 r573  
    1818                                        </li> 
    1919<?php $counter++; 
    20                         } ?> 
     20                } ?> 
    2121                                </ol> 
    2222<?php } else { ?> 
  • trunk/plog-content/themes/air/slideshow.php

    r572 r573  
    2323                </script> 
    2424 
    25 <?php echo generate_slideshow_interface(); ?> 
     25                <?php echo generate_slideshow_nav(); ?> 
     26                <div id="picture-holder"> 
     27                        <a href="javascript:slides.hotlink()"><img id="slideshow_image" class="photos-large" src="about:blank" title="<?php echo plogger_get_picture_caption(); ?>" alt="<?php echo plogger_get_picture_caption(); ?>" /></a> 
     28                </div><!-- /picture-holder --> 
     29 
     30                <script type="text/javascript"> 
     31                        <!-- 
     32                        if (document.images) 
     33                        { 
     34                                slides.set_image(document.images.slideshow_image); 
     35                                slides.textid = "picture_caption"; // optional 
     36                                slides.imagenameid = "image_name"; // optional 
     37                                slides.update(); 
     38                                slides.play(); 
     39                        } 
     40                        //--> 
     41                </script> 
     42 
    2643<?php else : ?> 
    2744                <div id="no-pictures-msg"> 
  • trunk/plog-content/themes/default/slideshow.php

    r572 r573  
    3131                        </div><!-- /inner_wrapper --> 
    3232 
    33 <?php echo generate_slideshow_interface(); ?> 
     33                        <?php echo generate_slideshow_nav(); ?> 
     34                        <div id="picture-holder"> 
     35                                <a href="javascript:slides.hotlink()"><img id="slideshow_image" class="photos-large" src="about:blank" title="<?php echo plogger_get_picture_caption(); ?>" alt="<?php echo plogger_get_picture_caption(); ?>" /></a> 
     36                        </div><!-- /picture-holder --> 
     37 
     38                        <script type="text/javascript"> 
     39                                <!-- 
     40                                if (document.images) 
     41                                { 
     42                                        slides.set_image(document.images.slideshow_image); 
     43                                        slides.textid = "picture_caption"; // optional 
     44                                        slides.imagenameid = "image_name"; // optional 
     45                                        slides.update(); 
     46                                        slides.play(); 
     47                                } 
     48                                //--> 
     49                        </script> 
     50 
    3451<?php else : ?> 
    3552                        <div id="no-pictures-msg"> 
  • trunk/plog-content/themes/lucid/slideshow.php

    r572 r573  
    3131                        </div><!-- /inner_wrapper --> 
    3232 
    33 <?php echo generate_slideshow_interface(); ?> 
     33                        <?php echo generate_slideshow_nav(); ?> 
     34                        <div id="picture-holder"> 
     35                                <a href="javascript:slides.hotlink()"><img id="slideshow_image" class="photos-large" src="about:blank" title="<?php echo plogger_get_picture_caption(); ?>" alt="<?php echo plogger_get_picture_caption(); ?>" /></a> 
     36                        </div><!-- /picture-holder --> 
     37 
     38                        <script type="text/javascript"> 
     39                                <!-- 
     40                                if (document.images) 
     41                                { 
     42                                        slides.set_image(document.images.slideshow_image); 
     43                                        slides.textid = "picture_caption"; // optional 
     44                                        slides.imagenameid = "image_name"; // optional 
     45                                        slides.update(); 
     46                                        slides.play(); 
     47                                } 
     48                                //--> 
     49                        </script> 
     50 
    3451<?php else : ?> 
    3552                        <div id="no-pictures-msg"> 
  • trunk/plog-includes/lib/phpthumb/phpthumb.class.php

    r486 r573  
    929929                if ($this->ra || $this->ar) { 
    930930                        if (!function_exists('ImageRotate')) { 
    931                                 $this->DebugMessage('!function_exists(ImageRotate)', __FILE__, __LINE__); 
    932                                 return false; 
     931                                //$this->DebugMessage('!function_exists(ImageRotate)', __FILE__, __LINE__); 
     932                                //return false; 
     933                                // Code by Dominik Scholz: http://php.net/manual/en/function.imagerotate.php#82261 
     934                                function imagerotate($src_img, $angle) { 
     935                                        $src_x = imagesx($src_img); 
     936                                        $src_y = imagesy($src_img); 
     937                                        if ($angle == 180) { 
     938                                                $dest_x = $src_x; 
     939                                                $dest_y = $src_y; 
     940                                        } elseif (($angle == 90) || ($angle == 270)) { 
     941                                                $dest_x = $src_y; 
     942                                                $dest_y = $src_x; 
     943                                        } else { 
     944                                                return $src_img; 
     945                                        } 
     946 
     947                                        $rotate=imagecreatetruecolor($dest_x,$dest_y); 
     948                                        imagealphablending($rotate, false); 
     949 
     950                                        switch ($angle) { 
     951                                                case 270: 
     952                                                        $dest_x--; 
     953                                                        for ($y = 0; $y < $src_y; $y++) 
     954                                                        for ($x = 0; $x < $src_x; $x++) 
     955                                                                imagesetpixel($rotate, $dest_x - $y, $x, imagecolorat($src_img, $x, $y)); 
     956                                                        break; 
     957                                                case 90: 
     958                                                        $dest_y--; 
     959                                                        for ($y = 0; $y < $src_y; $y++) 
     960                                                        for ($x = 0; $x < $src_x; $x++) 
     961                                                                imagesetpixel($rotate, $y, $dest_y - $x, imagecolorat($src_img, $x, $y)); 
     962                                                        break; 
     963                                                case 180: 
     964                                                        $dest_x--; 
     965                                                        $dest_y--; 
     966                                                        for ($y = 0; $y < $src_y; $y++) 
     967                                                        for ($x = 0; $x < $src_x; $x++) 
     968                                                                imagesetpixel($rotate, $dest_x - $x, $dest_y - $y, imagecolorat($src_img, $x, $y)); 
     969                                                        break; 
     970                                        } 
     971                                        return $rotate; 
     972                                } 
    933973                        } 
    934974                        if (!include_once(dirname(__FILE__).'/phpthumb.filters.php')) { 
  • trunk/plog-includes/plog-functions.php

    r572 r573  
    430430 
    431431        // function for generating the slideshow interface 
    432 function generate_slideshow_interface() { 
     432function generate_slideshow_nav($pre_pre='', $pre='', $post='', $post_post='') { 
    433433        global $config, $thumbnail_config; 
    434434 
    435         $picture_caption = plogger_get_picture_caption(); 
    436  
    437         $large_link = '<a accesskey="v" title="' . plog_tr('View Large Image') . '" href="javascript:slides.hotlink()"><img src="'.THEME_URL.'images/search.gif" width="16" height="16" alt="'. plog_tr('View Large Image') . '" /></a>&nbsp;&nbsp;'; 
    438         $prev_url = '<a accesskey="," title="' .plog_tr('Previous Image') . '" href="javascript:slides.previous();"><img src="'.THEME_URL.'images/rewind.gif" width="16" height="16" alt="' . plog_tr('Previous Image') . '" /></a>&nbsp;&nbsp;'; 
    439         $stop_url = '<a accesskey="x" title="'. plog_tr('Stop Slideshow') . '" href="javascript:slides.pause();"><img src="'.THEME_URL.'images/stop.gif" width="16" height="16" alt="' . plog_tr('Stop Slideshow') . '" /></a>&nbsp;&nbsp;'; 
    440         $play_url = '<a accesskey="s" title="'. plog_tr('Start Slideshow') . '" href="javascript:slides.play();"><img src="'.THEME_URL.'images/play.gif" width="16" height="16" alt="' . plog_tr('Start Slideshow') . '" /></a>&nbsp;&nbsp;&nbsp;'; 
    441         $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>'; 
    442  
    443         $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 -->'; 
    444  
    445         $imgtag = '<img id="slideshow_image" class="photos-large" src="about:blank" title="'.$picture_caption.'" alt="'.$picture_caption.'" />'; 
    446  
    447         $output .= "\n\n\t\t\t" . '<div id="picture-holder"> 
    448                                 <a href="javascript:slides.hotlink()">'.$imgtag.'</a> 
    449                         </div><!-- /picture-holder --> 
    450                         <br />'; 
    451         // activate slideshow object using javascript block 
    452         $output .= "\n\t\t\t" . '<script type="text/javascript"> 
    453                                 <!-- 
    454                                 if (document.images) 
    455                                 { 
    456                                         slides.set_image(document.images.slideshow_image); 
    457                                         slides.textid = "picture_caption"; // optional 
    458                                         slides.imagenameid = "image_name"; // optional 
    459                                         slides.update(); 
    460                                         slides.play(); 
    461                                 } 
    462                                 //--> 
    463                         </script>'; 
     435        $large_link = $pre.'<a accesskey="v" title="' . plog_tr('View Large Image') . '" href="javascript:slides.hotlink()"><img src="'.THEME_URL.'images/search.gif" width="16" height="16" alt="'. plog_tr('View Large Image') . '" /></a>&nbsp;&nbsp;'.$post; 
     436        $prev_url = $pre.'<a accesskey="," title="' .plog_tr('Previous Image') . '" href="javascript:slides.previous();"><img src="'.THEME_URL.'images/rewind.gif" width="16" height="16" alt="' . plog_tr('Previous Image') . '" /></a>&nbsp;&nbsp;'.$post; 
     437        $stop_url = $pre.'<a accesskey="x" title="'. plog_tr('Stop Slideshow') . '" href="javascript:slides.pause();"><img src="'.THEME_URL.'images/stop.gif" width="16" height="16" alt="' . plog_tr('Stop Slideshow') . '" /></a>&nbsp;&nbsp;'.$post; 
     438        $play_url = $pre.'<a accesskey="s" title="'. plog_tr('Start Slideshow') . '" href="javascript:slides.play();"><img src="'.THEME_URL.'images/play.gif" width="16" height="16" alt="' . plog_tr('Start Slideshow') . '" /></a>&nbsp;&nbsp;&nbsp;'.$post; 
     439        $next_url = $pre.'<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>'.$post; 
     440 
     441        $output = '<div class="large-thumb-toolbar" style="width: '.$thumbnail_config[THUMB_LARGE].'px;">'.$pre_pre.$large_link.$prev_url.$stop_url.$play_url.$next_url.$post_post.'</div><!-- /large-thumb-toolbar -->'; 
     442 
    464443        return $output; 
    465444} 
     
    11631142                // no such caption, perhaps we have better luck with path? 
    11641143                if (!$picture) { 
     1144                        // check if it's an RSS feed for the picture comments 
     1145                        while (!empty($names['arg1']) && $names['arg1'] == "feed") { 
     1146                                $feed = array_pop($names); 
     1147                        } 
    11651148                        $filepath = join("/",$names); 
    11661149                        $like_match = array("_", "%"); 
     
    16141597        WHERE `parent_id`=".intval($id)." 
    16151598        AND `approved`=1"; 
     1599        if (isset($arr['comments'])) { 
     1600                $query .= " ORDER BY `id` "; 
     1601                if ($arr['comments'] == "ASC") { 
     1602                        $query .= "ASC"; 
     1603                } else { 
     1604                        $query .= "DESC"; 
     1605                } 
     1606        } 
    16161607        $result = run_query($query) or die(mysql_error()); 
    16171608 
     
    19861977        if ($config["use_mod_rewrite"]) { 
    19871978                global $path; 
    1988                 if (!empty($path)) 
    1989                 $rss_link .= "http://".$_SERVER['HTTP_HOST']."/".SmartStripSlashes(substr($path,1))."feed/"; 
    1990                 else 
    1991                 $rss_link .= $config['gallery_url']."feed/"; 
    1992  
    1993         } 
    1994         else { 
     1979                if (!empty($path)) { 
     1980                        $rss_link .= "http://".$_SERVER['HTTP_HOST']."/".SmartStripSlashes(substr($path,1))."feed/"; 
     1981                } else { 
     1982                        $rss_link .= $config['gallery_url']."feed/"; 
     1983                } 
     1984 
     1985        }       else { 
    19951986                $rss_link .= $config["gallery_url"] . "plog-rss.php?level=".$GLOBALS['plogger_level']."&amp;id=".$GLOBALS['plogger_id']; 
    19961987        } 
     
    20081999        global $config; 
    20092000 
    2010         if ($GLOBALS['plogger_mode'] != "slideshow" && $GLOBALS['plogger_level'] != "picture" && $GLOBALS['plogger_level'] != "404") { 
     2001        if ($GLOBALS['plogger_mode'] != "slideshow" && $GLOBALS['plogger_level'] != "404") { 
    20112002                $rss_link = ""; 
    20122003                // change the tooltip message to reflect the nature of the RSS aggregate link. 
    2013                 if ($GLOBALS['plogger_level'] != "") 
    2014                 $rss_tooltip = plog_tr('RSS 2.0 subscribe to') . ': ' . $GLOBALS["plogger_level"]; 
    2015                 else 
    2016                 $rss_tooltip = plog_tr('RSS 2.0 subscribe to all images'); 
     2004                if ($GLOBALS['plogger_level'] != "") { 
     2005                        $rss_tooltip = plog_tr('RSS 2.0 subscribe to') . ': ' . $GLOBALS["plogger_level"]; 
     2006                } else { 
     2007                        $rss_tooltip = plog_tr('RSS 2.0 subscribe to all images'); 
     2008                } 
    20172009 
    20182010                $rss_link = plogger_rss_link(); 
     
    22162208        else 
    22172209        return 0; 
     2210} 
     2211 
     2212function plogger_get_picture_filename($specialchars = false) { 
     2213        global $config; 
     2214        $filename = SmartStripSlashes(basename($GLOBALS['current_picture']['path'])); //get the basename and clean up the text a little 
     2215        $filename = substr($filename, 0, strrpos($filename, '.')); //remove the file extension 
     2216        //if the truncate value is set and the filename is longer than the truncate value 
     2217        //chop it off and add the trailing ellipses 
     2218        if (intval($config['truncate']) > 0 && isset($filename{ intval($config['truncate'])})) { 
     2219                $filename = substr($filename, 0, intval($config['truncate'])).'...'; 
     2220        } 
     2221        if ($specialchars) { 
     2222                return htmlspecialchars($filename); 
     2223        } 
     2224        return $filename; 
    22182225} 
    22192226 
  • trunk/plog-rss.php

    r568 r573  
    3131                $config["feed_title"] .= ": " . $album['album_name'] . " " . plog_tr("Album"); 
    3232 
     33        } else if ($level == "picture") { 
     34                plogger_init_picture(array( 
     35                'id' => $id, 
     36                'comments' => 'DESC' 
     37                )); 
     38                $picture = get_picture_by_id($id); 
     39                $config["feed_title"] .= ": " . basename($picture['path']); 
     40 
    3341        } else if ($level == "search") { 
    3442                plogger_init_search(array( 
     
    4654        } 
    4755 
    48         $header = 1; 
    49  
    5056        // generate RSS header 
    51 $rssFeed = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"; 
     57        $rssFeed = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"; 
    5258        $rssFeed.= "<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\" xmlns:media=\"http://search.yahoo.com/mrss/\">\n"; 
    5359 
     
    6167        $rssFeed.= "<atom:link href=\"http://".$_SERVER['HTTP_HOST'].str_replace('&', '&amp;', $_SERVER['REQUEST_URI'])."\" rel=\"self\" type=\"application/rss+xml\" />\n"; 
    6268 
     69        $header = 1; 
     70 
    6371        while(plogger_has_pictures()) { 
    6472                plogger_load_picture(); 
    65                 $submitdate = plogger_get_picture_date("D, d M Y H:i:s O",1); 
    66                 $takendate = plogger_get_picture_date(); 
     73                // if at picture level, check to make sure it has comments first 
     74                if ($level != "picture" || plogger_picture_has_comments()) { 
     75                         
     76                        if ($header) { 
     77                                $submitdate = plogger_get_picture_date("D, d M Y H:i:s O",1); 
     78                                $takendate = plogger_get_picture_date(); 
     79                         
     80                                $rssFeed.= "<pubDate>". $submitdate . "</pubDate>\n"; 
     81                                $rssFeed.= "<lastBuildDate>". $submitdate . "</lastBuildDate>\n"; 
     82                                $header = 0; 
     83                        } 
    6784 
    68                 if ($header) { 
    69                         $rssFeed.= "<pubDate>". $submitdate . "</pubDate>\n"; 
    70                         $rssFeed.= "<lastBuildDate>". $submitdate . "</lastBuildDate>\n"; 
    71                         $header = 0; 
     85                        $rssFeed .= "<item>\n"; 
     86 
     87                        $urlPath = str_replace(array("%2F", "%3A"), array("/", ":"), rawurlencode(plogger_get_source_picture_url())); 
     88 
     89                        $caption = plogger_get_picture_caption(); 
     90                        $thumbpath = plogger_get_picture_thumb(THUMB_RSS); 
     91 
     92                        //$pagelink = $config["address"] . plogger_get_picture_url(); 
     93                        // XXX: Below won't look nice with mod_rewrite, but plogger_get_picture_url 
     94                        // returns wrong filename, needs to be fixed - still needs to be fixed as this does not always work as wanted either 
     95                        $pagelink = $config['gallery_url'] . "?level=picture&amp;id=" . plogger_get_picture_id(); 
     96 
     97                        if ($caption == "" || $caption == "&nbsp;") $caption = plog_tr("New Image (no caption)"); 
     98                        $caption .= " - " . $takendate; 
     99 
     100                        $descript = '&lt;p&gt;&lt;a href="'.$pagelink.'" 
     101                        title="'.$caption.'"&gt; 
     102                        &lt;img src="'.$thumbpath.'" alt="'.$caption.'" style="border: 1px solid #000000;" /&gt; 
     103                        &lt;/a&gt;&lt;/p&gt;&lt;p&gt;'.$caption.'&lt;/p&gt;'; 
     104 
     105                        $descript .= '&lt;p&gt;'.htmlspecialchars(plogger_get_picture_description()).'&lt;/p&gt;'; 
     106 
     107                        $rssFeed .= "\t<pubDate>" . $submitdate . "</pubDate>\n"; 
     108                        $rssFeed .= "\t<title>" . $caption .  "</title>\n"; 
     109                        $rssFeed .= "\t<link>" . $pagelink . "</link>\n"; 
     110                        $rssFeed .= "\t<description>" . $descript .  "</description>\n"; 
     111                        $rssFeed .= "\t<guid isPermaLink=\"false\">".$thumbpath."</guid>\n"; 
     112                        $rssFeed .= "\t<media:content url=\"" . $urlPath . "\" type=\"image/jpeg\" />\n"; 
     113                        $rssFeed .= "\t<media:title>" . $caption . "</media:title>\n"; 
     114                        $rssFeed .= "</item>\n"; 
     115                        if ($level == "picture") { 
     116                                while(plogger_picture_has_comments()) { 
     117                                        plogger_load_comment(); 
     118                                        $rssFeed .= "<item>\n"; 
     119                                        $rssFeed .= "\t<pubDate>" . plogger_get_comment_date("D, d M Y H:i:s O") . "</pubDate>\n"; 
     120                                        $rssFeed .= "\t<title>Comment by " . plogger_get_comment_author() . "</title>\n"; 
     121                                        $rssFeed .= "\t<link>" . $pagelink . "</link>\n"; 
     122                                        $rssFeed .= "\t<description>" . plogger_get_comment_text() .  "</description>\n"; 
     123                                        $rssFeed .= "\t<guid isPermaLink=\"true\">".$pagelink."#Comment-".plogger_get_comment_id()."</guid>\n"; 
     124                                        $rssFeed .= "</item>\n"; 
     125                                } 
     126                        } 
    72127                } 
    73  
    74                 $rssFeed .= "<item>\n"; 
    75  
    76                 $urlPath = plogger_get_source_picture_url(); 
    77  
    78                 $caption = plogger_get_picture_caption(); 
    79                 $thumbpath = plogger_get_picture_thumb(THUMB_SMALL); 
    80  
    81                 //$pagelink = $config["address"] . plogger_get_picture_url(); 
    82                 // XXX: Below won't look nice with mod_rewrite, but plogger_get_picture_url 
    83                 // returns wrong filename, needs to be fixed - still needs to be fixed as this does not always work as wanted either 
    84                 $pagelink = $config['gallery_url'] . "?level=picture&amp;id=" . plogger_get_picture_id(); 
    85  
    86                 if ($caption == "" || $caption == "&nbsp;") $caption = plog_tr("New Image (no caption)"); 
    87                 $caption .= " - " . $takendate; 
    88  
    89                 $discript = '&lt;p&gt;&lt;a href="'.$pagelink.'" 
    90                 title="'.$caption.'"&gt; 
    91                 &lt;img src="'.$thumbpath.'" alt="'.$caption.'" style="border: 1px solid #000000;" /&gt; 
    92                 &lt;/a&gt;&lt;/p&gt;&lt;p&gt;'.$caption.'&lt;/p&gt;'; 
    93  
    94                 $discript .= '&lt;p&gt;'.htmlspecialchars(plogger_get_picture_description()).'&lt;/p&gt;'; 
    95  
    96                 $rssFeed .= "\t<pubDate>" . $submitdate . "</pubDate>\n"; 
    97                 $rssFeed .= "\t<title>" . $caption .  "</title>\n"; 
    98                 $rssFeed .= "\t<link>" . $pagelink . "</link>\n"; 
    99                 $rssFeed .= "\t<description>" . $discript .  "</description>\n"; 
    100                 $rssFeed .= "\t<guid isPermaLink=\"false\">".$thumbpath."</guid>\n"; 
    101                 $rssFeed .= "\t<media:content url=\"" . $urlPath . "\" type=\"image/jpeg\"/>\n"; 
    102                 $rssFeed .= "\t<media:title>" . $caption . "</media:title>\n"; 
    103                 $rssFeed .= "</item>\n"; 
    104128        } 
    105129 
     
    122146        $path = join("/",array_diff(explode("/",$_SERVER["REQUEST_URI"]),explode("/",$_SERVER["PHP_SELF"]))); 
    123147        $resolved_path = resolve_path($path); 
    124         // there is no meaningful RSS feed for images 
    125         if (is_array($resolved_path) && isset($resolved_path['level']) && $resolved_path['level'] != "picture") { 
    126                 $level = (isset($resolved_path['level'])) ? $resolved_path['level'] : "collections"; 
    127                 $id = (isset($resolved_path['id'])) ? $resolved_path['id'] : 0; 
    128         } 
     148        $level = (isset($resolved_path['level'])) ? $resolved_path['level'] : "collections"; 
     149        $id = (isset($resolved_path['id'])) ? $resolved_path['id'] : 0; 
    129150} 
    130151 
  • trunk/plogger.php

    r568 r573  
    116116} 
    117117 
    118 function the_plogger_gallery_head() { 
     118function the_plogger_head() { 
    119119        plogger_head(); 
    120120