WordPress.org

Ready to get started?Download WordPress

Forums

BuddyPress Activity Plus
[resolved] Links & Videos conflicts (9 posts)

  1. Dutch Hill
    Member
    Posted 4 months ago #

    When adding links I would like to have just the Title of the article or whatever I'm adding in with the link button. I use BP Limit Activity Length, its a nice plugin that lets me set a number of characters in the activity. However, it interferes with the links excerpts. And I don't know that there is much support for it. So I was hoping I could just manipulate Activity Plus to just show the Title for Links. I dove into the link template and noticed the "DIV.bpfb_link_preview_body" Anyway I could just get rid of this all together? What would be the best way?

    https://wordpress.org/plugins/buddypress-activity-plus/

  2. WPMU DEV
    Member
    Posted 4 months ago #

    Hi @Dutch Hill,

    Thank you for your question.

    Links & Videos conflicts

    I don't know how your question title is related with your question.

    When adding links I would like to have just the Title of the article or whatever I'm adding in with the link button.

    You can do so by customizing the plugin code.

    You have to change the BpfbLinkHandler function in the following pluign js file.

    buddypress-activity-plus/js/bpfb_interface.js

    Also you have to edit the function ajax_update_activity_contents in the following pluign file.

    buddypress-activity-plus/lib/class_bpfb_binder.php

    Kind Regards,

  3. Dutch Hill
    Member
    Posted 4 months ago #

    Sorry about the Title, I got my support tickets mixed up...Anyways, I have located those files and I tried just removing the link body.

    removing link body div
    - edit bpfb_interface.js line 140 & 141 remove the "bpfb_link_preview_body"
    - also line 215
    - edit class_bpfb_binder.php remove line 222 & 292

    It seemed to work but would no longer produce the thumbnail image to the link. Could you please assist with this?

  4. David
    WPMU DEV Support Staff
    Posted 4 months ago #

    Hi @Dutch Hill,

    Thanks for your reply. Could I ask for you to post your edited code for that over at pastebin.com and providing a link for it here?

    That'll help us to see exactly where you're at with it and get a fix. :)

    Thanks,
    David

  5. Dutch Hill
    Member
    Posted 4 months ago #

    Okay they are up. This is all I did...
    class_bpfb_binder.php
    - removed lines 222, 235, 290

    bpfb_interface.js
    - removed lines 140, 141, 215

    This link is for class_bpfb_binder.php
    http://pastebin.com/5C7ViDyQ

    This one is for bpfb_interface.js
    http://pastebin.com/DyzjcnmZ

    Also, I know the div for the bpfb_link_preview_body is in the link_tag_template.php. Should that also be removed?

    Thanks for your help!

  6. Ashok
    WPMU DEV Support Staff
    Posted 4 months ago #

    Hi @dutch hill

    You don't need to edit the class_bpfb_binder.php and bpfb_interface.js files, rather just edit the link_tag_template.php file. Remove elements from that file that you don't want. Also, you can reorganize the elements if you want.

    Let us know if it works for you.

    Cheers
    Ash

  7. Dutch Hill
    Member
    Posted 4 months ago #

    Thanks for all your support. I'm still not getting the effect I'm looking for. But we are close. If you can go to gravitylyfe.com/gravity-feed/ and just look at the links that have been posted. Using Inspect Element in FireFox or Googe Chrome, inspect the text that is floating to the right. I see the div class bpfb_final_link and then there are <p></p> tags. All I'm looking for is the Title of the Article and The Link. I don't want those paragraph tags. I have taken out the link_body but doesn't seem to get rid of that text. What do you guys think?

  8. David
    WPMU DEV Support Staff
    Posted 4 months ago #

    Hi @Dutch Hill,

    Thanks for your reply. Perhaps I've misunderstood, but wouldn't it be much simpler to just hide those p tags with CSS like so?

    div.activity-inner p {
    display: none;
    }

    That would save from having to alter core plugin files, thus ensuring your changes aren't overwritten when plugin updates occur.

    Would that work for you?

    Cheers,
    David

  9. WPMUDEV
    WPMU DEV Support Staff
    Plugin Author

    Posted 4 months ago #

    Hey there.

    We haven't heard from you in awhile, so I just wanted to check in to make sure all was good.

    This thread was marked resolved, but please, if you still need help then just respond and open it back up. We can then take it from there. :)

    Hope you have a fantastic day!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.