November 15, 2019 at 3:51 am #4423
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
November 15, 2019 at 6:02 am #4425
- This topic was modified 3 months, 2 weeks ago by rafadizeo. Reason: order code
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!
HaruThemeNovember 15, 2019 at 6:30 am #4426
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 missingNovember 15, 2019 at 6:34 am #4427
You need check this file to process your new server:
You need check $server and variable store your iframe code to display.
Hope this help!
HaruThemeNovember 15, 2019 at 6:59 am #4428
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.November 15, 2019 at 7:02 am #4429
film-modal.php display popup video when first load.
Then player-ajax.php get video when you click change server.
You need use:
for check value and process.November 15, 2019 at 7:43 am #4430
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; ?>
But dont work var_dump return STRINGNovember 15, 2019 at 7:58 am #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!
HaruThemeNovember 17, 2019 at 3:46 am #4432
Thanks for help! It Works!November 17, 2019 at 1:22 pm #4435
Thanks for your feedback!
You must be logged in to reply to this topic.