Embedding multiple videos

This topic contains 16 replies, has 3 voices, and was last updated by  creativeartandsoul 9 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #45740

    creativeartandsoul
    Free User
    Post count: 61

    Hi Everyone!

    I was hoping to that my customers would be able to upload multiple videos into their listing. I’ve tried a few things:

    1) I embedded several videos into the “More Info” tab, and renamed the tab Videos. The result is a string of multiple videos (Yay!), but they look unsightly (ICK!)…all squished & narrow. I understand that users can click “full screen,” but first impressions are everything, especially when I’m taking customer’s money. 🙂 The other undesirable thing that happens is that another new tab is automatically created (Video)that includes only the last video from the list of uploads. See Pic #1 & 2

    If I deselect “Show in More Info tab” in the video field, I still only get the one last video from the list in the auto-created tab.

    2) The second thing I tried was to create new video tabs using the Textarea fieldset (just as the default video field) and naming them video1, video2, video3, etc. I can get the tabs to show some of the time, but the video embed doesn’t work at all and I only get blank tabs (bummer). See pic#3.

    I would like to offer at least a 4 video embed. Scenario #1 would be best if I could have all the videos in one tab either in the “More info” tab (not squished flat), or all in the auto-created video tab. OR, I would be Ok with having multiple video tabs (using textarea fieldset) if that would work, but I prefer scenario 1.

    Is there any way to fix this?

    One more quick question….is there a maximum number of tabs I can have in a listing? At some point in my testing I had 2 rows of tabs (assuming a customer might go crazy & fill video tabs, audio tabs, uploads, etc) , but I haven’t been able to duplicate that again.

    Thanks so much for your help!
    Cheers, Kris

    #45766

    Guust
    Moderator
    Post count: 29970

    Use a HTML field.
    Technically, you can use as many tabs as you like, but once the first row is full things will get ugly …
    If you use an HTML field you can add as many videos you like to the one field.

    See my test site here [ignore all little errors at various places, it is a test site):
    http://geo.goldroo.net/accommodation/hotels/chestnut-hill-hotel/

    #45770

    creativeartandsoul
    Free User
    Post count: 61

    Thanks for your reply, Guust!

    When I use the html fieldsets for embedding videos, only the code comes through as text. See pic, please. I can’t figure out why it’s not working on my end. Thanks for checking into this.

    Cheers! Kris

    #45776

    Guust
    Moderator
    Post count: 29970

    You must add the code to the text editor, not the html editor?
    Post your URL and admin details if you want me to have a closer look.

    #45780

    creativeartandsoul
    Free User
    Post count: 61
    This reply has been marked as private.
    #45784

    creativeartandsoul
    Free User
    Post count: 61

    Forgot to mention that the above settings are in the Nonprofits CPT.
    Thanks!

    #45786

    Guust
    Moderator
    Post count: 29970

    Like I said: You must add the code to the text editor, not the html editor.
    I corrected the video2 tab data.

    #45795

    creativeartandsoul
    Free User
    Post count: 61

    THank you, Guust.

    That’s really odd, because when I add the code to the text tab of the editor, save and publish, I get a completely blank tab. When I open the editor to go back and edit, the text box is completely blank as if I never had pasted anything.
    What am I missing?

    #45796

    Guust
    Moderator
    Post count: 29970

    I guess you are trying to add the code from the frontend.
    If you add it from the backend, it works [see video1 tab].
    I don’t understand why, we’ll have to call in the wizards.

    #45797

    creativeartandsoul
    Free User
    Post count: 61

    Yes, I’m working from the front end and trying to get the “user experience” and work out the kinks before launch.

    I definitely want my customers to be able to upload from the front end…LOL… I really don’t want to have to do it for them. 🙂

    Thanks again.
    Kris

    #45798

    Guust
    Moderator
    Post count: 29970

    Let’s wait for the wizards. They are still asleep on the other side of the world, so stand-by.
    I guess it has something to do with the fact we are trying to add an iframe.

    #45836

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    the html custom fields strips iframe embeds for security reasons. The only field in the form that will accept iframes is the video field.

    If you add more than 1 videos, they are currently placed one on top of the other, so only the last one is showing.

    This is due to making the video box responsive (youtube iframes are not responsive). We already spent hours trying to do this without adding another script (that would slow down the page) and we still haven’t found a solution.

    With this code in your theme functions.php, you can allow iframes on a specific custom field (video1):

    
    
    // This example allows iframes on the custom field "video1"
    add_filter('geodir_save_post_key',"my_allow_html_tags",10,2);
    function my_allow_html_tags($tags, $pkey){
        // $pkey is "geodir_" followed by the field HTML variable name, eg: "geodir_video1"
        if($pkey=='geodir_video1'){ $tags .= "<iframe>";}
        return $tags;
    }
    

    We are still trying to find the definitive solution for the Video tab. We will keep you posted.

    Let us know if this helps.

    Thanks

    #45842

    creativeartandsoul
    Free User
    Post count: 61

    Hi Paolo! Thanks for your assistance, but I’m still not getting anywhere.

    I went to: Dashboard > Appearance > Editor > Theme Functions
    and added the full code you provided & updated. Then edit listing > added YouTube code in Video1 box under Text tab > save > Publish and …..nothing. 🙁

    Again, when I go back to edit view and check video1 box it is blank as if I never added anything. I tried several times. I am doing this from the front end as if I were a user.

    Am I missing a step in there? Sorry for the trouble.
    Thanks again!
    K

    #45844

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    your html variable was Video1, while that script required it to be video1.

    A capital letter can change it all.

    Changed and tested on your website and now it works.

    I’m settings this as resolved for now.

    Thanks

    #45856

    creativeartandsoul
    Free User
    Post count: 61

    It’s perfect! I can even get more than one in there! Thank you!! You made my day!

    LOL…that’s why we leave the coding to you! I’d pull every single hair out trying to fish out minor but important details like that all day! I would have never found that.

    Thank you, again!
    K

Viewing 15 posts - 1 through 15 (of 17 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount