bhanu pratap
asked 9 years ago

Hi,
I have installed and activated both buddypress and DW Question & Answer plugin. I followed steps given in your guide. In step 2 i have created buddypress folder as mentioned and bpcustom.php also in the folder but when i paste the link mentioned in the given link "http://snippi.com/s/rqwxbkq" my site goes white and says syntax error unexpected ‘Â ‘ (T_STRING) in line 4. (I am not very good at php )
I have spent 3 days in finding out whats wrong.But failed. I tried to solve it by putting on google, stack overflow, but still not solved. when i correct this error it again says error in line 6 and then 7 and so on…
please help…

4 Answers
DominicStaff
answered 9 years ago

Please send me username & password of your site & FTP (via private answer, we will help you make a profile page in your site.
Regards,

DominicStaff
answered 9 years ago

I have checked your site and helped you resolve this issue, you can check your profile now (Screenshot).
Regards,

bhanu
replied 9 years ago

Thanks…now its working fine….i think what I was doing wrong was pasting the code into bp-custom.php through web ftp instead of from WP-admin…

bhanu pratap
answered 9 years ago

Yes, its working now. 🙂 Thanks a lot.

need more help…I have few more problems:

  1. Buddypress activity says "Mr X wrote a new post" instead of "asked a new question" or "answered a question". How can these be changed?

  2. How can I show the number of questions asked and answers given below user or in the buddypress profile page of a user? (for example… like the screenshot in guide)
    ![designwall buddypress profile page](http://designwall.s3.amazonaws.com/images/guide/dw_qa/user-profile.png "enter image title here")

Thank you

DominicStaff
answered 9 years ago
  1. For this text string, you can use Westi’s method,
    • You can add the following code in your theme’s functions.php
      <?php
      class PJW_Translation_Mangler {
      function filter_gettext($translation, $text, $domain) {
      $translations = &get_translations_for_domain( $domain );
      if ( $text == '%s wrote a new post, %s' ) {
      return $translations->translate( '%s asked a new question, %s' );
      }
      return $translation;
      }
      }
      add_filter('gettext', array('PJW_Translation_Mangler', 'filter_gettext'), 10, 4);
      ?>
    • Found it!
      It’s actually right in buddypress/bp-blogs.php on line 383

      $activity_action = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), </strong>bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">'</a>
  2. Please note that the above image is for illustration purposes only. To have the interface like the screenshot, we made some custom code only for the designwall. Of course, after configuring, your front-end is not similar to ours.
    Hope this helps !
Powered by DW Question & Answer Pro