Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 23,626 through 23,650 (of 69,106 total)
  • Author
    Search Results
  • #152413
    linish
    Participant

    Hello,

    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

    #152412
    Ben Hansen
    Participant

    nice one thanks for sharing!

    #152404
    mischiefwizard
    Participant

    and 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

    Mitesh Patel
    Participant
    #152397
    Mitesh Patel
    Participant

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

    #152393
    shanebp
    Moderator

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

    #152387
    Mitesh Patel
    Participant

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

    #152382
    Mitesh Patel
    Participant

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

    #152379
    bhguy
    Participant

    My 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/&#8217;.$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’);

    #152378
    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.

    #152375
    shanebp
    Moderator

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

    Mitesh Patel
    Participant

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

    #152372
    Mitesh Patel
    Participant

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

    #152367
    shanebp
    Moderator

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

    #152365
    linish
    Participant

    Hello,

    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

    #152361
    tushargp
    Participant

    Just 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
    Registration

    I 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/company

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

    #152360
    bhguy
    Participant

    On: 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.

    #152358
    @ChrisClayton
    Participant

    the 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.
    `

    #152351

    In 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?

    #152350
    bhguy
    Participant

    Please someone help, I am stucked with this.
    I want to add buddypress to my site, but cant make this work.
    Tried many ways.

    #152348
    shanebp
    Moderator

    Use :
    xprofile_get_field_data( “Company Name” , $member_id)
    You have to supply the $member_id

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

    #152347
    mtm123
    Participant

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

    Lawrence
    Participant

    @knaveenchand, @casualmagic

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

    #152341

    In reply to: BuddyPress Compatible

    Patryk
    Participant

    @Hugo Thanks for the link 🙂

    #152337
    bhguy
    Participant

    ChrisClayton, thanks.

    Can you tell how to enable shortcodes on activity stream of profiles, groups etc.

    Or, is there simple way to enable it everywhere?

Viewing 25 results - 23,626 through 23,650 (of 69,106 total)
Skip to toolbar