Search Results for 'buddypress'
-
AuthorSearch Results
-
February 5, 2013 at 4:46 am #152413
In reply to: Get Buddypress Profile Data in WordPress Page
linish
ParticipantHello,
I had created the paste of the code i had tried both in profile-loop.php and in
functions.php
`http://pastie.org/6050342`
The code is working fine in profile-loop.php but showing blank result in
functions.php
February 5, 2013 at 4:21 am #152412In reply to: Video: BuddyPress 1.7 Overview
Ben Hansen
Participantnice one thanks for sharing!
February 5, 2013 at 12:38 am #152404In reply to: upgrading to 1.5 prior to 1.6 (with a hail mary :-)
mischiefwizard
Participantand now it seems the REPOST has disappeared, so here’s a better version:
Hi guys,
I just upgraded WP to latest version, and then after a long search found the CP 1.5 files and overwrote my 1.2.8 installation. Now to get it all working with my custom child theme Would love some help.I’m trying to implement the article at https://codex.buddypress.org/developer/releases/developer-and-designer-information/, and
1) it says:
>>>>>>
You’ll also need to modify the following file in your WP theme:/wp-content/themes/YOUR-THEME/members/single/home.php
Open up /members/single/home.php in your editor and add:<<<<<<<>>>>>In your functions.php declare the function like this:
function bp_dtheme_enqueue_styles() {
// Bump this when changes are made to bust cache
$version = ’20110804′;// Default CSS
wp_enqueue_style( ‘bp-default-main’, get_template_directory_uri() . ‘/_inc/css/default.css’, array(), $version );// Right to left CSS
if ( is_rtl() )
wp_enqueue_style( ‘bp-default-main-rtl’, get_template_directory_uri() . ‘/_inc/css/default-rtl.css’, array( ‘bp-default-main’ ), $version );
}
add_action( ‘wp_enqueue_scripts’, ‘bp_dtheme_enqueue_styles’ );
<<<<<<But then I get a "Call to undefined function add_action() " error
3) How do I ensure it will enqueue the .css file in my child theme directory?
4) Do I need to find the developer notes for upgrading to buddy press 1.4 and 1.5 as well and make other changes to my child theme? Where would I find these? The above link just talks about BP 1.5 and 1.5.2
5) I get undefined function error from my child them header calling
a) "bp_dtheme_page_on_front()" function.:
b) Call to undefined function bp_is_page()
It seems these functions aren’t deprecated, so how can i ensure they get loaded properly?
Thanks in advance
David
February 5, 2013 at 12:04 am #152398Mitesh Patel
ParticipantMakeshift solution posted here…
https://buddypress.org/support/topic/how-to-override-buddypress-function-using-hook/February 4, 2013 at 11:59 pm #152397In reply to: how to override buddypress function using hook?
Mitesh Patel
ParticipantI finally yielded, and messed up (so to speak) the function messages_screen_compose, adding conditional custom redirects with if else statements like…
`
if(wp_get_referer()){//to check origin of form submission, returns false for self submission
bp_core_redirect(wp_get_referer()); //custom redirect, as this isn’t self submission
} else {
bp_core_redirect( bp_loggedin_user_domain() . $bp->messages->slug . ‘/view/’ . $thread_id . ‘/’ );// this was originally there, for submission from original php file
}
`As I think the issue is ‘resolved’, for time being, I should document the solution here.
I intended to use buddypress private messaging as feedback form, with various feedback options like Question, Suggestion, Feedback etc. Thus, I created corresponding users (Question, Suggestion, Feedback etc.) who will receive the feedback. The idea is super-elegant from my purpose, as not only the submissions be automatically segregated and stored in database, but responding to the feedbacks would be as simple as responding to PM, all without the hassle of email, spam etc. An added benifit is, users can draw attention to various issues site wide by @mension, like :@question What about this?”
So I tried to imitate the buddypress compose form, and I succeeded, except the redirect problem as described here.
https://buddypress.org/support/topic/create-a-feedback-form-using-buddypress-messaging-functionality/What I was doing was, creating a duplicate form, but calling the original form action (fooling buddypress 🙂 ). I did so, because, I don’t even know how to submit the copy-pasted form I created, and get the same thing done as the original compose.php was doing when it called itself (self submission).
Anyways, this hack with unforgivable modifications in buddypress files works beautifully. I feel I’ll have to go through the plugin route finally though, as this is make-shift arrangement (but will work as long as I don’t update the buddypress plugin 🙂 ).
Thanks shane for your help.
February 4, 2013 at 10:38 pm #152393In reply to: how to override buddypress function using hook?
shanebp
ModeratorA plugin can be very simple.
For example, maybe all it does is over-ride a pluggable function.You can try it in bp-custom.php – which I believe is loaded with all the plugins.
So it might be loaded before pluggable.php is loaded, therefore it might work.February 4, 2013 at 9:30 pm #152387In reply to: how to override buddypress function using hook?
Mitesh Patel
ParticipantNever mind, the $location refers to the url of the page where we will be redirected afterwords.
Will post back, If I ever get it done.
February 4, 2013 at 9:10 pm #152382In reply to: how to override buddypress function using hook?
Mitesh Patel
ParticipantThanks @shanebp. A couple of questions before I mark this thread resolved one way or other.
It seems a whole lot labour to write a plugin (which I’ll have to learn first 🙂 ) for a solitary redirect, but can I not do it in bp-custom.php, which seems to be for the same type of purposes, and conveniently resides in plugins directory?
Secondly, $location refers to the url of the page from which action originated as opposed to the location where the page will be redirected afterwards, right? I checked the referred wp codex page before I asked the earlier question, but couldn’t figure out what it meant.
February 4, 2013 at 9:00 pm #152379In reply to: Buddypress building shortcode
bhguy
ParticipantMy youtube function disappearing here as well as my shortcode from budypress on my site. lol
function youtube( $atts, $content = null ) {
return ‘div id=”youtube”iframe width=”200″ height=”200″ src=”http://youtube.com/embed/’.$content.'” frameborder=”0″ allowfullscreen /iframe/div’;
}add_shortcode(“youtube”, “youtube”);
add_filter(‘bp_get_the_profile_field_value’, ‘do_shortcode’);
add_filter(‘bp_get_activity_content_body’, ‘do_shortcode’);
add_filter(‘bp_get_activity_action’, ‘do_shortcode’);February 4, 2013 at 8:58 pm #152378In reply to: Buddypress building shortcode
bhguy
Participant`
function youtube( $atts, $content = null ) {
return ”;
}add_shortcode(“youtube”, “youtube”);
add_filter(‘bp_get_the_profile_field_value’, ‘do_shortcode’);
add_filter(‘bp_get_activity_content_body’, ‘do_shortcode’);
add_filter(‘bp_get_activity_action’, ‘do_shortcode’);
`I use this, but nothing works on activity, shortcodes disappearing from there, just in full view of article it works.
February 4, 2013 at 8:07 pm #152375In reply to: how to override buddypress function using hook?
shanebp
ModeratorI’m not aware of a filter for this, but you can definitely over-ride wp_safe_redirect in a manner that doesn’t affect its usage otherwise, ie. check the $location and adjust if applicable.
To over-ride it, you must do so within a plugin. It’s not about actions or filters.
More info: https://codex.wordpress.org/Pluggable_Functions
>Or, can I not rewrite the entire function messages_screen_compose() so that it overrides the one in buddypress, and put it in functions.php of my theme?
No. And it would be a bad idea even if you could.
February 4, 2013 at 8:03 pm #152373Mitesh Patel
ParticipantThank you @slaffik for your response. I figured that much, and I posted another thread subsequently asking how to hook into bp_core_redirect(). I was suggested that bp_core_redirect() in turn calls wp_safe_redirect, which could be hooked into, but I am clueless how? Sorry, not a programmer. Can you point me to an example I could analyse?
Secondly, Can I override the messages_screen_compose function from bp-messages-screens.php by writing an entirely new function by same name in my theme’s function.php (with my custom redirects with if-else, which seems very easy and non-intrusive), and doing some remove_action, add_action magic, so to speak? Writing the new function is easy, but how to implement/insert it so that it works is a mystery for me.
February 4, 2013 at 7:52 pm #152372In reply to: how to override buddypress function using hook?
Mitesh Patel
ParticipantSorry @shanebp, for delayed response. Got disconnected for a while.
I don’t understand how to do what you suggest. Any pointers in right direction? I’m not a programmer, but I will understand if I could analyse an example.
Also, if I ‘plug’ the function, as you suggest (not modifying the actual function but by an action hook), will my conditional statement run every time a call to wp_safe_redirect is made from other places (not my form) as well? as wp_safe_redirect would be used hundreds of time.
Or, can I not rewrite the entire function messages_screen_compose() so that it overrides the one in buddypress, and put it in functions.php of my theme? If that’s possible, what’s correct way of doing it?
February 4, 2013 at 7:32 pm #152367In reply to: Get Buddypress Profile Data in WordPress Page
shanebp
Moderatorxprofile_get_field_data function is provided so that you CAN use it on non-profile pages.
Use http://pastie.org/ or similar to show what you tried.
February 4, 2013 at 7:20 pm #152365In reply to: Get Buddypress Profile Data in WordPress Page
linish
ParticipantHello,
I had tried that but it will worked only on buddypress profile page, the same gave blank result in normal wordpress page / custom template for a page
February 4, 2013 at 6:42 pm #152361In reply to: Move profile fields to another field group?
tushargp
ParticipantJust a small favor from you required if you can look that- as I’m very close to execute it.
For http://www.healthitinsider.com – I’m currently using buddypress template file and having the following functionality
https://github.com/kayue/buddypress-blank/tree/master/Activity
Blogs
Forums
Members
RegistrationI would like to create a specific section like groups which I name to Company. So that user can create and register company here.
I have copy the code of groups section (code mention in previous link)- modify it and create a directory which I name company
Healthitinsider.com/wp-admin/content/themes/companyNow I would like to define function in function.php so that it will be functional and we can assign a page on the site like
http://healthitinsider.com/groups/For style.css I’ve use the previous codes. Please let me know how we can have the following functionality.
February 4, 2013 at 6:37 pm #152360In reply to: Buddypress building shortcode
bhguy
ParticipantOn: domain.com/members/admin/activity/13/ = video works.
On: domain.com/activity = video is not shown, shortcode is not shown, there is nothing, shortcode is not showed as text or anything, shortcode doesnt exist.I see only this: admin posted an update 1 day, 8 hours ago.
February 4, 2013 at 6:17 pm #152358In reply to: Buddypress building shortcode
@ChrisClayton
Participantthe filter I mentioned above
`
add_filter(‘bp_get_activity_content_body’, ‘do_shortcode’); // Adds shortcodes to activity content.
`will add it to the content of all activity (including on the profile page and groups)
If you need to add it to activity actions as well, you can also use
`
add_filter(‘bp_get_activity_action’, ‘do_shortcode’); // Adds shortcodes to activity action.
`February 4, 2013 at 4:45 pm #152351In reply to: Missing ADD MEDIA
@mercime
Participant@pjfbncil Contributors and Authors should be able to upload media by default. Have you tried deactivating plugins one by one except BuddyPress and checked which plugin/s might be causing the issue?
February 4, 2013 at 4:16 pm #152350In reply to: Buddypress building shortcode
bhguy
ParticipantPlease someone help, I am stucked with this.
I want to add buddypress to my site, but cant make this work.
Tried many ways.February 4, 2013 at 3:45 pm #152348In reply to: Get Buddypress Profile Data in WordPress Page
shanebp
ModeratorUse :
xprofile_get_field_data( “Company Name” , $member_id)
You have to supply the $member_idIf you’re on a profile page, the $member_id will be provided via bp_displayed_user_id()
Take a look at
/bp-xprofile/ -> bp-xprofile-functions.php -> xprofile_get_field_dataFebruary 4, 2013 at 3:41 pm #152347In reply to: Buddypress forum photo upload nightmare..
mtm123
ParticipantBump I am also looking for some kind of plugin to allow photo and video uploads to the forum and topic area. The activity area and member area I already have a plugin for.
February 4, 2013 at 3:02 pm #152346Lawrence
ParticipantJust seen some activity on this… again, really sorry that things have been on a bit of a pause, but luckily I still have all the code and a basic website so I’ll review everything again with the latest version of wordpress and buddypress and see if I can get this thing published at long last!
February 4, 2013 at 2:10 pm #152341In reply to: BuddyPress Compatible
February 4, 2013 at 12:04 pm #152337In reply to: Buddypress building shortcode
bhguy
ParticipantChrisClayton, thanks.
Can you tell how to enable shortcodes on activity stream of profiles, groups etc.
Or, is there simple way to enable it everywhere?
-
AuthorSearch Results