MyBB Community Forums

Full Version: How to? Let only members see youtube videos in threads?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is it possible to set Mybb to only allow registered members to view youtube videos posted in threads? I'm not sure where to post this thread either..
Thanks guys!
You will need a plugin for this.
youtube videos are not your property, so why would you restrict guests from viewing them? you're just going to make them go somewhere else.
(2012-07-12, 06:03 PM)brad-t Wrote: [ -> ]youtube videos are not your property, so why would you restrict guests from viewing them? you're just going to make them go somewhere else.


It's his forum, he has the right to prevent guests from seeing the content of each post.
He has the right to do a lot of things that he probably shouldn't.
Just to make this clear, as Omar said, you will need a plugin for this.
(2012-07-12, 06:03 PM)brad-t Wrote: [ -> ]youtube videos are not your property, so why would you restrict guests from viewing them? you're just going to make them go somewhere else.

Well, I like to try new things and that's how people get places by trying new things and not listening to all the negative posts people leave on forums.
On a better note, thank you to everyone who helped me out! That's what I love about mybb is the support everyone gives.. always appreciated!
Yes, you would need a plugin - I think the one you need is ZingaBurga's Conditional templates.

Then you could wrap the embed code in the Ungrouped template video_youtube_embed in an if else

Like if guest/banned see message - else see video.

This is handy if you post to a You Tube channel of your own and only allow viewing to people who have the link.

<if !in_array($GLOBALS['mybb']->user['usergroup'], array(1,5,7)) then>

<object type="application/x-shockwave-flash" class="video_embed" style="width: 450px; height: 366px;" data="http://www.youtube.com/v/{$id}"><param name="movie" value="http://www.youtube.com/v/{$id}" /></object>
<else>
Sorry, this is a members only video
</if>
Definitely agreed with Leefish. Template conditionals would certainly be the easiest way of doing what you're wanting to do. To find the plugin he was referring to, see here: http://mybbhacks.zingaburga.com/showthread.php?tid=464
Thanks Euantor, I forgot the link. But then, in my mind, that is the one plugin to rule them all, no doubt about it so I just assume people know. My bad.
Pages: 1 2