Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 20 Aug 2011, 03:06
pjkcards pjkcards is offline
 
Join Date: Jul 2007
Display a forum block only to certain usergroups

I'm having a hard time doing this.

I've used an HTML content type with this, and no luck:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And I've also tried this with no luck (want to display to everyone but 16):

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Can I modify permissions anywhere else for forum blocks since this isn't working for some reason? Thanks.
Reply With Quote
  #2  
Old 20 Aug 2011, 14:23
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
You can't use <vb:if... in html, only in a template. You could put your html in a template, make your widget PHP Direct Execution and use:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


or you could use this code without making a template


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

or you could put your html in a template and
Reply With Quote
  #3  
Old 20 Aug 2011, 20:18
pjkcards pjkcards is offline
 
Join Date: Jul 2007
Originally Posted by kh99 View Post
You can't use <vb:if... in html, only in a template. You could put your html in a template, make your widget PHP Direct Execution and use:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


or you could use this code without making a template


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

or you could put your html in a template and
Edit: I got it to work after playing with it a bit. It blocks all the content within the block, but it doesn't hide the block itself. How do I have it hide the block itself?

Thanks!

Last edited by pjkcards; 20 Aug 2011 at 20:23.
Reply With Quote
  #4  
Old 20 Aug 2011, 20:22
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Oops...yeah, I'm not sure what problem you're having exactly, but I just realized that it won't work like that because of the caching. I'm not sure if there's a way to write a PHP type block that doesn't cache. I'll look in to it...

--------------- Added 20 Aug 2011 at 20:36 ---------------

OK - should have thought of this before, sorry. Anyway, go back to using a static html widget. Copy the contents of the template vbcms_widget_static_page and create a new widget with the same contents but surround it with the 'if' tags, like


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Save it with some new name, then configure your widget and put that template in as the template name and your html in the html box.

Last edited by kh99; 20 Aug 2011 at 20:37.
Reply With Quote
  #5  
Old 30 Nov 2011, 21:18
malmazan malmazan is offline
 
Join Date: Feb 2006
Would it be possible to have a Latest Threads forum block where a usergroup was shown latest threads for some forums and another usergroup was shown latest threads for other forums?
Reply With Quote
  #6  
Old 30 Nov 2011, 22:21
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
You would need code of some sort to make that work. I just reread this thread and realized that the original post asked about forum blocks and I was thinking widgets for some reason, so pjkcards, if you read this, sorry about that.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 12:33.

Layout Options | Width: Wide Color: