Forum Replies Created
-
In reply to: Create Sub Nav Menu Item in Profile
Each subnav item requires a screen function or it will not be created.
example: ‘screen_function’ => ‘some_function’,You can create an empty function for testing:
function some_function() { }You probably need to add a screen function to the parent nav item too.
In reply to: [Resolved] BP 1.6 admin bar menu and profile editingYes, I’ve seen that plugin before.
I believe the filter above accomplishes the same thing, in this case much simpler.btw – [embarrassed] how do you mark a thread here as resolved ?
In reply to: [Resolved] BP 1.6 admin bar menu and profile editingNo – visiting other member profiles as an admin.
Maybe there is an easier way, but this works:
`function profile_admin_check ($my_profile) {
if ( current_user_can(‘add_users’) )
$my_profile = true;return $my_profile;
}
add_filter( ‘bp_is_my_profile’, ‘profile_admin_check’, 10,1 );`In reply to: [Resolved] BP 1.6 admin bar menu and profile editingI’m seeing this issue on 5 different installs on 3 different servers – 3 custom themed, 2 not.
In reply to: [Resolved] BP 1.6 admin bar menu and profile editingBP 1.6.3, WP 3.5, no other plugins, default BP theme – iow. a basic install.
Anyone else have this issue or any suggestions ?
Glad you got it working.
Please mark this thread as resolved.
And next time – follow directions from karmatosed !In reply to: how to override buddypress function using hook?A plugin can be very simple.
For example, maybe all it does is over-ride a pluggable function.You can try it in bp-custom.php – which I believe is loaded with all the plugins.
So it might be loaded before pluggable.php is loaded, therefore it might work.Follow the advice from karmatosed – deactivate all plugins except WP and BP AND use the default theme. Does the problem still exist ? If not, then you have a problem in your custom theme.
In reply to: how to override buddypress function using hook?I’m not aware of a filter for this, but you can definitely over-ride wp_safe_redirect in a manner that doesn’t affect its usage otherwise, ie. check the $location and adjust if applicable.
To over-ride it, you must do so within a plugin. It’s not about actions or filters.
More info: https://codex.wordpress.org/Pluggable_Functions
>Or, can I not rewrite the entire function messages_screen_compose() so that it overrides the one in buddypress, and put it in functions.php of my theme?
No. And it would be a bad idea even if you could.
Perhaps an ajax conflict ?
If you change the Order By, it will dynamically load the home page, as you said.
But if you then click the Members link, the members page is displayed per your Order By selection.
In reply to: Get Buddypress Profile Data in WordPress Pagexprofile_get_field_data function is provided so that you CAN use it on non-profile pages.
Use http://pastie.org/ or similar to show what you tried.
In reply to: Get Buddypress Profile Data in WordPress PageUse :
xprofile_get_field_data( “Company Name” , $member_id)
You have to supply the $member_idIf you’re on a profile page, the $member_id will be provided via bp_displayed_user_id()
Take a look at
/bp-xprofile/ -> bp-xprofile-functions.php -> xprofile_get_field_dataIn reply to: manual profileIf all the Notifications options are set to the default ‘yes’ – then nothing is stored in the database.
Change one of the settings to ‘no’ and then check wp_usermeta for that user and you should see an entry for each option.
In reply to: Duplicate Group Components (Multiple Group Types)In reply to: how to override buddypress function using hook?bp_core_redirect calls wp_safe_redirect which is pluggable, meaning you can replace it with a function that includes a check for the component and action within the redirect url.
In reply to: Duplicate Group Components (Multiple Group Types)Rather than duplicate the component or use the skeleton component, create a plugin using Custom Post Types – a WP approach. It works great within BP.
You can always submit a bug ticket on
https://buddypress.trac.wordpress.org/ticket/4573Use the same login you use here. Provide an url where they can see the issue.
In reply to: What's the point in the Friends component?Don’t you also have to be friends to invite somebody to join a group ?
-if so, that should be an admin option, imo.
In reply to: How to remove auto generated links in user profile?See the example at the bottom of the page :
http://bpsocialnetwork.wordpress.com//?s=buddypress&search=Go
Very nice, imo, should be a sticky in the How-To forum.
In reply to: [Resolved] Activity template – sidebar disappears?In reply to: Add new function do group admin panelUse https://gist.github.com/ or similar to show your code
In reply to: Add new function do group admin panelYou need to know php and need to use this:
https://codex.buddypress.org/developer/plugin-development/group-extension-api/In reply to: uploaded photos rotation/edit/
Mobile devices can take pictures on different rotations depending on how the device is held.The rotation info is stored in the exif data -> orientation for each picture, usually a jpg.
You have to parse that data and re-rotate and re-save to ‘normal’ rotation.afaik – there is no way to do that re-rotate within a standard BP install.
There may be a WP plugin for this or you could ask the BP Media team about it or you’ll need to write some custom code.In reply to: [Resolved] Activity template – sidebar disappears?In bp-default, single activity uses: activity/entry.php
But it is used by activity/activity-loop.php to display each entry in the entries list.
So any changes to entry.php will show up in the loop.
And obviously, you can’t add get_sidebar to entry.php.So how to use a different template when viewing a single activity entry ?
You’d have to know how to parse the ‘action’ of the URI and handle it from there.
iow. $bp->current_action, $bp->action_variablesProbably easier to kill the link on the ‘date’ of an entry in the loop – or maybe just when it’s not a discussion.
( Or is there some reason you want to show non-discussion activity on a single page ? )To kill the link, you have 2 filtering choices:
1. Before display ( needs to run every time an entry is displayed )
2. Before creating the database entry ( runs only once per entry )Number 1 is easier.
Number 2 is the better approach – but won’t alter entries already in the database.