Forum Replies Created
-
hey dude, all depends on how many people would want it as a plugin and it may have already been done before.
with David having a very specific case it was ok here but would need some more work to be practical.
if you need some help getting something like this working you could describe what you need, what theme you have etc and maybe take it from there.
Wondering if we can migrate the fore-mentioned into a single-file.php temporarily and set the activity entry form action to the current page and call accordingly? (Which totally goes against the DRY principles, jquery.delegate has its bugs too. ahhhh)
Will give it a whirl tomorrow.
@djpaul it’s already in trac

In ajax.php there is a function
`function bp_dtheme_new_activity_comment()`
On line 194
`check_admin_referer( ‘new_activity_comment’, ‘_wpnonce_new_activity_comment’ );`
In activity/entry.php The Nonce matches here.
“In buddypress/bp-activity/bp-activity-functions.php Line 912
function `function bp_activity_new_comment()`Which later calls on line 937
`bp_activity_add($args)`
$args being sent from the form.
Within the same file there is the function above which preps the data by merging and ostracising into var names.
It then used the BP_Activity_Activity class located in buddypress/activity/bp-activity-classes.php
and checks if the data could not be saved otherwise return the id of the entry.
BP_Activity_Activity instantiates all expected parameters initially with the id if passed. (i’m guessing for an output method).
Saving is the issue here and the method save() on line 62 has 3 global vars $wpdb, $bp and $current_user.
Saving allows for additional filters (to which extent is beyond me here) (… along with the rest).
*gets hairier here
Then…
It checks if some specific filters failed to return a value and if so returns false.
It checks for more specific filter return values and if false sets them to that of the matched user. (primary_link) specifically. How this is used in saving, can only hazard a guess that it’s for outputing a url to the activity stream for permalink.phphttp://site.com/members/admin/activity/6060842 for example.
Then using WPDB inserts or updates accordingly.
Maybe we can gain some movement with this here.
Anyone else please do chime in with corrections of the above PSEUDO interpretation, where to go from here is the next one.
Thanks for the heads up, guess that’s all the clarification was needing.
Do you know who worked on the activity streams? Maybe they’ll be able to share some inverse knowledge.
Will take a look for this item in trac, and post solution if found.
You can’t have a network on a network created site. It gets complicated.
You could however have seperate installs on the same domain and take it from there.
subdomain-one.site.com
subdomain-two.site.comYou would then upload and install WordPress in both these location and install / activate network / BuddyPress as you require.
public-html/suddomain-one/
public-html/subdomain-two/https://codex.wordpress.org/Create_A_Network That’s all you need.
This all depends on how you have the posts stored.
Do you have a category or a post-type associated with Academics or Professionals.
WP 3.x baby.
WordPress.org
wp-config.php
define(‘WP_ALLOW_MULTISITE’, true);
Login
Tools -> Network
Follow the steps.
Install BuddyPress.
Ready to rumble.
Have done some further digging and keep hitting the 404 issue.
The same issue is effected when adding a user as a friend, joining a group and favoriting.
Have created a quick and dirty button generator function that can be used throughout this WordPress theme.
However with the dead landing page these will never work. Are there any other approaches considered a best practice?
Hey @davidveldt this should do it if you are using the default theme. Otherwise you should integrate as you see fit.
theme/registration/register.php
You can add any groups or fields as you require. The groups and fields here are arbitrary.
` ‘player’, 4 => ‘coach’, 5 =>’parent’, 6 => ‘instructor’); ?>
$role) : ?>
<div id="” class=”role-fields”><label for="”>
<textarea rows="5" cols="40" name="” id=””>
<input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="” />
`
Create some profile groups to cater for each role. You can find the group id within the BuddyPress admin… In the url bar or investigate your database.
You should set-up the $roles array above to match your requirements.
Within the loop you can show any fields you have created within that xprofile group. If you have a select box within that group you would add the following code as outlined in the bp-default register.php
`
<label for="”>
<select name="” id=””>
`
Finally add the following jQuery where you house any other code of similar ilk.
`
jQuery(“.role-fields”).hide();
$roles = jQuery(“#roles”);
jQuery(“#field_2”).change(function()
{
$role = jQuery(this).val().toLowerCase();
jQuery(“.role-fields”).hide();
jQuery(“#” + $role).toggle();
});
`Here’s a pastebin for all that above. http://pastebin.com/QFdTdstz
No need for tabs or accordion this time.
Hope that helps you on the Road.
Oh I can help you with that, lemme set up a local test area.
haha cheers, Lars.
I was a bit stumped, tracing back those files all they seemed to do is return the WP title. page.php, single.php all heads to the same thing in that use context.
Wonder why PollDaddy was butchering it?
*nudge*
*bump* help please

Isn’t this what forums are for? Err.. not these forums, well yes these forums… but the BuddyPress forums… emmm paradigm or what.
Have you tried de-activating all plugins (minus BuddyPress)?
If so, what happens then?
Just an example here, running with Paul Gibbs start point.
Create xprofile fields as normal.
Each career group would also have its own xprofile group.
Player would have his / her own set of fields.
Coach would have his / her own set of fields.
Parent would have his / her own set of fields.
Instructor would have his / her own set of fields.None of the above would be required fields. (as far as BuddyPress is concerned (unless you roll some PHP codes))
You’d have another xprofile group specifically for required fields (this would be your first group).
You would make the “type” part of the required group and set it as a select box.
You could then write your registration form mark-up matching the requirements of jQuery tabs or jQuery accordion.
The “type” would be the last item on the required fields. Once that was selected you could then show or hide the corresponding jQuery ui-tab-panel that holds those form fields.
You could then on-the-fly make those fields then required using some jQuery also but a bit hacky.
It all depends on what’s happening here.
Could you go into your wp-config.php file and look for the line
`define(‘WP_DEBUG’, false);`Make sure this is set to true.
Re-visit your activation page and post the last error message you see (if any).
Also, in your BuddyPress theme could you find the file located here
wp-content/themes/your-theme/registration/activate.php
and post the code that’s within it please.
Child themes should not inherit ajax.js in my opinion. If you want to inherit the js it should be copied directly into the child theme.
Caused lot’s of headaches. Great for a chosen theme, but markup mods happen very often. Only so many ways you can rework content and padder :p
p.s. sorry to hi-jack
Hey, thanks for being so active.
I went back and tried again before posting a reply and it appears to have fixed itself.
Very strange, i have no idea what has happened.
Although i’ve fixed a couple of broken custom queries that were missing custom tables. Uhm and some white space from files has been trimmed.
Also deleted the error log before doing that final check and with it working now no errors have been produced.
Best
To me it’s more troublesome for the designers and developers to get rid of js function in a child theme that inherits everything from the default.
As a designer / developer surely you know what can happen with progressive enhancement. P2 is a fine example of what a developer knows. I mean the new 2010 WP theme doesn’t come with js does it?
I like to grab it, dig in, or build from scratch. Now with the default theme inheriting a whole lot more it sometimes is a pain.
Why am i complaining this is one heck of a free meal. :p
Thanks guys, upon inspecting a plugin with similar functionality then finding one with the exact functionality came accross this code.
$new_member = new BP_Groups_Member;
$new_member->group_id = $group_id;
$new_member->inviter_id = 0;
$new_member->user_id = $user_id;
$new_member->is_admin = 0;
$new_member->user_title = ”;
$new_member->date_modified = time();
$new_member->is_confirmed = 1;Which is a good insight of how to use a BP class in the future.
There were no actions being called on the WPDB query, would that be a reason why?
Unrelated note here, wouldn’t it be wise to advise plugin devs who utilise jQuery and default UI theme to rename their CSS class selectors as it always annoyingly clashes.
It’s either that or all theme developers have to rename theirs. A duel *slap :p
Thanks for help
Any ideas how to use this function, there is no documentation on accepted parameters. Nor is it listed in the function reference guide?
Thanks again
*i still wonder why it’s running 3 times, it works fine minus being entered 3 times.
Thanks for that, i hadn’t clicked at your clues above. Will post back the results.
Cheers
a little unrelated but does anyone here ever wonder why the default theme has so much js?. i understand it’s pro and progressive but really don’t think this sort of function is needed at the base theme. It’s kinda confusing because your not sure what’s core and what’s not sometimes.
I believe it’s up to the community to serve whatever js they like.
All i’ve done here is when the user is logged in and when the user matches my own custom login counter at 0 they are then signed up to these groups.
I don’t think the BP internal functions keep track of login counts?
It would be inefficient to run this every time they login.