The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
There's still the JavaScript method I suggested earlier. I have a product (which I haven't published) that does something like what you want. I could make some changes and get it to work if you could do the debugging. The only drawback is that a member could use a developer tool like FireBug to see the video, but most people wouldn't even think to check out how it works and I suspect even many of the people who play with coding here don't know how to use a developer tool.
I have a very complicated bb code in the works and I would like to look into how to use a template for it. If I ever figure it out I'll PM you . EDIT: I think I can remove the video for non-premium members to prevent them from viewing it. |
#12
|
|||
|
|||
Thanks. For the interim I am working on a simple solution.
The actual videos have been placed in posts on a hidden sub forum where only premium members have viewing rights. From there I copy the link for an individual post (#1). My Premium Video forum is set to allow all members to view posts and that is where I have put my description of the video with an image of the video to click on. I then add the link, to that hidden video, to that image. This allows everyone to read the description and when a premium member clicks on the image, a new window (or tab) opens showing the one post containing the video and a description. One more click on the video and it starts. When the member is finished, they just close the window. Non-premium members who click on the image are shown an error message inviting them to buy a subscription. I know this is all a bit clumsy, but it is the best I could do under the current circumstances until you guys can think of a better way. If any of the coders here want to see what I have done in action, pm me and I will provide you with a dummy account on my forum. Regards Peter |
#13
|
|||
|
|||
I'm interested in this subject because I have a very complicated bb code I'm working on and I would like to use a template instead of creating all the html with JavaScsript. So far, I have the basic idea working, I'm stuck on how to get a button working in the editor. For now you would have to manually type in the tag but that shouldn't be a problem. I'll see if I can get a crude version later today (US time).
What is the usergroup id of your premium members? |
#14
|
|||
|
|||
Interesting @Nerbert, I am interested to see how you make out using a template. I haven't explored the bbcode code since on the board I oversee we don't use anything more than the basic set.
But something like that might be interesting on my daughters small board. I am currently adding usergroup permissions to smilies right now so I started exploring class_bbcode.php and decided I might take a stab at adding usergroup permissions for bbcodes. As we all know setting permissions is not the problem, it all comes down to the presentation aspect. Of course when I get done with the forums, I am sure I will run into different problems getting it to work on the CMS and blog. It's never that easy. |
#15
|
|||
|
|||
@Peter Walker: This simply doesn't work. At the time of my last post I had gotten a very simple template bb code to work (it just made the font color red). I thought it would then be a simple matter to place conditionals in the template to change the output html for different user groups but that doesn't work for bb codes, template or not. So my project here has only the modest advantage of creating a bb code that's easy to modify in the style manager but so far has the disadvantage of not having a button in the editor. So I'm afraid you're stuck with the system you have in place now.
One thing you may wish to consider is a new page for your videos instead of posting them in a thread. A good coder (and there are plenty here) could probably put it together with little effort for a modest payment. I would do it but I can no longer use vB3, as I mentioned above. You would have to have an array associating video titles with their urls so you don't have a query string value equal to the url and therefore visible to members. Every time you make a new video available you would have to edit in a title => url pair into the array and then just post a new link in a thread. --------------- Added [DATE]1377425821[/DATE] at [TIME]1377425821[/TIME] --------------- For anyone interested here's a bare bones example of a template bb code. You can develop it further by reading through includes/class_bbcode.php and vb/ckeditor.php and experimenting around. plugin for [premium] tags Plugin Code for bbcode_fetch_tags: Code:
/** * Hook: bbcode_fetch_tags, includes/class_bbcode.php line 3719 * See function handle_external() line 1751 */ $tag_list['no_option']['premium'] = array( 'callback' => 'handle_external', 'external_callback' => 'handle_bbcode_premium' ); function handle_bbcode_premium($registry, $value) { $templater = vB_Template::create('bbcode_premium'); $templater->register('value', $value); return $templater->render(); } HTML Code:
<span style="color:red;">{vb:raw value}</span> |
#16
|
|||
|
|||
Quote:
Thanks for all your efforts and I can see it is not an easy task. The system I put in place with linking to a post in a sub-forum works so I will just live with that. Regards Peter |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|