vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Blasted bitfields (https://vborg.vbsupport.ru/showthread.php?t=92006)

Chris M 07-11-2005 09:04 PM

Blasted bitfields
 
:p

Ah the days you could modify code...

Anyway:

PHP Code:

// Get the Smilie Permissions for Users 
if ($permissions['smiliepermissions'] & $vbulletin->bf_ugp['smiliepermissions']['cansmilielimit']) { 
    
$vbulletin->options['maximages']= $vbulletin->bf_ugp['smiliepermissions']['smilieintset']; 


I created a bitfield for smilie permissions to be set on a 'per usergroup' basis - Problem is I cannot get the code above to set the maximages based on the usergroup value :disappointed:

Any help? :p

I hate bitfields :p

Satan

Marco van Herwaarden 07-12-2005 03:27 AM

If i understand you, you want to set a max number of smilies? A bitfield can only be true or false, no other values.

Chris M 07-12-2005 09:07 AM

Quote:

Originally Posted by MarcoH64
If i understand you, you want to set a max number of smilies? A bitfield can only be true or false, no other values.

I believe you can set an integer value using bitfields :)

Satan

Never mind I got it working :)

Satan

Marco van Herwaarden 07-12-2005 09:21 AM

Quote:

Originally Posted by hellsatan
I believe you can set an integer value using bitfields

No!
(unless you mean the integer representation of all combined permissions in that bitfield)

Chris M 07-12-2005 11:04 PM

Quote:

Originally Posted by MarcoH64
No!
(unless you mean the integer representation of all combined permissions in that bitfield)

Then please explain how my latest Extension works :p

Satan

Marco van Herwaarden 07-13-2005 12:45 AM

Post i alink and i will have a look tomorrow.

Paul M 07-13-2005 01:41 AM

Quote:

Originally Posted by hellsatan
Then please explain how my latest Extension works :p

Satan

Magic ?

They are called bitfields for a very good reason - they are one bit, 1 or 0, true or false. :)

Chris M 07-13-2005 01:49 AM

Quote:

Originally Posted by Paul M
Magic ?

They are called bitfields for a very good reason - they are one bit, 1 or 0, true or false. :)

Indeed - However in the .xml file you upload to the /includes/xml/ folder, if you add intperm="true" to the <bitfield> tag, it allows you to have an integer value in the specified area...

While technically this isn't a bitfield, it still is added the same way as one, and I was trying to figure out how to call it :p

I got it figured that it's:

PHP Code:

$vbulletin->options['maximages']= $vbulletin->userinfo['permissions']['groupsmilielimit']; 

;)

Satan


All times are GMT. The time now is 08:37 PM.

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.02269 seconds
  • Memory Usage 1,741KB
  • 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
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete