Views fields - custom field

alippai - June 26, 2008 - 11:11
Project:OpenPackage Video
Version:5.x-3.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:jbrown
Status:closed
Description

Please provide a custom field, which calls for example theme('opvideo_custom',$video);.
It's hard to theme a video field now (you use _op_video_render_* instead of theme functions).

#1

jbrown - June 29, 2008 - 17:42
Category:feature request» support request
Assigned to:Anonymous» jbrown

There are two theme functions which you can override:

<?php
function theme_op_video_preview_image($image) {
  return
$image;
}


function
theme_op_video_player($player) {
  return
$player;
}
?>

#2

alippai - July 13, 2008 - 14:09

I don't want to use the existing $player or $image, because I want to use my own players. I want to get $video, to theme it for my player.

#3

jbrown - July 21, 2008 - 22:35

In that case - you need to hack player.inc. We'll probably move op_video to flowplayer eventually.

#4

alippai - July 22, 2008 - 10:21
Category:support request» feature request

I know, that I have to hack player.inc - that is the reason why I set this issue as feature request :)
About that change of the video player: a pluggable system would be nice - in this case we should change the player at views formatter settings and add custom players via hooks. IMHO this is the right way...
The player plugin needs to define the players/themes (set if the player/image etc. can be a link or only it can be a link destination, or it can be rendered only without link) and at formatters we should have to choose from them (a rendered object->destination pair).

#5

jbrown - April 26, 2009 - 02:35
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.