Forum Replies Created
-
>any pointers on profiling queries?
Can you create a new user through wp-admin/user-new.php ?
If so, then there is a problem in your theme.
courtesy of modemlooper:
You can add code to a functions file or add a file bp-custom.php to the wp-content/plugins folder to change image sizesAvatar specific settings can be changed:
define ( ‘BP_AVATAR_THUMB_WIDTH’, 50 );
define ( ‘BP_AVATAR_THUMB_HEIGHT’, 50 );
define ( ‘BP_AVATAR_FULL_WIDTH’, 150 );
define ( ‘BP_AVATAR_FULL_HEIGHT’, 150 );[ A simple google search shows a lot of results for this ]
If the old site isn’t WordPress –
You’ll need to write a script to insert the existing users to your new database.
Might be tricky.Do a search on migrating from code-base-of-your-old-site to WordPress, you might get lucky.
>point bp to the existing database
You mean point BP to some forum tables in another database? But get everything else from the new site database?
You don’t want to do that.You’ll want to export/import your forum tables to the new site.
Do you have access to phpmyadmin ?
If you don’t know, ask your hosting company.You want to copy over the forum tables to the new site database.
Using a browser interface like phpmyadmin, it’s easy to export / import.
tip: export as gzipSince you are working on a new site, it’s okay if you screw-up the first try or two.
You’ll find out if there is any structural difference in the tables – hopefully not.You need to use php, so something like:
`
<?php
$global $bp; // this should already be set on an activity page, but just in case
$action_url = $bp->displayed_user->domain . $bp->invite_anyone->slug . ‘/sent-invites/send/’;
?><form id="invite-anyone-by-email" action="” method=”post”>
`Maybe it’s a typo, but it should be :
$bp->displayed_user->domainIf you still have trouble, show us the actual url being created for your form action.
@modemlooper – I second not1_name statements re: I think a native BP app would be very useful!
Being dependent on Aurigma is iffy at best.
We wouldn’t want your app incorporated into a theme.
If it works standalone, then a site license fee is a no-brainer !Thanks Paul.
We’re going to experiment with it in the near future and I’ll share the results with the BP dev team.
( Are we really the first to try it !?! )Did you try
`$item_id = $activities_template->activity->id;`We use Aurigma Up on a custom mobile page for iPhone/iPad. Works great. Uploads to your server.
Then use bp_activity_add() – you should be able to adapt this example.
http://bp-tricks.com/snippets/adding-a-new-activity-stream-entry-when-a-user-changes-his-avatar/For Apple – you need to check orientation using exif_read_data
For Android – you don’t need it for uploads – but the Avatar crop tool doesn’t work, so we did a custom page for that which includes basic auto-crop.
For both Android and Apple, we use this lib for rotation, thumbnails, resizing and cropping.
https://github.com/masterexploder/PHPThumb/wiki/Basic-Usage
Why not use WP methods? This lib gives us more control and better results.Note: we don’t use BP Mobile, so there is probably a better way if you do use it.
Try using
bp_activity_item_id()
instead of
bp_get_activity_item_id()In bp-activity-functions.php
there is
function bp_activity_post_update
which has
` do_action( ‘bp_activity_posted_update’, $content, $user_id, $activity_id );`I would use add_action in bp-custom to run a function that takes the $activity_id and does whatever you need.
Ditto for
do_action( ‘bp_groups_posted_update’, $content, $user_id, $group_id, $activity_id );
in
bp-groups.phphttps://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/
try something like
bp_has_activites(‘type=friends’)
in your templateI think you want $aid out of function ajax_update_activity_contents in class_bpfb_binder.php in Activity Plus
Have you tried xprofile_get_field_data?
`
$bio = xprofile_get_field_data(‘Bio’, $user_id);
`Not sure what you mean by ‘outside’ BP…
If you can’t use xprofile_get_field_data,
then a custom call to your database would work, but you’ll need to figure out the id of the Bio field.
`
$bio = $wpdb->get_var( “SELECT value FROM wp_bp_xprofile_data WHERE user_id = $user_id AND field_id = $field_id_for_bio” );
`This error was caused by users who were not logged in but tried to view the activity stream of a single member.
A simple redirect fixed it.
.Don’t redirect them.
Find where the Edit Profile link is and change it to:`
<a href="profile/edit/group/2″>Edit Profile
`@boone –
I used to be able to see a list of my forum posts.
That is no longer available.
They used to show up under the activity tab.
It was very helpful to review prior forum postsI tried Forums -> Topics Started etc.
Nothing works.Is there a different way to accomplish this?
.Did the task by getting all the user_ids for $zipcodes and then using them in a string – include=string
$filter_members = ‘include=’ . $zip_ids . ‘&type=online&per_page=999&populate_extras=0’;But would still like to know if it is possible to use multiple terms in ‘search terms’ ?
define(“BP_DEFAULT_COMPONENT”,”profile”);
https://codex.buddypress.org/extending-buddypress/changing-internal-configuration-settings/
Create a file called bp-custom.php – it will go in your plugins directory.
Put this code in it:
function visitor_intercept(){ global $bp_unfiltered_uri; if ( !is_user_logged_in() ) { if ( ($bp_unfiltered_uri[0] == BP_MEMBERS_SLUG) || ($bp_unfiltered_uri[0] == BP_ACTIVITY_SLUG) ) { bp_core_redirect( get_option('siteurl')."/some-page" ); } } } add_action( 'wp', 'visitor_intercept', 3 );Change “same-page” to where ever you want to send them or remove to send them to front page.
Note: this may not work if you are using BP 1.3I forgot the ajax file in the _inc folder in the child theme – fixed.
The usual way – trial and error.