WordPress.org

Ready to get started?Download WordPress

Forums

BuddyPress Activity Plus
[resolved] Add new button (7 posts)

  1. aaronkin
    Member
    Posted 8 months ago #

    I was able to add an icon next to the Link icon. When clicked I would like this button to Enter the text "@Ella" into the text field. Then people can type their question and hit "Post Update."

    The icon button will say "Ask Ella" so people can ask ANY question that will send a notification to "@Ella" using the @Mentions feature but also add their question to the Activity Feed.

    I was able to add the Icon by editing the "class_bpfb_binder.php" but i dont know PHP enough to do much else. can anyone help?

    website is here: The icon of Ella is the Bulldog. http://www.loacom.com/nprntest/activity

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

  2. Hi there @aaronkin,

    Hope your well today and thanks for your question.

    So all updates should go to @Ella, correct? So you already want it to have that in the post field?

    Please advise :)

    Thanks!

    Kind Regards
    Jack.

  3. aaronkin
    Member
    Posted 8 months ago #

    I am very well today.. thx for asking.

    Only the Questions will be sent to @Ella. So currently there are Icons for:
    1. Add Image
    2. Add Video
    3. Add Link
    4. Ask Ella (the bulldog icon)

    I will setup a Admin User account as "Ella" so when the Bulldog Icon is clicked the Text field will add the text "Ask @Ella a question:" I only want the text enterd when someone clicks the bulldog icon... Otherwise it will be blank. Once they type their question and hit "Post Update" I will get a notification that someone Mentioned Ella "@Ella". Then i can reply "Comment" with an answer.

    http://www.loacom.com/askella.png
    I edited the file "bpfb_interface.js" on line 370. All i did was duplicate the Link Icon code and changed the CSS "bpfb_toolbar.css" to ad the bulldog image. so currently the Bulldog does exactly the same thing as the Link Icon.

    Let me know if you need any other details.

    website is here... http://www.loacom.com/nprntest/activity

  4. aaronkin
    Member
    Posted 8 months ago #


  5. Hi there aaronkin,

    Hope your well today and thanks for the additional information.

    I've been taking a look at this, but can't see how we can get this to auto add the @, I've asked a colleague to take a look at this @Ashok and he should be posting as soon as possible :)

    Thanks for your patience.

    Kind Regards
    Jack.

  6. aaronkin
    Member
    Posted 8 months ago #

    i JUST figured this out late last night.

    Here's what worked:

    ________________
    added this to my header.php...

    function ElementContent(id,content)
    {
    document.getElementById(id).value = content;
    }

    ________________
    Added this to html...

    <a href="#ella" id="ask_ella" title="Ask Ella a question" onclick="ElementContent('whats-new','Ask @Ella a question: ')" />Have a question? Ask Ella!</a>
  7. Ashok
    WPMU DEV Support Staff
    Posted 8 months ago #

    @aaronkin, great that you found it. I was about to give you some solution though. Based on your code, you can use standard jQuery format too:

    function ElementContent(id,content)
    {
       jQuery('#'+id).val(content);
    }

    Cheers
    Ash

Reply

You must log in to post.

About this Plugin

About this Topic

Tags