当前位置: 首页>>代码示例>>PHP>>正文


PHP caGetMediaDisplayInfo函数代码示例

本文整理汇总了PHP中caGetMediaDisplayInfo函数的典型用法代码示例。如果您正苦于以下问题:PHP caGetMediaDisplayInfo函数的具体用法?PHP caGetMediaDisplayInfo怎么用?PHP caGetMediaDisplayInfo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了caGetMediaDisplayInfo函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: GetImageCenterEditor

 /**
  * Return representation image center editor
  *
  * Expects the following request parameters: 
  *		representation_id = the id of the ca_object_representations record for which to edit annotations
  *
  *	Optional request parameters:
  *		none (yet)
  */
 public function GetImageCenterEditor()
 {
     list($pn_representation_id, $t_rep) = $this->_initView();
     $va_display_info = caGetMediaDisplayInfo('image_center_editor', $t_rep->getMediaInfo("media", "original", "MIMETYPE"));
     $this->view->setVar('image', $t_rep->getMediaTag('media', $va_display_info['display_version'], array('id' => 'caImageCenterEditorImage', 'class' => 'caImageCenterEditor')));
     $va_media_info = $t_rep->getMediaInfo('media', $va_display_info['display_version']);
     $this->view->setVar('image_width', caGetOption('WIDTH', $va_media_info, null));
     $this->view->setVar('image_height', caGetOption('HEIGHT', $va_media_info, null));
     $va_center = $t_rep->getMediaCenter('media');
     $this->view->setVar('center_x', $va_center['x']);
     $this->view->setVar('center_y', $va_center['y']);
     $this->view->setVar('image_info', $va_media_info);
     return $this->render('ajax_representation_image_center_editor_html.php');
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:23,代码来源:ObjectRepresentationEditorController.php

示例2: caGetMediaDisplayInfo

            ?>
					</div><!-- end caMediaOverlayRepThumbs -->
<?php 
        }
        ?>
	<!-- Controls - only for media overlay -->
	<div class="caMediaOverlayControls">
			<div class='close'><a href="#" onclick="caMediaPanel.hidePanel(); return false;" title="close">&nbsp;&nbsp;&nbsp;</a></div>
<?php 
        if (caObjectsDisplayDownloadLink($this->request)) {
            ?>

				<div class='download'>
<?php 
            # -- get version to download configured in media_display.conf
            $va_download_display_info = caGetMediaDisplayInfo('download', $t_rep->getMediaInfo('media', 'INPUT', 'MIMETYPE'));
            $vs_download_version = $va_download_display_info['display_version'];
            print caNavLink($this->request, "<img src='" . $this->request->getThemeUrlPath() . "/graphics/buttons/downloadWhite.png' border='0' title='" . _t("Download Media") . "'>", '', 'Detail', 'Object', 'DownloadRepresentation', array('representation_id' => $t_rep->getPrimaryKey(), "object_id" => $t_object->getPrimaryKey(), "download" => 1, "version" => $vs_download_version));
            ?>
				
				</div>
<?php 
        }
        ?>
			<div class='objectInfo'>
<?php 
        $vs_label = $t_object->getLabelForDisplay();
        print mb_strlen($vs_label) > 80 ? mb_substr($vs_label, 0, 80) . "..." : $vs_label;
        if ($t_object->get("idno")) {
            print " [" . $t_object->get("idno") . "]";
        }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:31,代码来源:representation_viewer_html.php

示例3: _renderMediaView

 /**
  * Returns content for overlay containing details for object representation
  */
 private function _renderMediaView($ps_view_name, $ps_media_context)
 {
     $pn_object_id = $this->request->getParameter('object_id', pInteger);
     $pn_representation_id = $this->request->getParameter('representation_id', pInteger);
     $pn_year = $this->request->getParameter('year', pInteger);
     $this->view->setVar("year", $pn_year);
     $va_periods = $this->ops_periods;
     $this->view->setVar('object_id', $pn_object_id);
     $t_object = new ca_objects($pn_object_id);
     # --- get caption and photocredit
     $this->view->setVar("caption", $t_object->get("description"));
     $this->view->setVar("photographer", $t_object->get("provenance"));
     $t_rep = new ca_object_representations($pn_representation_id);
     $this->view->setVar('representation_id', $pn_representation_id);
     $this->view->setVar('t_object_representation', $t_rep);
     if ($this->request->config->get("dont_enforce_access_settings")) {
         $va_access_values = array();
     } else {
         $va_access_values = caGetUserAccessValues($this->request);
     }
     if (!$t_object->getPrimaryKey()) {
         die("Invalid object_id");
     }
     if (!$t_rep->getPrimaryKey()) {
         die("Invalid representation_id");
     }
     if (sizeof($va_access_values) && !in_array($t_object->get('access'), $va_access_values)) {
         die("Invalid object_id");
     }
     if (sizeof($va_access_values) && !in_array($t_rep->get('access'), $va_access_values)) {
         die("Invalid rep_id");
     }
     $this->view->setVar('t_display_rep', $t_rep);
     // Get media for display using configured rules
     $va_rep_display_info = caGetMediaDisplayInfo($ps_media_context, $t_rep->getMediaInfo('media', 'INPUT', 'MIMETYPE'));
     // set version
     $this->view->setVar('display_version', $va_rep_display_info['display_version']);
     // set other options
     $this->view->setVar('display_options', $va_rep_display_info);
     // Get all representation as icons for navigation
     # --- do a search for all chronology image objects
     # --- determine the period from the year
     foreach ($va_periods as $i => $va_per_info) {
         if ($pn_year >= $va_per_info["start"] && $pn_year <= $va_per_info["end"]) {
             $vn_period = $i;
             break;
         }
     }
     # --- what is year to search by?
     $vn_y = "";
     if ($va_periods[$vn_period]["displayAllYears"] == 1) {
         $vn_y = $va_periods[$vn_period]["start"] . "-" . $va_periods[$vn_period]["end"];
     } else {
         $vn_y = $pn_year;
     }
     # --- get type is for chron images
     $t_list = new ca_lists();
     $vn_chron_images_type_id = $t_list->getItemIDFromList('object_types', 'chronology_image');
     $o_obj_search = new ObjectSearch();
     $qr_chron_images = $o_obj_search->search("ca_objects.access:1 AND ca_objects.date.parsed_date:\"" . $vn_y . "\" AND ca_objects.type_id:{$vn_chron_images_type_id}", array("sort" => "ca_objects.date.parsed_date", "no_cache" => !$this->opb_cache_searches));
     $va_thumbnails = array();
     if ($qr_chron_images->numHits() > 0) {
         $t_image_objects = new ca_objects();
         $i = 1;
         while ($qr_chron_images->nextHit()) {
             $t_image_objects->load($qr_chron_images->get("ca_objects.object_id"));
             if ($t_primary_rep = $t_image_objects->getPrimaryRepresentationInstance()) {
                 $va_temp = array();
                 if (!sizeof($va_access_values) || in_array($t_primary_rep->get('access'), $va_access_values)) {
                     $va_temp["representation_id"] = $t_primary_rep->get("representation_id");
                     $va_temp["rep_icon"] = $t_primary_rep->getMediaTag('media', 'icon');
                     $va_temp["rep_tiny"] = $t_primary_rep->getMediaTag('media', 'tinyicon');
                     $va_temp["object_id"] = $qr_chron_images->get("ca_objects.object_id");
                     $va_thumbnails[$qr_chron_images->get("ca_objects.object_id")] = $va_temp;
                     if ($vn_getNext == 1) {
                         $this->view->setVar("next_object_id", $qr_chron_images->get("object_id"));
                         $this->view->setVar("next_representation_id", $t_primary_rep->get("representation_id"));
                         $vn_getNext = 0;
                     }
                     if ($qr_chron_images->get("object_id") == $pn_object_id) {
                         $this->view->setVar("representation_index", $i);
                         $this->view->setVar("previous_object_id", $vn_prev_obj_id);
                         $this->view->setVar("previous_representation_id", $vn_prev_rep_id);
                         $vn_getNext = 1;
                     }
                     $vn_prev_obj_id = $qr_chron_images->get("object_id");
                     $vn_prev_rep_id = $t_primary_rep->get("representation_id");
                     $i++;
                 }
             }
         }
     }
     $this->view->setVar('reps', $va_thumbnails);
     return $this->render("Chronology/{$ps_view_name}.php");
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:98,代码来源:ChronologyController.php

示例4: SendShare

 /**
  *
  */
 public function SendShare()
 {
     $va_errors = array();
     $ps_tablename = $this->request->getParameter('tablename', pString);
     $pn_item_id = $this->request->getParameter('item_id', pInteger);
     if (!($t_item = $this->opo_datamodel->getInstanceByTableName($ps_tablename, true))) {
         die("Invalid table name " . $ps_tablename . " for detail");
         // shouldn't happen
     }
     if (!$t_item->load($pn_item_id)) {
         $this->view->setVar("message", _t("ID does not exist"));
         $this->render("Form/reload_html.php");
         return;
     }
     $o_purifier = new HTMLPurifier();
     $ps_to_email = $o_purifier->purify($this->request->getParameter('to_email', pString));
     $ps_from_email = $o_purifier->purify($this->request->getParameter('from_email', pString));
     $ps_from_name = $o_purifier->purify($this->request->getParameter('from_name', pString));
     $ps_subject = $o_purifier->purify($this->request->getParameter('subject', pString));
     $ps_message = $o_purifier->purify($this->request->getParameter('message', pString));
     $pn_security = $this->request->getParameter('security', pInteger);
     $pn_sum = $this->request->getParameter('sum', pInteger);
     # --- check vars are set and email addresses are valid
     $va_to_email = array();
     $va_to_email_process = array();
     if (!$ps_to_email) {
         $va_errors["to_email"] = _t("Please enter a valid email address or multiple addresses separated by commas");
     } else {
         # --- explode on commas to support multiple addresses - then check each one
         $va_to_email_process = explode(",", $ps_to_email);
         foreach ($va_to_email_process as $vs_email_to_verify) {
             $vs_email_to_verify = trim($vs_email_to_verify);
             if (caCheckEmailAddress($vs_email_to_verify)) {
                 $va_to_email[$vs_email_to_verify] = "";
             } else {
                 $ps_to_email = "";
                 $va_errors["to_email"] = _t("Please enter a valid email address or multiple addresses separated by commas");
             }
         }
     }
     if (!$ps_from_email || !caCheckEmailAddress($ps_from_email)) {
         $ps_from_email = "";
         $va_errors["from_email"] = _t("Please enter a valid email address");
     }
     if (!$ps_from_name) {
         $va_errors["from_name"] = _t("Please enter your name");
     }
     if (!$ps_subject) {
         $va_errors["subject"] = _t("Please enter a subject");
     }
     if (!$ps_message) {
         $va_errors["message"] = _t("Please enter a message");
     }
     if (!$this->request->isLoggedIn()) {
         # --- check for security answer if not logged in
         if (!$pn_security) {
             $va_errors["security"] = _t("Please answer the security question.");
         } else {
             if ($pn_security != $pn_sum) {
                 $va_errors["security"] = _t("Your answer was incorrect, please try again");
             }
         }
     }
     $this->view->setVar('t_item', $t_item);
     $this->view->setVar('item_id', $pn_item_id);
     $this->view->setVar('tablename', $ps_tablename);
     if (sizeof($va_errors) == 0) {
         $o_view = new View($this->request, array($this->request->getViewsDirectoryPath()));
         $o_view->setVar("item", $t_item);
         $o_view->setVar("item_id", $pn_item_id);
         $o_view->setVar("from_name", $ps_from_name);
         $o_view->setVar("message", $ps_message);
         $o_view->setVar("detailConfig", $this->config);
         # -- generate mail text from template - get both html and text versions
         if ($ps_tablename == "ca_objects") {
             $vs_mail_message_text = $o_view->render("mailTemplates/share_object_email_text.tpl");
         } else {
             $vs_mail_message_text = $o_view->render("mailTemplates/share_email_text.tpl");
         }
         if ($ps_tablename == "ca_objects") {
             $vs_mail_message_html = $o_view->render("/mailTemplates/share_object_email_html.tpl");
         } else {
             $vs_mail_message_html = $o_view->render("/mailTemplates/share_email_html.tpl");
         }
         $va_media = null;
         if ($ps_tablename == "ca_objects") {
             # --- get media for attachment
             $vs_media_version = "";
             # Media representation to email
             # --- version is set in media_display.conf.
             if (method_exists($t_item, 'getPrimaryRepresentationInstance')) {
                 if ($t_primary_rep = $t_item->getPrimaryRepresentationInstance()) {
                     if (!sizeof($this->opa_access_values) || in_array($t_primary_rep->get('access'), $this->opa_access_values)) {
                         // check rep access
                         $va_media = array();
                         $va_rep_display_info = caGetMediaDisplayInfo('email', $t_primary_rep->getMediaInfo('media', 'INPUT', 'MIMETYPE'));
                         $vs_media_version = $va_rep_display_info['display_version'];
//.........这里部分代码省略.........
开发者ID:ffarago,项目名称:pawtucket2,代码行数:101,代码来源:DetailController.php

示例5: getSetsOverlay

 /**
  * Returns content for overlay containing details for object representation linked to occurrence
  */
 public function getSetsOverlay()
 {
     $this->view->setVar('display_type', 'media_overlay');
     $pn_set_id = $this->request->getParameter('set_id', pInteger);
     $pn_object_id = $this->request->getParameter('object_id', pInteger);
     $this->view->setVar('object_id', $pn_object_id);
     $pn_representation_id = $this->request->getParameter('representation_id', pInteger);
     $this->opo_plugin_config = Configuration::load($this->request->getAppConfig()->get('application_plugins') . '/simpleGallery/conf/simpleGallery.conf');
     $this->view->setVar('set_id', $pn_set_id);
     $t_set = new ca_sets($pn_set_id);
     $pn_set_item_id = $this->request->getParameter('set_item_id', pInteger);
     $this->view->setVar('set_item_id', $pn_set_item_id);
     $ps_set_item_description_code = $this->opo_plugin_config->get('set_item_description_element_code');
     $this->view->setVar('set_item_description', $ps_set_item_description_code);
     $this->view->setVar('object_id', $pn_object_id);
     $t_object = new ca_objects($pn_object_id);
     $this->view->setVar('t_object', $t_object);
     $t_rep = new ca_object_representations($pn_representation_id);
     $this->view->setVar('representation_id', $pn_representation_id);
     $this->view->setVar('t_object_representation', $t_rep);
     if ($this->request->config->get("dont_enforce_access_settings")) {
         $va_access_values = array();
     } else {
         $va_access_values = caGetUserAccessValues($this->request);
     }
     if (!$t_set->getPrimaryKey()) {
         die("Invalid set_id");
     }
     if (!$t_object->getPrimaryKey()) {
         die("Invalid object_id");
     }
     if (!$t_rep->getPrimaryKey()) {
         die("Invalid representation_id");
     }
     if (sizeof($va_access_values) && !in_array($t_set->get('access'), $va_access_values)) {
         die("Invalid set_id");
     }
     if (sizeof($va_access_values) && !in_array($t_object->get('access'), $va_access_values)) {
         die("Invalid object_id");
     }
     if (sizeof($va_access_values) && !in_array($t_rep->get('access'), $va_access_values)) {
         die("Invalid rep_id");
     }
     // Get media for display using configured rules
     $va_rep_display_info = caGetMediaDisplayInfo("media_overlay", $t_rep->getMediaInfo('media', 'INPUT', 'MIMETYPE'));
     // set version
     $this->view->setVar('version', $va_rep_display_info['display_version']);
     unset($va_display_info['display_version']);
     // set other options
     $this->view->setVar('display_options', $va_rep_display_info);
     if (!($ps_containerID = trim($this->request->getParameter('containerID', pString)))) {
         $ps_containerID = 'caMediaPanelContentArea';
     }
     $this->view->setVar("containerID", $ps_containerID);
     // Get all objects asscoiated with this set and show primary reps as icons for navigation
     $va_set_items = $t_set->getItems(array("checkAccess" => $va_access_values));
     #print "<pre>";
     #print_r($va_set_items);
     #print "</pre>";
     if (sizeof($va_set_items) > 0) {
         $t_image_objects = new ca_objects();
         $i = 1;
         foreach ($va_set_items as $vn_rel_id => $va_inter) {
             foreach ($va_inter as $id => $va_info) {
                 $t_image_objects->load($va_info["row_id"]);
                 if ($t_primary_rep = $t_image_objects->getPrimaryRepresentationInstance()) {
                     $va_temp = array();
                     if (!sizeof($va_access_values) || in_array($t_primary_rep->get('access'), $va_access_values)) {
                         $va_temp["representation_id"] = $t_primary_rep->get("representation_id");
                         $va_temp["rep_icon"] = $t_primary_rep->getMediaTag('media', 'icon');
                         $va_temp["rep_tinyicon"] = $t_primary_rep->getMediaTag('media', 'tinyicon');
                         $va_temp["object_id"] = $va_info["object_id"];
                         $va_temp["set_item_id"] = $va_info['item_id'];
                         $va_thumbnails[$va_info["object_id"]] = $va_temp;
                         if ($vn_getNext == 1) {
                             $this->view->setVar("next_object_id", $va_info["object_id"]);
                             $this->view->setVar("next_representation_id", $t_primary_rep->get("representation_id"));
                             $vn_getNext = 0;
                         }
                         if ($va_info["object_id"] == $pn_object_id) {
                             $this->view->setVar("representation_index", $i);
                             $this->view->setVar("previous_object_id", $vn_prev_obj_id);
                             $this->view->setVar("previous_representation_id", $vn_prev_rep_id);
                             $this->view->setVar("set_item_id", $va_info['item_id']);
                             $vn_getNext = 1;
                         }
                         $vn_prev_obj_id = $va_info["object_id"];
                         $vn_prev_rep_id = $t_primary_rep->get("representation_id");
                         $i++;
                     }
                 }
             }
         }
     }
     $this->view->setVar('reps', $va_thumbnails);
     return $this->render($this->ops_theme . "/ajax_ca_sets_media_overlay_html.php");
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:100,代码来源:SetsOverlayController.php

示例6: caGetMediaDisplayInfo

			H2 { font-weight:bold; font-size: 11px; font-family: Helvetica, sans-serif; margin-bottom:2px; }
			.media { float:right; padding:0px 0px 10px 10px; width:400px; }
			.pageHeader { margin: 0px 10px 20px 0px; padding: 0px 5px 0px 5px; width: 100%; font-family: Helvetica, sans-serif; }
			.pageHeader img{ vertical-align:middle;  }
			.notes { font-style:italic; color:#828282; margin-top:20px; }
			-->
		</style>
	</HEAD>
	<BODY>
		
<?php 
if (file_exists($this->request->getThemeDirectoryPath() . '/graphics/CAlogo.gif')) {
    print '<div class="pageHeader"><img src="' . $this->request->getThemeDirectoryPath() . '/graphics/CAlogo.gif"/></div>';
}
if ($t_rep = $t_item->getPrimaryRepresentationInstance(array('return_with_access' => $va_access_values))) {
    $va_rep_display_info = caGetMediaDisplayInfo("summary", $t_rep->getMediaInfo('media', 'INPUT', 'MIMETYPE'));
    if (!($vs_version = $va_rep_display_info['display_version'])) {
        $vs_version = "large";
    }
    ?>
			<div class="media"><img src="<?php 
    print $t_rep->getMediaPath("media", $vs_version);
    ?>
"></div>
<?php 
}
print "<H1>" . $o_purifier->purify($t_item->getLabelForDisplay()) . "</H1>";
# --- identifier
if ($t_item->get('idno')) {
    print "<div class='unit'><b>" . _t("Identifier") . ":</b> " . $o_purifier->purify($t_item->get('idno')) . "</div><!-- end unit -->";
}
开发者ID:guaykuru,项目名称:pawtucket,代码行数:31,代码来源:ca_objects_pdf_html.php

示例7: array

$vn_image_rep_id = "";
$va_image_rep = array();
$va_image_media_display_info = array();
$va_annotations = array();
if (sizeof($va_videos)) {
    $va_audio_video_rep = array_shift($va_videos);
    $vn_audio_video_rep_id = $va_audio_video_rep["representation_id"];
    $va_audio_video_media_display_info = caGetMediaDisplayInfo('detail', $va_audio_video_rep["mimetype"]);
} elseif (sizeof($va_audios)) {
    $va_audio_video_rep = array_shift($va_audios);
    $vn_audio_video_rep_id = $va_audio_video_rep["representation_id"];
    $va_audio_video_media_display_info = caGetMediaDisplayInfo('detail', $va_audio_video_rep["mimetype"]);
    if (sizeof($va_images)) {
        $va_image_rep = array_shift($va_images);
        $vn_image_rep_id = $va_image_rep["representation_id"];
        $va_image_media_display_info = caGetMediaDisplayInfo('detail', $va_image_rep["mimetype"]);
    }
}
if ($vn_image_rep_id) {
    $t_rep->load($vn_image_rep_id);
    print "<div id='cont'>" . $t_rep->getMediaTag("media", $va_image_media_display_info["display_version"], $va_image_media_display_info) . "</div>";
}
if ($vn_audio_video_rep_id) {
    $t_rep->load($vn_audio_video_rep_id);
    print $t_rep->getMediaTag("media", $va_audio_video_media_display_info["display_version"], $va_audio_video_media_display_info, array("id" => "caPlayer"));
    # --- get the annotations for this audio/video rep
    $va_annotations = $t_rep->getAnnotations(array("checkAccess" => $this->getVar("access_values")));
}
?>
				</div><!-- end col -->
				<div class='col-sm-6 col-md-6 col-lg-6'>
开发者ID:ffarago,项目名称:pawtucket2,代码行数:31,代码来源:ca_objects_interview_html.php

示例8: caRepresentationViewerHTMLBundleForSearchResult

/**
 * 
 *
 * @param RequestHTTP $po_request
 * @param array $pa_options
 * @param array $pa_additional_display_options
 * @return string HTML output
 */
function caRepresentationViewerHTMLBundleForSearchResult($po_data, $po_request, $pa_options = null, $pa_additional_display_options = null)
{
    $ps_version = $po_request->getParameter('version', pString);
    $va_access_values = isset($pa_options['access']) && is_array($pa_options['access']) ? $pa_options['access'] : array();
    $vs_display_type = isset($pa_options['display']) && $pa_options['display'] ? $pa_options['display'] : 'media_overlay';
    $vs_container_dom_id = isset($pa_options['containerID']) && $pa_options['containerID'] ? $pa_options['containerID'] : null;
    $vn_object_id = isset($pa_options['object_id']) && $pa_options['object_id'] ? $pa_options['object_id'] : null;
    $vn_item_id = isset($pa_options['item_id']) && $pa_options['item_id'] ? $pa_options['item_id'] : null;
    $vn_order_item_id = isset($pa_options['order_item_id']) && $pa_options['order_item_id'] ? $pa_options['order_item_id'] : null;
    $vb_media_editor = isset($pa_options['mediaEditor']) && $pa_options['mediaEditor'] ? true : false;
    $vb_no_controls = isset($pa_options['noControls']) && $pa_options['noControls'] ? true : false;
    $vn_item_id = isset($pa_options['item_id']) && $pa_options['item_id'] ? $pa_options['item_id'] : null;
    $t_object = new ca_objects($vn_object_id);
    //if (!$t_object->getPrimaryKey()) { return false; }
    if (!$po_data->getPrimaryKey() && $t_object->getPrimaryKey() && method_exists($po_data, 'load')) {
        $po_data->load($t_object->getPrimaryRepresentationID(array('checkAccess' => $va_access_values)));
    }
    $t_set_item = new ca_set_items();
    if ($vn_item_id) {
        $t_set_item->load($vn_item_id);
    }
    $t_order_item = new ca_commerce_order_items();
    if ($vn_order_item_id) {
        $t_order_item->load($vn_order_item_id);
    }
    $o_view = new View($po_request, $po_request->getViewsDirectoryPath() . '/bundles/');
    $o_view->setVar('t_object', $t_object);
    $o_view->setVar('t_set_item', $t_set_item);
    $o_view->setVar('t_order_item', $t_order_item);
    $o_view->setVar('use_media_editor', $vb_media_editor);
    $o_view->setVar('noControls', $vb_no_controls);
    $va_rep_display_info = array();
    if (isset($pa_options['use_book_viewer'])) {
        $va_rep_display_info['use_book_viewer'] = (bool) $pa_options['use_book_viewer'];
    }
    if ($t_object->getPrimaryKey()) {
        $o_view->setVar('reps', $va_reps = $t_object->getRepresentations(array('icon'), null, array("return_with_access" => $va_access_values)));
    }
    $t_media = new Media();
    $va_buf = array();
    while ($po_data->nextHit()) {
        if (method_exists($po_data, 'numFiles')) {
            $o_view->setVar('num_multifiles', $po_data->numFiles());
        }
        $o_view->setVar('t_object_representation', $po_data);
        if (($vn_representation_id = $po_data->getPrimaryKey()) && (!sizeof($va_access_values) || in_array($po_data->get('access'), $va_access_values))) {
            // check rep access
            $va_rep_display_info = caGetMediaDisplayInfo($vs_display_type, $vs_mimetype = $po_data->getMediaInfo('media', 'INPUT', 'MIMETYPE'));
            $va_rep_display_info['poster_frame_url'] = $po_data->getMediaUrl('media', $va_rep_display_info['poster_frame_version']);
            $va_additional_display_options = array();
            if (is_array($pa_additional_display_options) && isset($pa_additional_display_options[$vs_mimetype]) && is_array($pa_additional_display_options[$vs_mimetype])) {
                $va_additional_display_options = $pa_additional_display_options[$vs_mimetype];
            }
            $o_view->setVar('display_options', caGetMediaDisplayInfo('detail', $vs_mimetype));
            $o_view->setVar('display_type', $vs_display_type);
            $o_view->setVar('representation_id', $vn_representation_id);
            $o_view->setVar('t_object_representation', $po_data);
            $o_view->setVar('versions', $va_versions = $po_data->getMediaVersions('media'));
            $o_view->setVar('containerID', $vs_container_dom_id . $vn_representation_id);
            $o_view->setVar('version_type', $t_media->getMimetypeTypename($po_data->getMediaInfo('media', 'original', 'MIMETYPE')));
            if ($t_object->getPrimaryKey()) {
                $vn_next_rep = $vn_prev_rep = null;
                $va_rep_list = array_values($va_reps);
                foreach ($va_rep_list as $vn_i => $va_rep) {
                    if ($va_rep['representation_id'] == $vn_representation_id) {
                        if (isset($va_rep_list[$vn_i - 1])) {
                            $vn_prev_rep = $va_rep_list[$vn_i - 1]['representation_id'];
                        }
                        if (isset($va_rep_list[$vn_i + 1])) {
                            $vn_next_rep = $va_rep_list[$vn_i + 1]['representation_id'];
                        }
                        $o_view->setVar('representation_index', $vn_i + 1);
                    }
                }
                $o_view->setVar('previous_representation_id', $vn_prev_rep);
                $o_view->setVar('next_representation_id', $vn_next_rep);
            }
            if (!in_array($ps_version, $va_versions)) {
                if (!($ps_version = $va_rep_display_info['display_version'])) {
                    $ps_version = null;
                }
            }
            $o_view->setVar('version_info', $po_data->getMediaInfo('media', $ps_version));
            $o_view->setVar('version', $ps_version);
        }
        $va_buf[$vn_representation_id] = $o_view->render('representation_viewer_html.php');
    }
    return $va_buf;
}
开发者ID:ffarago,项目名称:pawtucket2,代码行数:97,代码来源:displayHelpers.php

示例9: array

$va_failed_inserts = array();
foreach ($this->request->getActionErrorSubSources('ca_representation_annotations') as $vs_error_subsource) {
    if (substr($vs_error_subsource, 0, 4) === 'new_') {
        $va_action_errors = $this->request->getActionErrors('ca_representation_annotations', $vs_error_subsource);
        foreach ($va_action_errors as $o_error) {
            $va_failed_inserts[] = array_merge($va_init_props, array('_errors' => array(array('errorDescription' => $o_error->getErrorDescription(), 'errorCode' => $o_error->getErrorNumber()))));
        }
    }
}
print caEditorBundleShowHideControl($this->request, $vs_id_prefix . $t_item->tableNum() . '_annotations');
print caEditorBundleMetadataDictionary($this->request, $vs_id_prefix . $t_item->tableNum() . '_annotations', $va_settings);
?>
<!-- BEGIN Media Player -->
<div class="bundleContainer" style="text-align:center; padding:5px;">
<?php 
$va_media_player_config = caGetMediaDisplayInfo('annotation_editor', $t_subject->getMediaInfo('media', $o_properties->getDisplayMediaVersion(), 'MIMETYPE'));
?>
	<div class="caAnnotationMediaPlayerContainer">
		<?php 
print $t_subject->getMediaTag('media', $o_properties->getDisplayMediaVersion(), array('class' => 'caAnnotationMediaPlayer', 'viewer_width' => $va_media_player_config['viewer_width'], 'viewer_height' => $va_media_player_config['viewer_height'], 'id' => 'annotation_media_player', 'poster_frame_url' => $t_subject->getMediaUrl('media', 'medium')));
?>
	</div>
</div>
<!-- END Media Player -->

<!-- BEGIN Annotation List -->
<div id="<?php 
print $vs_id_prefix . $t_item->tableNum() . '_annotations';
?>
">
<?php 
开发者ID:idiscussforum,项目名称:providence,代码行数:31,代码来源:ca_representation_annotations.php

示例10: array

 $va_reps = array();
 foreach ($va_exhibition_images as $vn_rel_id => $va_info) {
     $vn_exhibition_image_id = $va_info["object_id"];
     $t_image_object = new ca_objects($vn_exhibition_image_id);
     if ($t_rep = $t_image_object->getPrimaryRepresentationInstance()) {
         if (!sizeof($va_access_values) || in_array($t_rep->get('access'), $va_access_values)) {
             # --- build array of thumbnails on related images for display under main image
             $va_temp = array();
             $va_temp["representation_id"] = $t_rep->get("representation_id");
             $va_temp["rep_tinyicon"] = $t_rep->getMediaTag('media', 'tinyicon');
             $va_temp["object_id"] = $va_info["object_id"];
             $va_reps[$va_info["object_id"]] = $va_temp;
             # Media representations to display (objects only)
             if (!$vn_first_rep_set) {
                 $vn_first_rep_set = 1;
                 $va_rep_display_info = caGetMediaDisplayInfo('detail', $t_rep->getMediaInfo('media', 'INPUT', 'MIMETYPE'));
                 $vs_display_version = $va_rep_display_info['display_version'];
                 unset($va_display_info['display_version']);
                 $va_rep_display_info['poster_frame_url'] = $t_rep->getMediaUrl('media', $va_rep_display_info['poster_frame_version']);
                 unset($va_display_info['poster_frame_version']);
                 $va_display_options = $va_rep_display_info;
                 $vs_display_rep = $t_rep->getMediaTag('media', $vs_display_version, $va_display_options);
                 $vn_display_rep_id = $t_rep->get("representation_id");
                 $vn_display_object_id = $va_info["object_id"];
                 $vn_display_caption = $t_rep->get("image_credit_line");
                 $va_display_media_info = $t_rep->getMediaInfo('media', $vs_display_version);
                 $vn_display_media_width = $va_display_media_info["WIDTH"];
             }
         }
     }
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:31,代码来源:ca_sets_detail_html.php

示例11: Show


//.........这里部分代码省略.........
             $this->view->setVar('browse_criteria', $va_browse_criteria);
         } else {
             // not configured for browse
             $this->request->session->setVar($this->ops_tablename . '_' . $this->ops_appname . '_detail_current_browse_id', null);
             $this->view->setVar('show_browse', false);
         }
     }
     $this->request->session->setVar($this->ops_tablename . '_' . $this->ops_appname . '_detail_current_item_id', $vn_item_id);
     # Next and previous navigation
     $opo_result_context = new ResultContext($this->request, $this->ops_tablename, ResultContext::getLastFind($this->request, $this->ops_tablename));
     $this->view->setVar('next_id', $opo_result_context->getNextID($vn_item_id));
     $this->view->setVar('previous_id', $opo_result_context->getPreviousID($vn_item_id));
     # Item instance and id
     $this->view->setVar('t_item', $t_item);
     $this->view->setVar($t_item->getPrimaryKey(), $vn_item_id);
     # Item  - preferred
     $this->view->setVar('label', $t_item->getLabelForDisplay());
     # Item  - nonpreferred
     $this->view->setVar('nonpreferred_labels', caExtractValuesByUserLocale($t_item->getNonPreferredLabels()));
     # Item timestamps (creation and last change)
     if ($va_entry_info = $t_item->getCreationTimestamp()) {
         $this->view->setVar('date_of_entry', date('m/d/Y', $va_entry_info['timestamp']));
     }
     if ($va_last_change_info = $t_item->getLastChangeTimestamp()) {
         $this->view->setVar('date_of_last_change', date('m/d/Y', $va_last_change_info['timestamp']));
     }
     # Media representations to display (objects only)
     if (method_exists($t_item, 'getPrimaryRepresentationInstance')) {
         if ($t_primary_rep = $t_item->getPrimaryRepresentationInstance()) {
             if (!sizeof($va_access_values) || in_array($t_primary_rep->get('access'), $va_access_values)) {
                 // check rep access
                 $va_info = $t_primary_rep->getMediaInfo('media', 'original');
                 $this->view->setVar('t_primary_rep', $t_primary_rep);
                 $va_rep_display_info = caGetMediaDisplayInfo('detail', $t_primary_rep->getMediaInfo('media', 'original', 'MIMETYPE'));
                 $this->view->setVar('primary_rep_display_version', $va_rep_display_info['display_version']);
                 unset($va_display_info['display_version']);
                 $va_rep_display_info['poster_frame_url'] = $t_primary_rep->getMediaUrl('media', $va_rep_display_info['poster_frame_version']);
                 unset($va_display_info['poster_frame_version']);
                 $this->view->setVar('primary_rep_display_options', $va_rep_display_info);
             }
         }
     }
     #
     # User-generated comments, tags and ratings
     #
     $va_user_comments = $t_item->getComments(null, true);
     $va_comments = array();
     if (is_array($va_user_comments)) {
         foreach ($va_user_comments as $va_user_comment) {
             $va_comment = array();
             if ($va_user_comment["comment"]) {
                 $va_comment["comment"] = $va_user_comment["comment"];
                 # TODO: format date based on local
                 $va_comment["date"] = date("n/j/Y", $va_user_comment["created_on"]);
                 $va_comment["created_on"] = $va_user_comment["created_on"];
                 # -- get name of commenter
                 $t_user = new ca_users($va_user_comment["user_id"]);
                 $va_comment["author"] = $t_user->getName();
                 $va_comment["email"] = $va_user_comment["email"];
                 $va_comment["name"] = $va_user_comment["name"];
                 $va_comments[] = $va_comment;
             }
         }
     }
     $this->view->setVar('comments', $va_comments);
     $va_user_tags = $t_item->getTags(null, true);
开发者ID:guaykuru,项目名称:pawtucket,代码行数:67,代码来源:BaseDetailController.php

示例12: ca_objects

// 			print caNavLink($this->request, $va_reps["tags"]["widepreview"], '', 'Detail', 'Object', 'Show', array('object_id' => $va_object_info['object_id']));
//
// 		}
// 	}
$vn_c = 0;
$vn_numCols = 4;
$vn_max_images = 12;
if (is_array($va_action["objects"]) && sizeof($va_action["objects"])) {
    # --- if there is only one image, show a larger one - which is configured in media_display_conf under chronology. Otherwise show a grid of images
    if (sizeof($va_action["objects"]) == 1) {
        $t_rel_object = new ca_objects();
        foreach ($va_action["objects"] as $vn_i => $va_object_info) {
            $t_rel_object->load($va_object_info['object_id']);
            $t_rep = $t_rel_object->getPrimaryRepresentationInstance(array('return_with_access' => $va_access_values));
            # -- get version to display configured in media_display.conf
            $va_chrono_display_info = caGetMediaDisplayInfo('chronology', $t_rep->getMediaInfo('media', 'INPUT', 'MIMETYPE'));
            $vs_chrono_version = $va_chrono_display_info['display_version'];
            $vn_object_id = $va_object_info['object_id'];
            $va_opts = array('display' => 'detail', 'object_id' => $vn_object_id, 'containerID' => 'cont');
            print "<div style='text-align:center;'>" . caNavLink($this->request, $t_rel_object->getLabelForDisplay() . ", ID:" . $t_rel_object->get('idno'), '', 'Detail', 'Object', 'Show', array('object_id' => $vn_object_id)) . "</div>";
            print "<div id='contchrono'>" . $t_rep->getRepresentationViewerHTMLBundle($this->request, $va_opts) . "</div>";
        }
    } else {
        ?>
			<table border="0" cellpadding="0px" cellspacing="0px" width="100%">
<?php 
        $t_rel_object = new ca_objects();
        $vn_itemc = 0;
        # --- only show the first 12 images then a link that says how many more there are
        foreach ($va_action["objects"] as $vn_i => $va_object_info) {
            $t_rel_object->load($va_object_info['object_id']);
开发者ID:guaykuru,项目名称:pawtucket,代码行数:31,代码来源:action_info_html.php

示例13: getMediaAttributeViewerHTMLBundle

 /**
  * 
  */
 public function getMediaAttributeViewerHTMLBundle($po_request, $pa_options = null)
 {
     $va_access_values = isset($pa_options['access']) && is_array($pa_options['access']) ? $pa_options['access'] : array();
     $vs_display_type = isset($pa_options['display']) && $pa_options['display'] ? $pa_options['display'] : 'media_overlay';
     $vs_container_dom_id = isset($pa_options['containerID']) && $pa_options['containerID'] ? $pa_options['containerID'] : null;
     $pn_value_id = isset($pa_options['value_id']) && $pa_options['value_id'] ? $pa_options['value_id'] : null;
     $t_attr_val = new ca_attribute_values();
     $t_attr_val->load($pn_value_id);
     $t_attr_val->useBlobAsMediaField(true);
     $o_view = new View($po_request, $po_request->getViewsDirectoryPath() . '/bundles/');
     $o_view->setVar('containerID', $vs_container_dom_id);
     $va_rep_display_info = caGetMediaDisplayInfo('media_overlay', $t_attr_val->getMediaInfo('value_blob', 'INPUT', 'MIMETYPE'));
     $va_rep_display_info['poster_frame_url'] = $t_attr_val->getMediaUrl('value_blob', $va_rep_display_info['poster_frame_version']);
     $o_view->setVar('display_options', $va_rep_display_info);
     $o_view->setVar('representation_id', $pn_representation_id);
     $o_view->setVar('t_attribute_value', $t_attr_val);
     $o_view->setVar('versions', $va_versions = $t_attr_val->getMediaVersions('value_blob'));
     $t_media = new Media();
     $ps_version = $po_request->getParameter('version', pString);
     if (!in_array($ps_version, $va_versions)) {
         if (!($ps_version = $va_rep_display_info['display_version'])) {
             $ps_version = null;
         }
     }
     $o_view->setVar('version', $ps_version);
     $o_view->setVar('version_info', $t_attr_val->getMediaInfo('value_blob', $ps_version));
     $o_view->setVar('version_type', $t_media->getMimetypeTypename($t_attr_val->getMediaInfo('value_blob', $ps_version, 'MIMETYPE')));
     $o_view->setVar('version_mimetype', $t_attr_val->getMediaInfo('value_blob', $ps_version, 'MIMETYPE'));
     $o_view->setVar('mimetype', $t_attr_val->getMediaInfo('value_blob', 'INPUT', 'MIMETYPE'));
     return $o_view->render('media_attribute_viewer_html.php');
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:34,代码来源:BaseEditorController.php

示例14: GetPageListAsJSON

 /**
  * 
  */
 public function GetPageListAsJSON()
 {
     $pn_object_id = $this->request->getParameter('object_id', pInteger);
     $pn_representation_id = $this->request->getParameter('representation_id', pInteger);
     $ps_content_mode = $this->request->getParameter('content_mode', pString);
     $this->view->setVar('object_id', $pn_object_id);
     $this->view->setVar('representation_id', $pn_representation_id);
     $this->view->setVar('content_mode', $ps_content_mode);
     $t_rep = new ca_object_representations($pn_representation_id);
     $va_download_display_info = caGetMediaDisplayInfo('download', $t_rep->getMediaInfo('media', 'INPUT', 'MIMETYPE'));
     $vs_download_version = $va_download_display_info['display_version'];
     $this->view->setVar('download_version', $vs_download_version);
     $va_page_list_cache = $this->request->session->getVar('caDocumentViewerPageListCache');
     $va_pages = $va_page_list_cache[$pn_object_id . '/' . $pn_representation_id];
     if (!isset($va_pages)) {
         // Page cache not set?
         $this->postError(1100, _t('Invalid object/representation'), 'ObjectEditorController->GetPage');
         return;
     }
     $va_section_cache = $this->request->session->getVar('caDocumentViewerSectionCache');
     $this->view->setVar('pages', $va_pages);
     $this->view->setVar('sections', $va_section_cache[$pn_object_id . '/' . $pn_representation_id]);
     $this->view->setVar('is_searchable', MediaContentLocationIndexer::hasIndexing('ca_object_representations', $pn_representation_id));
     $this->render('object_representation_page_list_json.php');
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:28,代码来源:ObjectController.php

示例15: caRepToolbar

function caRepToolbar($po_request, $t_representation, $pn_object_id)
{
    $o_set_config = caGetSetsConfig();
    $vs_lightbox_icon = $o_set_config->get("add_to_lightbox_icon");
    if (!$vs_lightbox_icon) {
        $vs_lightbox_icon = "<i class='fa fa-suitcase'></i>";
    }
    $va_lightbox_display_name = caGetSetDisplayName($o_set_config);
    $vs_lightbox_display_name = $va_lightbox_display_name["singular"];
    $vs_lightbox_display_name_plural = $va_lightbox_display_name["plural"];
    $va_rep_display_info = caGetMediaDisplayInfo('detail', $t_representation->getMediaInfo('media', 'INPUT', 'MIMETYPE'));
    $va_rep_display_info['poster_frame_url'] = $t_representation->getMediaUrl('media', $va_rep_display_info['poster_frame_version']);
    $vs_tool_bar = "<div class='detailMediaToolbar'>";
    if (!$va_rep_display_info["no_overlay"]) {
        $vs_tool_bar .= "<a href='#' class='zoomButton' onclick='caMediaPanel.showPanel(\"" . caNavUrl($po_request, '', 'Detail', 'GetRepresentationInfo', array('object_id' => $pn_object_id, 'representation_id' => $t_representation->getPrimaryKey(), 'overlay' => 1)) . "\"); return false;' title='" . _t("Zoom") . "'><span class='glyphicon glyphicon-zoom-in'></span></a>\n";
    }
    if (!$po_request->config->get("disable_my_collections")) {
        if ($po_request->isLoggedIn()) {
            $vs_tool_bar .= " <a href='#' class='setsButton' onclick='caMediaPanel.showPanel(\"" . caNavUrl($po_request, '', 'Sets', 'addItemForm', array("object_id" => $pn_object_id)) . "\"); return false;' title='" . _t("Add item to %1", $vs_lightbox_display_name) . "'>" . $vs_lightbox_icon . "</a>\n";
        } else {
            $vs_tool_bar .= " <a href='#' class='setsButton' onclick='caMediaPanel.showPanel(\"" . caNavUrl($po_request, '', 'LoginReg', 'LoginForm') . "\"); return false;' title='" . _t("Login to add item to %1", $vs_lightbox_display_name) . "'>" . $vs_lightbox_icon . "</a>\n";
        }
    }
    if (caObjectsDisplayDownloadLink($po_request)) {
        # -- get version to download configured in media_display.conf
        $va_download_display_info = caGetMediaDisplayInfo('download', $t_representation->getMediaInfo('media', 'INPUT', 'MIMETYPE'));
        $vs_download_version = $va_download_display_info['display_version'];
        $vs_tool_bar .= caNavLink($po_request, " <span class='glyphicon glyphicon-download-alt'></span>", 'dlButton', 'Detail', 'DownloadRepresentation', '', array('representation_id' => $t_representation->getPrimaryKey(), "object_id" => $pn_object_id, "download" => 1, "version" => $vs_download_version), array("title" => _t("Download")));
    }
    $vs_tool_bar .= "</div><!-- end detailMediaToolbar -->\n";
    return $vs_tool_bar;
}
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:32,代码来源:themeHelpers.php


注:本文中的caGetMediaDisplayInfo函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。