Search Results for 'buddypress'
-
AuthorSearch Results
-
June 28, 2016 at 8:33 am #255382
In reply to: buddypress doesn’t use my files child
danbp
ParticipantHi @simonmnt,
you should create a correct child-theme to get BP templates customization to work.
First, you need to declare the child via /your-child/style.css with the correct header information.
Eg. for a twenty fourteen child/* Theme Name: Fourteen-Child Description: My child theme for Twenty Fourteen Version: 1.0 Author: simon Template: twentyfourteen */ @import url("../twentyfourteen/style.css");Once done, you can select this child as site theme.
Now you can add a /buddypress/ folder to /your-child/
Inside this folder, you copy any file you need to modify from /bp-legacy/buddypress/
You copy only the file(not the whole /bp-legacy/buddypress/ folder) you want to change, by respecting eventually the original path. Eg
.
/your-child/buddypress/members/single/profile/profile-loop.phpIf you need custom functions for the theme, you add a file called functions.php inside /your-child/functions.php
If you need custom functions for BuddyPress (like most of the snippets you can find on this forum), you add them to wp-content/plugins/bp-custom.php
June 28, 2016 at 8:26 am #255381In reply to: Fatal error after update
oddreal
ParticipantResolved an error in Courses:
Fatal error: Class ‘BP_Groups_Group’ not found in /path-to-project/wp-content/themes/lms/framework/buddypress/metaboxes.php on line 15A friend of mine – CMS developer – took a look at this and advised to just check User Groups at BuddyPress settings page (http://your.site/wp-admin/admin.php?page=bp-components)
Have a nice day to all.
June 28, 2016 at 5:04 am #255374In reply to: Post Update: Unable to See the buddypress Activity
r-a-y
KeymasterThanks for the debug help, @tse11.
One of your plugins (or yourself) is using this code snippet:
add_filter( 'bp_use_legacy_activity_query', '__return_true' );This made our strict activity permalink access check fail.
I believe the following patch will fix your problem:
https://buddypress.trac.wordpress.org/attachment/ticket/7146/7146.01.patchCan you confirm?
June 28, 2016 at 4:10 am #255370r-a-y
Keymaster@metaverso – Can you revert your changes and try my fix?
https://buddypress.trac.wordpress.org/attachment/ticket/7140/7140.01.patchIf that doesn’t work for you, can you tell me what BP plugins you are using?
June 28, 2016 at 4:08 am #255368metaverso
Participantmy fix:
Fatal error: Call to undefined function bp_get_current_group_id() in /wp-content/plugins/buddypress/bp-groups/classes/class-bp-group-extension.php on line 488[ soluction ]
public static function get_group_id() { if ( defined( 'WP_NETWORK_ADMIN' ) && bp_is_active('groups')) { // -----------fix add line 1 echo get_called_class();// -----------fix add line 2 // Usually this will work. $group_id = bp_get_current_group_id(); // On the admin, get the group id out of the $_GET params. if ( empty( $group_id ) && is_admin() && ( isset( $_GET['page'] ) && ( 'bp-groups' === $_GET['page'] ) ) && ! empty( $_GET['gid'] ) ) { $group_id = (int) $_GET['gid']; } // This fallback will only be hit when the create step is very // early. if ( empty( $group_id ) && bp_get_new_group_id() ) { $group_id = bp_get_new_group_id(); } // On some setups, the group id has to be fetched out of the // $_POST array // @todo Figure out why this is happening during group creation. if ( empty( $group_id ) && isset( $_POST['group_id'] ) ) { $group_id = (int) $_POST['group_id']; } return $group_id; }// -----------fix add line 3 }June 28, 2016 at 3:45 am #255365In reply to: Fatal error after update
metaverso
Participant[ SOLUCTION ]
error buddypress/wp-content/plugins/buddypress/bp-groups/classes/class-bp-groups-group.php on line 988update 988 line:
if ( ! empty( $r['update_meta_cache'] ) ) {
to:
if ( ! empty( $r['update_meta_cache'] && bp_is_active( 'groups' )) ) {June 28, 2016 at 1:28 am #255363In reply to: Activity embeds in activity stream
binary10
Participant@r-a-y Yes i am using the latest version of WP. Actually what i am trying is to embed the activity at
http://localhost/members/john/activity/2/in my activity stream athttp://localhost/members/binary10/. It doesn’t work. But as i already said i did a separate install for testing and created a buddypress activity with permalinkhttp://localhost/site/members/binary10/activity/2/then it works. This is what i am trying to say. Any ideas?
thanksJune 27, 2016 at 11:11 pm #255355In reply to: Post Update: Unable to See the buddypress Activity
tse11
ParticipantHi, thank you for trying to help.
This is for all users, it isn’t specific to a particular member type or activity item either.
A member goes to the activity feed, he wants to click on an activity item, the item redirects to the user’s own activity profile page with a bar across the top (the buddypress notification,) stating, “You do not have access to this activity.”
I am not using an object cache plugin.
June 27, 2016 at 10:38 pm #255354danbp
Participant– BuddyPress pages have all an ID.
– BP pages are not ordinary static WordPress page, but dynamic pages, a kind of placeholder. They have no content and are only existing to have a slug (and a ID for DB magement) for WP/BP dialog.
Eg.your-site/activity/URL is empty when you deactivate BP.Let’s continue with the activity page as example.
This “page” is made of different parts, which are contextually loaded on their own template. Use the activity filter to see what is all coming up on the (url/activity/) page. About 10 items which would be 10 real pages on a WP site without BP ! And that’s just default. Many plugins use also BP’s activity…
For each component, there is a loop. As long as you are in such a loop, you can call what ever belong to that component from inside this loop. And for almost each loop, you have a template.
If you want the About page (default WP page) to show up on a profile, you load it on one of the profile templates, but not on the BP member page which is the “page” who host “profiles”, but also the “member director”y. And you don’t want About apearing there, isn’t it ? 😉
If you read the codex about theme develoment and template hierarchy, you may understand how all this is articulated.
June 27, 2016 at 10:03 pm #255353In reply to: How to add widget to new front.php template
airsid
ParticipantLike you, i’m not a coder.
Dan, you’re a star in buddypress world !!
What would be if i give you some code if you don’t understand a text ?
I will paste it and use it. If something go wrong i’ll google it and play with it using other same codes…that’s how I managed to have my community website 😉
Learning to code take so much time and as so many people i’m running after time.
But you’re right, so ok i’ll read it again and try to learn…June 27, 2016 at 9:41 pm #255351In reply to: How to add widget to new front.php template
danbp
Participant…but it is a simple code to add a widget !
Don’t take it wrong, we all started a day to learn. Like you, i’m not a coder. But the widget coding is a WP thing, explained on the codex page i indicated.You say you didn’t understand what is written on codex. What would be if i give you some code if you don’t understand a text ? Try again. And while learning step by step, read also BP’s codex about templates.
Once you feel more confortable, after some experimentation and errors, come back for BuddyPress related questions. 🙂
June 27, 2016 at 7:37 pm #255346In reply to: restrict messages to user-admin-user
David Cavins
Keymaster@Earl_D: No. The above snippets are added to a custom version of the
buddypress/members/single/messages/compose.phpfile. Basically, if you add this file to your theme (following the structurebuddypress/members/single/messages/), it will be used in preference to the one BuddyPress ships with. Read more about adding custom template parts: https://codex.buddypress.org/themes/theme-compatibility-1-7/a-quick-look-at-1-7-theme-compatibility/June 27, 2016 at 6:29 pm #255344In reply to: Customizing a Member Directory
June 27, 2016 at 5:14 pm #255338danbp
ParticipantUse BuddyPress repair tool to recalculate members.
June 27, 2016 at 5:12 pm #255337In reply to: Activity embeds in activity stream
danbp
Participanti want that it should work for activities on the same website? Is it possible?
BuddyPress features are generally designed to work inside BuddyPress. 😉
I guess it is possible. Because it was made for !Follow Ray’s advice…
June 27, 2016 at 5:05 pm #255336In reply to: bp_activity_filter_kses function
danbp
Participantcolor buttons are TinyMCE tools and not html tags. The only way to get them would be to use the editor toolbar.
Here a scenario you could use:
– create a child-theme and add post-form.php to it (copy from bp-templates/bp-legacy/buddyPress/activity/post-form.php).
Result:your-child-theme/buddypress/activity/post-form.phpIn that file, go to line:40 where textarea start.
Inser this action hook:<?php if ( bp_is_groups_component() ) : ?> <?php do_action( 'blablabla' ); ?> <?php endif ?>Then add this
<?php if ( ! bp_is_groups_component() ) : ?>
<textarea class="bp-suggestions"......bla...bla...</textarea>
and add <?php endif ?> after the textarea closing tag.This contionnals will show a custom area for the desired group and prevent update area to appear on all other groups home pages.
So if a user is member of different groups, he will get a texteditor for group_id 13 and the normal update area on all others.
The custom template is ready. Now the fonctions we need.
Open bp-custom.php (or create it) and paste in those snippets.
Adding the texteditor:
function bpfr_whats_new_tiny_editor() { // deactivation of the visual tab, so user can't play with style tools //add_filter ( 'user_can_richedit' , create_function ( '$a' , 'return false;' ) , 50 ); $content = ""; // building the what's new textarea if ( isset( $_GET['r'] ) ) : $content = esc_textarea( $_GET['r'] ); endif; // adding tinymce tools $editor_id = 'whats-new'; $settings = array( 'textarea_name' => 'whats-new', 'teeny' => false, 'media_buttons' => true, 'drag_drop_upload' => true, 'quicktags' => array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' )); // get the editor wp_editor( $content, $editor_id, $settings ); } add_action( 'whats_new_textarea', 'bpfr_whats_new_tiny_editor' );A simple function who add the original textarea for users who are group members, but not allowed to rich edit.
function my_textarea() { ?> <textarea class="bp-suggestions" name="whats-new" id="whats-new" cols="50" rows="10" <?php if ( bp_is_group() ) : ?>data-suggestions-group-id="<?php echo esc_attr( (int) bp_get_current_group_id() ); ?>" <?php endif; ?> ><?php if ( isset( $_GET['r'] ) ) : ?>@<?php echo esc_textarea( $_GET['r'] ); ?> <?php endif; ?></textarea> <?php }And the last one, where you set up the group allowed to publish updates using edit tools.
function trotro() { if ( bp_is_groups_component() ) : $check = groups_is_user_member( bp_loggedin_user_id(), bp_get_group_id() ); $check_group = bp_get_group_id(); if ($check != 0 && $check_group == 21 && 'leon' == bp_current_item() ){ echo 'Wow! You can rich edit in this group.'; bpfr_whats_new_tiny_editor(); } else { echo 'Sorry, you cannot rich edit in this group'; my_textarea(); } endif; } add_action( 'blablabla', 'trotro' );Now, any member which is part of the group leon, group id 23 can publish updates and use the color picker and all other things which are on the edit bar.
Only thing you have to do is to adjust leon and id to your rules.
Successfully tested on 2.6 and 2016.
May this help you to go further with your BuddyPress project. 🙂
June 27, 2016 at 4:50 pm #255335In reply to: Activity embeds in activity stream
r-a-y
Keymaster@binary10 – Are you using some custom code to restrict access to your BuddyPress site or certain parts of your site like member profiles?
If you are, then it isn’t possible for the oEmbed code to return properly.
June 27, 2016 at 4:02 pm #255326In reply to: Fatal error after update
oddreal
ParticipantHi,
I’ve faced the same problem. The patch https://buddypress.trac.wordpress.org/attachment/ticket/7140/7140.01.patch releaved me from the initial problem but now I have another one error message at the same place – Courses Group widget (it doesn’t allow to edit Courses):
Fatal error: Class ‘BP_Groups_Group’ not found in /path-to-project/wp-content/themes/lms/framework/buddypress/metaboxes.php on line 15Please advise.
June 27, 2016 at 3:28 pm #255324In reply to: PHP Fatal Error After Update BP 2.6.0
noyearslost
ParticipantJune 27, 2016 at 3:20 pm #255323In reply to: Activity embeds in activity stream
binary10
Participant@danbp so it works if i copy the permalink of an activity on some other buddypress installation but i want that it should work for activities on the same website? Is it possible?
thanksJune 27, 2016 at 12:48 pm #255312In reply to: Buddypress mails get sent text-only
shanebp
ModeratorYou can open a ticket here. Use the same user name and password that you use for this forum.
June 27, 2016 at 12:43 pm #255310In reply to: Embedded webpages on activity feed?
Pulse North
ParticipantP.S I am running the latest versions of both WordPress and Buddypress.
June 27, 2016 at 12:11 pm #255306In reply to: Embedded webpages on activity feed?
danbp
ParticipantWhile doing this, you’ll see a quoted page title, not the whole page content. So guess it is standard behave.
Example
Question related to third party plugin should be asked on plugin support. That said, it’s a known bug who remain unanswered since 7 mounth…
https://wordpress.org/support/topic/conflict-with-bp-24-cover-photo
June 27, 2016 at 12:06 pm #255304In reply to: Share Profile?
danbp
ParticipantJune 27, 2016 at 10:43 am #255302In reply to: Buddypress mails get sent text-only
Bharat
ParticipantI have found solutions for html email text
there is some changes in bp_core files :
You can change content type given below path:
\wp-content\plugins\buddypress\bp-core\bp-core-functions.php line number 2962put content_html text instead content_plaintext:
content_plaintext should be send plain text email and content_html should besend html email:
$email->get( ‘content_plaintext’, ‘replace-tokens’ )$email->get( ‘content_html’, ‘replace-tokens’ )
I would like to give suggestions, if buddypress team should be given backend options like select content type (1)HTML email (2)Plain text
because buddypress have not given any hook for changes content type text -
AuthorSearch Results