Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-30-2007, 08:55 PM
Coders Shack Coders Shack is offline
 
Join Date: Apr 2007
Location: Culver City, CA
Posts: 807
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Product ACP Checkbox?

Is is possible to add checkbox options in the ACP for products?
Reply With Quote
  #2  
Old 10-30-2007, 11:10 PM
Analogpoint's Avatar
Analogpoint Analogpoint is offline
 
Join Date: Feb 2007
Posts: 656
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure, go in debug mode and examine one of the built-in options that uses checkboxes.
Reply With Quote
  #3  
Old 10-31-2007, 12:20 AM
Coders Shack Coders Shack is offline
 
Join Date: Apr 2007
Location: Culver City, CA
Posts: 807
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm
Code:
		<settinggroup name="bbcode" displayorder="300">
			<setting varname="allowedbbcodes" displayorder="10">
				<datatype>bitfield</datatype>
				<optioncode>bitfield:nocache|allowedbbcodes</optioncode>
				<defaultvalue>1023</defaultvalue>
			</setting>
		</settinggroup>
is an example of a checkbox optioncode if put in a install product and its using the bit field option (bitfiled_vbulletin.xml)
Code:
			<group name="allowedbbcodes">
				<bitfield name="allow_bbcode_basic">1</bitfield>
				<bitfield name="allow_bbcode_color">2</bitfield>
				<bitfield name="allow_bbcode_size">4</bitfield>
				<bitfield name="allow_bbcode_font">8</bitfield>
				<bitfield name="allow_bbcode_align">16</bitfield>
				<bitfield name="allow_bbcode_list">32</bitfield>
				<bitfield name="allow_bbcode_link">64</bitfield>
				<bitfield name="allow_bbcode_code">128</bitfield>
				<bitfield name="allow_bbcode_php">256</bitfield>
				<bitfield name="allow_bbcode_html">512</bitfield>
			</group>
my question is how can i create a checkbox field from a product install. (im tryin lol)

--------------- Added [DATE]1193862860[/DATE] at [TIME]1193862860[/TIME] ---------------

i still cant figure it out.
Reply With Quote
  #4  
Old 11-01-2007, 04:43 AM
Coders Shack Coders Shack is offline
 
Join Date: Apr 2007
Location: Culver City, CA
Posts: 807
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone?
Reply With Quote
  #5  
Old 11-01-2007, 06:38 AM
Analogpoint's Avatar
Analogpoint Analogpoint is offline
 
Join Date: Feb 2007
Posts: 656
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Examine the Inferno vBshout mod, it uses them.
Reply With Quote
  #6  
Old 11-01-2007, 02:03 PM
Coders Shack Coders Shack is offline
 
Join Date: Apr 2007
Location: Culver City, CA
Posts: 807
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Analogpoint View Post
Examine the Inferno vBshout mod, it uses them.
thx man!
Reply With Quote
  #7  
Old 11-01-2007, 02:51 PM
Analogpoint's Avatar
Analogpoint Analogpoint is offline
 
Join Date: Feb 2007
Posts: 656
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Coders Shack View Post
thx man!
No problem. I've never had to use them, so I can't offer any direct help, but hopefully you can figure something out from the examples.
Reply With Quote
  #8  
Old 11-03-2007, 01:00 AM
Coders Shack Coders Shack is offline
 
Join Date: Apr 2007
Location: Culver City, CA
Posts: 807
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok so i was able to do it... Wow its easier than i though but still confusing how the actual check boxes are processed.

Values:
1
2
4
8
16
32
64
....

I used 19 boxes and it sure multiplies fast... the 20th box's value would be 524288 lol... around 35 the actual value length is over 11 digits and i think it may messup inside the database, im not sure.
Reply With Quote
  #9  
Old 11-03-2007, 04:00 AM
Analogpoint's Avatar
Analogpoint Analogpoint is offline
 
Join Date: Feb 2007
Posts: 656
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How is the bitfield represented in vB's php code? If it's an int it should be 32 bits on most hardware, giving you a max value of about 2 billion. There shouldn't be any problems in the database, since setting values are stored as text.
Reply With Quote
  #10  
Old 11-03-2007, 04:21 AM
Coders Shack Coders Shack is offline
 
Join Date: Apr 2007
Location: Culver City, CA
Posts: 807
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh i thought they were stored in an INT field, INT is 11
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:19 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.04168 seconds
  • Memory Usage 2,248KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete