Download & Extend

Removing the format tabs

Project:CDN2 Video
Version:6.x-1.9
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

I'm looking for a quick and simple way to remove the tabs menu from on top of the video node display. By this I mean the vertically aligned menu, with 'Low Resolution Flash' etc.

Slightly confused about why I can't find any tags which refer directly to this menu in the code. I can see it is being modified by the cdn2.js file, and by the cdn2_tabs tag in the module file. But removing either of these completely, seems to be a step too far, because either the whole video frame disappears, or simply the formatting disappears (and the menu remains). Similarly, hiding that tag using CSS hides the entire video frame.

The reason I want to do this is I want to just display the video frame. I have successfully stripped down the appearance of the video node so that nothing now remains to view except the frame, and that upper format menu. Common sense tells me there MUST be a simple way to get rid of it, or even just to hide it from view.

Any help would be much appreciated. I'm using Flowplayer btw.

Comments

#1

If you can find the theme which displays the tabs, then you should be able to override that theme and remove the tabs... that's what i did a year or so back when i last used this module.

If you're really stuck i'll go have a look for the bits to override...

(before that you might want to try setting only 1 video type to transcode to, if the code is written nicely then the tabs won't be displayed for only 1 type)

#2

Status:active» needs review

If you override theme('cdn2_video') you can remove the tabs at the top. Copy theme_cdn2_video into your template.php and rename it as appropriate.

You need to set this up to grab the first asset only, as well as removing the ul tag that renders the top tabs.

There are two loops in this function, both beginning with:

    for ($asset_key = 0; $asset_key < count($field['assets']); $asset_key++) {

Search for this code and remove it from your theme function override:

  $output .= '<ul>';
  if (count($preset_list)) {
    foreach ($preset_list as $preset_name => $preset_list_item) {
      if (strpos($preset_name, 'thumb') == FALSE) {
        $output .= '<li>'. $preset_list_item .'</li>';
      }
    }
  }
  $output .= '</ul>';

That should do it. Make sure to refresh your theme registry to make it pick up the new theme function.

#3

Thank you both. I followed acstewart's instructions and the offending menu appears to have disappeared!

#4

EDIT: this is resolved now. It was a CSS issue!

Hi there

I just wanted to ask a very basic follow-up question, in case acstewart or anyone else can help me.

Since I successfully removed the formatting tabs, another issue within CDN2 led me to have to reinstall the module. Now, the assets are back! It seems that the function override is not having the affect on the new instance of the module.

Any tips on updating the override to reflect the re-installed module? (Digging into the literature now to see if I can fix this myself)

Many thanks from a grateful Drupal learner
Derry