コード例 #1
0
ファイル: randomAlbums.php プロジェクト: seanfbrown/jinzora
<?php

global $random_art_size;
$display = new jzDisplay();
$sm = smartySetup();
if (!isset($node) || $random_albums <= 0) {
    return;
}
$art = array();
$artArray = $node->getSubNodes("nodes", distanceTo("album", $node), true, $random_albums, true);
foreach ($artArray as $al) {
    $art[] = array('name' => $al->getName(), 'link' => urlize(array('jz_path' => $al->getPath("string"))), 'playlink' => $display->playlink($al, 'Play', false, false, true), 'art' => $display->returnImage($al->getMainArt($random_art_size . 'x' . $random_art_size), $al->getName(), $random_art_size, $random_art_size, "fixed"));
}
$sm->assign('albums', $art);
jzTemplate($sm, 'randomAlbums');
コード例 #2
0
ファイル: blocks.php プロジェクト: jinzora/jinzora3
 /**
  * Displays a table of the given video tracks.
  *
  * @author Ross Carlson
  * @version 2.26.06
  * @since 2.26.06
  * @param array $tracks The array of objects of each track
  * @param $purpose The type of this track table. One of:
  * generic|album|search|sample|sample-all
  */
 function videoTable($tracks, $purpose = false)
 {
     global $web_root, $root_dir, $row_colors;
     $display = new jzDisplay();
     // Let's setup Smarty
     $smarty = smartySetup();
     // Let's define our variables
     $i = 0;
     foreach ($tracks as $child) {
         $metaData = $child->getMeta();
         $tArr[$i]['name'] = $display->returnShortName($child->getName(), 25);
         $tArr[$i]['length'] = convertSecMins($metaData['length']);
         $tArr[$i]['playlink'] = $display->playlink($child, $child->getName(), false, false, true, false, true);
         $tArr[$i]['downloadlink'] = $display->downloadButton($child, true, false, false, true);
         $tArr[$i]['i'] = $i;
         $art = $child->getMainArt("125x125", true, "video");
         if ($art) {
             $tArr[$i]['art'] = $art;
         } else {
             $tArr[$i]['art'] = false;
         }
         $tArr[$i]['playcount'] = $child->getPlayCount();
         $i++;
     }
     $smarty->assign('tracks', $tArr);
     $smarty->assign('i', 0);
     $smarty->assign('cols', 3);
     $smarty->assign('jz_row1', $row_colors[1]);
     $smarty->assign('jz_row2', $row_colors[2]);
     $smarty->assign('word_watch_now', word("Watch Now"));
     $smarty->assign('word_download', word("Download"));
     $smarty->assign('word_viewed', word("Viewed"));
     // Now let's include the template
     $smarty->display(SMARTY_ROOT . 'templates/slick/videotable.tpl');
 }
コード例 #3
0
ファイル: playlistedit.php プロジェクト: seanfbrown/jinzora
    echo $buttonlabel;
    ?>
" value="<?php 
    echo $e;
    ?>
" name="plTrackDel-<?php 
    echo $e;
    ?>
"/><?php 
    echo icon('clear', array('title' => word('Delete'), 'onclick' => "document.getElementById('{$buttonlabel}').click()"));
    ?>
						</td>
						<td width="1%">
							<nobr>
							<?php 
    echo $display->playlink($item, $display->returnShortName($track, 20));
    ?>
							</nobr>
						</td>
						<td width="1%">
							<nobr>
								<?php 
    echo $display->returnShortName($album, 20);
    ?>
							</nobr>
						</td>
						<td width="1%">
							<nobr>
								<?php 
    echo $display->returnShortName($artist, 20);
    ?>