vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   HowTo Create Custom Usergroup Permissions (https://vborg.vbsupport.ru/showthread.php?t=82844)

Kirk Y 08-23-2005 11:42 PM

Quote:

Originally Posted by KirbyDE
Yes. I've read this Post you made and found it very amusing :)

Ha ha... well I'm glad I can find ways to amuse you. I was just curious... not like you see v3 Arcade in the Navbar or anything, eh?

jesus likes pie 10-07-2005 12:51 AM

Can you make a specific user be allowed to use html?

If so, how?

EDIT: hey, I have an idea, could I make a secondary usergroup that has it enabled, put the desired user as secondary usergroup for it, but have him display as his primary one?

Will that work? If not.....what will?

sorry guys...wrong thread. rofl...

Andreas 10-07-2005 12:52 AM

Yes it will work, if the primary usergroup does allow membergroups.

Reaktor7 10-07-2005 02:03 AM

i am pretty sure there is a plugin for that which may make things a little neater....

harmor19 10-22-2005 01:46 PM

I got the same error someone else got about the escape strings

In the product I have I put that "Rebuild Bitfields" script Andreas wrote

Code:

<plugins>
                <plugin active="1">
                        <title>Testimonialss</title>
                        <phpcode><![CDATA[ // Rebuild Bitfields
require_once(DIR . '/includes/class_bitfield_builder.php');
vB_Bitfield_Builder::save($db);
$myobj =& vB_Bitfield_Builder::init();

$groupinfo = array();

for ($x = 1; $x < 9; $x++)
{
    $groupinfo["$x"]['mypermissions'] = 0;
}

foreach ($myobj->data['ugp']['mypermissions'] AS $permtitle => $permvalue)
{
    if (empty($permvalue['group']))
    {
        continue;
    }

    if (!empty($permvalue['install']))
    {
        foreach ($permvalue['install'] AS $gid)
        {
            $groupinfo["$gid"]['mypermission'] += $permvalue['value'];
        }
    }
}

foreach ($groupinfo AS $usergroupid => $permissions)
{
    $db->query_write("UPDATE " . TABLE_PREFIX . "usergroup SET mypermissions=$permissions[mypermissions] WHERE usergroupid=$usergroupid");
}
build_forum_permissions();]]></phpcode>
                </plugin>
        </plugins>

I don't know if I plugins can be used without a hook so maybe that's my problem.

Here's my bitfield
Code:

<?xml version="1.0" encoding="ISO-8859-1"?>
<bitfields product="testimonials">
        <bitfielddefs>
                <group name="ugp">
                        <group name="testimonials">
                        <bitfield name="can_mod_testimonials" group="testimonials_permissions" phrase="can_mod_testimonials" install="">1</bitfield>
                        </group>
                </group>
        </bitfielddefs>
</bitfields>


Andreas 10-22-2005 08:00 PM

You must use the Code as Product install Code.

harmor19 10-22-2005 09:34 PM

1 Attachment(s)
It was in a product but removed the plugin tags around it.

when I upload the product I get this error

Code:

### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO plugin
        (`active`, `value`, `product`)
VALUES
        ('1', '\r\n                ', 'testimonials-Harmor19');

MySQL Error  : Unknown column 'value' in 'field list'


Andreas 10-22-2005 11:01 PM

1 Attachment(s)
Did you create the product XML by hand?
There is almost no chance the product manager would generate smth. like that ...

harmor19 10-22-2005 11:19 PM

Well I took references frommy other product xml's.

Thanks.

Now I'm on to update my testimonials mod.

akanevsky 10-28-2005 09:32 PM

Hi, this is the XML I'm trying to use:

Code:

<?xml version="1.0" encoding="ISO-8859-1"?>
<bitfields product="vBulletin">
        <bitfielddefs>
                <group name="ugp">
                        <group name="charlimit">
                                <bitfield name="isexempt" group="post_thread_permissions"  phrase="exempt_from_char_limit"></bitfield>
                        </group>
                </group>
        </bitfielddefs>
</bitfields>

On save, it says "Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /includes/class_core.php on line 635... why?


All times are GMT. The time now is 12:08 AM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03730 seconds
  • Memory Usage 1,744KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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