在ClipBucket视频共享脚本中,Watch_video.html页面包含一个subscribe按钮,但不包含该视频用户的订阅者数量。
然而,在用户频道页面中,有一个数量。下面是输出amount的代码。{$u.subscribers|number_format}
我尝试了以下方法,但什么也没做。
{$vdo.userid.subscribers|number_format}Watch_video.html的完整代码:https://raw.githubusercontent.com/arslancb/clipbucket/master/upload/styles/cbv2new/layout/watch_video.html
频道页面(没有足够的代表发布链接)
ClipBucket完整代码:https://github.com/arslancb/clipbucket/tree/master/upload
任何帮助都是非常感谢的。
发布于 2015-05-04 00:07:51
我在这篇博客文章中找到了解决方案:Display number of subscribers on a video page in ClipBucket。
我测试了它,它工作得很好。
首先转到watch_video.php并添加以下内容:
//Getting the user information - Read more: BLOG.GEORGECHALHOUB.COM
echo $u = $vdo['username'];
$u = mysql_clean($u);
$udetails = $userquery->get_user_details($u);
assign("u",$udetails);
//End Getting the user information然后转到watch_video.html,并添加以下要显示数字的smarty行:
{$u.subscribers|number_format}就这样。应该能行得通。
https://stackoverflow.com/questions/27873861
复制相似问题