Search Results for 'wordpress'
-
AuthorSearch Results
-
June 16, 2014 at 3:01 am #184102
In reply to: Front End Profile Editing
paton400
ParticipantNo, I need to grant the user role permission to ‘edit users’. But by granting that, I’m granting them access too much access.
I want only want them to be able to change the information in other users profile fields. I don’t want them to be able to read private messages.
Is this a question for Buddypress, WordPress or my user role permissions plugin?
June 15, 2014 at 5:42 pm #184097In reply to: Frontend User Search
June 15, 2014 at 11:26 am #184081Henry Wright
ModeratorCheck out Roles and Capabilities. If your admin and custom roles share a common capability then you can distinguish these roles from the rest of the roles that don’t have that capability.
See
current_user_can() and user_can()You would use them like this:
if ( current_user_can( 'manage_options' ) ) { // The current user can manage options so do something special. }if ( user_can( $user_id, 'manage_options' ) ) { // The specified user can manage options so do something special. }June 15, 2014 at 12:40 am #184063In reply to: Help with profiles
blu3shad0w
ParticipantJune 14, 2014 at 12:48 am #184024In reply to: Upgrading BuddyPress 1.6.4 to 2.x
r-a-y
KeymasterHere is the BP release archive page:
https://codex.buddypress.org/developer/releases/This is what I would do. Disclaimer: Don’t blame me if anything goes wrong with your site. 🙂
Now with that out of the way. First of all, backup your database, your plugins and theme.
Next, make sure you have a development environment set up. Do not do this on a production site!
Disable all BP plugins to be safe.
I would update to the latest version of WordPress first. Then, upgrade to BuddyPress 1.9.2. Then, update to BuddyPress 2.0.1.
Update any outdated plugins and reactivate the BP plugins. Then, test your site out. See if there are any bugs.
Once you’ve confirmed everything is good, then do the same on your production site.
June 13, 2014 at 2:53 pm #184000Mathieu Viet
ModeratorNo. You’ll need to add a common capability to the roles you are targeting, see
https://codex.wordpress.org/Function_Reference/add_capJune 13, 2014 at 7:22 am #183987Mathieu Viet
ModeratorHi,
Depending on the theme you use (regular WordPress theme, BP Default or a child of it, or a standalone BuddyPress theme), you can override some templates to achieve your goal.
Have a look at the codex starting with this page : https://codex.buddypress.org/themes/theme-compatibility-1-7/a-quick-look-at-1-7-theme-compatibility/
If it’s a regular WordPress theme, then you can can add a
buddypressfolder in it and copy these templates into it respecting the ‘tree’ :
–bp-templates/bp-legacy/buddypress/activity/index.php
–bp-templates/bp-legacy/buddypress/members/single/activity.phpOnce done, you should have :
–yourthemefolder/buddypress/activity/index.php
–yourthemefolder/buddypress/members/single/activity.phpThen into these two files search for
bp_get_template_part( 'activity/post-form' );and you should see a line above an if statement containingis_user_logged_in().... Replaceis_user_logged_in()bybp_current_user_can( 'theminimumcapability' )where theminimumcapability is the the role capability you’re targeting. See the WordPress codex to define it : https://codex.wordpress.org/Roles_and_Capabilities
June 12, 2014 at 5:27 pm #183974paton400
ParticipantNow we are talking very basic WordPressing here.
Go to the appearance/menus screen and from there it’s pretty self explanatory.
click on ‘Create a new menu’, call it whatever you want, then select what pages you would like to appear in the menu.
Underneath the list of WordPress pages you see a tab full of Buddypress options that can also appear in the menu, one of which is the log-in/log-out button.
Regards
June 12, 2014 at 12:28 pm #183953In reply to: Hot can I display the profile fields groups in tabs?
danbp
ParticipantAnyway an image says more as words (in our case).
Check if this plugin can help you:
https://wordpress.org/plugins/buddypress-profile-tabs/June 12, 2014 at 8:07 am #183937danbp
ParticipantIn your first topic you asked: It is possible to turn off this notification?
Yes it is, and the solution is in the first link. The other link is given as reference to the code, who is in a core file. Such core files should never been modified directly.
You need to study a bit WP and BP codex to understand how to achieve this, and learn a bit more about buddypress customization. You are also free to hire a developer by posting at http://jobs.wordpress.net/ or somewhere else.
One easy way to begin is to search and read this forum first i guess.
June 12, 2014 at 7:55 am #183936In reply to: I want to use BP BUT is there a plugin for this use?
danbp
Participanthi @jjjaay9,
BuddyPress (BP) is a community plugin (a bundle of 8 distinct components and many other features) for WordPress. These components are all optionnal, but in any case, publishing is the territory of WordPress.
If you want to allow front-end publishing for your users, to avoid them going directly into the admin, search some plugin on the WP plugin repo or use a theme who provide such facility.For example consider the theme P2, it probably contains anything you listed. (so far i remember)
User guide is here.
June 12, 2014 at 7:44 am #183934In reply to: I want to use BP BUT is there a plugin for this use?
jjjaay9
Participanti found some plugins that MAY do this: answer/questions
However, if I used these plugins, how easy do they integrate with buddypress?
Can I customize to show these pages, and for users to have a default link to ‘create a question’ ?I mean, if they have ‘create post’ like a normal wordpress blog, then buying/using a question/answer plugin is kinda useless as most wont be able to find the link to it – and will automatically create a post instead.
Also, how would i know if it looks good or this plugin will integrate with BP?For example, would it show up as a sidebar saying recent questions like recent posts etc?
Otherwise if it doesn’t integrate with BP then there’s no point using BP if it has a question and answer section that acts normally as wordpress anyway.
If so, what are teh benefits of using BP AND a question/answer plugin?
one eg i think of is, users can private message eachotehr when someone posts a questionThanks
June 11, 2014 at 1:18 pm #183914In reply to: [Resolved] How to hide more than one profile field?
danbp
ParticipantGroup exclusion doesn’t work on a single install for the moment (only on MS).
More advice on this here:
https://buddypress.trac.wordpress.org/ticket/5650June 11, 2014 at 12:14 pm #183912CommonEasy
ParticipantJune 11, 2014 at 10:41 am #183908Hope
ParticipantGot the solution from this link:
http://wordpress.stackexchange.com/questions/60793/customize-activity-stream-buddypressThanks
June 10, 2014 at 5:37 pm #183880In reply to: [Resolved] Temporary username and one-time change
@mercime
Participantone-time username change from the admin area for users after their first login?
@pixieblitz I used http://buddydev.com/plugins/bp-username-changer/ last year. Back up DB and check if it works for current BP version or post at developer’s forums.
On another note, https://wordpress.org/plugins/username-changer/ will allow the site/super admin to change the username of each user from wp-admin area instead of diving into DB.June 10, 2014 at 9:52 am #183862In reply to: Translation fails only at "Sitewide Activity"
danbp
ParticipantFinally I opened a ticket !
June 9, 2014 at 6:02 pm #183841In reply to: Translation fails only at "Sitewide Activity"
danbp
Participant@shanebp,
forcing a translation is not the best solution, even if it is a solution.
Mine by hacking the core file is not better, as we loose it at the next update.
Your function won’t be loosed, but it should be used by caution, as gettext pass a second time on ALL strings. It’s not dramatical to force the translation for one string, but what will happen if someone use this trick for 20, 50 or more strings ? Performance trouble !I’ll track this further before opening a ticket.
https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext_with_contextJune 9, 2014 at 5:31 pm #183839In reply to: Translation fails only at "Sitewide Activity"
shanebp
ModeratorJust fyi – if you only have a few labels that you want to change, you can use these functions.
https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext_with_contextIt’s a lot faster than messing with .po files.
But you need to know if the label is using a context parameter.So you can use this approach for ‘Sitewide Activity’…
function example_gettext_with_context( $translated, $text, $context, $domain ) { if ( 'buddypress' !== $domain ) return $translated; switch ( $text ) { case 'Sitewide Activity': return 'Bongos'; default: return $translated; } return $translated; } add_filter( 'gettext_with_context', 'example_gettext_with_context', 11, 4 );June 9, 2014 at 7:40 am #183821In reply to: Birthday Notification with thumbnail
danbp
Participanthi @escudero95
here are 2 function you can use for do what you need. The first add Happy birthday on the Toolbar, near the Howdy.
The second will add the same thing on the profile header, above @username at the right of the avatar.
These function can be used from within bp-custom.php or theme’s functions.php
You have to create a date type profile field and set it to be viewed by friends only.
Naturally this is intended to be an example of use. It’s certainly perfectible. Also take care of the different comments inside the code. Have fun !
function bpfr_happybirthday( $wp_admin_bar ) { global $bp; // if user is not logged in, we show nothing if ( !is_user_logged_in() ) return false; // is xprofile component active ? if ( bp_is_active( 'xprofile' ) ) // fetch the birthdate // as the function should work outside of the profile loop, we first need the user_id $user_id = bp_get_activity_user_id(); // now we get the birthdate and our text to show (text | username). 53 is the field id. // depending your theme, this may be adjusted by css as it goes probably on two lines $birthdate = xprofile_get_field_data('53', $user_id ) ? __( 'Happy Birthday ' ) . bp_core_get_username( bp_displayed_user_id() ) : ''; // building the output and adding some css $user_id = bp_displayed_user_id(); // condition for the greating on the toolbar if (!is_user_logged_in( $user_id ) ) { $my_title = '<span style="float: left; width: 16px; height: 16px; margin: 5px 5px 0 -1px; display: block; background-color: green; border-radius: 16px;"></span> '.$birthdate.' '; $args = array( 'parent' => 'top-secondary', // position 'id' => 'birthday_item', // unique identifier 'title' => $my_title, // the name who appears on the bar ); $wp_admin_bar->add_node($args); } } add_action( 'admin_bar_menu', 'bpfr_happybirthday', 90 ); function bpfr_happybirthday2u() { global $bp; // if user is not logged in, we show nothing if ( !is_user_logged_in() ) return false; if( bp_is_user() && ! bp_get_member_user_id() ) { $user_id = 'displayed: '. bp_displayed_user_id(); } else { $user_id = 'get_member_user: '. bp_get_member_user_id(); } // is xprofile components active ? if ( bp_is_active( 'xprofile' ) ) // fetch the birthdate // as the function should work outside of the profile loop, we first need the user_id $user_id = bp_get_activity_user_id(); // now we get the birthdate and our text to show (text | username). 53 is the field id. // depending your theme, this may be adjusted by css as it goes probably on two lines $birthdate = xprofile_get_field_data('53', $user_id ) ? __( 'Happy Birthday ' ) . bp_core_get_username( bp_displayed_user_id() ) : ''; // building the output and adding some css $my_title = '<div style="margin: 5px 5px 20px 5px; border:1px solid red; min-height:18px;"><div style="float: left; width: 16px; height: 16px; margin: 5px 5px 0 -1px; display: block; background-color: green; border-radius: 16px;"></div> '.$birthdate.' </div>'; echo $birthdate; } add_action( 'bp_before_member_header_meta', 'bpfr_happybirthday2u' );Codex references:
https://codex.wordpress.org/Class_Reference/WP_Admin_BarPlaying with the toolbar (in french but code is in english)
http://www.geekpress.fr/wordpress/tutoriel/modifier-howdy-admin-bar-1102/June 8, 2014 at 6:11 pm #183807@mercime
Participant@envieme WP/BP versions? What’s the name of the theme activated in your dashboard menu > Appearahce > Themes? I have to ask again because new installations do not get the BP Default Theme served in the Appearance > Themes panel. (continued from WP Forums)
Thanks Dan.
EDIT – Discussion continued and issued resolved at WPorg forums.
June 8, 2014 at 9:02 am #183798In reply to: [Resolved] The member pages are missing
@mercime
Participant@johnhome glad you have a working BP install using XAMPP.
@zvi18 I would suggest that you start off by checking out BuddyPress Documentation https://codex.buddypress.org/ and explore the features https://codex.buddypress.org/buddypress-components-and-features/ Try it out first locally by installing https://make.wordpress.org/core/handbook/installing-a-local-server/installing-xampp/June 7, 2014 at 1:05 pm #183789WPChina
ParticipantYes you’re right it is a WP issue rather than BP 😉 But any thoughts on how to deal with that? I see this on the WP forums that it has not been dealt with fully yet:
https://wordpress.org/support/topic/tweak-for-high-traffic-sites-delete-user-drop-down-menuYes, deleting users from the frontend works fine, but for more systematic searches and tweaks, deleting from the backend works better (just not in this case~)
June 6, 2014 at 7:32 pm #183770danbp
Participanthi @envieme,
is there a simple way I can achieve this hacking the wordpress code?
NO !
But you can check this plugin: http://urbangiraffe.com/plugins/headspace2/June 6, 2014 at 1:16 pm #183748In reply to: Noob Question – How to Import Users as Members?
shanebp
Moderatorhlna’s code uses the old method for storing last_activity.
It was appropriate when written, but is no longer valid.It can easily be updated by following the instructions here re new API functions:
User last_activity data and BuddyPress 2.0 -
AuthorSearch Results