vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Convert Secondary UserGroup to Primary UserGroup (https://vborg.vbsupport.ru/showthread.php?t=73782)

trulylowcarb 03-06-2005 02:45 AM

I probably had a piece of the first hack left, Huang's, which I have since gotten to work.... thanks!

Cyricx 04-07-2005 02:59 PM

This works like a charm Marcoh!

Any idea how to do the check box that turns them all on or all off like the primary group has?

Thanks so much man!

Marco van Herwaarden 04-07-2005 04:14 PM

Quote:

Originally Posted by Cyricx
This works like a charm Marcoh!

Any idea how to do the check box that turns them all on or all off like the primary group has?

Thanks so much man!

In you includes/adminfunctions_user.php, find:
PHP Code:

// Start hack MarcoH64 
        
print_membergroup_row($vbphrase['additional_usergroups'], 'user[membergroupids]'2$userarray); 
        
// End hack MarcoH64 

Replace by:
PHP Code:

  // Start hack MarcoH64 
?>
<script type="text/javascript">
function check_all_additional_usergroups(formobj, toggle_status)
{
 for (var i = 0; i < formobj.elements.length; i++)
 {
  var elm = formobj.elements[i];
  if (elm.type == "checkbox" && elm.name == 'user[membergroupids][]')
  {
   elm.checked = toggle_status;
  }
 }
}
</script>
<?php
  print_checkbox_row
($vbphrase['all_usergroups'] . " (Additional)"'usergroup_additional_all'0, -1$vbphrase['all_usergroups'] . " (Additional)"'check_all_additional_usergroups(this.form, this.checked);');
    
print_membergroup_row($vbphrase['additional_usergroups'], 'user[membergroupids]'2$userarray); 
    
// End hack MarcoH64

Again please test on a testboard first.

Marco van Herwaarden 04-07-2005 04:16 PM

Quote:

Originally Posted by JustAskJulie
Thanks, I'll give it a try.

Still no feedback? It was made for you ;)

arob42 05-16-2005 02:18 AM

Well, I added this to my website and it works great! I'll check out your Thread of the Week Hack next. Thanks!

Marco van Herwaarden 05-16-2005 07:56 AM

Thanks, maybe i should release this as a hack instead of just an answer in a thread.

henken 09-08-2005 02:45 PM

Quote:

Originally Posted by MarcoH64
No feedback? Did this solve your problem?


This works great. Thank you very much MarcoH64. Much appreciated. This should be noted by the vB staff and added as a next function in their upcoming releases :)

Marco van Herwaarden 09-08-2005 07:52 PM

Hehe, a bit late for 3.5, but nice that it works for you. :D

Boofo 09-08-2005 08:18 PM

Quote:

Originally Posted by MarcoH64
Hehe, a bit late for 3.5, but nice that it works for you. :D

Can you do this for 3.5? ;)

Marco van Herwaarden 09-09-2005 03:14 AM

I might have a look at it. Bump me again if i forget. :D


All times are GMT. The time now is 05:56 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.02409 seconds
  • Memory Usage 1,737KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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