Issue displaying iframe objects on a video module

edited May 2014 in Modules
Hi,

I am creating a video module, the user simply enters their vimeo link in the admin screen and this should then get posted to the 'film' page.

For some reason my view is only showing 2 of the 4 videos that I have added.

<?php $films = fuel_model('films', array('find' => 'all', 'order' => 'precedence desc')); ?> <?php echo fuel_edit('create', 'Add Film', 'films'); ?> <div class="videoWrap"> <?php if (!empty($films)) : ?> <?php foreach($films as $film) : ?> <div class="video"> <?php if (!empty($film->name)) : ?> <iframe src="<?php echo $film->vimeo_url;?>?title=0&amp;byline=0&amp;portrait=0&amp;badge=0&amp;color=f02c00" width ="450" height="262" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen</iframe> <?php endif; ?> </div> <?php endforeach; ?> <?php endif; ?> </div>

the_model:

<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); require_once(FUEL_PATH.'models/base_module_model.php'); class Films_model extends Base_module_model { public $filters = array('name'); public $required = array('name'); //public $linked_fields = array('slug' => array('name' => 'url_title')); //public $linked_fields = array('slug' => 'name', 'client' => 'name'); function __construct() { parent::__construct('films'); // table name } function list_items($limit = null, $offset = null, $col = 'precedence', $order = 'desc') { $this->db->select('id, name, vimeo_url, precedence, published', FALSE); $data = parent::list_items($limit, $offset, $col, $order); return $data; } function form_fields($values = array()) { $fields = parent::form_fields($values); return $fields; } } class Film_model extends Base_module_record { function get_url() { return site_url('film/'.$this->slug); } function get_image_path() { return img_path('films/'.$this->name); } function get_thumb() { $thumb = $this->_parent_model->thumb_name($this->name); return img_path('films/'.$thumb); } } ?>

When I check the page source I can see that the four video items are loaded. But if I use the inspect tool with safari only 2 are shown.

Is this an issue with iframes, or have I missed something obvious?

Thanks,

Comments

  • edited 9:29AM
    This sounds like it may be something in your HTML code. If you are able to see 4 in the source code, perhaps there is a javascript or open HTML tag preventing the other ones from loading? Or is there some other PHP error being displayed on the page or in the source code?
  • edited 9:29AM
    Hi, there is no error being shown anywhere on the page.. would this indicate open tag somewhere in the view? thanks
  • edited 9:29AM
    You don't appear to have an ending ">" after "allowfullscreen".
  • edited 9:29AM
    Thank you!!!
Sign In or Register to comment.