else
{
// TODO select data, description if details are needed
- $selected_columns = "id, name, title, duration, user_id, views,
- thumbs_count, default_thumb,
+ $selected_columns = "v.id, name, title, duration, user_id, views,
+ thumbs_count, default_thumb, u.username,
(views + likes - dislikes) AS score,
$relevance";
$order = "ORDER BY relevance DESC, score DESC";
$category_cond = "";
$str_query = "SELECT $selected_columns
- FROM `videos`
- WHERE $category_cond ( $search_cond )
+ FROM `videos` v, `users` u
+ WHERE v.user_id = u.id AND $category_cond ( $search_cond )
$order
$limit";
// echo "<p>$str_query</p>";
?>
</div>
<div class="video-username">
- <?php echo $this->lang->line('ui_from') . ' TODO' //TODO ?>
+ <?php echo $this->lang->line('ui_from') ?> <a href="<?php echo site_url("user/profile/{$video['username']}") ?>"><?php echo $video['username'] ?></a>
</div>
</div>
<?php endforeach ?>
.appendTo(widget.$controls);
$formats = $('.ui-nsvideo-formats', $formats[0]);
$.each(widget.options.src, function(index, value) {
- id = widget.element.attr('id') + '-format-' + index;
- definition = value.res.substring(value.res.indexOf('x')+1)+'p';
+ var id = widget.element.attr('id') + '-format-' + index;
+ var definition = value.res.substring(value.res.indexOf('x')+1)+'p';
$('<input type="radio" id="' + id + '" name="format" />')
.appendTo($formats)
.attr('checked', (index == widget.options.srcIndex))
},
video: function() {
- widget = this;
+ var widget = this;
// Select video source.
// If src option is string, that's the source.
},
seeking: function() {
widget.html5.refreshState();
- },
+ }
});
}
// VLC