View Single Post
  #8  
Old 04-03-2005, 01:01 AM
why-not why-not is offline
 
Join Date: Feb 2004
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why not just add a column to to the usertextfield table 'usercolor', then add a bitwize value to your usergroup permissions 'genericoptions' because it not used much, then add two properties in the usergroup!

1. User can select color for username: Yes/No
2. If (1) = NO enter a color for the username!

Edits...

(1) Admin Panel edit (usergroup.php)

(1) Profile options edit (profile.php)

(1) database change (usertextfield) table alter ADD char (6) column

(2) include file type edits (init.php => to add the bitwise permission, functions_showthread.php to add the color if() block question) ie: does user have permission (yes/no) yes change color, no use default color!

I might not put it in the functions_showthread.php but instead just put it in showthread.php, but I am thinking functions_showthread.php will be the best place for it. I will have to look, when I get home.

If what I said is fine I will make it real quick when I get home in few hours! If you want me to do it then you will need to do the following!

Create 8 phrases (2) to use in the user group permissions, and the other (6) for the admin help! I'll do one, so you see what I mean, if you want to change there value(s) go head!

Once I see you have these done, I will do the mod real quick. I would write the phrases myself, but having written almost 400 of them in the last two days, I can not bear to write to many more at the moment! So you help me and help your self and I will do the code part!

Code:
INSERT INTO xx_prefix_phrase VALUES ('', -1, 'can_select_color', 'User Group Can Select User Name Font Color', 3);


INSERT INTO prefix_phrase VALUES ( '', -1, 'usergroup_add_edit_canselectcolor_title', 'User Group Can Select User Name Font Color', 6000);
INSERT INTO prefix_phrase VALUES ( '', -1, 'usergroup_add_edit_canselectcolor_text', 'Selecting (yes) will allow this user group the permission to change colors for their username. It will also display the color selector in the users options menu found in user control panel options menu.', 6000 );
INSERT INTO prefix_adminhelp VALUES ( '', 'usergroup', 'add,edit', 'canselectcolor', 706, 1 );

// you do this one


INSERT INTO xx_prefix_phrase VALUES ('', -1, 'user_default_color', '', 3);

INSERT INTO prefix_phrase VALUES ( '', -1, 'usergroup_add_edit_userdefaultcolor_title', '', 6000 );
INSERT INTO prefix_phrase VALUES ( '', -1, 'usergroup_add_edit_userdefaultcolor_text', '', 6000 );
INSERT INTO prefix_adminhelp VALUES ( '', 'usergroup', 'add,edit', 'userdefaultcolor', 707, 1 );

Sonia
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01058 seconds
  • Memory Usage 1,769KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete