Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 35,651 through 35,675 (of 94,569 total)
  • Author
    Search Results
  • 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/’.$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

    #152364
    Thomasboerre
    Participant

    It’s very urgent everyone

    Hi Everyone,

    I’m stucked after my buddypress installation.
    The normal registration page http://www.ferie.nu/wp-login.php?action=register is now redirected to buddy press registration page i.e. http://www.ferie.nu/club-tilmeld/.
    Can anyone help me out in this as I couldn’t find any proper solution on doing R&D on this.
    Also with my profile page too something unusual things are appearing.
    Any help in this would be appreciated a lot.

    It´s important also to inform that im also running S2member system on the same site, but i shouldnt do anything right?

    Regards,
    Thomas

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

    daniel.vos
    Participant

    WordPress: 3.5.1
    BuddyPress: 1.6.4
    Link to my site: http://5mthosting.com/wjc-members/

    Avatar image upload is failing intermittently with a 500 Internal Server Error. I’m getting the 500 error more often when the image is 500-1000KB or more. If the image is a more reasonable size (e.g., 100KB or less), I rarely if ever get the 500 error.

    Any idea what might be causing this problem?

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

    #152349
    mtm123
    Participant

    Any tips on buddypress smilies? I also wondered if their was a plugin to post pictures and videos only on the topics and topic reply posts. My activity area can already do it.

    #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 - 35,651 through 35,675 (of 94,569 total)
Skip to toolbar