/[drupal]/contributions/modules/switchtheme/switchtheme.module
ViewVC logotype

Diff of /contributions/modules/switchtheme/switchtheme.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.15, Sun Nov 2 13:32:46 2008 UTC revision 1.16, Sun Aug 2 23:42:11 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: switchtheme.module,v 1.14 2008/11/02 12:44:30 sun Exp $  // $Id: switchtheme.module,v 1.15 2008/11/02 13:32:46 sun Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 135  function switchtheme_display_random_bloc Line 135  function switchtheme_display_random_bloc
135    shuffle($themes);    shuffle($themes);
136    foreach ($themes as $key => $theme) {    foreach ($themes as $key => $theme) {
137      $theme->screenshot = dirname($theme->filename) .'/screenshot.png';      $theme->screenshot = dirname($theme->filename) .'/screenshot.png';
138      if (file_exists($theme->screenshot)) {      if ($theme->status && file_exists($theme->screenshot)) {
139        // Return the first theme with a screenshot.        // Return the first theme with a screenshot.
140        $output = l("<img src=\"". base_path() ."$theme->screenshot\" alt=\"preview of $theme->name\"/>", $_GET['q'], array('query' => 'theme='. $theme->name, 'html' => TRUE));        $output = l("<img src=\"". base_path() ."$theme->screenshot\" alt=\"preview of $theme->name\"/>", $_GET['q'], array('query' => 'theme='. $theme->name, 'html' => TRUE));
141        return $output;        return $output;

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.2