/** * Displays the random albums block * @author Ross Carlson * @version 12/22/04 * @since 12/22/04 * @param object $node the node that we are looking at * @param string $level The level we are looking at, like a subartist */ function randomAlbums(&$node, $level = "", $valArray = false) { global $random_albums, $random_per_slot, $random_rate, $row_colors, $root_dir, $jzUSER, $show_album_art, $random_art_size; // Should we be here???? if ($random_albums == "0" or $show_album_art == "false") { return; } // Let's setup the new display object $display =& new jzDisplay(); // Let's make sure they didn't pass the data already if ($valArray) { $artArray = $valArray; } else { // Now let's get a random amount of albums with album art $artArray = $node->getSubNodes("nodes", distanceTo("album", $node), true, $random_albums * $random_per_slot, true); } // Now let's see how much we got back and make sure we just shouldn't return if (count($artArray) == 0) { return; } // Now let's display the images ?> <table width="100%" cellpadding="5" cellspacing="0" border="0"> <tr> <?php // Now let's figure out how wide to make the colums if ($random_albums * $random_per_slot > count($artArray)) { // Now we've got to figure out how many we've got $numArt = count($artArray); if ($numArt > $random_albums) { $random_per_slot = round(count($artArray) / $random_albums - 0.49, 0); } else { $random_albums = count($artArray); $random_per_slot = 1; } } $colWidth = 100 / $random_albums; $c = 1; while ($c < $random_albums + 1) { echo '<td align="center" valign="middle" width="' . $colWidth . '">'; echo '<div id="div' . $c . '"></div>'; echo '</td>'; $c++; } ?> </tr> </table> <?php // Now let's add the Javascript for the rotations ?> <SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"><!--\ //you may add your image file or text below $c=1; // Now let's create the variables <?php $c = 1; while ($c < $random_albums + 1) { echo "var imgItem" . $c . "=new Array()" . "\n"; $c++; } // Now let's build the first array with ALL the data so we can break it up later $c = 0; for ($i = 0; $i < count($artArray); $i++) { $albumName_long = $artArray[$i]->getName(); $albumName = returnItemShortName($artArray[$i]->getName(), 12); $albumLink = str_replace('"', "\\\"", $display->link($artArray[$i], $albumName, word("Browse") . ": " . $albumName_long, "jz_random_art_block", true)); $artist = $artArray[$i]->getNaturalParent(); $artistName_long = $artist->getName(); $artistName = returnItemShortName($artist->getName(), 12); $artistLink = str_replace('"', "\\\"", $display->link($artist, $artistName, word("Browse") . ": " . $artistName_long, "jz_random_art_block", true)); $artsize = explode("x", $random_art_size); $imgSrc = str_replace('"', "'", $display->returnImage($artArray[$i]->getMainArt($random_art_size), $artArray[$i]->getName(), $artsize[0], $artsize[1], "fixed")); $item_link = str_replace('"', "'", $display->link($artArray[$i], $imgSrc, $albumName_long, "jz_random_art_block", true)); // Now, can they stream? if ($jzUSER->getSetting('stream')) { $playLink = str_replace('"', "\\\"", $display->playLink($artArray[$i], word("Play"), word("Play") . ": " . $albumName_long, "jz_random_art_block", true)); $randLink = str_replace('"', "\\\"", $display->playLink($artArray[$i], word("Play Random"), word("Play Random") . ": " . $albumName_long, "jz_random_art_block", true, true)); $dispLink = $playLink . " - " . $randLink; } else { $dispLink = ""; } // Let's make sure they aren'te view only $arrayVar = "<center>" . $artistLink . "<br>" . $albumLink . "<br>" . $item_link; if ($jzUSER->getSetting('stream')) { $arrayVar .= "<br>" . $dispLink . "</center>"; } $fullArray[] = $arrayVar; } // Now we need to get the different arrays $c = 1; $start = 0; while ($c < $random_albums + 1) { $dataArray = array_slice($fullArray, $start, $random_per_slot); for ($ctr = 0; $ctr < count($dataArray); $ctr++) { echo "imgItem" . $c . "[" . $ctr . "]=\"" . $dataArray[$ctr] . '"' . "\n"; } // Now let's move on $start = $start + $random_per_slot; $c++; } // Now let's create the functions $c = 1; while ($c < $random_albums + 1) { ?> var current<?php echo $c; ?> =0 <?php $c++; } $c = 1; while ($c < $random_albums + 1) { ?> var ns6=document.getElementById&&!document.all function changeItem<?php echo $c; ?> (){ if(document.layers){ document.layer1.document.write(imgItem<?php echo $c; ?> [current<?php echo $c; ?> ]) document.layer1.document.close() } if(ns6)document.getElementById("div<?php echo $c; ?> ").innerHTML=imgItem<?php echo $c; ?> [current<?php echo $c; ?> ] { if(document.all){ div<?php echo $c; ?> .innerHTML=imgItem<?php echo $c; ?> [current<?php echo $c; ?> ] } } if (current<?php echo $c; ?> ==<?php echo $random_per_slot - 1; ?> ) current<?php echo $c; ?> =0 else current<?php echo $c; ?> ++ <?php if ($random_per_slot != 1) { ?> setTimeout("changeItem<?php echo $c; ?> ()",<?php echo $random_rate; ?> ) <?php } ?> } <?php $c++; } $c = 1; while ($c < $random_albums + 1) { ?> changeItem<?php echo $c; ?> (); <?php $c++; } ?> //--> </script> <?php }
/** * Displays the random albums block * @author Ross Carlson * @version 12/22/04 * @since 12/22/04 * @param object $node the node that we are looking at * @param string $level The level we are looking at, like a subartist */ function slickRandomAlbums(&$node, $level = "") { global $show_album_art, $random_albums, $random_per_slot, $random_albums, $random_per_slot, $random_rate, $row_colors, $root_dir, $jzUSER, $show_album_art, $random_art_size; // Should we show this? if ($show_album_art == "false") { return; } if ($_GET['action'] == "viewallart") { return; } // Now let's get a random amount of albums with album art $artArray = $node->getSubNodes("nodes", distanceTo("album", $node), true, $random_albums * $random_per_slot, true); if (count($artArray) == 0) { return; } $title = word("Random Albums"); if ($node->getName() != "") { $title = word("Random Albums") . " :: " . $node->getName(); } $url_array = array(); $url_array['jz_path'] = $node->getPath("String"); $url_array['action'] = "viewallart"; $showLink = '<a href="' . urlize($url_array) . '">' . word("View All Art") . '</a> '; // Should we be here???? if ($random_albums == "0" or $show_album_art == "false") { return; } // Let's setup the new display object $display =& new jzDisplay(); /* // WTF is this doing here? (BJD 6/21/06) // Let's make sure they didn't pass the data already if ($valArray){ $artArray = $valArray; } else { // Now let's get a random amount of albums with album art $artArray = $node->getSubNodes("nodes",distanceTo("album",$node),true,$random_albums*$random_per_slot,true); } // Now let's see how much we got back and make sure we just shouldn't return if (count($artArray) == 0){ return; } */ // Let's startup Smarty $smarty = smartySetup(); $smarty->assign('title', $title); $smarty->assign('showLink', $showLink); // Now let's display the template $smarty->display(SMARTY_ROOT . 'templates/slick/block-random-albums.tpl'); // Now let's add the Javascript for the rotations ?> <SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"><!--\ //you may add your image file or text below $c=1; // Now let's create the variables <?php $c = 1; while ($c < $random_albums + 1) { echo "var imgItem" . $c . "=new Array()" . "\n"; $c++; } // Now let's build the first array with ALL the data so we can break it up later $c = 0; for ($i = 0; $i < count($artArray); $i++) { $albumName_long = $artArray[$i]->getName(); $albumName = returnItemShortName($albumName_long, 12); $albumLink = str_replace('"', "\\\"", $display->link($artArray[$i], $albumName, word("Browse") . ": " . $albumName_long, "jz_random_art_block", true)); $artist = $artArray[$i]->getNaturalParent(); $artistName_long = $artist->getName(); $artistName = returnItemShortName($artistName_long, 12); $artistLink = str_replace('"', "\\\"", $display->link($artist, $artistName, word("Browse") . ": " . $artistName_long, "jz_random_art_block", true)); $artsize = explode("x", $random_art_size); $art = $artArray[$i]->getMainArt($random_art_size); $imgSrc = str_replace('"', "'", $display->returnImage($art, $artistName_long, $artsize[0], $artsize[1], "fixed")); $item_link = str_replace('"', "'", $display->link($artArray[$i], $imgSrc, $albumName_long, "jz_random_art_block", true)); // Now, can they stream? if ($jzUSER->getSetting('stream')) { $playLink = str_replace('"', "\\\"", $display->playLink($artArray[$i], word("Play"), word("Play") . ": " . $albumName_long, "jz_random_art_block", true)); $randLink = str_replace('"', "\\\"", $display->playLink($artArray[$i], word("Play Random"), word("Play Random") . ": " . $albumName_long, "jz_random_art_block", true, true)); $dispLink = $playLink . " - " . $randLink; } else { $dispLink = ""; } // Let's make sure they aren'te view only $arrayVar = "<center>" . $artistLink . "<br>" . $albumLink . "<br>" . $item_link; if ($jzUSER->getSetting('stream')) { $arrayVar .= "<br>" . $dispLink . "</center>"; } $fullArray[] = $arrayVar; } // Now we need to get the different arrays $c = 1; $start = 0; while ($c < $random_albums + 1) { $dataArray = array_slice($fullArray, $start, $random_per_slot); for ($ctr = 0; $ctr < count($dataArray); $ctr++) { echo "imgItem" . $c . "[" . $ctr . "]=\"" . $dataArray[$ctr] . '"' . "\n"; } // Now let's move on $start = $start + $random_per_slot; $c++; } // Now let's create the functions $c = 1; while ($c < $random_albums + 1) { ?> var current<?php echo $c; ?> =0 <?php $c++; } $c = 1; while ($c < $random_albums + 1) { ?> var ns6=document.getElementById&&!document.all function changeItem<?php echo $c; ?> (){ if(document.layers){ document.layer1.document.write(imgItem<?php echo $c; ?> [current<?php echo $c; ?> ]) document.layer1.document.close() } if(ns6)document.getElementById("div<?php echo $c; ?> ").innerHTML=imgItem<?php echo $c; ?> [current<?php echo $c; ?> ] { if(document.all){ div<?php echo $c; ?> .innerHTML=imgItem<?php echo $c; ?> [current<?php echo $c; ?> ] } } if (current<?php echo $c; ?> ==<?php echo $random_per_slot - 1; ?> ) current<?php echo $c; ?> =0 else current<?php echo $c; ?> ++ <?php if ($random_per_slot != 1) { ?> setTimeout("changeItem<?php echo $c; ?> ()",<?php echo $random_rate; ?> ) <?php } ?> } <?php $c++; } $c = 1; while ($c < $random_albums + 1) { ?> changeItem<?php echo $c; ?> (); <?php $c++; } ?> //--> </script> <?php }
/** * Displays a table of the given tracks. * * @author Ross Carlson * @version 11/30/04 * @since 01/11/05 * @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 trackTable($tracks, $purpose = false) { global $media_dir, $jinzora_skin, $hierarchy, $album_name_truncate, $row_colors, $img_more, $img_email, $img_rate, $img_discuss, $num_other_albums, $enable_ratings, $this_site, $root_dir; if (sizeof($tracks) == 0) { return; } // Let's setup the new display object $display =& new jzDisplay(); // Let's figure out our settings: // First, set the defaults. $showNumbers = true; $showArtist = false; $showAlbum = false; $showCheck = false; $showInfo = false; $showEmail = false; $showRate = false; $showDisc = false; $albumArtThumbs = false; $showAlbumNames = false; $trackTruncate = false; $showPlayCount = false; // Now adjust as needed: switch ($purpose) { case "generic": $showNumbers = false; break; case "album": $showCheck = true; $showNumbers = false; $showInfo = true; $showPlayCount = true; $showEmail = true; break; case "search": $showArtist = true; break; case "sample": // We only want to show album thumbs IF this artist has more than 1 album $parent = $tracks[0]->getParent(); $gParent = $parent->getParent(); $nodes = $gParent->getSubNodes("nodes"); if (count($nodes) > 1) { $albumArtThumbs = true; } $showNumbers = false; $showAlbum = true; break; case "sample-all": $showNumbers = false; $showCheck = true; $showAlbumNames = true; $trackTruncate = 20; break; } // Do we need to start the form if ($showCheck) { $node = $tracks[0]->getParent(); ?> <form name="albumForm" action="<?php echo urlize(); ?> " method="POST"> <input type="hidden" name="<?php echo jz_encode("action"); ?> " value="<?php echo jz_encode("mediaAction"); ?> "> <input type="hidden" name="<?php echo jz_encode("jz_path"); ?> " value="<?php echo htmlentities(jz_encode($node->getPath("String"))); ?> "> <input type="hidden" name="<?php echo jz_encode("jz_list_type"); ?> " value="<?php echo jz_encode("tracks"); ?> "> <?php } // Now let's setup the big table to display everything $i = 0; ?> <table class="jz_track_table" width="100%" cellpadding="3" cellspacing="0" border="0"> <?php foreach ($tracks as $child) { // First let's grab all the tracks meta data $metaData = $child->getMeta(); $album = $child->getParent(); if (findPType($album) == "disk") { $album = $album->getParent(); } $gParent = $album->getParent(); $artist = getInformation($album, "artist"); ?> <tr class="<?php echo $row_colors[$i]; ?> "> <?php if ($showCheck) { ?> <td width="1%" valign="top" class="jz_track_table_songs_td"> <input type="checkbox" name="jz_list[]" value="<?php echo jz_encode($child->getPath("String")); ?> "> </td> <td width="1%" valign="top" class="jz_track_table_songs_td"> <?php echo $display->playButton($child); ?> </td> <td width="1%" valign="top" class="jz_track_table_songs_td"> <?php echo $display->downloadButton($child); ?> </td> <?php } // Do they want ratings? if ($enable_ratings == "true") { echo '<td width="1%" valign="top" class="jz_track_table_songs_td">'; $display->rateButton($child); echo '</td>'; } ?> <?php if ($showInfo) { $arr = array(); $arr['action'] = "popup"; $arr['ptype'] = "trackinfo"; $arr['jz_path'] = $child->getPath("String"); $link = urlize($arr); ?> <td width="1%" valign="top" class="jz_track_table_songs_td"> <a href="<?php echo $link; ?> " target="_blank" onclick="openPopup(this, 375, 650); return false;"><?php echo $img_more; ?> </a> </td> <?php } ?> <?php if ($showEmail) { ?> <td width="1%" valign="top" class="jz_track_table_songs_td"> <?php $arr = array(); $arr['action'] = "playlist"; $arr['jz_path'] = $child->getPath("String"); $arr['type'] = "track"; $link = $this_site . $root_dir . "/" . str_replace("&", "%26", urlize($arr)); $mailLink = "mailto:?subject=" . $artist . " - " . $album->getName() . "&body=Click to play " . $artist . " - " . $album->getName() . ":%0D%0A%0D%0A" . $link . "%0D%0A%0D%0APowered%20by%20Jinzora%20%0D%0AJinzora%20::%20Free%20Your%20Media%0D%0Ahttp://www.jinzora.org"; ?> <a class="jz_track_table_songs_href" href="<?php echo $mailLink; ?> "><?php echo $img_email; ?> </a> </td> <?php } ?> <?php if ($showDisc) { ?> <td width="1%" valign="top" class="jz_track_table_songs_td"> <a class="jz_track_table_songs_href" href=""><?php echo $img_discuss; ?> </a> </td> <?php } ?> <td nowrap width="100%" valign="top" class="jz_track_table_songs_td"> <?php // Do they want tiny thumbnails? if ($albumArtThumbs) { if (($art = $album->getMainArt()) !== false) { $display->link($album, $display->returnImage($art, $album->getName(), 25, 25, "limit", false, false, "left", "2", "2"), $album->getName(), "jz_track_table_songs_href"); } } if ($showArtist !== false) { $j = 0; while ($j < sizeof($hierarchy) && $hierarchy[$j] != 'artist') { $j++; } if ($j < sizeof($hierarchy)) { $parent = $child; while ($parent->getLevel() > $j + 1) { $parent = $parent->getParent(); } $display->link($parent, $parent->getName(), $parent->getName(), "jz_track_table_songs_href"); echo " / "; } } if (!$trackTruncate) { $tName = $child->getName(); } else { $tName = returnItemShortName($child->getName(), $trackTruncate); } $display->link($child, $tName, $child->getName(), "jz_track_table_songs_href"); if ($showAlbum) { echo "<br>From: "; $display->link($album, returnItemShortName($album->getName(), 20), $album->getName(), "jz_track_table_songs_href"); } // Do they want ratings? if ($enable_ratings == "true") { $rating = $display->displayRating($child, true); if ($rating) { echo "<br>" . $rating; } unset($rating); } ?> </td> <?php $lyricsSearch = false; if (isset($_POST['search_type'])) { if ($_POST['search_type'] == "lyrics") { $lyricsSearch = $_POST['search_query']; } } if (isset($_GET['search_type'])) { if ($_GET['search_type'] == "lyrics") { $lyricsSearch = $_GET['search_query']; } } if ($lyricsSearch) { // Now let's get the lyrics back $lyrics = $child->getLyrics(); // Now let's parse it out $lyrics = str_replace("Lyrics Provided by: Leo's Lyrics\nhttp://www.leoslyrics.com", "", $lyrics); $start = strpos(strtolower($lyrics), strtolower($lyricsSearch)) - 20; if ($start < 0) { $start = 0; } $lyrics = " (..." . substr($lyrics, $start, strlen($lyricsSearch) + 40) . "...)"; $lyrics = highlight($lyrics, $lyricsSearch); echo '<td width="6%" align="center" valign="top" class="jz_track_table_songs_td">'; echo "<nobr>" . $lyrics . "</nobr>"; echo '</td>'; } ?> <?php if ($showAlbumNames) { echo '<td width="1%" align="center" valign="top" class="jz_track_table_songs_td"><nobr>'; $display->link($gParent, returnItemShortName($gParent->getName(), 20), $gParent->getName(), "jz_track_table_songs_href"); echo '</nobr></td>'; } ?> <?php if ($showPlayCount) { echo '<td width="1%" align="center" valign="top" class="jz_track_table_songs_td">'; echo $child->getPlayCount(); echo '</td>'; } ?> <td width="6%" align="center" valign="top" class="jz_track_table_songs_td"> <nobr> <?php echo convertSecMins($metaData['length']); ?> </nobr> </td> </tr> <?php $i = 1 - $i; unset($gParent); unset($album); } // Now let's set a field with the number of checkboxes that were here echo "</table>"; // Now let's show the playlist bar if we should if ($showCheck) { $blocks = new jzBlocks(); $blocks->blockSpacer(); $blocks->playlistBar(); echo "</form>"; } }
function drawPage(&$node) { global $cols_in_genre, $cellspacing, $this_page, $img_play, $artist_truncate, $main_table_width, $img_random_play, $directory_level, $web_root, $root_dir, $img_more, $media_dir, $show_sub_numbers, $show_all_checkboxes, $img_more_dis, $img_play_dis, $img_random_play_dis, $url_seperator, $days_for_new, $img_rate, $enable_ratings, $enable_discussion, $img_discuss, $show_sub_numbers, $disable_random, $info_level, $days_for_new, $enable_playlist, $track_play_only, $css, $jinzora_skin, $bg_c, $text_c, $img_discuss_dis, $hierarchy, $random_albums, $frontend; // Let's see if the theme is set or not, and if not set it to the default //if (isset($_SESSION['cur_theme'])){ $_SESSION['cur_theme'] = $jinzora_skin; } // Let's setup the display object $display =& new jzDisplay(); $blocks =& new jzBlocks(); $fe =& new jzFrontend(); // Now let's display the header // Let's see if they are viewing the Genre or not // Now let's get all the data for this level $retArray = $node->getSubNodes("both"); // Now let's display the site description $news = $blocks->siteNews($node); if ($news != "") { echo "<br><center>" . $news . "<center>"; } echo '<br><br>'; //$blocks->blockHeader(); $blocks->blockBodyOpen(); // Now let's start our table to put the stuff in echo '<br>'; jzTableOpen("100%", "3", "jz_col_table_main"); jzTROpen("jz_col_table_tr"); // Now let's figure out how wide our colum should be $cols_in_genre = 3; $col_width = returnColWidth(count($retArray)); // Now let's figure out how many artists per column // adding the .49 make sure it always rounds up $folder_per_column = round(count($retArray) / $cols_in_genre + 0.49, 0); $first_loop = ""; // Let's initialize some variables $ctr = 1; // Let's setup our form for below echo '<form action="' . $_SESSION['prev_page'] . '" name="trackForm" method="POST">'; // Now let's loop through that array, displaying the items for ($i = 0; $i < count($retArray); $i++) { // Let's make sure that we found items to display if ($retArray[$i]->isLeaf()) { continue; } else { // Now let's see if this is a NEW directory or not //$new_from = checkForNew(jzstripslashes($genre. "/". $retArray[$i])); // NEW BACKEND: don't know how to handle this yet. // Let's count so we know where we are in making the columns // Then we'll add the links to the sub pages if ($ctr == 1) { if ($first_loop == "") { $first_loop = "no"; jzTDOpen($col_width, "left", "top", "", "0"); } else { jzTDClose(); jzTDOpen($col_width, "left", "top", "", "0"); } } // Let's see if we need to truncate the name $displayItem = returnItemShortName($retArray[$i]->getName(), $artist_truncate); // Now let's get the number of sub items $fldr_ctr = $retArray[$i]->getSubNodeCount(); // Let's open our table jzTableOpen("100", "0", "jz_col_table"); jzTROpen("jz_col_table_tr"); // Let's see if they are only a viewing user or not if ($_SESSION['jz_access_level'] != "viewonly" and $_SESSION['jz_access_level'] != "lofi") { // Now let's show them the info button if ($info_level == "all" or $info_level == "admin" and $_SESSION['jz_access_level'] == "admin") { jzTDOpen("1", "left", "top", "", "0"); $item_url = $root_dir . '/popup.php?type=' . $hierarchy[$retArray[$i]->getLevel()] . '&info=' . urlencode($retArray[$i]->getPath("String")) . '&cur_theme=' . $_SESSION['cur_theme']; jzHREF($item_url, "_blank", "jz_col_table_href", "openPopup(this, 320, 520, false, 'Popup'); return false;", $img_more); jzTDClose(); } // Now let's see if they only wanted to see track plays if ($track_play_only != "true") { jzTDOpen("1", "left", "top", "", "0"); $display->playButton($retArray[$i]); jzTDClose(); } // Now let's see if they wanted to see random icons if ($disable_random == "false") { jzTDOpen("1", "left", "top", "", "0"); $display->randomPlayButton($retArray[$i]); jzTDClose(); } // Now let's show them the rating link, if they wanted it if ($enable_ratings == "true") { jzTDOpen("1", "left", "top", "", "0"); $display->rateButton($retArray[$i]); jzTDClose(); } if ($enable_discussion == "true") { jzTDOpen("1", "left", "top", "", "0"); $item_url = $root_dir . '/popup.php?type=discuss&info=' . rawurlencode($retArray[$i]->getPath("String")) . '&cur_theme=' . $_SESSION['cur_theme']; // Now let's figure out which icon to use if ($retArray[$i]->getDiscussion() == "") { $img = $img_discuss_dis; } else { $img = $img_discuss; } jzHREF($item_url, "_blank", "", "openPopup(this, 500, 500, false, 'Popup'); return false;", $img_discuss); jzTDClose(); } } else { // Ok, they are view only, so let's show them the disabled icons jzTDOpen("1", "left", "top", "", "0"); echo $img_more_dis; jzTDClose(); jzTDOpen("1", "left", "top", "", "0"); echo $img_play_dis; jzTDClose(); if ($disable_random == "false") { jzTDOpen("1", "left", "top", "", "0"); echo $img_random_play_dis; jzTDClose(); } } // Let's give them the check box for the playlist addition IF they wanted it if ($show_all_checkboxes == "true" and $enable_playlist != "false") { jzTDOpen("1", "left", "top", "", "0"); echo '<input class="jz_checkbox" name="track-' . $i . '" type=checkbox value="' . $root_dir . $media_dir . '/' . rawurlencode($genre) . '/' . urlencode($retArray[$i]) . '/">'; jzTDClose(); } // NEW BACKEND: This part will need a bit more work. jzTDOpen("1", "left", "top", "", "0"); echo " "; jzTDClose(); // Let's see if the data is new or not $new_data = ""; $new_from = ""; if ($new_from != "") { $new_data = ""; } jzTDOpen("90", "left", "top", "", "0"); $item_url = $this_page . $url_seperator . 'path=' . rawurlencode($retArray[$i]->getPath("String")); // Now let's display the link $display->link($retArray[$i]); // Let's see if this is new or not if ($new_from != "") { echo icon('new') . $new_data . '>'; } // Now let's see if they wanted ratings if ($enable_ratings == "true") { // Ok, now let's see if there is a rating file //$display->rateButton($node);// NEW BACKEND: this needs work. } // Now let's return the description $descData = $retArray[$i]->getShortDescription(); if ($descData) { echo "<br>" . stripslashes($descData) . "<br><br>"; } // Now let's close out jzTDClose(); jzTRClose(); jzTableClose(); // Now let's increment for out column counting if ($ctr == $folder_per_column) { $ctr = 1; } else { $ctr++; } } } // go to next loop echo '</form>'; // Now let's set a hidden form field so we'll know how many boxes there were echo '<input type="hidden" name="numboxes" value="' . $i . '">'; // Now let's close our table jzTableClose(); echo "<br>\n"; $blocks->blockBodyClose(); // Now let's see if we should display random albums if ($random_albums != "0") { $blocks->classicRandomAlbums($node, $node->getName()); echo "<br>"; } // we might still have tracks. $tracks = $node->getSubNodes("tracks"); $blocks->trackTable($tracks, false); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Need to update this to new abstraction layer // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Now let's look and see if there are any songs in this directory that we need to display // This will also test for the chart boxes and display them // NEW BACKEND: This needs to be reworked. (Check array for isLeaf == ture //$songsFound = lookForMedia(jzstripslashes(urldecode($web_root. $root_dir. $media_dir. "/". $genre))); // Now let's show the playlist bar //if ($enable_playlist <> "false"){ displayPlaylistBar($songsFound); } }
$retType = "nodes"; } $recent = $node->{$func}($retType, distanceTo($type, $node), $limit); // Now let's loop through the results for ($i = 0; $i < count($recent); $i++) { // Now let's create our node and get the properties $item = $recent[$i]; $album = $item->getName(); $parent = $item->getParent(); $artist = $parent->getName(); // Now let's create our links $albumArr['jz_path'] = $item->getPath("String"); $artistArr['jz_path'] = $parent->getPath("String"); // Now let's create our short names $artistTitle = returnItemShortName($artist, $album_name_truncate); $albumTitle = returnItemShortName($album, $album_name_truncate); // Now let's display it echo "<nobr>"; $display->playLink($item, $img_tiny_play, $album); // Now let's set the hover code $innerOver = ""; if (($art = $item->getMainArt()) != false) { $innerOver .= $display->returnImage($art, $item->getName(), 75, 75, "limit", false, false, "left", "3", "3"); } $desc_truncate = 200; $desc = $item->getDescription(); $innerOver .= $display->returnShortName($desc, $desc_truncate); if (strlen($desc) > $desc_truncate) { $innerOver .= "..."; } $innerOver = str_replace('"', "", $innerOver);