item_id = $item_id; print $view; } public function showhtml($item_id) { // Generate the Dialog Box for HTML links. $item = ORM::factory("item", $item_id); access::required("view", $item); // If the current page is an album, only display two links. if ($item->is_album()) { $linkArray[0] = array("Text:", "type}s/{$item->id}") . "">Click Here"); $linkArray[1] = array("Thumbnail:", "type}s/{$item->id}") . "">thumb_url(true) . "">"); $linkTitles[0] = array("Link To This Album:", 2); // If the item is a movie, don't display resize links, do display an embed link. } elseif ($item->is_movie()) { // Link to the current page. $linkArray[0] = array("Text:", "type}s/{$item->id}") . "">Click Here"); $linkArray[1] = array("Thumbnail:", "type}s/{$item->id}") . "">thumb_url(true) . "">"); $linkTitles[0] = array("Link To This Page:", 2); // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display links to it. if (access::can("view_full", $item)) { $linkArray[2] = array("Text:", "file_url(true) . "">Click Here"); $linkArray[3] = array("Thumbnail:", "file_url(true) . "">thumb_url(true) . "">"); $linkArray[4] = array("Embed:", "width . "" height="" . $item->height . "" data="" . url::abs_file("lib/flowplayer.swf") . "" type="application/x-shockwave-flash">"); $linkTitles[1] = array("Link To The Video File:", 3); } // Or else assume the item is a photo. } else { // Link to the current page. $linkArray[0] = array("Text:", "type}s/{$item->id}") . "">Click Here"); $linkArray[1] = array("Thumbnail:", "type}s/{$item->id}") . "">thumb_url(true) . "">"); $linkArray[2] = array("Resized:", "type}s/{$item->id}") . "">resize_url(true) . "">"); $linkTitles[0] = array("Link To This Page:", 3); // Link to the "resized" version of the current image. $linkArray[3] = array("Text:", "resize_url(true) . "">Click Here"); $linkArray[4] = array("Thumbnail:", "resize_url(true) . "">thumb_url(true) . "">"); $linkArray[5] = array("Image:", "resize_url(true) . "">"); $linkTitles[1] = array("Link To The Resized Image:", 3); // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display links to it. if (access::can("view_full", $item)) { $linkArray[6] = array("Text:", "file_url(true) . "">Click Here"); $linkArray[7] = array("Thumbnail:", "file_url(true) . "">thumb_url(true) . "">"); $linkArray[8] = array("Resized:", "file_url(true) . "">resize_url(true) . "">"); $linkTitles[2] = array("Link To The Full Size Image:", 3); } } $view = new View("embedlinks_htmldialog.html"); $view->titles = $linkTitles; $view->details = $linkArray; print $view; } public function showbbcode($item_id) { // Generate the Dialog Box for BBCode links. $item = ORM::factory("item", $item_id); access::required("view", $item); // If the current page is an album, only display two links. if ($item->is_album()) { $linkArray[0] = array("Text:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "]Click Here[/url]"); $linkArray[1] = array("Thumbnail:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "][img]" . $item->thumb_url(true) . "[/img][/url]"); $linkTitles[0] = array("Link To This Album:", 2); // If the item is a movie, don't display resize links. } elseif ($item->is_movie()) { // Link to the current page. $linkArray[0] = array("Text:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "]Click Here[/url]"); $linkArray[1] = array("Thumbnail:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "][img]" . $item->thumb_url(true) . "[/img][/url]"); $linkTitles[0] = array("Link To This Page:", 2); // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display links to it. if (access::can("view_full", $item)) { $linkArray[2] = array("Text:", "[url=" . $item->file_url(true) . "]Click Here[/url]"); $linkArray[3] = array("Thumbnail:", "[url=" . $item->file_url(true) . "][img]" . $item->thumb_url(true) . "[/img][/url]"); $linkTitles[1] = array("Link To The Video File:", 2); } // Or else assume the item is a photo. } else { // Link to the current page. $linkArray[0] = array("Text:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "]Click Here[/url]"); $linkArray[1] = array("Thumbnail:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "][img]" . $item->thumb_url(true) . "[/img][/url]"); $linkArray[2] = array("Resized:", "[url=" . url::abs_site("{$item->type}s/{$item->id}") . "][img]" . $item->resize_url(true) . "[/img][/url]"); $linkTitles[0] = array("Link To This Page:", 3); // Link to the "resized" version of the current image. $linkArray[3] = array("Text:", "[url=" . $item->resize_url(true) . "]Click Here[/url]"); $linkArray[4] = array("Thumbnail:", "[url=" . $item->resize_url(true) . "][img]" . $item->thumb_url(true) . "[/img][/url]"); $linkArray[5] = array("Image:", "[img]" . $item->resize_url(true) . "[/img]"); $linkTitles[1] = array("Link To The Resized Image:", 3); // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display links to it. if (access::can("view_full", $item)) { $linkArray[6] = array("Text:", "[url=" . $item->file_url(true) . "]Click Here[/url]"); $linkArray[7] = array("Thumbnail:", "[url=" . $item->file_url(true) . "][img]" . $item->thumb_url(true) . "[/img][/url]"); $linkArray[8] = array("Resized:", "[url=" . $item->file_url(true) . "][img]" . $item->resize_url(true) . "[/img][/url]"); $linkTitles[2] = array("Link To The Full Size Image:", 3); } } $view = new View("embedlinks_bbcodedialog.html"); $view->titles = $linkTitles; $view->details = $linkArray; print $view; } public function showfullurl($item_id) { // Generate the Dialog Box for the URLs to the items thumb, resize and fullsize image. $item = ORM::factory("item", $item_id); access::required("view", $item); // If the current page is an album, only display a URL and thumnail fields. if ($item->is_album()) { $linkArray[0] = array("Album URL:", url::abs_site("{$item->type}s/{$item->id}")); $linkArray[1] = array("Thumbnail:", $item->thumb_url(true)); $linkTitles[0] = array("URLs:", 2); // If the item is a movie, do not display the resize url. } elseif ($item->is_movie()) { // Link to the current page. $linkArray[0] = array("This Page:", url::abs_site("{$item->type}s/{$item->id}")); $linkArray[1] = array("Thumbnail:", $item->thumb_url(true)); // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display its URL. if (access::can("view_full", $item)) { $linkArray[2] = array("Video File:", $item->file_url(true)); $linkTitles[0] = array("URLs:", 3); } else { $linkTitles[0] = array("URLs:", 2); } // Or else assume the item is a photo. } else { // Link to the current page. $linkArray[0] = array("This Page:", url::abs_site("{$item->type}s/{$item->id}")); $linkArray[1] = array("Thumbnail:", $item->thumb_url(true)); $linkArray[2] = array("Resized:", $item->resize_url(true)); // If the visitor has suficient privlidges to see the fullsized // version of the current image, then display its URL. if (access::can("view_full", $item)) { $linkArray[3] = array("Full Size:", $item->file_url(true)); $linkTitles[0] = array("URLs:", 4); } else { $linkTitles[0] = array("URLs:", 3); } } $view = new View("embedlinks_fullurldialog.html"); $view->titles = $linkTitles; $view->details = $linkArray; print $view; } }