vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Style Permissions (https://vborg.vbsupport.ru/showthread.php?t=68045)

Marco van Herwaarden 03-05-2005 02:11 PM

You will need to replace the "X" and the "Y" with your styleid's (numbers!!).

warpeditor 03-06-2005 09:19 AM

Quote:

Originally Posted by MarcoH64
You will need to replace the "X" and the "Y" with your styleid's (numbers!!).

Well, of course I did. But I still got an error. Thanks anyway.

Marco van Herwaarden 03-06-2005 11:57 AM

For the rest this code look perfect sane to me.

Could you post the actual code you're using.

warpeditor 03-06-2005 01:19 PM

PHP Code:

if ($bbuserinfo['styleid'] == 23 AND $bbuserinfo['usergroupid'] != 7

$styleid $vboptions['styleid']; 

else 

// style specified in user profile 
$styleid $bbuserinfo['styleid']; 


This is what I did in global.php. I want usergroup id 7 to be able to choose styleid 23. Isn't this the way it supposed to be? But when I do this I got an error saying "Parse error: parse error, unexpected '{' in /home/wherever/global.php on line 266.

Marco van Herwaarden 03-06-2005 06:38 PM

I must be blind or simply too much tired, but i don't see your error.

And which line is line 266?

warpeditor 03-07-2005 10:10 AM

Quote:

Originally Posted by MarcoH64
And which line is line 266?


PHP Code:

if ($bbuserinfo['styleid'] == 23 AND $bbuserinfo['usergroupid'] != 7
{  ----- 
this one is line 266
$styleid 
$vboptions['styleid']; 

else 

// style specified in user profile 
$styleid $bbuserinfo['styleid']; 


hmm... thanks for your help anyway.

Marco van Herwaarden 03-07-2005 10:36 AM

Well i did the same edit myself, and no problem.

Please post again (dohh) with the 5 lines before and after the change.

warpeditor 03-09-2005 12:52 PM

PHP Code:

$userselect false;

// is style in the forum/thread set?
if ($codestyleid)
{
    
// style specified by forum
    
$styleid $codestyleid;
    
$userselect true;
}
else if (
$bbuserinfo['styleid'] > AND ($vboptions['allowchangestyles'] == OR ($bbuserinfo['permissions']['adminpermissions'] & CANCONTROLPANEL)))
{
    if (
$bbuserinfo['styleid'] == 29 AND $bbuserinfo['usergroupid'] != 7
++++{ 
++++++++
$styleid $vboptions['styleid']; 
++++} 
++++else 
++++{ 
++++
// style specified in user profile 
++++$styleid $bbuserinfo['styleid']; 
++++} 
  
}
else
{
    
// no style specified - use default
    
$styleid $vboptions['styleid'];


This is how it looks.

Marco van Herwaarden 03-09-2005 03:23 PM

Try:
PHP Code:

$userselect false

// is style in the forum/thread set? 
if ($codestyleid

    
// style specified by forum 
    
$styleid $codestyleid
    
$userselect true

else
{
    if (
$bbuserinfo['styleid'] > AND ($vboptions['allowchangestyles'] == OR ($bbuserinfo['permissions']['adminpermissions'] & CANCONTROLPANEL))) 
    { 
        if (
$bbuserinfo['styleid'] == 29 AND $bbuserinfo['usergroupid'] != 7
            { 
                
$styleid $vboptions['styleid']; 
            } 
            else 
            { 
            
// style specified in user profile 
                
$styleid $bbuserinfo['styleid']; 
            } 
       
    } 
    else 
    { 
        
// no style specified - use default 
        
$styleid $vboptions['styleid']; 
    } 



warpeditor 03-14-2005 04:25 PM

Quote:

Originally Posted by MarcoH64
Try:
PHP Code:

$userselect false

// is style in the forum/thread set? 
if ($codestyleid

    
// style specified by forum 
    
$styleid $codestyleid
    
$userselect true

else
{
    if (
$bbuserinfo['styleid'] > AND ($vboptions['allowchangestyles'] == OR ($bbuserinfo['permissions']['adminpermissions'] & CANCONTROLPANEL))) 
    { 
        if (
$bbuserinfo['styleid'] == 29 AND $bbuserinfo['usergroupid'] != 7
            { 
                
$styleid $vboptions['styleid']; 
            } 
            else 
            { 
            
// style specified in user profile 
                
$styleid $bbuserinfo['styleid']; 
            } 
       
    } 
    else 
    { 
        
// no style specified - use default 
        
$styleid $vboptions['styleid']; 
    } 



I no longer getting parse error but it doesn't change style ID 29. Moderators (ID number 7) only sees default style. After this even administrators can't see style ID 29.

Many thanks anyway MarcoH64. Any ideas?


All times are GMT. The time now is 06:16 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.01856 seconds
  • Memory Usage 1,780KB
  • 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
  • (5)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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