PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

User video upload

  1. ribena_wrath
    Member

    Hi all!

    I really want to make this happen, and I'm sure it must be in there somewhere.

    I want users to be able to send posts to the site.
    They will give an URL to youtube in one box
    I want the post to be forced into a category
    I want the post template to be forced also
    I also need the form to be able to recognise and allow me to post in this custom embed field my theme has, see here

    http://i131.photobucket.com/albums/p298/ribenawrath/Screenshot2011-08-06at184215.jpg

    Thanks guys

    Posted 12 years ago on Saturday August 6, 2011 | Permalink
  2. What plugin (or theme functionality) are you using to embed the videos now? We will need to know what the meta key is that is attached to the meta value which holds the video URL.

    The rest is all easily possible.

    1. Let visitors submit posts
    2. Accept URL in one box
    3. Force the category for the submission
    4. Force the post template
    5. Force URL to your custom field

    The custom field will be used for both the post template and the URL for the embed. There may be other meta fields required to set the other option shown in that screenshot (where the video should be displayed, before or after the content.)

    We need to know what the meta keys are for all the options you need to set, then you can set them with Gravity Forms when the post is created.

    Posted 12 years ago on Saturday August 6, 2011 | Permalink
  3. ribena_wrath
    Member

    I managed to get most of this to work, but I have issues with the URL for the embed just disappearing entirely.

    The videos are embedded using oEmbed plugin. The extra options on the post page come from the 'VIDEOZOOM' theme. The options is gives are as follows,

    POST EMBED VIDEO
    in the middle column
    before everything else (I need to be able to select this option)

    CUSTOM POST OPTIONS
    default
    sidebar on left ( I need this selecting by default)
    full page

    SOCIAL SHARING ICONS

    This is not an issue as the default is what I need.

    I don't know what the metas are or how to find them, can you point me in the right direction?

    Thanks for your time and help with this :)

    Posted 12 years ago on Saturday August 6, 2011 | Permalink
  4. The meta key and meta value are how WordPress stores information for custom fields. They're stored in the database in a table called wp_postmeta by default (the wp_ prefix might be different in your installation.) If you're not comfortable using something like phpMyAdmin to look in your MySQL database, it's going to be hard to find the actual key names. We need to know them exactly though, so we can recreate them in your form.

    If you're not comfortable with phpMyAdmin, can you send me a copy of the theme (since it's a paid theme I don't have access to it) at chris@rocketgenius.com please? The whole zipped theme. I should be able to look in there for the custom field meta information and help you determine the correct values to use in your form.

    Posted 12 years ago on Saturday August 6, 2011 | Permalink
  5. ribena_wrath
    Member

    Thanks a lot! Sent you an email just now :)

    Posted 12 years ago on Sunday August 7, 2011 | Permalink
  6. Turns out I was making this harder than it needed to be and there are a couple ways to get the information you need.

    If you view the custom fields for an existing post, one which already has all these options set, you will see the custom field names (the meta keys.) Some themes/plugins hide these custom fields, but this theme does not. If you don't have a section on your post editing screen called "Custom Fields", find the "Screen Options" pull down up by your name:

    http://min.us/mdyuWXP

    pull it down, and check the "Custom Fields" box so you will see custom fields in the post editor. This is what I see when looking at a video post made created by using the options in this theme:

    http://min.us/m91T2T

    These meta keys are the custom fields you're going to need when creating your form. That's one half the information you need. The other half is the possible meta values for these keys. I got that information from looking at the source of the Post Edit screen. I just looked for the drop downs where these options are set and looked at all the possible values. Those values are what you are going to have to allow people to select in your form. You don't want them to type them in, because they need to be exact. So you can use a drop down or multiple choice. (The post editor uses drop down, but I prefer multiple choice here since there's just a small list.)

    Here's the source of the post edit screen where you can see the options you need to set (both meta keys and possible meta values.) http://pastebin.com/PqvTScVH

    You will see the meta keys on lines 5, 13, 27, 35:

    5: wpzoom_post_embed_location
    13: wpzoom_post_embed_code
    27: wpzoom_post_template
    35: wpzoom_post_social

    The possible meta values are the < option > items in this code.

    • In the middle column
    • Before everything else

    wpzoom_post_embed_location

    • insert paragraph text input into your form

    wpzoom_post_embed_code

    • Default
    • Sidebar on the left
    • Full Width (no sidebar)

    wpzoom_post_template

    • Yes
    • No

    wpzoom_post_social

    Armed with all that information, you need to create a form with post fields that enable your visitors to select all those options. I would make the fields required, so no information is missing. You can set the default to whichever option you want, so if they do not make a selection, a sensible default still exists.

    Some tips for creating your form. Be sure to use Post Fields:

    http://minus.com/mceVRLZ

    For these four custom fields, you need to use the Custom Field type form field. After you add a Custom Field, select the "Field Type" - there are both Standard and Advanced field types listed here. You could use Drop Down to mimic the post editor exactly, or use Multiple Choice to expose the options right off the bat.

    After selecting the Field Type, you will be presented with the option to add the meta values you discovered in the source of the Post Editor. You can use the [Bulk Add / Predefined Choices] button to just paste your options in. Be sure to paste the options in exactly, with no extra markup or spaces and exact capitalization. The theme is not expecting that people will be doing anything other than selecting from a predefined list with the drop downs in the post editor. If you deviate from the expected values, I don't think it will work as expected.

    Set the Custom Field Name with the drop down to the meta keys you discovered earlier. If you already have posts on your site created with this theme, the meta keys (Custom Field Names) will already exist, so you can leave the "Existing" radio button checked, then just use the drop down. That will map this form field (and the value submitted) to this Custom Field, just as if you had selected it in the post editor.

    Be sure you have a post title and a post body as well. You should be able to get this done by using only Post Body, Post Title and Custom Fields.

    I hope that's enough information to get you going. Please post back if you need more assistance or when you have it working.

    Posted 12 years ago on Sunday August 7, 2011 | Permalink
  7. ribena_wrath
    Member

    This totally worked! I wasn't sure on the exact instructions, but I just tried what I thought would work and it totally did :)

    Now I need to do is set it so that I can specify what these values are. I don't want the user to be able to select these choices. So now how do I hide those choices, but still have the choice I have selected as a default?

    Thanks for all your incredible help!

    UPDATE: Ok I've totally got it working to exactly how I want to now! Cheers mate!

    I'm thinking that I'll upgrade to pro soon, I'd love to have this kind of functionality for the registration form. Does it integrate with BuddyPress? I have a bunch of fields set up for profiles there, and would like them to integrate.

    Also giving people the chance to put an avatar up on registration would be great.

    Posted 12 years ago on Monday August 8, 2011 | Permalink

This topic has been resolved and has been closed to new replies.