Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'theme'

Viewing 25 results - 5,526 through 5,550 (of 31,072 total)
  • Author
    Search Results
  • #243382
    muskokee
    Participant

    That 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.

    #243377
    muskokee
    Participant

    Thanks 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.4

    #243362
    yasesin
    Participant

    I 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 🙂

    #243354
    danbp
    Participant

    hi @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 ?

    #243350
    danbp
    Participant

    BP’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.

    #243323
    danbp
    Participant

    I 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.

    #243321
    chicho1969
    Participant

    okay, 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.

    #243319
    danbp
    Participant

    Hi @ramuzic,

    read the related ticket for more explanation from here:
    https://buddypress.org/support/topic/warning-strstr-empty-needle/#post-239979

    If 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 !

    #243317
    ramuzic
    Participant

    i 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

    #243300
    danbp
    Participant

    per_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.

    #243296
    danbp
    Participant

    You 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' );
    #243289
    Henry Wright
    Moderator

    If 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.

    #243288
    Henry Wright
    Moderator

    This could be theme-related. Which theme are you using?

    #243286

    In reply to: Sitewide Notice

    shanebp
    Moderator

    There 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.

    #243278
    Quinn Goldwin
    Participant

    Never 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

    #243249
    danbp
    Participant

    @sismis,

    Howdy [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_Menus

    #243241
    manicexpression
    Participant

    Okay, 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. 🙂

    djsteveb
    Participant

    I 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.

    atfpodcast
    Participant

    No 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.=

    danbp
    Participant

    @djsteveb +1 !


    @atfpodcast
    ,

    – you go to your menu dashboard and select the menu of your theme (if exist, it should be there)
    – you open screen option (top right) on menu admin and select BuddyPress
    – you select profile in the left column where BuddyPress appeared and give it a title XYZ
    – save and you’re done !

    Now you have a XYZ button near Home, About and whatever is already on your theme menu.
    Doc is here https://codex.buddypress.org/getting-started/buddypress-links-in-wordpress-menus/

    #243227
    shanebp
    Moderator

    You could create a template overload of this file:
    bp-templates\bp-legacy\buddypress\members\single\notifications.php

    Then wrap the current markup with this conditional: bp_is_my_profile()

    #243209
    djsteveb
    Participant

    @darkhelmet1 – settings -> buddypress -> third tab near top is “settings”
    first checkbox: Show the Toolbar for logged out users

    Is it checked?

    Which theme are you using?

    Any other plugins installed / activated?

    #243191
    kostasbarkas30
    Participant

    i deactivated all the plugins and still the buttons don’t display at this them only. when i change to other themes buttons are ok. i am considering how to hack this theme so as to have this 3 buttons in my theme

    #243190
    Henry Wright
    Moderator

    This is simply the way your theme displays things on the page. If you’d like a sidebar on those pages, you can modify the templates. See the Template Hierarchy article for more info.

    #243188
    Markus Echterhoff
    Participant

    Found the culprit and the fix here in case anyone encounters the same issue: https://codex.buddypress.org/themes/buddypress-companion-stylesheets/#existing-styled-themes

Viewing 25 results - 5,526 through 5,550 (of 31,072 total)
Skip to toolbar