Forum Replies Created
-
@modemlooper ah yes I see! – I suppose if it works, why not 🙂
@modemlooper not sure I follow?
@modemlooper – Great stuff, as in doing this?
$nav = array( 'name' => __( 'Component name', 'bp-component-name' ), 'slug' => 'component-name', 'position' => 80, 'screen_function' => 'bp_component_blah' );This does give the page I need:
example.com/members/username/component-nameAlthough this leads on to another problem – pagination. I’m displaying a list of posts on that page. paginate_links() is outputting nicely but when I visit the following nothing appears
example.com/members/username/component-name/page/2 example.com/members/username/component-name/page/3That said, I can get pagination to work when I introduce a subnav item:
example.com/members/username/component-name/subpage/page/2 example.com/members/username/component-name/subpage/page/3I just don’t want the subnav item in there. any ideas?
In reply to: strong passwords@cwjordan just to add – a logged out user can request a password reset link which they can use to enter a new password. This will be another place to enforce strong passwords.
Hi @applegateian with user display name you have the problem of spaces in the URLs. I suppose it is possible but in my view it would mean quite a bit of custom code.
@applegateian you won’t be able to remove the username from the URL because BP needs a unique string. If you had 3 or 4 users with the same display name then that would cause URL conflicts.
If the server isn’t the issue and you are using everything as it comes out of the box then yes you should give a fresh install a shot. Keep a back up of everything for reference.
In reply to: javascript precedence@bassjobsen how many plugins do you plan to write? hehe. The core team are great, if there is a bug they tend to jump on them straight away – hopefully you won’t have to wait too long for the fix. 🙂
In reply to: I can see users' private messages@jetlej as far as I know Admin can do that by default. Personally as a website owner I would want that functionality to be sure that my members were behaving themselves.
In reply to: javascript precedence@bassjobsen if you’re writing a plugin then you could introduce a {plugin-name}-functions.php file which could be home for your custom helper functions. Just a thought.
In reply to: javascript precedenceYou can use Trac if you need to report a bug in BP core:
https://buddypress.trac.wordpress.org/With reference to (2), you could always remove the action then enqueue the script you want.
remove_action( 'wp_head', bp_core_confirmation_js', 100 );In reply to: I can see users' private messages@jetlej are you logged in as ‘admin’? That would explain it as admin has access rights to member’s private messages. Try setting up a dummy user with subscriber access rights. You’ll most probably not be able to read the messages.
Actually apologies – not convinced this will achieve what you want it to
$value = wordwrap( $value, 16 ); $value = explode( "\n", $value ); $value = $value[0] . '...';The best approach would be to filter the data before you display it to screen. The general idea would be something like this
function filter_about_me_info( $value, $field_id, $user_id ) { if ( bp_is_directory() ) { $value = wordwrap( $value, 16 ); $value = explode( "\n", $value ); $value = $value[0] . '...'; } $return $value; } add_filter( 'xprofile_get_field_data', 'filter_about_me_info', 10, 3 );Note: I haven’t tested it.
@mikealan can you list all of the plugins you have installed?
In reply to: I can see users' private messages@jetlej which theme are you using?
In reply to: I can see users' private messages@jetlej does it happen with the user role editor plugin deactivated?
I think you might be able to do something like this in functions.php
function absolute_message_sent_date() { global $thread_template; return $thread_template->message->date_sent }Then this will go straight into your single.php template
echo absolute_message_sent_date();@ugcheleuce WordPress and BuddyPress could handle this no problem. Depending on what features you’d need, you may need to write some custom code or add some plugins.
In reply to: Members directory dropdown sort issue (possible bug)@bphelp I’ve seen websites that grant login access even before the account has been activated. Twitter is an example.
Thinking about the profile URL being created – Although BP doesn’t give login access, the fact that a profile URL is created opens up opportunities. For example, on registration submit you could add an action that redirects the user to their profile URL. They’ll be logged out of course, but nothing to stop you displaying a template notice like “Your page awaits you. Just activate you account then you can log in”
Ah yes of course.
Replace:
bp_get_profile_field_data( 'field=VALUE' )With
xprofile_get_field_data( 'field=VALUE', bp_loggedin_user_id() )<?php echo 'Hi ' . bp_core_get_username( bp_loggedin_user_id() ) . ' – Account Type: ' . bp_get_profile_field_data( 'field=VALUE' ); ?>Note: VALUE should be the exact name of the field you want to use.
echo $_REQUEST['s'];in members-loop.php worked! The global was the bit I didn’t like. For some reason I completely overlooked the obvious. Thanks @shanebp for the solution.In reply to: Members directory dropdown sort issue (possible bug)@bphelp I haven’t been able to test this for you yet but I did notice yesterday that non-activated users get given a URL which is visible to anyone. For example, if you completed the registration form on my site and chose username ‘bphelp’ – even before you click on the link in the activation email you will be able to go to
mysite.com/members/bphelp
Here you’d see: Your name, the mystery man avatar etc.
Imagine a site that has lots of spam signups. They’d have hundreds if not thousands on unused URLs.
How is this currently handled by BP?
@shanebp I thought that too but it seems to be. Check out how BP remembers the search term after clicking. See
bp_directory_members_search_form()in bp-members-template.php