?>
">

<?php 
    if ($feedback_resource_select) {
        ?>
<h2><?php 
        echo $lang["selectedresources"];
        ?>
:</h2><?php 
        # Show thumbnails and allow the user to select resources.
        $result = do_search("!collection" . $collection);
        for ($n = 0; $n < count($result); $n++) {
            $ref = $result[$n]["ref"];
            $access = get_resource_access($ref);
            $use_watermark = check_use_watermark($ref);
            $title = $ref . " : " . htmlspecialchars(tidy_trim(i18n_get_translated($result[$n]["field" . $view_title_field]), 60));
            if (isset($collection_feedback_display_field)) {
                $displaytitle = htmlspecialchars(get_data_by_field($ref, $collection_feedback_display_field));
            } else {
                $displaytitle = $title;
            }
            ?>
	
		<!--Resource Panel-->
		<div class="ResourcePanelShell" id="ResourceShell<?php 
            echo $ref;
            ?>
">
		<div class="ResourcePanel">
		
Example #2
0
include "../../../include/resource_functions.php";
include "../../../include/collections_functions.php";
include "../../../include/search_functions.php";
# Get variables and check key is valid.
$ref = getvalescaped("ref", "");
$key = getvalescaped("key", "");
$size = getvalescaped("size", "pre");
$transition = (int) getvalescaped("transition", 4);
$width = getvalescaped("width", "");
$player_width = $width;
# Check key is valid
if (!check_access_key_collection($ref, $key)) {
    exit($lang["embedslideshow_notavailable"]);
}
# Load watermark settings
$use_watermark = check_use_watermark();
?>
<html>
<head>
<link href="../css/embedslideshow.css" rel="stylesheet" type="text/css" media="screen,projection,print" /> 
<script src="../../../lib/js/jquery-1.7.2.min.js" type="text/javascript"></script>
</head>
<body>

<div class="embedslideshow_player">
<div class="embedslideshow_preview" id="embedslideshow_preview" style="width:<?php 
echo $width;
?>
px;height:<?php 
echo $width + 8;
?>
Example #3
0
function HookAnnotateViewRenderinnerresourcepreview()
{
    global $baseurl_short, $ajax, $ref, $ffmpeg_preview_extension, $resource, $k, $search, $offset, $order_by, $sort, $archive, $lang, $download_multisize, $baseurl, $annotate_ext_exclude, $annotate_rt_exclude, $annotate_public_view, $annotate_pdf_output;
    if (in_array($resource['file_extension'], $annotate_ext_exclude)) {
        return false;
    }
    if (in_array($resource['resource_type'], $annotate_rt_exclude)) {
        return false;
    }
    if (!($k == "") && !$annotate_public_view) {
        return false;
    }
    $download_multisize = true;
    $flvfile = get_resource_path($ref, true, "pre", false, $ffmpeg_preview_extension);
    if (file_exists($flvfile)) {
        return false;
    }
    if ($resource["has_image"] == 1) {
        ?>
	<script type="text/javascript">
		button_ok = "<?php 
        echo preg_replace("/\r?\n/", "\\n", addslashes($lang["ok"]));
        ?>
";
		button_cancel = "<?php 
        echo preg_replace("/\r?\n/", "\\n", addslashes($lang["cancel"]));
        ?>
";
		button_delete = "<?php 
        echo preg_replace("/\r?\n/", "\\n", addslashes($lang["action-delete"]));
        ?>
";
		button_add = "&gt;&nbsp;<?php 
        echo preg_replace("/\r?\n/", "\\n", addslashes($lang["action-add_note"]));
        ?>
";
	    button_toggle = "&gt;&nbsp;<?php 
        echo preg_replace("/\r?\n/", "\\n", addslashes($lang["action-toggle-on"]));
        ?>
";
		button_toggle_off = "&gt;&nbsp;<?php 
        echo preg_replace("/\r?\n/", "\\n", addslashes($lang["action-toggle-off"]));
        ?>
";
		error_saving = "<?php 
        echo preg_replace("/\r?\n/", "\\n", addslashes($lang["error-saving"]));
        ?>
";
		error_deleting = "<?php 
        echo preg_replace("/\r?\n/", "\\n", addslashes($lang["error-deleting"]));
        ?>
";
	</script>
	<script>
		jQuery.noConflict();

	</script><?php 
        $use_watermark = check_use_watermark($resource['ref']);
        $imagepath = get_resource_path($ref, true, "pre", false, $resource["preview_extension"], -1, 1, $use_watermark);
        if (!file_exists($imagepath)) {
            $imagepath = get_resource_path($ref, true, "thm", false, $resource["preview_extension"], -1, 1, $use_watermark);
            $imageurl = get_resource_path($ref, false, "thm", false, $resource["preview_extension"], -1, 1, $use_watermark);
        } else {
            $imageurl = get_resource_path($ref, false, "pre", false, $resource["preview_extension"], -1, 1, $use_watermark);
        }
        if (!file_exists($imagepath)) {
            return false;
        }
        $sizes = getimagesize($imagepath);
        $w = $sizes[0];
        $h = $sizes[1];
        if (file_exists($imagepath)) {
            $page_count = get_page_count($resource);
            $multipage_document = FALSE;
            if ($page_count > 1) {
                $multipage_document = TRUE;
            }
            ?>
	


<div id="wrapper" class="annotate-view-wrapper">
<div>
<img id="toAnnotate" onload="annotate(<?php 
            echo $ref;
            ?>
,'<?php 
            echo $k;
            ?>
','<?php 
            echo $w;
            ?>
','<?php 
            echo $h;
            ?>
',<?php 
            echo getvalescaped("annotate_toggle", true);
            ?>
);" src="<?php 
            echo $imageurl;
            ?>
" id="previewimage" class="Picture" GALLERYIMG="no" style="display:block;"   />
</div>
	
<div class="annotate-view-preview-links" >
<a class="enterLink" href="<?php 
            echo $baseurl_short;
            ?>
pages/preview.php?<?php 
            if (getval("annotate", "") != "") {
                ?>
annotate=true&<?php 
            }
            ?>
ref=<?php 
            echo $ref;
            ?>
&amp;ext=<?php 
            echo $resource["preview_extension"];
            ?>
&amp;k=<?php 
            echo $k;
            ?>
&amp;search=<?php 
            echo urlencode($search);
            ?>
&amp;offset=<?php 
            echo $offset;
            ?>
&amp;order_by=<?php 
            echo $order_by;
            ?>
&amp;sort=<?php 
            echo $sort;
            ?>
&amp;archive=<?php 
            echo $archive;
            if ($multipage_document) {
                echo '&amp;page=1';
            }
            ?>
" title="<?php 
            echo $lang["fullscreenpreview"];
            ?>
">&gt;&nbsp;<?php 
            echo $lang["fullscreenpreview"];
            ?>
</a>
    
     <?php 
            // MAGICTOUCH PLUGIN COMPATIBILITY
            global $magictouch_account_id;
            if ($magictouch_account_id != "") {
                global $plugins;
                global $magictouch_rt_exclude;
                global $magictouch_ext_exclude;
                if (in_array("magictouch", $plugins) && !in_array($resource['resource_type'], $magictouch_rt_exclude) && !in_array($resource['file_extension'], $magictouch_ext_exclude) && !defined("MTFAIL")) {
                    ?>
&nbsp;<a style="display:inline;" href="<?php 
                    echo getval("from", "") == "search" ? $baseurl_short . "pages/search.php?" : $baseurl_short . "pages/view.php?ref=" . $ref . "&";
                    ?>
search=<?php 
                    echo urlencode($search);
                    ?>
&offset=<?php 
                    echo $offset;
                    ?>
&order_by=<?php 
                    echo $order_by;
                    ?>
&sort=<?php 
                    echo $sort;
                    ?>
&archive=<?php 
                    echo $archive;
                    ?>
&k=<?php 
                    echo $k;
                    ?>
" onClick="document.cookie='annotate=off';return CentralSpaceLoad(this);">&gt;&nbsp;<?php 
                    echo $lang['zoom'];
                    ?>
</a><?php 
                }
            }
            ///////////////
            ?>
     
<?php 
            if ($annotate_pdf_output) {
                ?>
&nbsp;&nbsp;<a style="display:inline;float:right;" class="nowrap" href="<?php 
                echo $baseurl_short;
                ?>
plugins/annotate/pages/annotate_pdf_config.php?ref=<?php 
                echo $ref;
                ?>
&ext=<?php 
                echo $resource["preview_extension"];
                ?>
&k=<?php 
                echo $k;
                ?>
&search=<?php 
                echo urlencode($search);
                ?>
&offset=<?php 
                echo $offset;
                ?>
&order_by=<?php 
                echo $order_by;
                ?>
&sort=<?php 
                echo $sort;
                ?>
&archive=<?php 
                echo $archive;
                ?>
" onClick="return CentralSpaceLoad(this);">&gt;&nbsp;<?php 
                echo $lang["pdfwithnotes"];
                ?>
</a>
<?php 
            }
            ?>

</div>
</div>

	
<?php 
        }
    } else {
        ?>
	<img src="<?php 
        echo $baseurl;
        ?>
/gfx/<?php 
        echo get_nopreview_icon($resource["resource_type"], $resource["file_extension"], false);
        ?>
" alt="" class="Picture" style="border:none;" id="previewimage" />
	<?php 
    }
    return true;
}
Example #4
0
function HookMagictouchViewReplacerenderinnerresourcepreview()
{
    global $baseurl, $plugins, $lang, $search, $offset, $archive, $order_by, $sort, $plugins, $download_multisize, $k, $access, $ref, $resource, $watermark;
    global $magictouch_account_id;
    if ($magictouch_account_id == "") {
        return false;
    }
    // This hooks runs outside of the renderinnerresourcepreview hook,
    // and if MTFAIL is defined, annotate will know not to include a Zoom link.
    // annotate plugin compatibility
    global $plugins;
    if (in_array("annotate", $plugins)) {
        global $annotate_ext_exclude;
        global $annotate_rt_exclude;
        if (in_array($resource['file_extension'], $annotate_ext_exclude)) {
            return false;
        }
        if (in_array($resource['resource_type'], $annotate_rt_exclude)) {
            return false;
        }
        if (getval("annotate", "") != "") {
            return false;
        }
    }
    // exclusions
    global $magictouch_rt_exclude;
    global $magictouch_ext_exclude;
    if (in_array($resource['resource_type'], $magictouch_rt_exclude)) {
        define("MTFAIL", true);
        return false;
    }
    if (in_array($resource['file_extension'], $magictouch_ext_exclude)) {
        define("MTFAIL", true);
        return false;
    }
    $download_multisize = true;
    if ($resource["has_image"] != 1) {
        define("MTFAIL", true);
        return false;
    }
    // watermark check
    $access = get_resource_access($ref);
    $use_watermark = check_use_watermark($ref);
    // paths
    $imageurl = get_resource_path($ref, false, "pre", false, $resource["preview_extension"], -1, 1, $use_watermark);
    global $magictouch_view_page_sizes;
    foreach ($magictouch_view_page_sizes as $mtpreviewsize) {
        $largeurl = get_resource_path($ref, false, $mtpreviewsize, false, "jpg", -1, 1, $use_watermark);
        $largeurl_path = get_resource_path($ref, true, $mtpreviewsize, false, "jpg", -1, 1, $use_watermark);
        if (file_exists($largeurl_path)) {
            break;
        }
    }
    if (!file_exists($largeurl_path)) {
        define("MTFAIL", true);
        return false;
        # Requires an original large JPEG file.
    }
    ?>

<div style="float:left;">
<div class="Picture">
<a href="<?php 
    echo $largeurl;
    ?>
" class="MagicTouch"><img src="<?php 
    echo $imageurl;
    ?>
" GALLERYIMG="no" id="previewimage" /></a>
</div><br />
    
<?php 
    // annotate plugin compatibility
    if (in_array("annotate", $plugins) && $k == "") {
        ?>
<a style="display:inline;clear:left;float:left;" href="<?php 
        echo $baseurl;
        ?>
/pages/view.php?ref=<?php 
        echo $ref;
        ?>
&search=<?php 
        echo urlencode($search);
        ?>
&offset=<?php 
        echo $offset;
        ?>
&order_by=<?php 
        echo $order_by;
        ?>
&sort=<?php 
        echo $sort;
        ?>
&archive=<?php 
        echo $archive;
        ?>
&k=<?php 
        echo $k;
        ?>
&annotate=true" onClick="return CentralSpaceLoad(this);">&gt;&nbsp;<?php 
        echo $lang['annotations'];
        ?>
</a><br /><br /><?php 
    }
    ?>
<script type="text/javascript">if(typeof MagicTouch=="object") {MagicTouch.refresh();} else {console.log("MagicTouch not loaded");}</script>
</div>
<?php 
    return true;
}
Example #5
0
function HookAnnotateViewRenderinnerresourcepreview()
{
    global $ref, $ffmpeg_preview_extension, $resource, $k, $search, $offset, $order_by, $sort, $archive, $lang, $download_multisize, $baseurl, $annotate_ext_exclude, $annotate_rt_exclude, $annotate_public_view, $annotate_pdf_output;
    if (in_array($resource['file_extension'], $annotate_ext_exclude)) {
        return false;
    }
    if (in_array($resource['resource_type'], $annotate_rt_exclude)) {
        return false;
    }
    if (!($k == "") && !$annotate_public_view) {
        return false;
    }
    $download_multisize = true;
    $flvfile = get_resource_path($ref, true, "pre", false, $ffmpeg_preview_extension);
    if (file_exists($flvfile)) {
        return false;
    }
    if ($resource["has_image"] == 1) {
        ?>
<style type="text/css" media="all">@import "<?php 
        echo $baseurl;
        ?>
/plugins/annotate/lib/jquery/css/annotation.css";</style>

	<script type="text/javascript" src="<?php 
        echo $baseurl;
        ?>
/plugins/annotate/lib/jquery/js/jquery.annotate.js"></script>
	<script type="text/javascript">
		button_ok = "<?php 
        echo preg_replace("/\r?\n/", "\\n", addslashes($lang["ok"]));
        ?>
";
		button_cancel = "<?php 
        echo preg_replace("/\r?\n/", "\\n", addslashes($lang["cancel"]));
        ?>
";
		button_delete = "<?php 
        echo preg_replace("/\r?\n/", "\\n", addslashes($lang["action-delete"]));
        ?>
";
		button_add = "&gt;&nbsp;<?php 
        echo preg_replace("/\r?\n/", "\\n", addslashes($lang["action-add_note"]));
        ?>
";
		error_saving = "<?php 
        echo preg_replace("/\r?\n/", "\\n", addslashes($lang["error-saving"]));
        ?>
";
		error_deleting = "<?php 
        echo preg_replace("/\r?\n/", "\\n", addslashes($lang["error-deleting"]));
        ?>
";
	</script>
	<script>
		jQuery.noConflict();
	</script><?php 
        $use_watermark = check_use_watermark($resource['ref']);
        $imagepath = get_resource_path($ref, true, "pre", false, $resource["preview_extension"], -1, 1, $use_watermark);
        if (!file_exists($imagepath)) {
            $imagepath = get_resource_path($ref, true, "thm", false, $resource["preview_extension"], -1, 1, $use_watermark);
            $imageurl = get_resource_path($ref, false, "thm", false, $resource["preview_extension"], -1, 1, $use_watermark);
        } else {
            $imageurl = get_resource_path($ref, false, "pre", false, $resource["preview_extension"], -1, 1, $use_watermark);
        }
        if (!file_exists($imagepath)) {
            return false;
        }
        $sizes = getimagesize($imagepath);
        $w = $sizes[0];
        $h = $sizes[1];
        if (file_exists($imagepath)) {
            ?>
	


		<div id="wrapper" style="display:block;clear:none;float:left;margin: 0px 10px 10px 0px;">
<div>
<img id="toAnnotate" src="<?php 
            echo $imageurl;
            ?>
" id="previewimage" class="Picture" GALLERYIMG="no" style="display:block;"   />
	</div>
	<div style="padding-top:10px;">
	<a style="display:inline;" href="preview.php?<?php 
            if (getval("annotate", "") != "") {
                ?>
annotate=true&<?php 
            }
            ?>
ref=<?php 
            echo $ref;
            ?>
&ext=<?php 
            echo $resource["preview_extension"];
            ?>
&k=<?php 
            echo $k;
            ?>
&search=<?php 
            echo urlencode($search);
            ?>
&offset=<?php 
            echo $offset;
            ?>
&order_by=<?php 
            echo $order_by;
            ?>
&sort=<?php 
            echo $sort;
            ?>
&archive=<?php 
            echo $archive;
            ?>
" title="<?php 
            echo $lang["fullscreenpreview"];
            ?>
">&gt;&nbsp;<?php 
            echo $lang["fullscreenpreview"];
            ?>
</a>
    
     <?php 
            // MAGICTOUCH PLUGIN COMPATIBILITY
            global $magictouch_account_id;
            if ($magictouch_account_id != "") {
                global $plugins;
                global $magictouch_rt_exclude;
                global $magictouch_ext_exclude;
                if (in_array("magictouch", $plugins) && !in_array($resource['resource_type'], $magictouch_rt_exclude) && !in_array($resource['file_extension'], $magictouch_ext_exclude) && !defined("MTFAIL")) {
                    ?>
&nbsp;<a style="display:inline;" href="<?php 
                    echo getval("from", "") == "search" ? "search.php?" : "view.php?ref=" . $ref . "&";
                    ?>
search=<?php 
                    echo urlencode($search);
                    ?>
&offset=<?php 
                    echo $offset;
                    ?>
&order_by=<?php 
                    echo $order_by;
                    ?>
&sort=<?php 
                    echo $sort;
                    ?>
&archive=<?php 
                    echo $archive;
                    ?>
&k=<?php 
                    echo $k;
                    ?>
" onClick="return CentralSpaceLoad(this);">&gt;&nbsp;<?php 
                    echo $lang['zoom'];
                    ?>
</a><?php 
                }
            }
            ///////////////
            ?>
     
<?php 
            if ($annotate_pdf_output) {
                ?>
&nbsp;&nbsp;<a style="display:inline;float:right;" class="nowrap" href="<?php 
                echo $baseurl;
                ?>
/plugins/annotate/pages/annotate_pdf_config.php?ref=<?php 
                echo $ref;
                ?>
&ext=<?php 
                echo $resource["preview_extension"];
                ?>
&k=<?php 
                echo $k;
                ?>
&search=<?php 
                echo urlencode($search);
                ?>
&offset=<?php 
                echo $offset;
                ?>
&order_by=<?php 
                echo $order_by;
                ?>
&sort=<?php 
                echo $sort;
                ?>
&archive=<?php 
                echo $archive;
                ?>
" onClick="return CentralSpaceLoad(this);">&gt;&nbsp;<?php 
                echo $lang["pdfwithnotes"];
                ?>
</a>
<?php 
            }
            ?>
</div>

	</div>
<script language="javascript">
	jQuery("#toAnnotate").load(function(){
	jQuery("#toAnnotate").annotateImage({
		getUrl: "<?php 
            echo $baseurl;
            ?>
/plugins/annotate/pages/get.php?ref=<?php 
            echo $ref;
            ?>
&k=<?php 
            echo $k;
            ?>
&pw=<?php 
            echo $w;
            ?>
&ph=<?php 
            echo $h;
            ?>
",
		saveUrl: "<?php 
            echo $baseurl;
            ?>
/plugins/annotate/pages/save.php?ref=<?php 
            echo $ref;
            ?>
&k=<?php 
            echo $k;
            ?>
&pw=<?php 
            echo $w;
            ?>
&ph=<?php 
            echo $h;
            ?>
",
		deleteUrl: "<?php 
            echo $baseurl;
            ?>
/plugins/annotate/pages/delete.php?ref=<?php 
            echo $ref;
            ?>
&k=<?php 
            echo $k;
            ?>
",
		useAjax: true,
		<?php 
            if ($k == "") {
                ?>
 editable: true <?php 
            } else {
                ?>
 editable: false <?php 
            }
            ?>
  
	});
	});
</script>
	
<?php 
        }
    } else {
        ?>
	<img src="<?php 
        echo $baseurl;
        ?>
/gfx/<?php 
        echo get_nopreview_icon($resource["resource_type"], $resource["file_extension"], false);
        ?>
" alt="" class="Picture" style="border:none;" id="previewimage" />
	<?php 
    }
    return true;
}