Home Forums Themes Support Circle Add Embed Code support for popup player

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #4423
    rafadizeo
    Supported

    Hi, I added two new custom fields as you can see in this image: https://i.postimg.cc/L4tp4rS8/Screenshot-2019-11-14-Edit-Film-Pro-Hd-Latino-Word-Press-1.png I can display these fields correctly in any template but I cannot add them to the player. The “Option 1” and “Option 2” tabs appear on the player but when you click on them nothing happens. As I think I need to edit a css class of this code located in the film-player-direct.php file I can’t find the css file where “server-facebook” is located to replicate the code and thus make the player work correctly with my two new custom fields. Here you can see my player https://prohdlatino.com/film/drive-angry/ Thanks

     <li>
      <a href="javascript :;" data-server="facebook" data-video-id="<? php echo esc_attr ($ video ['link_server7']);?>" class="server-facebook">
      <? php echo esc_html ($ video ['title_server7']); ?>
      </a>
      </li>
    • This topic was modified 3 months, 2 weeks ago by rafadizeo. Reason: order code
    #4425

    Hi, Thanks for choosing our product!
    Sorry but add new sever is not easy as you think here (use CSS display).
    We used Ajax in this case.
    You can see in wp-content/themes/haru-cirlce/assets/js/haru-circle.js on line 1454: http://prntscr.com/px7l7s.
    Ajax function template in wp-content/plugins/haru-circle-core/templates/circle/film-modal.php
    If you add new server you need process in here: http://prntscr.com/px7m0j.
    The code js when change video source: http://prntscr.com/px7mk3 .
    You will need customize wp-content/plugins/haru-circle-core/templates/circle/player-ajax.php to display your new server.
    Hope this help!

    ****
    Regards,
    HaruTheme

    #4426
    rafadizeo
    Supported

    I added server in wp-content/plugins/haru-circle-core/templates/circle/film-modal.php see this https://prnt.sc/px7wyj and tabs, see here https://prnt.sc/px7xni
    in wp-content/themes/haru-cirlce/assets/js/haru-circle.js i have this https://prnt.sc/px7ymn
    The player work only if i choise one server in film https://prohdlatino.com/film/drive-angry/ so if pick option 2 dont work, i think some js part is missing

    #4427

    You need check this file to process your new server:
    wp-content/plugins/haru-circle-core/templates/circle/player-ajax.php
    You need check $server and variable store your iframe code to display.
    Hope this help!

    ****
    Regards,
    HaruTheme

    #4428
    rafadizeo
    Supported

    I think this player wp-content/plugins/haru-circle-core/templates/circle/player-ajax.php is from other post type, if y delete all code of this file the player still working.
    But if i delete all code on film-modal.php the player dont work.

    #4429

    Hi,
    film-modal.php display popup video when first load.
    Then player-ajax.php get video when you click change server.
    You need use:
    var_dump($variable);
    for check value and process.

    #4430
    rafadizeo
    Supported

    Testing this code on player-ajax.php

            <?php elseif ( $server == 'embedcode1' ) : ?>
                <?php echo esc_attr( $video_id ); ?>
            <?php elseif ( $server == 'embedcode2' ) : ?>  
                <?php echo esc_attr( $video_id ); ?>
            <?php endif;?>

    This print the iframe code in “legible mode”

    <iframe width=\"640\" height=\"360\" src=\"https://uptostream.com/iframe/4b3f02ru37om\" scrolling=\"no\" frameborder=\"0\" allowfullscreen webkitallowfullscreen></iframe>

    So i try

    <?php echo $video_id[0]; ?>

    But dont work var_dump return STRING

    #4431

    We checked yours site and changed code to:

    <?php elseif ( $server == 'embedcode1' ) : ?>
                <?php echo wp_kses_post( $video_id ); ?>
            <?php elseif ( $server == 'embedcode2' ) : ?>  
                <?php echo wp_kses_post( $video_id ); ?>
            <?php endif;?>

    Now it’s working fine! You need change esc_html to wp_kses_post
    Hope this help!

    *****
    Regards,
    HaruTheme

    #4432
    rafadizeo
    Supported

    Thanks for help! It Works!

    #4435

    Thanks for your feedback!

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.