Form Fields on cms_galleries Page

Post

Posted
Rating:
#6556 (In Topic #1698)
Avatar
Standard member
starfish is in the usergroup ‘Fan in action’

Not allow inputs on specific fields on page

When a member is uploading a video (cms_galleries.php), I do not want the member to be able to enter data into the form fields: Video length, and Dimensions (width/height).  I always want this data to be auto-detected (as when the fields are left blank).

How would I do this?  Nothing I have tried works properly.

Thanks so much for your help!
Online now: No Back to the top

Post

Posted
Rating:
#6560
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
It'd require code changes.

You'd need to copy cms/pages/modules/cms_galleries.php to cms/pages/modules_custom/ then remove these lines:

Code

        $fields->attach(form_input_integer(do_lang_tempcode('VIDEO_LENGTH'), do_lang_tempcode('DESCRIPTION_VIDEO_LENGTH'), 'video_length', $video_length, false));
        $fields->attach(form_input_dimensions(do_lang_tempcode('DIMENSIONS'), do_lang_tempcode('DESCRIPTION_VIDEO_DIMENSIONS'), 'video_width', 'video_height', $video_width, $video_height, false));
I haven't tested, but what I can see from the code is that if these fields are not present it will just pick defaults / do autodetection.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#6561
Avatar
Standard member
starfish is in the usergroup ‘Fan in action’
Thank you Chris!!!  It works perfectly!!!
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

Vaiva, gabriel58, Manu, Philip, ManojSree, mytracker, John Connor, Paul D, Salman, MVLipwig

Forum statistics:
  • 1,339 topics, 5,886 posts, 7,196 members
  • Our newest member is clicksbazaar
Birthdays:
Back to Top