aloony92
aloony92

Reputation: 21

Show Subscriber Amount Code on Video Page (ClipBucket)

In the ClipBucket Video Sharing Script the Watch_video.html page contains a subscribe button but not the amount of subscribers the user for that video has.

In the users channel page, though, there is an amount. Here is the code to output amount. {$u.subscribers|number_format}

I tried the following but nothing.

{$vdo.userid.subscribers|number_format}

Full code for watch_video.html: https://raw.githubusercontent.com/arslancb/clipbucket/master/upload/styles/cbv2new/layout/watch_video.html

Channel Page (Not enough rep to post link)

ClipBucket Full Code: https://github.com/arslancb/clipbucket/tree/master/upload

Any help is appreciated.

Upvotes: 2

Views: 90

Answers (1)

Online User
Online User

Reputation: 17748

I found the solution on this blog post: Display number of subscribers on a video page in ClipBucket.

I tested it and it works pretty well.

First go to watch_video.php and add the following:

//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

Then go to watch_video.html and add the following smarty line where you want to display the number:

{$u.subscribers|number_format}

That's it. It should work.

Upvotes: 0

Related Questions