Would there be a simple way to add a default value so that a user adding a video_filter_field can just add the link and not have to think about the height/width/autoplay functions??

Comments

7wonders’s picture

Status: Active » Needs review
StatusFileSize
new9.13 KB

Attached is a patch that makes quite a few big changes. Im still learning so please accept my apologies in advance if there are any major cockups, but ive tested as best possible and found nothing wrong. This patch adds two major functionalities to this module:

  1. >Adds a simple setting to the field settings that allows you to prevent users from setting height, width and autoplay. This means that a user can simply add a compatible url and video_filter will add its defaults.
  2. Adds a "Video Filter Custom" display formatter so that you can override either the defaults or the users width, height and autoplay settings (depending on whether you use the above setting or not). This means you can have different sizes for different view modes.
7wonders’s picture

Also note that this makes the field available to views with "Video Filter Custom" settings available :)

7wonders’s picture

Any chance of getting this reviewed and commited?

7wonders’s picture

StatusFileSize
new6.08 KB

The last attached patch was against dev. This one is against 1.1.

drupik’s picture

Hi. not working for me:

Notice: Undefined index: width_height in video_filter_field_field_widget_form() (line 156 ...... video_filter_field.module).

1.1

adamtong’s picture

I applied the patch in #4

Notice: Undefined index: width_height in video_filter_field_field_widget_form() (line 156 of /home/drupal/public_html/sites/all/modules/video_filter_field/video_filter_field.module).
Notice: Undefined index: width_height in video_filter_field_field_settings_form() (line 208 of /home/drupal/public_html/sites/all/modules/video_filter_field/video_filter_field.module).

i use 7.11 version.

rufein’s picture

Category: feature » bug
Priority: Normal » Minor
Status: Needs review » Needs work

More errors with the patch #4:

Notice: Undefined index: custom_width en video_filter_field_field_formatter_settings_summary() (línea 292 de /var/www/g2green-2013-06/sites/all/modules/video_filter_field/video_filter_field.module).
Notice: Undefined index: custom_height en video_filter_field_field_formatter_settings_summary() (línea 293 de /var/www/g2green-2013-06/sites/all/modules/video_filter_field/video_filter_field.module).
Notice: Undefined index: custom_autoplay en video_filter_field_field_formatter_settings_summary() (línea 294 de /var/www/g2green-2013-06/sites/all/modules/video_filter_field/video_filter_field.module).

These errors are throwing in "manage display" page of a node type with a defined "video_filter_field" field

rufein’s picture

Status: Needs work » Needs review
StatusFileSize
new6.69 KB

I've corrected the patch in #4.

Some comments about the issues repport in this thread:

  • Errors reported in #5 and #6: Probably, the cause of the problem is the admin hasn't flushed the cache. I've added a warning message to remember to flush the cache.
  • Errors reported in #7: I've corrected the code.