vb.org Archive

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

Artistichaven 04-28-2011 10:08 PM

Bitfield help
 
I created two custom bitfields

Code:

<group name = "serverstuff">
<bitfield name="isserverstaff" group="server_stuff"  phrase="is_server_staff">1</bitfield>
<bitfield name="isbetatester" group="server_stuff"  phrase="is_beta_tester">2</bitfield>
</group>

The issue is isserverstaff gets saved in serverstuff, and isbetatester does not get saved at all.

kh99 04-28-2011 10:28 PM

I think you want different values for those, like instead of making them both '1' make the second one '2'.

Artistichaven 04-29-2011 12:56 AM

Quote:

Originally Posted by kh99 (Post 2189832)
I think you want different values for those, like instead of making them both '1' make the second one '2'.

Oh woops! I did that, it's still not saving the value.

Edit:
Correction, it does work. The bitfields had just not been rebuilt. Now I just don't know how to call on each bitfield independently, any help there?

Artistichaven 04-30-2011 09:04 PM

Does anyone have any idea on how to make each bitfield save separately so that I can call on them individually?

kh99 04-30-2011 09:23 PM

I'm not sure what you're doing exaclty - how are you trying to save them?

Artistichaven 05-01-2011 03:01 PM

Quote:

Originally Posted by kh99 (Post 2190472)
I'm not sure what you're doing exaclty - how are you trying to save them?

I'm not doing anything but the bitfields... :erm:

Artistichaven 05-06-2011 06:04 PM

It has been nearly a week. Any ideas?

Artistichaven 05-09-2011 10:47 PM

Sorry to be a hassle, but I need this solved. If anyone knows, it would be greatly appreciated.

kh99 05-09-2011 10:59 PM

I'll try to help you figure it out, but I don't understand what you're doing. What exactly are you doing with the xml in the first post, and what do you mean by "making them save"?

Artistichaven 05-11-2011 09:54 AM

Basically if you click yes to 'isserverstaff' then 'serverstuff' adds one to itself for that usergroup. But if you click 'isbetatester' then 'serverstuff' adds two to itself. Meaning that if I try and call on 'serverstuff' the current way I cannot have the 'isbetatester' field because I call on it with something like $permissions['serverstuff']. I want to be able to check if the person isserverstaff, not just serverstuff. Make more sense?

kh99 05-11-2011 10:31 AM

Code:

if ($permissions['serverstuff'] & 1)
    // isserverstaff

if ($permissions['serverstuff'] & 2)
    // isbetatester


You didn't say exactly where you added your xml, but I think you should be able to do something like this code (which obviously checks forumpermissions):
Code:

$permissions['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview']

by replacing 'bf_ugp_forumpermissions' with whatever is appropriate for your bitfields, that way you're not hard-coding the values.


Maybe this article will help: https://vborg.vbsupport.ru/showthread.php?t=166940


All times are GMT. The time now is 08:09 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.01297 seconds
  • Memory Usage 1,733KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)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