Hi there,
is it possible to hide the list of the diferent formats in upload form?
Override...??
Cheers

Comments

sphism’s picture

Override the theme function in cdn2.module called:

theme_cdn2_upload_form

and just remove the bit about $preset_inputs

The default values should still be in the form but not displayed for editing.

The upload form is very weird in that it is in an iframe, i have no idea why, but it is actually generating the form from within your drupal site.

sphism’s picture

Ok, ignore my advice. The (extremely weird non drupal) form needs to have the presets listed otherwise the video will be uploaded to cdn2 with no transcode options, so you get no thumbnail and no videos!! What's more is that when you go to edit the node you can't add the transcode options in...

oh joy.

I just don't understand why an end user would have the ability to alter the transcoding formats??? Surely that should just be a admin setting.

Especially since the user can untick all the boxes and get no videos of thumbnail.

It's bonkers.

Anyhoo, i just tried changing the checkboxes to be hidden form items instead but get the same result. I think i'm just gonna have to resort to hiding them with css which is obviously wide open to abuse and completely lame.

If anyone knows how to this properly i'd really appreciate it.

Also if anyone at cdn2 could rewrite the upload form using drupals forms api instead of html that would be great too, i mean, using an html form inside an iframe??? Who ever came up with that idea?

m

sphism’s picture

ok i seem to have this working...

except thumbnails aren't being made but that could be something else...

i overrode theme_cdn2_upload_form

and replaced this

$preset_inputs .= sprintf('<input type="checkbox" name="%s" value="%s" checked>%s<br/>', $inputName, $short_name, $preset->friendlyName);

with this

    //hack:matt: don't allow users to change transcode options
    $preset_inputs .= sprintf('<input type="hidden" name="%s" value="%s">', $inputName, $short_name, $preset->friendlyName);
kylebrowning’s picture

Status: Active » Fixed

Ive actually been meaning to add this as a feature.

You can now change this option on the Format Presets page near the bottom.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.