vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Only custom usergroups able to view html and php blocks (https://vborg.vbsupport.ru/showthread.php?t=319168)

vze2yqtm 06-21-2015 06:14 PM

Only custom usergroups able to view html and php blocks
 
Hi, if someone can please create a plugin to allow me to specify who can view certain blocks, I will be very grateful - thanks in advance :)

MarkFL 06-22-2015 12:02 AM

Please take a look at this product:

Hide BBCodes/Signatures From Guests

If I were to add the ability to hide BBCodes from everyone except the usergroups you specify in the product settings, would that work for you?

vze2yqtm 06-22-2015 05:33 AM

Quote:

Originally Posted by MarkFL (Post 2548338)
Please take a look at this product:

Hide BBCodes/Signatures From Guests

If I were to add the ability to hide BBCodes from everyone except the usergroups you specify in the product settings, would that work for you?

Thanks so much for the fast reply, Sir :) That would be a great feature, but the sidebar block I wish to only show specific usergroups is a html code

MarkFL 06-22-2015 05:38 AM

I thought you were talking about hiding BBCodes like the CODE, HTML, and PHP blocks. If you could explain exactly what you have in mind, you would more likely be helped. Can you provide a screenshot of what it is you wish to hide?

vze2yqtm 06-22-2015 04:27 PM

Hi, thanks so much for the help :) http://prntscr.com/7k1j21 What I wish to hide from guests is the Special Events poster on the top, which is a simple html sidebar block

MarkFL 06-22-2015 05:47 PM

If you wish to hide just that block from guests, then I think your best bet is to change the content type to PHP, and then use a conditional to render the output. You could use the following format:

PHP Code:

global $show;

if (!
$show['guest'])
{
    
$output 'HTML goes in here';
    return 
$output;



vze2yqtm 06-23-2015 02:24 PM

Thanks so much for the suggestion, Sir, but this causes a parse error

MarkFL 06-23-2015 02:35 PM

Can you post the PHP code you have? I suspect a few single quotes need to be escaped.

vze2yqtm 06-23-2015 02:41 PM

Parse error: syntax error, unexpected '<' in /home/*****/public_html/includes/block/html.php(95) : eval()'d code on line 12

Parse error: syntax error, unexpected '<' in /home/*****/public_html/includes/block/html.php(95) : eval()'d code on line 12

MarkFL 06-23-2015 02:43 PM

I mean can you post the actual PHP code you have in the block, not the resulting errors.


All times are GMT. The time now is 03:33 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01105 seconds
  • Memory Usage 1,729KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete