Search Results for 'private'
-
AuthorSearch Results
-
October 3, 2013 at 2:59 am #172233
In reply to: Making Buddypress Private.
c.ogden
ParticipantSweet thanks! I gave your app 5 stars.
October 3, 2013 at 1:56 am #172232In reply to: Making Buddypress Private.
bp-help
Participant@cogden-1
Try this plugin I made. This only makes BuddyPress and bbPress private.
https://wordpress.org/plugins/private-bp-pages/
Also make sure you read the FAQ first:
https://wordpress.org/plugins/private-bp-pages/faq/
Make sure you clear the previous code out of bp-custom.php that you posted above!October 3, 2013 at 1:12 am #172230In reply to: Making Buddypress Private.
c.ogden
Participantweird (doesn’t let me edit my post to check the box for recieve email notifications for replies, so I had to post a reply to check the box
October 2, 2013 at 1:58 pm #172199In reply to: Private Group Request Notification
Zane
ParticipantThanks! There it is 🙂
So there appears to be an issue with my user receiving emails from the site. I triple checked my profile email address with no luck. No messages to my spam folder or anything. Any idea’s what might cause all notifications for my admin user to be disabled?
October 2, 2013 at 1:44 pm #172198In reply to: registration form with minimum age
bp-help
ParticipantOctober 2, 2013 at 7:04 am #172172In reply to: Private Group Request Notification
bp-help
Participant@zane
When you are logged in hover the “My Account Menu” in the top right. Then click Settings/Notifications. On the next screen scroll down towards the bottom. Under “Groups” select “Yes” to the right of “A member requests to join a private group for which you are an admin.”October 1, 2013 at 4:06 pm #172119In reply to: create group"/> at top of page
Permakultur-Netzwerk
ParticipantHere are the details:
Wordpress 3.6.1
Plugins:
Buddypress 1.8.1
bbpress 2.4
Private Community For BP Lite 4.0
BePro Listings 1.2.35September 30, 2013 at 9:14 pm #172062In reply to: Duplicate Avatars in Activity Stream
Uncle Jimmy
Participant@Shanebp and @mercime [RESOLVED]
The following file was responsible. Comments marked !!!IMPORTANT!!! are where I made changes.
wp-content/plugins/gantry-buddypress/bpt-functions.php
<?php /** * @version 1.3 November 8, 2012 * @author RocketTheme, LLC http://www.rockettheme.com * @copyright Copyright © 2007 - 2012 RocketTheme, LLC * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only */ // Sets up WordPress theme for BuddyPress support. function gantry_bp_tpack_theme_setup() { global $bp, $gantry_bp_path; // Load the default BuddyPress AJAX functions if it isn't explicitly disabled require_once( $gantry_bp_path . '/_inc/ajax.php' ); if ( !is_admin() ) { ///!!!IMPORTANT!!!/// COMMENTED OUT BY UNCLEJIMMY [[FIXED MEMBER HEADER DUPLICATE BUTTONS Friends/Public Message/Private Message]] ///!!!IMPORTANT!!!/// ///!!!IMPORTANT!!!/// [[ALSO REDUCED QUADRUPAL MESSAGES/COMMENTS/REPLIES TO DUPLICATES]] ///!!!IMPORTANT!!!/// // Register buttons for the relevant component templates // Friends button //if ( bp_is_active( 'friends' ) ) //add_action( 'bp_member_header_actions', 'bp_add_friend_button' ); // Activity button //if ( bp_is_active( 'activity' ) ) //add_action( 'bp_member_header_actions', 'bp_send_public_message_button' ); // Messages button //if ( bp_is_active( 'messages' ) ) //add_action( 'bp_member_header_actions', 'bp_send_private_message_button' ); // Group buttons if ( bp_is_active( 'groups' ) ) { ///!!!IMPORTANT!!!/// COMMENTED OUT BY UNCLEJIMMY [[FIXED DUPLICATE GROUP BUTTON Join/Leave ]] ///!!!IMPORTANT!!!/// //add_action( 'bp_group_header_actions', 'bp_group_join_button' ); add_action( 'bp_group_header_actions', 'bp_group_new_topic_button' ); add_action( 'bp_directory_groups_actions', 'bp_group_join_button' ); } // Blog button if ( bp_is_active( 'blogs' ) ) add_action( 'bp_directory_blogs_actions', 'bp_blogs_visit_blog_button' ); } } add_action( 'after_setup_theme', 'gantry_bp_tpack_theme_setup', 11 ); // Enqueues BuddyPress JS and related AJAX functions function gantry_bp_enqueue_scripts() { // Enqueue the global JS - Ajax will not work without it wp_enqueue_script( 'dtheme-ajax-js', get_template_directory_uri() . '/_inc/global.js', array( 'jquery' ), bp_get_version() ); // Add words that we need to use in JS to the end of the page so they can be translated and still used. $params = array( 'my_favs' => __( 'My Favorites', 'buddypress' ), 'accepted' => __( 'Accepted', 'buddypress' ), 'rejected' => __( 'Rejected', 'buddypress' ), 'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ), 'show_x_comments' => __( 'Show all %d comments', 'buddypress' ), 'show_all' => __( 'Show all', 'buddypress' ), 'comments' => __( 'comments', 'buddypress' ), 'close' => __( 'Close', 'buddypress' ), 'view' => __( 'View', 'buddypress' ), 'mark_as_fav' => __( 'Favorite', 'buddypress' ), 'remove_fav' => __( 'Remove Favorite', 'buddypress' ), 'unsaved_changes' => __( 'Your profile has unsaved changes. If you leave the page, the changes will be lost.', 'buddypress' ), ); wp_localize_script( 'dtheme-ajax-js', 'BP_DTheme', $params ); // Maybe enqueue comment reply JS if ( is_singular() && bp_is_blog_page() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action('wp_enqueue_scripts', 'gantry_bp_enqueue_scripts'); // Enqueues BuddyPress basic styles function gantry_bp_enqueue_styles() { global $gantry_bp_url; // Do not enqueue CSS if it's disabled if (get_option( 'gantry_bp_disable_css' )) return; // BP 1.5+ if ( version_compare( BP_VERSION, '1.3', '>' ) ) { $stylesheet = 'bp.css'; // Bump this when changes are made to bust cache $version = '20110918'; } // Add the wireframe BP page styles wp_enqueue_style( 'bp', $gantry_bp_url . '/' . $stylesheet, array(), $version ); // Enqueue RTL styles for BP 1.5+ if ( version_compare( BP_VERSION, '1.3', '>' ) && is_rtl() ) wp_enqueue_style( 'bp-rtl', $gantry_bp_url . '/' . 'bp-rtl.css', array( 'bp' ), $version ); } add_action('wp_enqueue_scripts', 'gantry_bp_enqueue_styles'); // Gantry BuddyPress plugin doesn't use bp-default's built-in sidebar login block, // so during no access requests, we need to redirect them to wp-login for // authentication. if (!function_exists('gantry_bp_use_wplogin')) { function gantry_bp_use_wplogin() { // returning 2 will automatically use wp-login return 2; } add_filter('bp_no_access_mode', 'gantry_bp_use_wplogin' ); } // Hooks into the 'bp_get_activity_action_pre_meta' action to add secondary activity avatar support function gantry_bp_activity_secondary_avatars( $action, $activity ) { // sanity check - some older versions of BP do not utilize secondary activity avatars if ( function_exists( 'bp_get_activity_secondary_avatar' ) ) : switch ( $activity->component ) { case 'groups' : case 'friends' : // Only insert avatar if one exists if ( $secondary_avatar = bp_get_activity_secondary_avatar() ) { $reverse_content = strrev( $action ); $position = strpos( $reverse_content, 'a<' ); $action = substr_replace( $action, $secondary_avatar, -$position - 2, 0 ); } break; } endif; return $action; } ///!!!IMPORTANT!!!/// COMMENTED OUT BY UNCLEJIMMY [[FIXED DUPLICATE AVTIVITY STREAM AVATARS]] ///!!!IMPORTANT!!!/// ///!!!IMPORTANT!!!/// [[ALSO FIXED DUPLICATE MESSAGES/COMMENTS/REPLIES]] ///!!!IMPORTANT!!!/// //add_filter('bp_get_activity_action_pre_meta', 'gantry_bp_activity_secondary_avatars', 10, 2);Thank you for your time and attention, please let me know if I could’ve done this better.
God Bless
September 30, 2013 at 10:32 am #172020In reply to: Bugs between bbpress and Buddypress
seamtv
ParticipantI can now confirm that there are problems between the integration of bbPress 2.4 and buddypress 1.81.
It turns out that there’s a bug in bbPress 2.4 that does not allow the admin to make a Forum ‘private’ or ‘hidden’. At the moment, the only workaround is to use the bulk edit facility to apply the ‘private’ setting to a forum (but, not, sadly the ‘hidden’ attribute as of yet).
In other words, if you go into the forum setting for the individual forum on the back-end and change the attribute there, it won’t stick. The forum comes back again as ‘Public’.
I used the build editor to change my forum to ‘Private’ and that stopped the replies to topic posts from being broadcast to everyone in the buddypress sitewide activity page. Now, I’m waiting for the ability to make the forums ‘hidden’ for extra security. In the meantime, I’ve been using s2member to lock down the content of the bbPress Group forum. This ONLY works for Group forums, because their topics have a forum-specific URI structure (so URI-restrictions can be used; e.g. ‘/group/<name of group>/forum/’)… whereas non-Group forums just have the ‘/topic/’ URI which is sitewide and cannot be restricted by a particular forum name. This is lamentable, as bbPress is very hard to lock-down otherwise.
It’s taken me many hours to track down all of these niggly problems, which is frustrating, since bbPress and buddypress are meant to be integrated now. So, it seems as if the integration is mucky.
Given all the user confusion regarding forum attributes in bbPress and forum security in buddypress, I would really love to see the development teams come up with a simple, unified interface for managing memberships and access restrictions. Otherwise, we’ll all end up chasing settings in different places, without really understanding their interplay.September 30, 2013 at 10:28 am #172019seamtv
ParticipantThis is definitely part of the problem that I’m having. It turns out that there’s a bug in bbPress 2.4 that does not allow the admin to make a Forum ‘private’ or ‘hidden’. At the moment, the only workaround is to use the bulk edit facility to apply the ‘private’ setting to a forum (but, not, sadly the ‘hidden’ attribute as of yet).
In other words, if you go into the forum setting for the individual forum on the back-end and change the attribute there, it won’t stick. The forum comes back again as ‘Public’.
I used the build editor to change my forum to ‘Private’ and that stopped the replies to topic posts from being broadcast to everyone in the buddypress sitewide activity page. Now, I’m waiting for the ability to make the forums ‘hidden’ for extra security. In the meantime, I’ve been using s2member to lock down the content of the bbPress Group forum. This ONLY works for Group forums, because their topics have a forum-specific URI structure (so URI-restrictions can be used; e.g. ‘/group/<name of group>/forum/’)… whereas non-Group forums just have the ‘/topic/’ URI which is sitewide and cannot be restricted by a particular forum name. This is lamentable, as bbPress is very hard to lock-down otherwise.
It’s taken me many hours to track down all of these niggly problems, which is frustrating, since bbPress and buddypress are meant to be integrated now. So, it seems as if the integration is mucky.
Given all the user confusion regarding forum attributes in bbPress and forum security in buddypress, I would really love to see the development teams come up with a simple, unified interface for managing memberships and access restrictions. Otherwise, we’ll all end up chasing settings in different places, without really understanding their interplay.September 30, 2013 at 9:21 am #172017seamtv
ParticipantActually, this problem is not resolved and appears to be pretty bad. Here’s my rundown:
I think the problem has to do with buddypress – bbPress integration.
The bbPress Group Forums appear to be set to ‘Open’ by default, even if they are hidden within buddypress. In fact, I cannot alter this. I tried changing my secret forum to ‘hidden’ within bbPress (2.4) and it won’t save the change – it always comes back as ‘open’.
Therefore, it’s up to buddypress to manage the privacy of the forum. It seems to be doing this with new topic posts (I can confirm that hide_sitewide in the activity stream table is “1” for new posts). The problem is that if someone replies to that post, the hide_sitewide for that reply is set to “0”, even though it’s inside of a ‘hidden’ group forum. To me, this is a serious security breach, as it exposes the forum name, the original topic name, and the contents of the reply in EVERYONE’s Activity stream, whether they are logged in or not, a member of the hidden forum or not.September 30, 2013 at 9:19 am #172016seamtv
ParticipantI think the problem has to do with buddypress – bbPress integration.
The bbPress Group Forums appear to be set to ‘Open’ by default, even if they are hidden within buddypress. In fact, I cannot alter this. I tried changing my secret forum to ‘hidden’ within bbPress (2.4) and it won’t save the change – it always comes back as ‘open’.
Therefore, it’s up to buddypress to manage the privacy of the forum. It seems to be doing this with new topic posts (I can confirm that hide_sitewide in the activity stream table is “1” for new posts). The problem is that if someone replies to that post, the hide_sitewide for that reply is set to “0”, even though it’s inside of a ‘hidden’ group forum. To me, this is a serious security breach, as it exposes the forum name, the original topic name, and the contents of the reply in EVERYONE’s Activity stream, whether they are logged in or not, a member of the hidden forum or not.September 29, 2013 at 10:22 pm #171982In reply to: Does anyone know if this is even possible?
bp-help
Participant@blogminded @tripvips
That would work fine unless the site admin was using a plugin like:
https://wordpress.org/plugins/private-community-for-bp-lite/
Then that URL would be useless and they would just get redirected but maybe this person is not using a plugin that restricts logged out visitors from the site so your idea may work for them.September 29, 2013 at 2:56 am #171950In reply to: considering BuddyPress
modemlooper
Moderator1. members are searched by profile fields
2. you can create unlimited profile fields
3. there may be an events plugin
4. BP has invite only private groups
5. there was a geo plugin, not sure its up to date
6. members are unlimitedSeptember 27, 2013 at 6:49 pm #171912Peter Hardy-vanDoorn
ParticipantWell, I’ve solved the problem – or, at least, what was causing MY problem – others may be having different issues.
Background: I originally set up this site in BP 1.6. When 1.7 came along and the old built-in forum system was deprecated, I installed bbPress 2.3 as instructed and it migrated all of my forums over to the new system.
So, I naturally assumed that all of the settings would be taken over too. I’ve just looked at the individual forums and have noticed that they have all had their Visibility set to Public, even though they are in Private or Hidden groups!
So, setting the visibility to what it should be has solved the problem.
HOWEVER, I do still consider there to be at least 3 bugs in the BuddyPress / bbPress software:
1. When the forums were converted from bbPress 1.x to 2.x they should have had their visibility set correctly.
2. The forums are all hosted within groups. Forums like this should respect the group’s Privacy settings.
3. Even if you should set a Public forum within a Private group, the posts should not appear in non-members’ activity feeds. The forum itself is not visitable, neither are its individual posts.Peter
September 27, 2013 at 5:59 pm #171909seamtv
ParticipantWell, that sorta fixed it. The topic posts don’t show up but the replies to those posts still do.
September 27, 2013 at 4:12 pm #171907seamtv
ParticipantI think the problem is coming from my caching scheme!
I deactivated all cachine (except Varnish) and it looks like the hide_sitewide is being obeyed. Hmmm. I specifically told the caching plugin to NOT cache the /activity URI but it ignored this request, it seems!September 27, 2013 at 4:03 pm #171904seamtv
ParticipantI have the same problem. However, my hide_sitewide values are “1” for private forum entries, but are being completely ignored with the sitewide activity is shown.
I, too, upgraded from legacy groups to sitewide forums.
I am running bbPress 2.4 with buddypress 1.8.1
I have run the forum tools script to repair hidden forums, but this hasn’t made a difference.
I’m really worried about this security breach and – despite seeing a number of posts in here pointing this out – the development team seem unable to recreate it at their end. Nevertheless, it seems it is affecting people like us and we need to lock it down ASAP.
Thanks.September 27, 2013 at 3:52 pm #171903seamtv
ParticipantI’ve been having the same problem. It’s a huge security breach and I’d love to get to the bottom of it. I’m using buddypress 1.8.1 and bbpress 2.4.
It’s actually really scary, since my private forums are having sensitive conversations that they believe to be private when, in fact, they are being broadcast in their entirety to everyone. This is horrendous.September 26, 2013 at 5:06 am #171831In reply to: LInk to inbox / sent messages
Arial Burnz
ParticipantI’m having a problem that I’m hoping the above situation will fix, but I need more information on how to utilize what’s above.
Problem: WordPress toolbar is NOT showing up in MSIE, Firefox or Safari browsers. It IS showing in the Google Chrome browser. I’ve tried logging in with different accounts to see if it’s related to the login, but it’s the same – admin or member account – no toolbar. ALSO it’s the same with my other WordPress site – both are on two different servers. However, if I go to a WordPress.com site (versus a WordPress installation on a server/private site), the WordPress toolbar IS available.
Since the WordPress toolbar is not available, I was hoping I could create menu tabs/options to get members easily to their BuddyPress inbox. The above information about building links from the sample structure is Greek to me. Where do I put that code? I’m using the Mantra Theme, so would I put it in the Custom CSS area? In the Appearance > Menu > Enter URL option? I’m thoroughly confused and I’m such a newb. Sorry!
Here’s the website I’m building: http://ilovevampirenovels.com/ravenousbooktours
Thank you!
Arial Burnz
Tour Host CoordinatorSeptember 22, 2013 at 10:38 pm #171677In reply to: Two installations have failed
Eric J T
ParticipantSorry I didn’t include the code for that. Yes, it is in the wp functions.php file, but it is relevant to bp theme. Here is the full function that line 100 is found in. Line 100 is the third to last, which starts with “add action”.
/** * Sets up theme defaults and registers support for various WordPress and BuddyPress features. * * Note that this function is hooked into the after_setup_theme hook, which runs * before the init hook. The init hook is too late for some features, such as indicating * support post thumbnails. * * To override bp_dtheme_setup() in a child theme, add your own bp_dtheme_setup to your child theme's * functions.php file. * * @global BuddyPress $bp The one true BuddyPress instance * @since BuddyPress (1.5) */ function bp_dtheme_setup() { // Load the AJAX functions for the theme require( get_template_directory() . '/_inc/ajax.php' ); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); // This theme comes with all the BuddyPress goodies add_theme_support( 'buddypress' ); // This theme uses post thumbnails add_theme_support( 'post-thumbnails' ); // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); if ( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { // Register buttons for the relevant component templates // Friends button if ( bp_is_active( 'friends' ) ) add_action( 'bp_member_header_actions', 'bp_add_friend_button', 5 ); // Activity button if ( bp_is_active( 'activity' ) && bp_activity_do_mentions() ) add_action( 'bp_member_header_actions', 'bp_send_public_message_button', 20 ); // Messages button if ( bp_is_active( 'messages' ) ) add_action( 'bp_member_header_actions', 'bp_send_private_message_button', 20 ); // Group buttons if ( bp_is_active( 'groups' ) ) { add_action( 'bp_group_header_actions', 'bp_group_join_button', 5 ); add_action( 'bp_directory_groups_actions', 'bp_group_join_button' ); } // Blog button if ( bp_is_active( 'blogs' ) ) add_action( 'bp_directory_blogs_actions', 'bp_blogs_visit_blog_button' ); } } add_action( 'after_setup_theme', 'bp_dtheme_setup' ); endif; if ( !function_exists( 'bp_dtheme_enqueue_scripts' ) ) :In the first install the failed bp had been installed and working for a few days. It suddenly gave errors when I edited a css color code on line 1211 in this file and uploaded it to the server by ftp. Yeah, I know you might say I made a mistake, but I know I did it correctly. And they you might say the file got corrupted in transfer, except that the second install on godaddy had no such changes or transfers and in short order – less than an hour of use with no other plugins or style changes – gave the same final error for line 100 when I changed my public name in the buddypress members listing, at which point neither the front nor back ends were accessible.
Looking forward to your insights.
September 21, 2013 at 8:57 am #171610deepwave
ParticipantMay be related to: https://bbpress.trac.wordpress.org/ticket/2408
September 19, 2013 at 12:32 pm #171542In reply to: Why is site admin getting users' private messages?
rypo73
ParticipantWhere can I find out more about this? How did you know that r-a-y?
September 19, 2013 at 1:50 am #171527In reply to: Why is site admin getting users' private messages?
r-a-y
KeymasterIt’s most likely the fact that one of your users was replying to the private message via email.
Replying to a private message via email does not post a PM back to the user. In this case, these emails usually get sent to the site admin.
September 16, 2013 at 12:40 pm #171378In reply to: Plugin Dev – Group Admin Add subnav form nonce fails
dmpastuf
ParticipantWhen I post my custom form on a custom tab, I get a wordpress “Are you sure?” page (i.e. a wp_nonce_ays). Not so much an error as a failure (i.e. I’d expect nonce to be causing what its causing, but have no idea what field is doing so).
Here’s the code I’m using for one of the two form tabs:
add_action('bp_init', 'bpcivi_addgroupeditnav1'); function bpcivi_addgroupeditnav1() { if ( class_exists( 'BP_Group_Extension' ) ) { // Recommended, to prevent problems during upgrade or when Groups are disabled //Run to find out if a chapter global $wpdb; global $bp; $bpcivi_ck_currgroup = $bp->groups->current_group->id; if(is_numeric($bpcivi_ck_currgroup)) { //Check if the group is set $bpcivi_ck_querytext = 'SELECT * FROM <code>wp_bpcivi_groupsync</code> WHERE <code>buddypress_group</code> =' . $bpcivi_ck_currgroup; $bpcivi_ck_settinggroups = $wpdb->get_results($bpcivi_ck_querytext); } class BPCivigroupedit extends BP_Group_Extension { function __construct() { $this->name = 'Edit Chapter Info'; $this->slug = 'bpcivi-groupedit'; $this->nav_item_position = 2; $this->visibility = 'private'; $this->enable_nav_item = false; $this->enable_create_step = false; } /** * The content of the My Group Extension tab of the group admin */ function edit_screen() { if ( !bp_is_group_admin_screen( $this->slug ) ) return false; //Include Files include_once(ABSPATH . '/wp-blog-header.php'); include_once(ABSPATH . 'wp-content/plugins/civicrm/civicrm.settings.php'); include_once(ABSPATH . 'wp-content/plugins/civicrm/civicrm/CRM/Core/Config.php'); include_once(ABSPATH . 'wp-content/plugins/civicrm/civicrm/civicrm.config.php'); $config = CRM_Core_Config::singleton(); global $wpdb; global $bp; //Current Buddypress Group $bpcivi_currgroup = $bp->groups->current_group->id; //Run Query on DB $bpvivi_querytext = 'SELECT * FROM <code>wp_bpcivi_groupsync</code> WHERE <code>buddypress_group</code> =' . $bpcivi_currgroup; $bpcivisync_settinggroups = $wpdb->get_results($bpvivi_querytext); //Assign to array from first membership found - oldest set effectively $bpcivi_groupsettings = get_object_vars($bpcivisync_settinggroups[0]); //Form Reaction TODO if (isset($_POST['groupeditsubmit'])) { //Contact Update $bpcivi_groupupdateparams = array('version' => 3,'page' => 'CiviCRM','q' => 'civicrm/ajax/rest','sequential' => 1, 'id' => $bpcivi_groupsettings['orgid'], 'organization_name' => $_POST['orgname'], 'legal_name' => $_POST['legalname'], 'nick_name' =>$_POST['nickname'], ); $bpcivi_groupeditpostresult = civicrm_api('Contact', 'create', $bpcivi_groupupdateparams); //Address Update $bpcivi_groupaddressupdateparams = array('version' => 3,'page' => 'CiviCRM','q' => 'civicrm/ajax/rest','sequential' => 1, 'id' => $_POST['addressid'], 'street_address' => $_POST['street1'], 'supplemental_address_1' => $_POST['street2'], 'supplemental_address_2' => $_POST['street3'], 'city' => $_POST['city1'], 'geo_code_1' => $_POST['latitude'], 'geo_code_2' => $_POST['longitude'], 'state_province_id' => $_POST['state'], ); $bpcivi_groupaddresseditpostresult = civicrm_api('Address', 'create', $bpcivi_groupaddressupdateparams); //Website Update $bpcivi_groupwebupdateparams = array('version' => 3,'page' => 'CiviCRM','q' => 'civicrm/ajax/rest','sequential' => 1, 'id' => $_POST['webid'], 'url' => $_POST['website1'], ); $bpcivi_groupwebupdateresult = civicrm_api('Website', 'create', $bpcivi_groupwebupdateparams); /*//Diagnostics echo "Being Sent to API - Address: <pre>"; print_r($bpcivi_groupwebupdateresult); echo "<pre>";*/ } //Run Query API Against Group $bpcivi_groupeditparams = array('version' => 3,'page' => 'CiviCRM','q' => 'civicrm/ajax/rest','sequential' => 1, 'contact_id' => $bpcivi_groupsettings['orgid'],); $bpcivi_groupeditresult = civicrm_api('Contact', 'get', $bpcivi_groupeditparams); //Array of assignments $bpcivi_groupedit_orgname = $bpcivi_groupeditresult['values'][0]['organization_name']; $bpcivi_groupedit_legalname = $bpcivi_groupeditresult['values'][0]['legal_name']; $bpcivi_groupedit_nickname = $bpcivi_groupeditresult['values'][0]['nick_name']; $bpcivi_groupedit_streetaddress = $bpcivi_groupeditresult['values'][0]['street_address']; $bpcivi_groupedit_supplemental_address_1 = $bpcivi_groupeditresult['values'][0]['supplemental_address_1']; $bpcivi_groupedit_supplemental_address_2 = $bpcivi_groupeditresult['values'][0]['supplemental_address_2']; $bpcivi_groupedit_city = $bpcivi_groupeditresult['values'][0]['city']; $bpcivi_groupedit_geo_code_1 = $bpcivi_groupeditresult['values'][0]['geo_code_1']; $bpcivi_groupedit_geo_code_2 = $bpcivi_groupeditresult['values'][0]['geo_code_2']; $bpcivi_groupedit_state_province_id = $bpcivi_groupeditresult['values'][0]['state_province_id']; $bpcivi_groupedit_country_id = $bpcivi_groupeditresult['values'][0]['country_id']; //Organization Website Query $bpcivi_groupeditwebsiteparams = array('version' => 3,'page' => 'CiviCRM','q' => 'civicrm/ajax/rest','sequential' => 1, 'contact_id' => $bpcivi_groupsettings['orgid'],); $bpcivi_groupeditwebsiteresult = civicrm_api('Website', 'get', $bpcivi_groupeditwebsiteparams); $bpcivi_groupedit_website1 = $bpcivi_groupeditwebsiteresult['values'][0]['url']; //Get the states list $bpcivi_statesparams = array('version' => 3,'page' => 'CiviCRM','q' => 'civicrm/ajax/rest','name' => 'stateProvince',); $bpcivi_statesresult = civicrm_api('Constant', 'get', $bpcivi_statesparams); $bpcivi_statesresultarr = $bpcivi_statesresult['values']; $bpcivi_statesresultarrkeyd = array_values($bpcivi_statesresultarr); $bpcivi_statesresultarrkeys = array_keys($bpcivi_statesresultarr); //Get the Countries list $bpcivi_countriesparams = array('version' => 3,'page' => 'CiviCRM','q' => 'civicrm/ajax/rest','name' => 'country',); $bpcivi_countriesresult = civicrm_api('Constant', 'get', $bpcivi_countriesparams); $bpcivi_countriesresultarr = $bpcivi_countriesresult['values']; $bpcivi_countriesresultarrkeyd = array_values($bpcivi_countriesresultarr); $bpcivi_countriesresultarrkeys = array_keys($bpcivi_countriesresultarr); //Display Form echo '<div id="bpcivigroupeditform">'; echo '<form action="" method="post">'; echo '<input type="hidden" name="addressid" value="' . $bpcivi_groupeditresult['values'][0]['address_id'] . '">'; echo '<input type="hidden" name="webid" value="' . $bpcivi_groupeditwebsiteresult['values'][0]['id'] . '">'; echo '<table border=1>'; echo "<tr><td>" . "Organization Name" . "</td><td>" . '<input type="text" name="orgname" value="' .$bpcivi_groupedit_orgname . '"></td><tr>'; echo "<tr><td>" . "Legal Name" . "</td><td>" . '<input type="text" name="legalname" value="' .$bpcivi_groupedit_legalname . '"></td><tr>'; echo "<tr><td>" . "Nickname" . "</td><td>" . '<input type="text" name="nickname" value="' .$bpcivi_groupedit_nickname . '"></td><tr>'; echo "<tr><td>" . "Website" . "</td><td>" . '<input type="url" name="website1" value="' .$bpcivi_groupedit_website1 . '"></td><tr>'; echo "<tr><td>" . "Street Address" . "</td><td>" . '<input type="text" name="street1" value="' .$bpcivi_groupedit_streetaddress . '"></td><tr>'; echo "<tr><td>" . "Street Address 2" . "</td><td>" . '<input type="text" name="street2" value="' .$bpcivi_groupedit_supplemental_address_1 . '"></td><tr>'; echo "<tr><td>" . "Street Address 3" . "</td><td>" . '<input type="text" name="street3" value="' .$bpcivi_groupedit_supplemental_address_2 . '"></td><tr>'; echo "<tr><td>" . "City" . "</td><td>" . '<input type="text" name="city1" value="' .$bpcivi_groupedit_city . '"></td><tr>'; echo "<tr><td>" . "Latitude" . "</td><td>" . '<input type="text" name="latitude" value="' .$bpcivi_groupedit_geo_code_1 . '"></td><tr>'; echo "<tr><td>" . "Longitude" . "</td><td>" . '<input type="text" name="longitude" value="' .$bpcivi_groupedit_geo_code_2 . '"></td><tr>'; echo "<tr><td>" . "State" . "</td><td>" . '<select name="state">'; for ($i=0;$i<count($bpcivi_statesresultarr);$i++) { if ($bpcivi_statesresultarrkeys[$i] == $bpcivi_groupedit_state_province_id) { echo '<option value="' . $bpcivi_statesresultarrkeys[$i] . '" selected>' . $bpcivi_statesresultarrkeyd[$i] . '</option>'; } else { echo '<option value="' . $bpcivi_statesresultarrkeys[$i] . '">' . $bpcivi_statesresultarrkeyd[$i] . '</option>'; } } echo '</select></td><tr>'; //value="' .$bpcivi_groupedit_state_province_id . '" echo "<tr><td>" . "Country" . "</td><td>" . '<input type="text" name="orgname" disabled value="' .$bpcivi_countriesresultarr[$bpcivi_groupedit_country_id] . '"></td><tr>'; echo '<tr><td colspan="2">' . '<input id="bpedit_submit" type="submit" name="groupeditsubmit" value="Submit">' . '</td></tr>'; echo "</table></form>"; echo "</div>"; //Diagnostics /* echo "<br>Post: <pre>"; print_r($_POST); echo "</pre>"; echo "<br>API Call: <pre>"; print_r($bpcivi_groupeditwebsiteresult); echo "</pre>"; */ } } if(count($bpcivi_ck_settinggroups) > 0) { //Make it so that the group exension is only used for chapter bp_register_group_extension( 'BPCivigroupedit' ); } } }This code is the initial code before I started adding the nonces to see if the problem could be resolved.
-
AuthorSearch Results