Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'string plugins template'

Viewing 24 results - 26 through 49 (of 49 total)
  • Author
    Search Results
  • ds123
    Participant

    can someone please advise on how i can get rid ofthese warnings in the log?

    PHP Warning: Illegal string offset ‘content’ in /wp-content/plugins/buddypress/bp-members/bp-members-template.php on line 981

    #244243
    Dreitausend
    Participant

    Since I really like this code …

    
    <?php
    /*
    * Called by wp-content/themes/twentyten/plugins/events-manager/placeholders/attendees.php
    * Called by procedure described in /wp-content/plugins/events-manager/templates/placeholders/readme.txt
    *
    *
    * @Shonu
    * @Date 16/08/2011 11:45:19
    */
    showBookingsTable();
    ##########################################################################################################
    function showBookingsTable($attributes = array()){
       global $EM_Event;
       if(!$EM_Event || !$EM_Event->rsvp ) return;
       $lister     = $EM_Event->get_bookings(); ///$bookings->get( $args = array());//
       $bookerList = $lister->bookings;
       $wpCurrentUserObj = wp_get_current_user();
       $currentUserID = $wpCurrentUserObj->ID;
       $userProfile = "/wp-admin/user-edit.php?user_id=#ID#";
       $table .= "<tr>"
                            ."<th>Full Name</th>"
                            ."<th>Time registered</th>"
                            ."<th>Status</th>"
                            ."<th>Seats</th>"
                            ."<th>Comments</th>"
                   ."</tr>";
       //error_reporting(E_WARNING);
       foreach($bookerList as $EM_Booking)
       {
             $atendeesNo = $atendeesNo + $EM_Booking->spaces;
             if(0){
             echo "<pre>";
             print_r($EM_Booking);
             echo "</pre>";
             }
             $bookedUserID = $EM_Booking->person_id;//Not the user ID!! It is a ticket id or so
             $personObj = $EM_Booking->person;
    
             $userFirstname = $personObj->first_name;
             $userLastname  = $personObj->last_name;
             $userDispname  = $EM_Booking->person->display_name;
             if(0){
             echo "<pre>";
             print_r($personObj);
             echo "</pre>";
             }
             /* @var $EM_Booking EM_Booking */
             $aTRs = array();
             foreach( $EM_Booking->get_tickets_bookings() as $EM_Ticket_Booking)
             {
                /* @var $EM_Ticket EM_Ticket */
                /* @var $EM_Ticket_Booking EM_Ticket_Booking */
                $EM_Ticket = $EM_Ticket_Booking->get_ticket();
                $isCurrentUser = $bookedUserID == $currentUserID;
    
                $userName = "<span title='login or register to reveal'>*********</span>";
                if(is_user_logged_in()){
                   if($userLastname && $userFirstname)
                      $userName = $userFirstname . " " . $userLastname ;
                   else //if($userFirstname)
                      //$userName = $EM_Booking->person->display_name;
                      $userName = $userDispname;
                }
                $sorterStringPrefix = "<!-- ".$EM_Booking->timestamp."-->";
                //$userProfile = $currentUserID ? "<a href=\"".str_replace("#ID#", $currentUserID, $userProfile)."\">$userName</a>":$userName;
                $row = array(
                   //$EM_Booking->id,
                   $userName ,//. " [$bookedUserID = $currentUserID]"
                   //$EM_Booking->person->user_email,
                   //$EM_Booking->person->phone,
                   date('d.m.Y H:i', $EM_Booking->timestamp),
                   $EM_Booking->get_status(),
                   //$EM_Ticket->name,
                   $EM_Ticket_Booking->get_spaces(),
                   //$EM_Ticket_Booking->get_price(),
                   preg_replace("/<|>/", "-", $EM_Booking->comment)
                );
                //Display all values
                $newTR = $sorterStringPrefix."<tr ".($isCurrentUser ? "style='background-color:#FFFFDD;'":"")."><!-- $currentUserID === {$EM_Booking->id} -->\r\n";
                foreach($row as $value){
                   //$value = str_replace('"', '""', $value);
                   //$value = str_replace("=", "", $value);
                   //$file .= '"' .  preg_replace("/\n\r|\r\n|\n|\r/", ".     ", $value) . '",';
                   $newTR .= "\t<td>" .  $value . "</td>\r\n";
                }
                $newTR .= "</tr>\r\n";
                $aTRs[$EM_Booking->timestamp] = $newTR;
             }
    
             if(0)
                $table .= $newTR;
             else{
                natsort($aTRs);
                $table .= implode("", $aTRs);
             }
       }//booker list
       $table .= "<tr><th colspan='3' style='text-align:right'>Total Attendees so far</th><td><b>$atendeesNo</b></td></tr>";
       reset($bookerList);
       if(!$lister || !$bookerList)
          echo "<p><b>Sorry, nobody is yet attending...</b></p>";
       else
          echo "<table><caption><h3>People Attending</h3></caption>\r\n" . $table . "</table>";
    }
    ?>
    

    … I tried to implement your code-snippet into it. But since I’m not a programmer, I just can’t figure it out. So I’d be very happy if you could give me a hint šŸ™‚

    #239634
    proteas
    Participant

    I deactivated all other plugins besides BuddyPress. Activated the 2014 theme. Changed the language to English and made sure BuddyPress pages were all assigned. The permalinks were already not on default. Then I deleted the wp-config and htaccess.

    Then I got to the point of install. I was asked for database information. I put the information of my already existing database, but I changed the wp_ table prefix to match the one I use for my already existing database and WP said that there was already an installation and didn’t go further. It automatically generated the wp-config with new hashes, but not .htaccess. I created it myself and only put the WP default .htaccess code:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Just to make sure, I also downloaded my entire public_html directory, and also downloaded a fresh copy of WordPress 4.2.2 and BuddyPress 2.2.3.1 and then ran them through a file difference checker application. The only two differences I found were:

    1. “version.php” inside the WordPress “includes” folder
    had as last line $wp_local_package = ‘el’; and I removed it and

    2. in BuddyPress “bp-members” folder the file “bp-members-template.php” I had changed a language string and I replaced the entire file with the fresh copy.

    All other WordPress and BuddyPress files are completely identical with the original versions.

    I used a different browser to register, but the problem persists exactly the same. It doesn’t work for any gmail account, but works for 1 of the two domains that used to work before.

    #238050
    danbp
    Participant

    – keep in mind that I’m not doing a full on translation, just this BuddyPress translation to change Friends to Connections.

    you put only those strings into your custom po. If the concerned string is on a template file, you can also hardcode it there, and use a template overload to get in from your child-theme in that case. So you haven’t to struggle with poEdit. In this case also, you have to take care of the details given by @shanebp.

    – does the language define statement in wp-config.php need to be set for this to work?

    This is no more used since WP 4.0. You can remove it.

    – buddypress-en_US.po and buddpress-en_US.mo files need to be in which folder?

    /wp-content/languages/plugins/ (the po file is not used by gettext, it’s only a human readable work file – you can store it elsewhere if you want. You just have to remind where in that case šŸ˜‰ ).

    if you put it in /language/ (of course you can), you will see buddypress-en_US as a language setting. Which is of course not the site language.

    But in any case, keep a copy of your work in a safe place outside of WP.

    #233407
    bringmesupport
    Participant

    Hi @fptquangngai,

    I am assuming you are referring to the name shown in the screenshot below:

    Screenshot

    This name you want to change is coming from the line bp_core_get_userlink( $user_id ); in the snippet you provided, which is part of the bp_message_get_recipient_tabs() function defined in the BuddyPress plugin under bp-members > admin > bp-members-functions.php.

    It seems there are two things you can do here:

    1. You can replace the bp_core_get_userlink() function in the message template (located at wp-content\plugins\buddypress\bp-templates\bp-legacy\buddypress\members\single\messages\compose.php) with your own custom function. See BuddyPress Codex for how to properly do this.

    OR

    2. Create a filter.

    Since the bp_core_get_userlink() function uses the ‘bp_core_get_userlink’ filter for the returned value, you can hook into this filter and modify it in your theme’s functions.php file (or your own custom plugin). The only problem is that since the bp_core_get_userlink() function is used in other parts of the code (notably the BuddyPress Login Widget), you will have to make it so that the custom filter is used only under certain conditions.

    Here is the custom filter I came up with. Its not refined, but serves as a working example:

    
    add_filter( 'bp_core_get_userlink', 'my_bp_filter', 10, 2 );
    function my_bp_filter( $string, $user_id ){  
        global $pagename;
        if ( isset( $_GET['r']) && $pagename === 'compose' ){
            $username = bp_core_get_username( $user_id );
            if ( $_GET['r'] === $username ) {
                $string = explode(' ', $string);
                $string = $string[0]. ' '. $string[1]. 'Alt="' . $username . '">'. $username . '</a>';
            }
        }
        return $string;
    }
    
    #230835

    This is the code I added at line 278 in /wp-content/plugins/buddypress-activity-plus/lib/class_bpfb_binder.php to create the action. The credit for this code is @Juanma in WordPress.org forum. (couldn’t find the original thread). In this case I’m creating an action for images upload.

    function ajax_update_activity_contents () {
      $bpfb_code = $activity = '';
      $aid = 0;
      $codec = new BpfbCodec;
      if (@$_POST['data']['bpfb_photos']) {
        $images = $this->move_images($_POST['data']['bpfb_photos']);
        $bpfb_code = $codec->create_images_tag($images);
        $type = 'bpfb_share_wall_photos';
      }
    
      $bpfb_code = apply_filters('bpfb_code_before_save', $bpfb_code);
    
      // All done creating tags. Now, save the code
      $gid = (int)@$_POST['group_id'];
      if ($bpfb_code) {
        global $bp;
        $content = @$_POST['content'] . "\n" . $bpfb_code;
        $content = apply_filters('bp_activity_post_update_content', $content);
        $user_id = $bp->loggedin_user->id;
        $userlink = bp_core_get_userlink( $user_id );
    
        $author = bp_core_get_userlink( $author_id );
        $activity_url = bp_activity_get_permalink( $item_id );
    
        $aid = $gid ?
          groups_post_update(array('conte nt' => $content, 'group_id' => $gid)) : 
          bp_activity_add(
            array(
              'action' => apply_filters( 'activity_update', sprintf( __( '%s shared a link', 'buddypress' ), $userlink ), $user_id ),
              'content' => $content,
              'component' => 'activity',
              'type' => $type,
              'user_id' => $user_id
            )
          );
          if ($aid) {
    			ob_start();
    			if ( bp_has_activities ( 'include=' . $aid ) ) {
    				while ( bp_activities() ) {
    					bp_the_activity();
    					if (function_exists('bp_locate_template')) bp_locate_template( array( 'activity/entry.php' ), true );
    					else locate_template( array( 'activity/entry.php' ), true );
    				}
    			}
    			$activity = ob_get_clean();
    		}
    		header('Content-type: application/json');
    		echo json_encode(array(
    			'code' => $bpfb_code,
    			'id' => $aid,
    			'activity' => $activity,
    		));
    		exit();
    	}
    }

    And this is the code that works for activity stream. It shows just the activities with this action, but when you click the ‘load more’ button it loads the regular stream.
    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . '&action=bpfb_share_wall_photos') ) : ?>

    #192079
    danbp
    Participant

    I just tested Duena and the BP translation is fine.

    Recheck your po/mo files. Here what you must have:

    duena – leave as is.
    buddypress/bp-languages/buddypress.pot
    wp-config – if you use english, as it’s default language you have nothing to do
    // define(‘WP_LANG’, ” );
    wp-content/languages/plugins/buddypress-en_US.mo

    Now if you want to modify only some strings, make a copy of the pot file and put it in a folder outside of buddypress.

    From this copy you remove anything you don’t want and keep only the 2 lines or 4 lines (if plural form) who belong to the string you want to change. You keep only the string you want to change.
    Once done, save and rename it buddypress-en_US.po and open it with a text editor (not poEdit), as we’re going to modify the header.

    msgid ""
    msgstr ""
    "PO-Revision-Date: 2014-09-12 00:05+0100\n"
    "MIME-Version: 1.0\n"
    "Content-Type: text/plain; charset=UTF-8\n"
    "Content-Transfer-Encoding: 8bit\n"
    "Plural-Forms: nplurals=2; plural=n > 1;\n"
    "X-Generator: Poedit 1.5.7\n"
    "Project-Id-Version: BuddyPress 2.0.2\n"
    "POT-Creation-Date: \n"
    "Last-Translator: \n"
    "Language-Team: \n"
    "Language: en\n"
    "X-Poedit-SourceCharset: UTF-8\n"
    "X-Poedit-Basepath: .\n"
    "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
    "_n_noop:1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;esc_attr__;"
    "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
    "X-Poedit-SearchPath-0: ..\n"

    The rest of the file looks like this:

    msgid "Friendships"
    msgstr ""  <strong><- replacement goes here</strong>
    
    #: bp-friends/bp-friends-template.php:588
    msgid "%s friend"
    msgid_plural "%s friends"
    msgstr[0] ""
    msgstr[1] ""

    Save in text format utf8 without BOM. (important)

    Now you can open this po file with poEdit, do your translation and save so that poEdit generate a mo file (see poEdit settings first to get this automatically each time you save a file).

    Copy the mo file in the appropriate folder and, normally, you’re done.

    References
    https://codex.wordpress.org/Translating_WordPress
    https://make.wordpress.org/polyglots/handbook/translating/basics/
    http://www.wpbeginner.com/wp-tutorials/how-to-disable-automatic-updates-in-wordpress/

    The definitive guide to disabling auto updates in WordPress 3.7

    #188349
    danbp
    Participant

    Hi @bnowthen,

    this is one of the most common thing you can do with BuddyPress. šŸ˜‰ .
    To do that, you have to read the Codex, about members loop.

    First, you will create a child-theme of 2014.
    Than you add a folder called buddypress to it.
    In this folder, you add a sub folder called members.
    You than make a copy of members-loop.php.
    This file is in wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/

    Now, you open the copied file and replace the content of line 16.

    Replace this:
    <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) : ?>
    with this:
    <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) . '&type=alphabetical' ) ) : ?>

    Save and enjoy.

    References
    https://codex.wordpress.org/Child_Themes

    Members Loop

    godavid33
    Participant

    I believe the above doesn’t work correctly because I am adding the new content as a subnav which by default tried to inherit the parent template (correct me if I’m wrong).

    Here is what I came up with (this all goes in functions.php), it still needs fine tuning and testing (for example I broke pagination and commenting):

    
    function my_test_setup_nav() {
            global $bp;
           
            $parent_slug = 'wall';
            $child_slug = 'all';
    //name, slug, screen, position, default subnav
            bp_core_new_nav_item( array( 'name' => __( 'test' ), 'slug' => $parent_slug, 'screen_function' => 'my_profile_page_function_to_show_screen', 'position' => 40, 'default_subnav_slug' => 'test_sub' ) );
    }
    
    function my_profile_page_function_to_show_screen() {
    	//add title and content here - last is to call the members plugin.php template
    	add_action( 'bp_template_title', 'my_profile_page_function_to_show_screen_title' );
    	add_action( 'bp_template_content', 'my_profile_page_function_to_show_screen_content' );
    	bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
    }
    function my_profile_page_function_to_show_screen_title() {
    	echo 'something';
    }
    
    function my_profile_page_function_to_show_screen_content() {
    	global $activities_template;
    
    	$personal_activites = array();
    	$friends_activites = array();
    	$group_activites = array();
    	
    	//Get friends Loop
    	do_action( 'bp_before_activity_loop' );
    	if ( bp_has_activities( bp_ajax_querystring( 'activity' )."&scope=friends") ) :
    		$friends_activites = $activities_template->activities;
    	endif;
    	do_action( 'bp_after_activity_loop' ); 
    	
    	//Get personal Loop
    	do_action( 'bp_before_activity_loop' );
    	if ( bp_has_activities( bp_ajax_querystring( 'activity' )."&scope=just-me") ) :
    		$personal_activites = $activities_template->activities; 
    	endif;
    	do_action( 'bp_after_activity_loop' ); 
    	
    	//Get groups Loop
    	do_action( 'bp_before_activity_loop' );
    	if ( bp_has_activities( bp_ajax_querystring( 'activity' )."&scope=groups") ) :
    		$group_activites = $activities_template->activities; 
    	endif;
    	do_action( 'bp_after_activity_loop' ); 
    	
    	do_action( 'bp_before_member_activity_post_form' );
    		bp_get_template_part( 'activity/post-form' );
    	do_action( 'bp_after_member_activity_post_form' );	
    	
    	$activities_template->activities = array_merge($personal_activites,$group_activites,$friends_activites);
    	quickSort( $activities_template->activities );
    
    ?>
    	<?php do_action( 'bp_before_activity_loop' ); ?>
    
    		<?php /* Show pagination if JS is not enabled, since the "Load More" link will do nothing */ ?>
    		<noscript>
    			<div class="pagination">
    				<div class="pag-count"><?php bp_activity_pagination_count(); ?></div>
    				<div class="pagination-links"><?php bp_activity_pagination_links(); ?></div>
    			</div>
    		</noscript>
    
    		<?php if ( empty( $_POST['page'] ) ) : ?>
    
    			<ul id="activity-stream" class="activity-list item-list">
    
    		<?php endif; ?>
    
    		<?php while ( bp_activities() ) : bp_the_activity(); ?>
    
    			<?php bp_get_template_part( 'activity/entry' ); ?>
    
    		<?php endwhile; ?>
    
    		<?php if ( bp_activity_has_more_items() ) : ?>
    
    			<li class="load-more">
    				<a href="#more"><?php _e( 'Load More', 'buddypress' ); ?></a>
    			</li>
    
    		<?php endif; ?>
    
    		<?php if ( empty( $_POST['page'] ) ) : ?>
    
    			</ul>
    
    		<?php endif; ?>
    
    	<?php do_action( 'bp_after_activity_loop' ); ?>
    
    	<form action="" name="activity-loop-form" id="activity-loop-form" method="post">
    
    		<?php wp_nonce_field( 'activity_filter', '_wpnonce_activity_filter' ); ?>
    
    	</form>
    <?php	
    }     
    
    add_action( 'bp_setup_nav', 'my_test_setup_nav' );
    
    // Non-recurive Quicksort for an array of Person objects
    // adapted from http://www.algorithmist.com/index.php/Quicksort_non-recursive.php
    function quickSort( &$array )
    {
    	$cur = 1;
    	$stack[1]['l'] = 0;
    	$stack[1]['r'] = count($array)-1;
    
    	do{
    		$l = $stack[$cur]['l'];
    		$r = $stack[$cur]['r'];
    		$cur--;
    
    		do{
    			$i = $l;
    			$j = $r;
    			$tmp = $array[(int)( ($l+$r)/2 )];
    
    			// partion the array in two parts.
    			// left from $tmp are with smaller values,
    			// right from $tmp are with bigger ones
    			do{
    				while( strtotime($array[$i]->date_recorded) > strtotime($tmp->date_recorded) )
    					$i++;
    
    				while( strtotime($tmp->date_recorded) > strtotime($array[$j]->date_recorded) )
    					$j--;
    
    				// swap elements from the two sides
    				if( $i <= $j){
    					$w = $array[$i];
    					$array[$i] = $array[$j];
    					$array[$j] = $w;
    
    					$i++;
    					$j--;
    				}
    
    			}while( $i <= $j );
    
    			if( $i < $r ){
    				$cur++;
    				$stack[$cur]['l'] = $i;
    				$stack[$cur]['r'] = $r;
    			}
    			$r = $j;
    
    		}while( $l < $r );
    
    	}while( $cur != 0 );
    
    }
    

    I’m sure there is a more elegant and seamless way to do it, and I will try to figure out exactly what that is. I’ll probably end up making templates for this to try and have cleaner code and stop the ajax bugs I created.

    But for now, congratulations, you now have an aggregate news feed.

    #175154
    2b.simone
    Participant

    hi,
    maybe you can find a solution here

    Activity Loop

    i had this
    <?php if ( bp_has_activities( bp_ajax_querystring( ‘activity’ ) ) ) : ?>
    in …/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/activity-loop.php

    i changed this way
    <?php if ( bp_has_activities( bp_ajax_querystring( ‘object=status’ ) ) ) : ?>

    it works!

    sorry for my bad english

    bye

    Visual Harbor
    Participant

    In this file:
    /wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/activity-loop.php

    Find Line 1:

    
    <?php do_action( 'bp_before_activity_loop' ); ?>
    

    Change Line 3 to this:

    
    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ).'display_comments=stream' ) ) : ?>
    
    #169235
    LogicWolf
    Participant

    Hi David,

    Hoping I’ll be able to help. I’ve seen alot of questions on the topic of How To Change and Reorder BuddyPress Group tabs and not much great direction. Hopefully you won’t be saying that after my posts… What I’m really hoping is someone comes in with a simpler, more elegant solution šŸ™‚

    Were you able to control the standard tabs?

    For the standard group tabs, you can control them directly like this:

    if (isset($bp->groups->current_group->slug) && $bp->groups->current_group->slug == $bp->current_item) 
    {
            $bp->bp_options_nav[$bp->groups->current_group->slug]['home']['position'] = 10;
            $bp->bp_options_nav[$bp->groups->current_group->slug]['members']['position'] = 60;
            $bp->bp_options_nav[$bp->groups->current_group->slug]['notifications']['position'] = 110;
    }

    So the code to put in functions.php might look like this:

    function whff_setup_nav() 
    {
    
      if (isset($bp->groups->current_group->slug) && $bp->groups->current_group->slug == $bp->current_item) 
      {
         $bp->bp_options_nav[$bp->groups->current_group->slug]['home']['position'] = 10;
         $bp->bp_options_nav[$bp->groups->current_group->slug]['members']['position'] = 60;
         $bp->bp_options_nav[$bp->groups->current_group->slug]['notifications']['position'] = 110;
    }
    
    } 
    add_action( 'bp_setup_nav', 'whff_setup_nav', 100000 );

    CUSTOM BUDDYPRESS GROUP TABS
    Now, the non-standard tabs are the tricky ones. You can’t access them through $bp->bp_options_nav (at least I couldn’t figure out how to do this.)

    Nonstandard Group tabs through the $wp_filter global. A good starting point is to dump the $wp_filter variable and get a look at it’s guts. Add this code in functions.php:

    global $wp_filter;
        
    foreach ( (array)$wp_filter as $key => $value ) 
    {
       echo '<pre>';
       echo '<strong>' . $key . ': </strong><br />';
       print_r( $value );
       echo '</pre>';
    }
    

    $wp_filter is a bunch of nested arrays. Search through the output for your Group Tab Names (i.e. search for “Calendar”) and you will find something like this:

    [00000000746c6153000000004e38ec1f_register] => Array
                    (
                        [function] => Array
                            (
                                [0] => BP_Group_Calendar_Extension Object
                                    (
                                        [visibility] => private
                                        [enable_create_step] => 
                                        [enable_nav_item] => 1
                                        [enable_edit_item] => 
                                        [name] => Calendar
                                        [slug] => calendar
                                        [admin_name] => 
                                        [admin_slug] => 
                                        [create_name] => 
                                        [create_slug] => 
                                        [create_step_position] => 81
                                        [nav_item_position] => 40
                                        [nav_item_name] => 
                                        [display_hook] => groups_custom_group_boxes
                                        [template_file] => groups/single/plugins
                                    )
    
                                [1] => _register
                            )
    
                        [accepted_args] => 1
                    )
    

    That’s your Group tab and all the hooks you need to change attributes (in this case it’s the tab that says “Calendar”.)

    But… unfortunately you can’t use the [00000000746c6153000000004e38ec1f_register] as a handle — that string is random and changes every time. But, now you know the class name is BP_Group_Calendar_Extension Object and you can search for that in the $wp_filter array and make the changes.

    Hope this gets you closer, let me know how you make out. Cheers David!

    FunseekersUSA
    Participant

    Ok… I’m a dope.

    Any and all help will be greatly appreciated by this technically deficit boobhead! I can usually figure something out with good instruction – and I’ve tried figuring this out unsuccessfully šŸ™

    I thought I needed to activate the BuddyPress Template Pack and when I did, I now get:

    Fatal error: Cannot redeclare bp_dtheme_ajax_querystring() (previously declared in /home/usafun/public_html/blog/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/ajax.php:91) in /home/usafun/public_html/blog/wp-content/themes/custom-community/_inc/ajax.php on line 81

    I can’t get into dashboard of my blog to deactivate the template pack or anywhere else on the website at http://www.funseekersusa.com/blog šŸ™

    This is my son’s non-profit organization (he’s 13 and just incorporated in Florida), so I really need help undoing what I did to crap out his blog.

    Again, any and all help would be greatly appreciated (and is desperately needed).

    modemlooper
    Moderator

    explain more about your set up. multisite? using custom themes? plugins? Sounds like you are using template pack on various sub sites, yes?

    modemlooper
    Moderator

    oops wrong function. This will add a sub nav under profile called Page. I don;t think you can change the slug for this item for different pages. What you would want is /page/name-of-page/

    In BuddyPress the part after /page/ would be considered an action variable. So you could do a looopy of some sorts to get the action and match it up to a page.

    Example code to read the variable and then you could display an appropriate page. if you visit /page/2/ it will echo the string. action variables are anything after an action. page is the action so anything in between slashes = variable and they are stored in an array.

    if you had this in the url:
    page/2/3/4/

    the variables can be accessed like this:
    $bp->action_variables[0] = 2
    $bp->action_variables[1] = 3
    $bp->action_variables[3] = 4

    `function bp_page_nav(){
    global $bp;

    $user_domain = bp_displayed_user_domain() ? bp_displayed_user_domain() : bp_loggedin_user_domain();

    $profile_link = trailingslashit( $user_domain . $bp->profile->slug );

    bp_core_new_subnav_item( array(
    ‘name’ => ‘Page’,
    ‘slug’ => ‘page’,
    ‘parent_url’ => $profile_link,
    ‘parent_slug’ => $bp->profile->slug,
    ‘screen_function’ => ‘page_screen’,
    ‘position’ => 20

    ) );
    }
    add_action(‘bp_setup_nav’, ‘bp_page_nav’, 10 );

    function page_screen(){
    global $bp;

    add_action( ‘bp_template_content’, ‘bp_page_screen_content’ );

    bp_core_load_template( apply_filters( ‘bp_core_template_plugin’, ‘members/single/plugins’ ) );
    }

    function bp_page_screen_content(){
    global $bp;

    $variable = $bp->action_variables[0];

    if( $variable == ‘2’ ){
    echo ‘page 2’;
    }

    }
    `

    #141043
    danbpfr
    Participant

    Ola !

    You have 2 translation when running BP. One for WP and one for BP
    And many plugins using their own mo file. In this case, the translation is in a “lang” or “languages” folder delivered with the plugin.

    The wp translation is called es_ES.mo and is in wp-content/languages/es_ES.mo
    The BP mo had to be in this same directory wp-content/languages/buddpress-es_ES.mo

    You have also to declare your site language in wp-config.php (define(‘WP_LANG’,’es_ES’) and you have to set this, if not already done, in WP’s settings.

    If all this is correctly made, all WP/BP strings should be in spanish. If despite correct settings, you have strings in english, it’s probably because you’re using a theme or a plugin with uninternationalized strings.

    The template pack has nothing to do with your problem. bp-template-pack is a kind of guide to help you modify/upset non BP compatible themes. The plugin doesn’t need to be in spanish.

    To find exactly where your untranslatable strings are, i suggest you to open buddypress/bp-languages/buddypress.pot and look above the word in english, the file name where the word is used. So simple as that ! ;-)

    EDIT: the concerned file is bp-themes/bp-default/members/single/settings/delete-account.php
    If you use a custom theme for your install, you have to use the same path:
    your_theme/members/single/settings/delete-account.php

    In this file, you must have this line 54:
    `

    `

    #118163

    I am having similar issues trying to get my BuddyPress install to work with my Headway BuddyPress Addon. I set up the BuddyPress plugin. -no problems- I then downloaded and set up the recommended BuddyPress Template Pack plugin. -site still working- However when I activate the Headway BuddyPress Add-On plugin, I receive the following error:

    Fatal error: Cannot redeclare bp_dtheme_ajax_querystring() (previously declared in /home/mbctv/public_html/test4_2/wp-content/plugins/headway-buddypress-add-on/lib/buddypress-theme/_inc/ajax.php:2) in /home/mbctv/public_html/test4_2/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/ajax.php on line 81

    Has anyone received this message? And can someone please help me?? Thanks!

    Becky

    #110799
    Boone Gorges
    Keymaster

    It looks like you need to do two things.

    1) Don’t do bp_ajax_querystring( ‘friends’ ). The function does not take arguments like ‘friends’. Just do bp_ajax_querystring() in the template file.
    2) Here is a function that, when placed in wp-content/plugins/bp-custom.php, will do what you want:
    `function bbg_my_friends_activity_default( $qs ) {
    if ( is_user_logged_in() && empty( $qs ) && empty( $_POST ) ) {
    $qs = ‘scope=friends’;
    }

    return $qs;
    }
    add_filter( ‘bp_ajax_querystring’, ‘bbg_my_friends_activity_default’, 999 );`

    The problem is that this is almost certain not to work correctly with the function you have in your template file:
    `function my_query_filter_new ( $query_string ) {
    $query_string .= ‘&per_page=10’;
    return $query_string; }
    add_filter( ‘bp_ajax_querystring’, ‘my_query_filter_new’ );`

    If you need this latter functionality, I would try to do some work to combine the functions so that the query strings are added in the proper order.

    Pisanojm
    Participant

    @nuprn1 @mercime @boonebgorges

    Thank you for leading me to the code to get to this… I basically just did a super-slight mod of Rich’s code. Here is what I used and I put it in the the bp-custom.php file in the plugins directory:

    `<? function my_group_loop_activity_item() {

    global $bp, $activities_template;

    if ( !bp_is_active( ‘activity’ ) )

    return;

    if ( !bp_group_is_visible() )

    return;

    $show_hidden = false;

    /* Group filtering */

    $object = $bp->groups->id;

    $primary_id = bp_get_group_id();

    if ( ‘public’ != $bp->groups->current_group->status && groups_is_user_member( $bp->loggedin_user->id, bp_get_group_id() ) )

    $show_hidden = true;

    /* Note: any params used for filtering can be a single value, or multiple values comma separated. */

    $defaults = array(

    ‘display_comments’ => false, // false for none, stream/threaded – show comments in the stream or threaded under items

    ‘sort’ => ‘DESC’, // sort DESC or ASC

    ‘page’ => 1, // which page to load

    ‘per_page’ => false, // number of items per page

    ‘max’ => 1, // max number to return

    ‘include’ => false, // pass an activity_id or string of ID’s comma separated

    ‘show_hidden’ => $show_hidden, // Show activity items that are hidden site-wide?

    /* Filtering */

    ‘object’ => $object, // object to filter on e.g. groups, profile, status, friends

    ‘primary_id’ => $primary_id, // object ID to filter on e.g. a group_id or forum_id or blog_id etc.

    ‘action’ => ‘new_forum_topic’, // action to filter on e.g. activity_update, new_forum_post, profile_updated

    ‘secondary_id’ => false, // secondary object ID to filter on e.g. a post_id

    /* Searching */

    ‘search_terms’ => false // specify terms to search on

    );

    $r = wp_parse_args( $args, $defaults );
    extract( $r );

    $filter = array( ‘user_id’ => false, ‘object’ => $object, ‘action’ => $action, ‘primary_id’ => $primary_id, ‘secondary_id’ => $secondary_id );

    $activities_template = new BP_Activity_Template( $page, $per_page, $max, $include, $sort, $filter, $search_terms, $display_comments, $show_hidden );

    while ( bp_activities() ) : bp_the_activity(); ?>

    <div class="item-descb" id="activity-“>

    Latest Topic Activity in the Group:

    <a href="”>

    <?php endwhile;

    }

    add_action( ‘bp_directory_groups_item’, ‘my_group_loop_activity_item’ );
    ?>`

    I also added this to the default.css to give me a little more control of the output (changed the div in the original to match below):

    ` ul.item-list li div.item-descb {
    margin: 10px 0 0 64px;
    font-size: 11px;
    color: #888;
    width: 85%;
    }
    `

    THANKS AGAIN! Here is a pict completed:
    http://mustech.net/holder/grouptopic2.jpg

    #76391
    Sven Lehnert
    Participant

    The plugin is not 100% update friendly, if I disable buddypress the site crashes.
    Fatal error: Call to undefined function bp_core_load_template() in /data/wwwcust/sv3-132/html/wp-content/plugins/buddypress-links/bp-links-core.php on line 277

    I fixed this bug for my version with if ( defined( ‘BP_VERSION’ ) )
    `
    /**
    * Use this only inside of screen functions, etc
    *
    * @param string $template
    */
    function bp_links_load_template( $template ) {
    bp_links_setup_theme();
    if ( defined( ‘BP_VERSION’ ) ){
    bp_core_load_template( BP_LINKS_THEME . ‘/’ . $template );
    }
    }
    `

    and wp single:
    Fatal error: Call to undefined function is_site_admin() in /data/wwwcust/sv3-155/html/wp-content/plugins/buddypress-links/bp-links-admin.php on line 20

    I changed:
    `
    if ( !is_site_admin() )
    return false;
    `
    to
    `
    if ( !current_user_can(‘level_10’) ){
    return false;
    }

    `

    #58814
    Anton
    Participant

    1. Which version of WPMU are you running? 2.86

    2. Did you install WPMU as a directory or subdomain install? Sub directory

    3. If a directory install, is it in root or in a subdirectory? root

    4. Did you upgraded from a previous version of WPMU? If so, from which version? Nope. Fresh install.

    5. Was WPMU functioning properly before installing/upgrading BuddyPress? Didn’t test WPMU on it’s own. Installed it to use BB

    6. Which version of BuddyPress (BP) are you running? 1.13

    7. Did you upgraded from a previous version of BP? If so, from which version? nope

    8. Do you have any plugins other than BuddyPress installed and activated? Yes. deactivated them all and the problem(s) still occurs.

    9. Are you using the standard BuddyPress themes or customized themes? Standard. Only edited the default css and added a couple of links.

    10. Have you modified the core files in any way? Yes. The delete button next to the code is not working and If I add any chars to the delete string eg: http://socialpress.co.za/friends/activity/delete/123?_wpnonce=30864bbwe2 it does delete but not always. Some members can’t delete. The default delete string does not work. I have also added those same chars to the RSS site wide activity feed as the default one: http://socialpress.co.za/activity/feed doesn’t work.

    11. Do you have any custom functions in bp-custom.php? nope

    12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in? 1.13

    13. Please provide a list of any errors in your server’s log files

    there’s quite allot of these

    [12-Dec-2009 19:18:07] WordPress database error Table ‘socialpr_socialpress.wp_bp_activity_sitewide’ doesn’t exist for query SELECT COUNT(id) FROM wp_bp_activity_sitewide WHERE hide_sitewide = 0 ORDER BY date_recorded DESC made by require, require_once, include, bp_has_activities, BP_Activity_Template->bp_activity_template, bp_activity_get_sitewide_activity, BP_Activity_Activity->get_sitewide_activity

    [12-Dec-2009 19:18:21] WordPress database error Table ‘socialpr_socialpress.wp_bp_activity_sitewide’ doesn’t exist for query SELECT * FROM wp_bp_activity_sitewide WHERE hide_sitewide = 0 ORDER BY date_recorded DESC LIMIT 0, 10 made by require, require_once, include, dynamic_sidebar, call_user_func_array, WP_Widget->display_callback, BP_Activity_Widget->widget, bp_has_activities, BP_Activity_Template->bp_activity_template, bp_activity_get_sitewide_activity, BP_Activity_Activity->get_sitewide_activity

    [12-Dec-2009 19:18:21] WordPress database error Table ‘socialpr_socialpress.wp_bp_activity_sitewide’ doesn’t exist for query SELECT COUNT(id) FROM wp_bp_activity_sitewide WHERE hide_sitewide = 0 ORDER BY date_recorded DESC LIMIT 200 made by require, require_once, include, dynamic_sidebar, call_user_func_array, WP_Widget->display_callback, BP_Activity_Widget->widget, bp_has_activities, BP_Activity_Template->bp_activity_template, bp_activity_get_sitewide_activity, BP_Activity_Activity->get_sitewide_activity

    [12-Dec-2009 19:18:21] WordPress database error Table ‘socialpr_socialpress.wp_bp_activity_sitewide’ doesn’t exist for query SELECT * FROM wp_bp_activity_sitewide WHERE hide_sitewide = 0 ORDER BY date_recorded DESC LIMIT 0, 10 made by require, require_once, include, bp_has_activities, BP_Activity_Template->bp_activity_template, bp_activity_get_sitewide_activity, BP_Activity_Activity->get_sitewide_activity

    [12-Dec-2009 19:18:21] WordPress database error Table ‘socialpr_socialpress.wp_bp_activity_sitewide’ doesn’t exist for query SELECT COUNT(id) FROM wp_bp_activity_sitewide WHERE hide_sitewide = 0 ORDER BY date_recorded DESC made by require, require_once, include, bp_has_activities, BP_Activity_Template->bp_activity_template, bp_activity_get_sitewide_activity, BP_Activity_Activity->get_sitewide_activity

    SHouldn’t there be a table wp_bp_activity_sitewide on the installation? I’ve looked in the db but it’s not there. I did the default installation.

    .

    14. Which company provides your hosting? Hostgator

    #44963
    Gilbert Cattoire
    Participant

    The Northern Smurfs called a certain object a “bottle smurfer”, while the Southern Smurfs called it a “smurf opener”.

    Language customization is subtly different from language translation but both share similar localization processes, using the same tools.

    ( https://codex.wordpress.org/Localizing_WordPress & https://codex.wordpress.org/Translating_WordPress. Google for more)

    Of course, as Lance accurately stated, using dedicated software is overkill if your intention is to change a small set of frequently used words site-wide (turning “groups” into “teams”, “members” into “players” and so on).

    In which case I’d go for the “slugs” method, as suggested by Andy Peatling, rather than tinker with the language files.

    As always, scale matters.

    If you are interested in managing one or more custom language versions, or if you find yourself willing to change more stuff as it comes, I strongly advise you to consider the software option.

    It’s a personal investment which requires you to do your homework and learn to organize your projects accordingly but the learning curve isn’t that steep, and it will guarantee you less white hair in the long run.

    PoEdit is a good choice, giving you the full benefit of a precious asset: translation memory.

    Once installed on your PC, it creates and maintains databases for each translation project – its original purpose. A feature that can be put to good use for language customization.

    Its rather straightforward user interface lets you focus on the language changes you want to make, with a built in “search” feature to locate words or expressions.

    There is no built in “find & replace” feature as software translation is primarily based on strings and not single word occurrences, which can be located in different strings with different contextual meanings.

    If you really want to batch-replace words, you can achieve this using a text editor like Notepad++. Proceed with extreme caution, though: unexpected replacements using this method are frequent, that you can’t always undo except by hand, which defeats the purpose of the whole process.

    Since language files are usually modified with each new release (added strings, modified strings, different string locations…), you’re also better off handling language file updates that way, keeping the language customization logic independent from the file itself, in PoEdit’s TM (translation memory) safe at home on your PC.

    When upgrading BP, it will spare you tedious language files comparison and copy-paste hell in a river of strings, and will do the job with more accuracy.

    A single mistake in a modified language file can generate cryptic errors which you don’t want to start tracking and debugging in 3,000 + strings distributed in multiple language files.

    PoEdit gives you the ability to manage multiple language files using a single TM database (or as many as you wish).

    This is especially useful when you know that the number of language files to be handled gets larger as your platform grows (plugins, themes and templates sometimes have their own – and should).

    Using PoEdit will give you the required semantic homogeneity among all language files belonging to the same project, seamlessly.

    This is where translators make significant productivity gains. And so can you.

    What is more, the software approach scales nicely:

    If you want to leverage your community’s knowledge for language customization – Klingon, Smurf, slang, professional jargon, secret dialect, whatever… – you may want to install Pootle

    ( http://translate.sourceforge.net/wiki/ ), an open source collaborative translation platform that does the same as PoEdit, on your server, and upload the languages files for collective customization – the scenario is yours.

    #42758
    megustaescribir
    Participant

    Hi, thanks for your answer.

    The error I get lately on the log is this:

    PHP Warning: html_entity_decode() expects parameter 2 to be long, string given in /home/freak/public_html/wp-content/mu-plugins/bp-activity/bp-activity-templatetags.php on line 240

    Any clue about that?

    #40207

    In reply to: wp-signup vs register

    Kunkel
    Participant

    and in the home folder here is functions.php

    <?php

    /* Register the widget columns */

    register_sidebars( 1,

    array(

    ‘name’ => ‘left-column’,

    ‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,

    ‘after_widget’ => ‘</div>’,

    ‘before_title’ => ‘<h2 class=”widgettitle”>’,

    ‘after_title’ => ‘</h2>’

    )

    );

    register_sidebars( 1,

    array(

    ‘name’ => ‘center-column’,

    ‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,

    ‘after_widget’ => ‘</div>’,

    ‘before_title’ => ‘<h2 class=”widgettitle”>’,

    ‘after_title’ => ‘</h2>’

    )

    );

    register_sidebars( 1,

    array(

    ‘name’ => ‘right-column’,

    ‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,

    ‘after_widget’ => ‘</div>’,

    ‘before_title’ => ‘<h2 class=”widgettitle”>’,

    ‘after_title’ => ‘</h2>’

    )

    );

    register_sidebars( 1,

    array(

    ‘name’ => ‘blog-sidebar’,

    ‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,

    ‘after_widget’ => ‘</div>’,

    ‘before_title’ => ‘<h2 class=”widgettitle”>’,

    ‘after_title’ => ‘</h2>’

    )

    );

    /* Catch specific URLs */

    function bp_show_home_blog() {

    global $bp, $query_string;

    if ( $bp->current_component == HOME_BLOG_SLUG ) {

    $pos = strpos( $query_string, ‘pagename=’ . HOME_BLOG_SLUG );

    if ( $pos !== false )

    $query_string = preg_replace( ‘/pagename=’ . HOME_BLOG_SLUG . ‘/’, ”, $query_string );

    query_posts($query_string);

    $single_check = strpos( $query_string, ‘&name=’ );

    if ( $single_check === false )

    bp_core_load_template( ‘index’, true );

    else

    bp_core_load_template( ‘single’, true );

    }

    }

    add_action( ‘wp’, ‘bp_show_home_blog’, 2 );

    function bp_show_register_page() {

    global $bp, $current_blog;

    if ( $bp->current_component == REGISTER_SLUG && $bp->current_action == ” ) {

    bp_core_signup_set_headers();

    bp_core_load_template( ‘register’, true );

    }

    }

    add_action( ‘wp’, ‘bp_show_register_page’, 2 );

    function bp_show_activation_page() {

    global $bp, $current_blog;

    if ( $bp->current_component == ACTIVATION_SLUG && $bp->current_action == ” ) {

    bp_core_activation_set_headers();

    bp_core_load_template( ‘activate’, true );

    }

    }

    add_action( ‘wp’, ‘bp_show_activation_page’, 2 );

    /* Hook for custom theme functions via plugins */

    do_action( ‘bp_home_theme_functions’ );

    ?>

Viewing 24 results - 26 through 49 (of 49 total)
Skip to toolbar