[ Index ]
 

Code source de Serendipity 1.2

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/templates/newspaper/ -> layout.php (source)

   1  <?php
   2  ##########################################################################
   3  # serendipity - another blogger...                                       #
   4  ##########################################################################
   5  #                                                                        #
   6  # (c) 2003 Jannis Hermanns <J@hacked.it>                                 #
   7  #          Kristian Köhntopp fucked it up                                #
   8  # http://www.jannis.to/programming/serendipity.html                      #
   9  #                                                                        #
  10  ##########################################################################
  11  
  12  $OPENSHADOW = '<table  cellspacing="0" width="100%" cellpadding="0" style="padding:0px">
  13                   <tr>
  14                     <td valign="top" align="left" style="padding:10px;border-top:1px solid #cdcdcd; border-left: 1px solid #cdcdcd;">
  15  ';
  16  
  17  $CLOSESHADOW = '</td>
  18                  <td style="width:8px; background-image:url('.$serendipity['baseURL'].'/templates/newspaper/img/shadowr.png);" valign="top"><img src="'.$serendipity['baseURL'].'/templates/newspaper/img/shadowt.png" border="0" hspace="0" vspace="0" alt="neu" /></td>
  19                </tr>
  20                <tr>
  21                  <td style="height:10px; background-image:url('.$serendipity['baseURL'].'/templates/newspaper/img/shadowb.png);"><img src="'.$serendipity['baseURL'].'/templates/newspaper/img/shadowbl.png" border="0" hspace="0" vspace="0" alt="new" /></td>
  22                  <td style="height:10px; width:8px;"><img src="'.$serendipity['baseURL'].'/templates/newspaper/img/shadowbr.png" border="0" hspace="0" vspace="0" alt="neu" /></td>
  23                </tr>
  24              </table>
  25  ';
  26  ?>
  27  
  28  <table width="100%" cellspacing="4" border="0">
  29      <tr>
  30          <td colspan="3" width="100%" class="serendipityBanner">
  31              <div id="serendipity_banner">
  32                  <h1><a class="homelink1" href="<?php echo $serendipity['baseURL']; ?>"><?php echo htmlspecialchars($serendipity['blogTitle']); ?></a></h1>
  33              <h2>
  34  <?php
  35  $sub = isset($serendipity['blogSubTitle']) ? $serendipity['blogSubTitle'] : $serendipity['blogDescription'];
  36  if (strlen($sub)) {
  37  ?>
  38      <h2><a class="homelink2" href="<?php echo $serendipity['baseURL']; ?>"><?php echo $sub ?></a></h2>
  39  <?php
  40  }
  41  ?>
  42  
  43  </h2>
  44              </div>
  45          </td>
  46      </tr>
  47      <tr>
  48          <td width="150" valign="top" align="left" class="serendipitySideBar">
  49              <?php
  50                  serendipity_plugin_api::generate_plugins('left', 'span');
  51  //              serendipity_plugin_api::generate_plugins('right', 'span');
  52              ?>
  53  
  54          </td>
  55          <td width="100%" valign="top" align="left" class="serendipityContent">
  56              <?php echo $OPENSHADOW; ?>
  57              <?php
  58                  // The main area
  59                  switch ($serendipity["GET"]["action"]) {
  60  
  61                      // User wants to read the diary
  62                      case "read":
  63                          if (isset($serendipity['GET']['id'])) {
  64                              serendipity_printEntries(array(serendipity_fetchEntry("id", $serendipity['GET']['id'])), 1);
  65                          } else {
  66                              serendipity_printEntries(serendipity_fetchEntries($serendipity['range'], true, $serendipity['fetchLimit']));
  67                          }
  68                      break;
  69  
  70                      // User searches
  71                      case "search":
  72                          $r = serendipity_searchEntries($serendipity["GET"]["searchTerm"]);
  73                          if ( strlen($serendipity["GET"]["searchTerm"]) <= 3 ) {
  74                                  echo SEARCH_TOO_SHORT;
  75                                  break;
  76                          }
  77  
  78                          if ($r === true) {
  79                              echo sprintf(NO_ENTRIES_BLAHBLAH, $serendipity['GET']['searchTerm']);
  80                              break;
  81                          }
  82                          echo sprintf(YOUR_SEARCH_RETURNED_BLAHBLAH, $serendipity["GET"]["searchTerm"], count($r));
  83                          serendipity_printEntries($r);
  84                      break;
  85  
  86                      // Show the archive
  87                      case "archives":
  88                         serendipity_printArchives();
  89                      break;
  90  
  91  
  92                      // Welcome screen or whatever
  93                      default:
  94                          serendipity_printEntries(serendipity_fetchEntries(null, true, $serendipity['fetchLimit']));
  95                  }
  96              ?>
  97              <?php echo $CLOSESHADOW; ?>
  98          </td>
  99          <td valign="top" align="left" class="serendipitySideBar">
 100              <?php
 101  //              serendipity_plugin_api::generate_plugins('left', 'span');
 102                  serendipity_plugin_api::generate_plugins('right', 'span');
 103              ?>
 104  
 105          </td>
 106      </tr>
 107  </table>


Généré le : Sat Nov 24 09:00:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics