Results 1 to 7 of 7

Thread: Connection between 2 groups

  1. #1
    Join Date
    Mar 2018

    Connection between 2 groups

    I have a social website with groups and events . Each group have 30 people maximum. All the groups are 100. What I want to do is : I want to create a button that will create events between that 2 groups. Example let's say we have 2 groups, group a and group b. Each group have button with the name "new event" when the group b press the "new event" button from the group a, if the group a accept it then I want to automatically create new page that will have access the group a and group b together to share photos, chat etc. How can I do that? If is possible. Right now I have WordPress buddypress community. Is not necessary to use WordPress. I can start from the begin. Any ideas?

  2. #2
    Join Date
    Jul 2013
    Voorheesville NY USA
    You have 100 groups max? You have a button that will create events between "that 2 groups"? Which two groups? What does it mean to say 'each group have button with the name new event'? How does that button know which groups to use?

    I hope you can see how poorly you have described this project to an outsider.
    PS - If you're posting here you should be using:

    ini_set('display_errors', '1');

    at the top of ALL php code while you develop it!

  3. #3
    Join Date
    Aug 2004
    Well, if you start from scratch (as opposed to trying to figure out how to leverage a WordPress plug-in), then for me it would start with the database design. Assuming you have a "users" table and a "groups" table, you'd then also have a "user_to_group" relation table. Then if you have an "events" table, you would also need a "group_to_event" relation table, which would then allow you to assign multiple groups to any event. After that, if you know how to to joins in SQL, you can relatively easily build DB queries to figure out which events a given user would know about by joining between their user ID and the groups table (to find what groups they are in) and then joining on the events table.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  4. #4
    Join Date
    Mar 2018
    Why you have to be so rude?

  5. #5
    Join Date
    Mar 2018
    Thank you very much for your help. I will check all the informations that you gave me

  6. #6
    Join Date
    Jul 2013
    Voorheesville NY USA
    I did not try to be rude. I tried to give you back the thoughts in my head that I had as a result of your poorly written description of whatever it is you are trying to do.

    You say you have up to 100 groups. You then propose working with just 2 of them. How did they get selected? Does the user see them all on his screen and choose the 2 he wants?
    PS - If you're posting here you should be using:

    ini_set('display_errors', '1');

    at the top of ALL php code while you develop it!

  7. #7
    Join Date
    Mar 2007
    You have not specified if the team has to play every team on the system or not.

    The simplest way I can think of is to have the page that you designate for the purpose of issuing a request is a drop down list, eg... a rough idea here is to have the challenger name written in to afield

    PHP Code:
    <script>function check( sel ){
    var formAction = document.forms.issueChallenge;
    if( sel.selectedIndex != 0 ){ // we will output an object reference, also set the action of the form.
        formAction.action = "yourFormHandler.php";
        formAction.Submit.disabled = false;
        }else{ // change the form and button state
            formAction.action = "javascript:;";
            formAction.Submit.disabled = true;
    <form name="issueChallenge" action="javascript:;" method="post" enctype="mutlipart/form-data" >
        <input name="teamId" type="hidden" value="<?php echo $teamID?>" readonly >  
        <input name="teamname" type="text" value="<?php echo $challenger?>" readonly ><br><hr><br>
        <select name="opposition" size="1" onchange="check( this )">
            <option value="-1" selected>Please Select a Team to Challenge</option>
            <?php  // call a function to run a database query of your teams available but not the challenger!
    $teams $db->querysprintf("SELECT * FROM teams WHERE teamname!='%s';",$challenger) );
    $team=$teams->fetchArray() )
    sprintf("<option value=\"%s\">%s</option>",$team['id'],$team['name']);
    <input name="Submit" type="submit" value="Challenge Team" disabled>
    So using a database will remove some of the scripting needed to check if a team exists or not, by outputting a list of teams in the database, negating the challenger, leads to a simpler team listing.

    You haven't produced any code of your own for anyone to go on to see what direction you were going in, so it helps if you provide an example of what you have worked on so far.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.12963 seconds
  • Memory Usage 2,926KB
  • Queries Executed 15 (?)
More Information
Template Usage (33):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (7)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (71):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates