Copyright © 2011 Kaltura Inc.
All Rights Reserved. Designated trademarks and brands are the property of their respective owners.
Use of this web site constitutes acceptance of the Terms of Use and Privacy Policy.
EduVideo.org
How to hide thumbnail from full node view
Hi,
let me start by saying that overriding with tpl/css is perfectly fine and accepted.
I wouldn't call it work-around, since tpl exists for these kind of changes exactly.
Right now, your options are:
1. use CSS to hide it
2. use tpl.php (should be node-kaltura_entry.tpl.php)
3. use template.php, by overriding the theme_node_kaltura_entry_thumbnail_url function.
Note that the 3rd option, depends on your implementation, might cause thumbnails to not display in other places as well (although you might expect them to).
you can read some more here: viewtopic.php?f=6&t=206
Regarding the "cck like behavior" - the kaltura CCK field acts as a regular CCK field (by means of display options) and there you can set how the field would be displayed.
The Kaltura CCK field is actually an enhanced type of node reference.
A 4:th option:
This hack provides a setting to optionally hide or show the thumbnail from full node view (probably not bullit proof):
in 'modules/kultura/plugins/node_kultura_entry/node_kultura_entry.module'
on line 646 (in the funtion 'theme_node_kaltura_entry_thumbnail_url()')
change:
Code: Select all
return 'kaltura_thumbnail_url . $size_str .'" '. $extra .' />';
to:
Code: Select all
if (variable_get('kaltura_entry_general_display_thumb', 1) == 1) {
return 'kaltura_thumbnail_url . $size_str .'" '. $extra .' />';
} else {
return '';
}
on line 67, in the function 'kaltura_entry_settings_form()')
insert:
Code: Select all
$form['kultura_entry_general'] = array(
'#type' => 'fieldset',
'#title' => 'General',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#weight' => -10,
);
$form['kultura_entry_general']['kaltura_entry_general_display_thumb'] = array(
'#type' => 'radios',
'#title' => t('Display Thumbnail of Media on Node View'),
'#options' => array( 0 => 'no', 1 => 'yes' ),
'#default_value' => variable_get('kaltura_entry_general_display_thumb', 1),
);
This enables a new 'General' setting at 'admin/settings/kaltura/kaltura_entry_settings'.
Gee! That sound great! Why is it not implemented by default?
Would you mind posting the entire code for the node_kaltura_entry.module file here please? I've been trying all afternoon but I get a syntax error...
edit (4info):
With my installation the function theme_node_kaltura_entry_thumbnail_url(...) is at line 605
It ends with:
Nevertheless, I adapt it accordingly and I get a server php error message:
Parse error: syntax error, unexpected '"' in /home/xxxxxx/public_html/sites/all/modules/kaltura/plugins/node_kaltura_entry/node_kaltura_entry.module on line 643
line 643:
This might help:
function theme_node_kaltura_entry_thumbnail_url($node, $teaser, $nosize = FALSE, $size = array()) {
...
if ($node->link_thumb || $teaser)
return '<div class="kaltura_thumbx"><a href="'. url('node/'. $node->nid) .'"><img src="'. $node->kaltura_thumbnail_url . $size_str .'" '. $extra .' /></a></div>';
else
if (variable_get('kaltura_entry_display_thumb', 1) == 1) {
return '<div class="kaltura_thumb_new"><img src="'. $node->kaltura_thumbnail_url . $size_str .'" '. $extra .' /></div>';
}
else if (variable_get('kaltura_entry_display_thumb', 1) == 0 && $node->type == 'kaltura_entry') {
return '';
}
}
Hey y'all,
I might be missing a simple setting somewhere but I can't see where I would hide the thumbnail on the full node display for Kaltura Media Nodes!? I mean, I could probably create a tpl.php page for that node type with an override (haven't heard whether this is possible) or do a css hide but those options seem like work-arounds!?
Any tips?
I would love if this module actually worked with CCK and views like normal/local content - ie. would be nice if I could just jump into the CCK display settings to control the thumbnail vs video player display on teasers and full nodes a la embedded media field module.
q./