Search Results for 'theme'
-
AuthorSearch Results
-
August 23, 2015 at 2:27 am #243501
In reply to: Comment HTML tag Appearing in Activity Stream
djsteveb
Participant@mrjarbenne – Which theme are you using?
Have you tried it with the 2014 or 2015 theme?Have you tried disabling all other plugins aside form bp to see if new comments create the same issue when those other plugins are disabled and you are using a default theme?
August 22, 2015 at 3:37 pm #243493In reply to: Register Link goes to homepage now?
shanebp
ModeratorWhy are the Register and Join Now buttons visible if you are logged in?
Usually these are only visible if you are not logged in.Rather than use redirects, it’s better to control when the buttons are displayed.
You’ll need to edit the theme file that displays the buttons.<?php if ( ! is_user_logged_in() ) : ?> html for buttons goes here <?php endif; ?>August 21, 2015 at 11:24 pm #243469In reply to: [Resolved] Add group redirects to 404 error!
meaganthefoodie
ParticipantHi there,
I am having this exact same problem, but nothing listed above seems to fix it.
After a fresh install of BuddyPress, with groups activated, and “Enable group creation for all users” checked in the settings page; I receive a 404 Error when clicking the “create group” button on either the groups page, or in the admin panel of WordPress. Is there something i’m missing? is the group creation page built into BuddyPress or do I need to create it? Nothing about creating this page is mentioned in the codex linked above.
I also tried deactivating all plugins except BuddyPress as well as changing my theme to the “twentyThirteen” theme but still no dice. I could really use some help with this.
Stats:
WordPress Version: 4.3
BuddyPress Version: 2.3.2.1
DynamiX Theme Version: 4.3.1August 21, 2015 at 4:49 pm #243457In reply to: What does Site Tracking do?
coffeywebdev
Participant@shanebp, I am unable to get comments to show up in my activity feed.. I even set up a staging environment, running only Buddypress with 2015 theme…. Still no comments! 🙁
Creating a post adds a row to the activity table, but commenting on that post doesn’t do anything.. Any thoughts??
I have made sure that I have buddypress properly configured to track post comments, but it isn’t working on my live site, or the staging environment that is running default wordpress theme and only one plugin, Buddypress..
Your help is much appreciated
August 19, 2015 at 9:56 pm #243402In reply to: [Resolved] Not working with WordPress 4.3
danbp
ParticipantDo you use a custom function building a widget ?
if you used the old php4 method
parent::WP_Widget( false, $name = __( 'My widget' ) );you should now use
parent::__construct( false, $name = __( 'My widget' ) );This can also be in a theme or a plugin. BuddyPress use
_constructmethod and is not concerned.If you deactivate WP_DEBUG in wp-config, the notice will disapear. And it’s only a notice, nothing will sudenly stop to work.
August 19, 2015 at 6:21 pm #243389In reply to: New nav item
danbp
ParticipantHi @muskokee,
Will be faster for me to give you a tutorial.
– Create a template file, call it testing.php and add it at the root of your child-theme.
This file should contain a template name in header comment and some minimal html and condition to get a sidebar and a footer. The example comes also with a BP action hook.– The template file
<?php /* Template Name: Testing */ get_header(); ?> <div id="primary" class="site-content"> <div id="content" role="main"> <?php if( is_user_logged_in() ) { echo'<h3>My test content title</h3>'; do_action( my_testing); }?> </div><!-- #content --> </div><!-- #primary --> <?php get_sidebar( 'front' ); ?> <?php get_footer(); ?>– Go to page dashboard, and create a new page. Call it Testing and asign in page attributes Testing as template. Save.
– Open bp-custom.php and copy/paste these functions.
First we setup the nav on profile with a sub-nav going to our test page.
function bpfr_post_profile_setup_nav() { global $bp; $parent_slug = 'testing'; $child_slug = 'testing_sub'; bp_core_new_nav_item( array( 'name' => __( 'Testing' ), 'slug' => $parent_slug, 'screen_function' => 'bpfr_profile_post_screen', 'position' => 40, 'default_subnav_slug' => $child_slug ) ); //Add subnav item bp_core_new_subnav_item( array( 'name' => __( 'My Testing' ), 'slug' => $child_slug, // this slug goes to profile/name/ //'parent_url' => $bp->loggedin_user->domain . $parent_slug.'/', // this slug goes directly to a page 'parent_url' => $bp->root_domain .'/'. $parent_slug .'/', 'parent_slug' => $parent_slug, 'screen_function' => 'bpfr_profile_post_screen' ) ); } function bpfr_profile_post_screen() { add_action( 'bp_template_content', 'bpfr_profile_post_screen_content' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); } // we took the opportunity to add an action hook. Can be usefull... function bpfr_profile_post_screen_content() { do_action( my_testing); } add_action( 'bp_setup_nav', 'bpfr_post_profile_setup_nav' );– And because you’re testing, we’ll do a little test by inserting a text directly into the template.
function action_x() { echo 'Test lorem ipsum, i can read this !'; } add_action( 'my_testing', 'action_x' );Now you can read the snippet, add you’re own html, loops and hooks to the template file, or simply publish something on the page… Hope you’ll understand how this is working. Happy testing !
August 19, 2015 at 2:11 pm #243382In reply to: Child theme – profile.php
muskokee
ParticipantThat did it! Changed over to legacy files and now I can place and modify the profile.php in my child-theme (another not-so-nice name for describing a regular wordpress theme).
Small suggestion: make this knowledge (bp-legacy over bp-default) a BIG note in the theme development documentation of this site!
Thanks @danbp for your question which prompted me to dig further and @shanebp for confirming my improper use of bp-default.
August 19, 2015 at 1:18 pm #243377In reply to: Child theme – profile.php
muskokee
ParticipantThanks for your reply @danbp! I got the profile.php from bp-default. I had previously placed bp-default custom edit.php and change-avatar.php inside the child theme at single/profile folder without a problem.
Yes, I use many custom functions in my functions.php file but I have not made use of bp-custom.php.
I also have a custom template titled plugin-buddypress.php in my child-theme folder above the buddypress folder.
I disabled all the profile plugins (pics, follow, cover, conditional field groups) and commented out all functions acting on Buddypress in my functions.php file. This did not make a difference! I still have a blank loop with the profile.php added to my child theme.
//EDIT
And I am running BP 2.3.2.1 on WP 4.2.4August 18, 2015 at 8:18 pm #243362In reply to: Users can’t reply to private messages
yasesin
ParticipantI tried with TwentyFifteen theme, and it still didn’t work with this theme. So, I think the problem is not theme related. Today an update suggestion came about WordPress 4.3, and after I install the new one, now it works 🙂
August 18, 2015 at 5:24 pm #243354In reply to: Child theme – profile.php
danbp
Participanthi @muskokee
from where do you pick profile.php: bp-default or bp-legacy ?
Do you use other custom function in bp-custom.php or child-theme functions.php ?
What when BuddyPics and BP Follow are deactivated ?August 18, 2015 at 4:15 pm #243350In reply to: Set page template for BuddyPress Registration.
danbp
ParticipantBP’s registration template is in: https://buddypress.trac.wordpress.org/browser/tags/2.3.2/src/bp-templates/bp-legacy/buddypress/members/register.php
Copy it to your child-theme, /your-theme/buddypress/members/register.php, and make your change in that copy.
In some case, you could also use bp_get_template_part filter.
August 18, 2015 at 9:15 am #243323In reply to: Need urgent help with BP notifications
danbp
ParticipantI am writing all these code in bp-functions.php in my bududdypress folder within my theme folder. (this may be my problem).
Yeah, it is probably the problem. Custom functions for BP can/should be added to bp-custom.php, which should sit in wp-content/plugins/bp-custom.php, not in your child theme buddypress folder.
Or into functions.php of your child-theme.
bp-custom.php explained on Codex.
August 18, 2015 at 9:01 am #243321In reply to: Need urgent help with BP notifications
chicho1969
Participantokay, This is almost done, but is really rare, not everything works as it should.
First of all, this is not a pluggin, I am writing all these code in bp-functions.php in my bududdypress folder within my theme folder. (this may be my problem).
Step by step:
1st Problem setup globals is not working as it espected:define( 'BP_NOTIFIER_CELBIRTHDAY_SLUG', 'celbirthday_notifier' ); function celbirthday_notifier_setup_globals () { global $bp, $wpdb; $bp = buddypress(); $bp->celbirthday_notifier = new stdClass(); $bp->celbirthday_notifier->id = 'celbirthday_notifier'; //I asume others are not going to use this is $bp->celbirthday_notifier->slug = BP_NOTIFIER_CELBIRTHDAY_SLUG; $bp->celbirthday_notifier->notification_callback = 'celbirthday_notifier_format_notifications'; //show the notification $bp->active_components[$bp->celbirthday_notifier->id] = $bp->celbirthday_notifier->id; do_action( 'bp_setup_globals' ); }This function is not doing nothing unless I call it directly:
celbirthday_notifier_setup_globals ();
I Know this is not the proper way, but it is the only way I found to make it run.
Does anyone know why it does not work properly?Continue with the notification:
//Format notifications function celbirthday_notifier_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) { if ( 'new_birthday' === $action ) { if ( (int) $total_items > 1 ) { if ( 'string' === $format ) { $famoso_name = get_the_title( $secondary_item_id ); return apply_filters( 'celebrities_multiple_verifications_notification','Say Happybirthday to '.$famoso_name); } } else { if ( 'string' === $format ) { //falta definir $famoso_link y mas $famoso_name = get_the_title( $secondary_item_id ); return apply_filters( 'celebrities_single_verifications_notification','Say Happybirthday to '.$famoso_name); // $return = apply_filters( $filter, '<a href="' . esc_url( $famoso_link ) . '" title="birthday anounce">' . esc_html( $text ) . '</a>', (int) $total_items, $text, $famoso_link ); // $message = apply_filters( 'bp_activity_at_message_notification_message', $message, $poster_name, $content, $message_link, $settings_link ); } } } do_action( 'celbirthday_notifier_format_notifications', $action, $item_id, $secondary_item_id, $total_items ); return false; }ok, this format function is working right, although I have to do some more work. After it, I have two more functions (mark and delete notifications) wich are also working fine.
//mark notification function celebrities_mark_screen_notifications() { global $bp; bp_notifications_mark_notifications_by_item_id( $bp->loggedin_user->id, $bp->celbirthday_notifier->id, 'new_birthday', $secondary_item_id = false, $is_new='0'); } add_action( 'bp_notifications_screen', 'celebrities_mark_screen_notifications' );and…
function celbirthday_notifier_remove_screen_notifications() { global $bp; bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->profile->slug, 'new_birthday' ); } add_action( 'bp_notifications_screen', 'celbirthday_notifier_remove_screen_notifications' ); add_action( 'xprofile_screen_display_profile', 'celbirthday_notifier_remove_screen_notifications' );As I say, this works fine, but a I am not sure if I need the second “add_action” (xprofile screen).
And finally, to add notification I use this code (which is not working)://Adding notification function buddypress_celebrities_add_notification() { if ( bp_is_active( 'notifications' ) ) { $fecha_act = date("Y-m-d"); $res_birth = $wpdb->get_results( "SELECT wp_best_favs.user_id, wp_postmeta.post_id FROM wp_best_favs LEFT JOIN wp_postmeta ON ( wp_postmeta.post_id = wp_best_favs.celeb_ID ) WHERE ( wp_postmeta.meta_key = 'fecha_na') AND (DAY( <code>wp_postmeta</code>.<code>meta_value</code> ) = DAY( '$fecha_act' )) AND (MONTH( <code>wp_postmeta</code>.<code>meta_value</code> ) = MONTH( '$fecha_act' )) "); $res_birth = array_filter($res_birth); $matriz = objectToArray($res_birth); //I use this function to convert objet array to simple array if(count($matriz)==0) { // está vacío } else { global $wpdb; $bp = buddypress(); $current_time = bp_core_current_time(); foreach ($matriz as $v1) { $famoso_id = $v1[post_id]; $receiver_user_id = $v1[user_id]; $args = array( 'user_id' => $receiver_user_id, 'item_id' => $famoso_id, 'secondary_item_id' => $famoso_id, 'component_name' => $bp->celbirthday_notifier->slug, 'component_action' => 'new_birthday', 'date_notified' => $current_time, 'is_new' => 1, ); bp_notifications_add_notification( $args ); } } } } do_action( 'bp_init', 'buddypress_celebrities_add_notification' );So this is my bigger problem:
Add notifications (function buddypress_celebrities_add_notification()) is not working.
I am pretty sure this is because I am not hooking properly, but I tried so many hooks and none of it did work.
I Know the code is fine because if I comment the two first lines and the two last lines (so I run the code not as a function) the notifications are being added to database.Anyone can help me, to find a proper hook, or just pointing me in the right direction.
Thanks in advance.August 18, 2015 at 8:57 am #243319In reply to: [Resolved] Warning: strstr(): Empty needle in
danbp
ParticipantHi @ramuzic,
read the related ticket for more explanation from here:
https://buddypress.org/support/topic/warning-strstr-empty-needle/#post-239979If the error is still in after changing to one of twenty theme, it’s possible you use a cache plugin containing some old files or your browser history is…very old. Clear it !
August 18, 2015 at 8:42 am #243317In reply to: [Resolved] Warning: strstr(): Empty needle in
ramuzic
Participanti am having this problem as well i have switched themes and still same thing i have read all the other topics on the net about this but it does not explain clear on how to fix this issue can anyone help
August 17, 2015 at 7:51 pm #243300In reply to: Private Message Pagination
danbp
Participantper_page option is availble for the message loop, like inbox (which is default), sentbox and notices where all received message are stored. This option let you paginat the result.
Now, the case of a long conversation. This start in the inbox, where you found it at page 1 or 12…
You click on the message and you see the content. This page is not concerned by the loop containing your per_page option. You can control that in the url.If you read the code in the file i indicated you previously, you’ll see that there is no pagination system in it.
Message option can be set in bp-templates\bp-legacy\buddypress\members\single\messages\message-loop.php
You need to copy this file into your child-theme first so you won’t loose your modification at next update. See codex if you need more infos about theming.
August 17, 2015 at 7:13 pm #243296danbp
ParticipantYou can use the loop which is in groups-loop.php.
Try this and add some CSS class to your need to fit with your theme. code goes to bp-custom.php
function my_groups_avatar_on_profile() { $user_id = bp_displayed_user_id(); if ( bp_has_groups( 'type=alphabetical&user_id=' . $user_id ) ) : ?> <div style="clear:both;"> <ul> <?php while ( bp_groups() ) : bp_the_group(); ?> <li style=""> <div> <a href="<?php bp_group_permalink() ?>"><?php bp_group_avatar_thumb() ?></a> </div> </li> <?php endwhile; endif; ?> </ul> </div> <?php } add_action ( 'bp_after_member_header', 'my_groups_avatar_on_profile' );August 17, 2015 at 2:40 pm #243289In reply to: Users can’t reply to private messages
Henry Wright
ModeratorIf you don’t see the problem with TwentyFifteen activated, the problem is likely to be theme-related and, One Community being a premium theme, none of us here can see the theme’s code. Try opening a support ticket on the theme’s support forum.
August 17, 2015 at 2:36 pm #243288In reply to: [Resolved] Problem with duplicate content
Henry Wright
ModeratorThis could be theme-related. Which theme are you using?
August 17, 2015 at 1:43 pm #243286In reply to: Sitewide Notice
shanebp
ModeratorThere is no Notifications tab in wp-admin.
You don’t see that option on the front-end when you go to your profile > Messages > Compose ?
If not, try switching to a WP theme like 2015 to determine if there is an issue with your theme.August 16, 2015 at 11:59 pm #243278In reply to: add a create group button inside Profile > groups
Quinn Goldwin
ParticipantNever mind, i figured it out.
add this
<span class="create-a-group"><?php echo bp_get_group_create_button() ?></span>to groups.php and place it in a child theme located in members/single/groups.php
I added the code before
<div class="item-list-tabs no-ajax" id="subnav" role="navigation">You can mark this as resolved
August 16, 2015 at 3:13 am #243249In reply to: My accaunt in menu or header
danbp
ParticipantHowdy [username] is part of WordPress Toolbar. When BP is activated, it add a sub-menu to this menu.
If you want it elswhere, it’s not really possible as the BP part of it was written to go to the admin_bar only.
To get a similar menu, you simply add buddypress menu to your theme main menu (explained on above codex link). But this menu will be static and you cant get same details.
Another solution is to recode that menu, so you can add it with a filter function to wp_nav_menu, which handles the main menu or the header menu.
To do this, you can use a new Walker Class extention or the existing filter. Possibly also some other ways to do this, but i don’t know them.
To remove the Howdy menu and the attached BuddyPress Profile sub menu from the Toolbar, you can use this snippet (in functions.php or bp-custom.php):
function bpfr_remove_my_account_menu() { global $wp_admin_bar; $wp_admin_bar->remove_menu('my-account'); } add_action( 'wp_before_admin_bar_render', 'bpfr_remove_my_account_menu' );Codex References
https://codex.wordpress.org/Function_Reference/wp_nav_menu
https://codex.wordpress.org/Navigation_MenusAugust 16, 2015 at 12:38 am #243241In reply to: Disabling Admin ability to see User Notifications
manicexpression
ParticipantOkay, now I’m getting somewhere, This is how I’ve set it up,
wp-content/themes/enfold(My theme)/community/members/single/notifications.php
It seems to be overriding the original file as it should be, the only problem now is that notifications disappear entirely(when clicking on the notification tab on the profile, there’s just a white space where the information should be popping up)
This is how I implemented your code,
switch ( bp_current_action() ) : // Unread case 'unread' : bp_get_template_part( 'members/single/notifications/unread' ); break; // Read case 'read' : bp_get_template_part( 'members/single/notifications/read' ); break; // Any other default : bp_get_template_part( 'members/single/plugins' ); break; bp_is_my_profile() endswitch;Now I’m not much of a coder, so I wouldn’t doubt that I’ve misinterpreted what you meant by “wrap the current markup”
Regardless, thanks for your help so far,I was lost, now I’m less lost. 🙂
August 15, 2015 at 11:51 pm #243239djsteveb
ParticipantI would GUESS that you could edit that plugin to add in the code as mentioned above https://buddypress.org/support/topic/how-users-can-link-to-their-profile/
Or ask the plugin author for clarification.
I stopped using that plugin when they added the extra security stuff for strong passwords that broke things for me.. however the plugin’s support page is pretty active, and given that he/she has options for redirecting users after login based on role – there may be an easy way to add such functionality to the plugin by asking the plugin author.
There is a bit of info with some of the functions here ->https://codex.buddypress.org/themes/members-navigation-menus/
I see others are asking about bp xprofile fields and such within the them my login support forum,
( wordpress.org/support/plugin/theme-my-login )
so hopefully this plugin author will add more and more BP options – I enjoyed using that plugin some time ago – hope it continues to mature.August 15, 2015 at 11:41 pm #243237atfpodcast
ParticipantNo i not in my navigation i was talking about on the widget for my them login. Nother of that works for my situation. I am using the plugin My Theme Login and I want to put it there.=
-
AuthorSearch Results