boonebgorges / buddypress-docs-wiki

An add-on for BuddyPress Docs that creates a sitewide "Wiki" section alongside your Docs
9 stars 3 forks source link

Add Image Button to toolbar #23

Open vothsco opened 9 years ago

vothsco commented 9 years ago

Hi - CBOX member Damian Sol notices that there is no "Add Media" button in the Toolbar so that users can add images to a BP Docs wiki. Also not available on BP Docs. Is it possible to provide an easier way to add images to a doc (rather than native html) ?

r-a-y commented 9 years ago

Thanks for the report, Scott.

It looks like BP Docs limits the "Add Media" button from being shown. I can see why though as it doesn't really work properly.

However, here's a quick code snippet to show the "Add Image" button in the BP Docs editor toolbar:

function my_docs_media_buttons( $r ) {
    // uncomment this to show the "Add Media" button; inserting an item doesn't work though :(
    //$r['media_buttons'] = true;

    // add image button filter; this should probably be moved out of this function
    add_filter('tiny_mce_plugins', 'my_register_docs_extra_buttons');
    add_filter('mce_buttons', 'my_register_docs_extra_buttons');

    // registers the 'image' plugin and button for the BP Docs editor
    function my_register_docs_extra_buttons( $buttons ) {
        array_push($buttons, 'image');
        return $buttons;
    }

    return $r;
}
add_filter( 'bp_docs_wp_editor_args', 'my_docs_media_buttons' );

Snippet should go in the theme's functions.php file or wp-content/plugins/bp-custom.php.

@boonebgorges Do you see any benefit of including the "Add Image" button to the BP Docs editor?

Also related: https://github.com/boonebgorges/buddypress-docs/issues/369. That issue proposes to display image attachments inline within the editor.

boonebgorges commented 9 years ago

Do you see any benefit of including the "Add Image" button to the BP Docs editor?

How does this work? Does it interface with the Media Library? The complexities of working with the Media Library in the Docs context are the main reason I have disabled the Add Media button.

r-a-y commented 9 years ago

The "Add Image" button opens a modal asking the user to input the URL to an image.

It's just a TinyMCE button, so no integration with Media Library, which is good for simple use-cases.

boonebgorges commented 9 years ago

Ah right. Yeah, including that seems fine to me, especially if there's no Add Media to confuse it with.

On 06/29/15 18:54, r-a-y wrote:

The "Add Image" button opens a modal asking the user to input the URL to an image.

It's just a TinyMCE button, so no integration with Media Library, which is good for simple use-cases.

— Reply to this email directly or view it on GitHub https://github.com/boonebgorges/buddypress-docs-wiki/issues/23#issuecomment-116874058.

twohatsconsulting commented 9 years ago

Hi folks,

Thanks so much for continuing the discussion over this feature.

I asked my client about the possibility of simply using an image URL to post images, and unfortunately her website audience is not very tech-savvy, so that's not a great option.

What we really want, in case I haven't clearly stated before, is the full Add Media button functionality on the Add New Wiki page template, just as it works in the back end of WordPress.

I'm seeing that this would be a significant change to the codebase, and isn't a planned feature at this time.

Is there a possibility of hiring you to complete this customization for my client? They have some budget for the project, but I'm not a programmer and so I can't make the customization myself.

If you're open to doing the customization, please let me know how I can best communicate the feature request to you -- in a design doc or whatever other method works best for you. What I'm after at the moment is a rough price, which I realize can be work to arrive at. Mostly I wonder if this is more of a $1,000 or $10,000 or $100,000 customization, so if you happen to be able to ballpark it for me, obviously I would like that very much.

However, I acknowledge that "ballparking" prices can be problematic, so just let me know what process works best for you, and I'm happy to follow that.

Thanks very much,

Damian

boonebgorges commented 9 years ago

Hi Damian @twohatsconsulting - I might be available to work on this, but not until the fall (September or October). If you want to talk a bit more about scope and price, drop me an email (boone at gorg dot es).

twohatsconsulting commented 9 years ago

Hi Boone,

Thanks for the prompt reply. I will contact you directly as requested.

Damian

On Wed, Jul 8, 2015 at 5:41 PM, Boone Gorges notifications@github.com wrote:

Hi Damian @twohatsconsulting https://github.com/twohatsconsulting - I might be available to work on this, but not until the fall (September or October). If you want to talk a bit more about scope and price, drop me an email (boone at gorg dot es).

— Reply to this email directly or view it on GitHub https://github.com/boonebgorges/buddypress-docs-wiki/issues/23#issuecomment-119771342 .

Damian Sol Cell: 916-205-1576

Two Hats Office: Map + Directions http://twohatsconsulting.com/contact/

“Everything should be made as simple as possible, but not simpler.” – Albert Einstein

LYPratt commented 8 years ago

Please add my vote to this one. Without images, I'm going to have to look for a different wiki tool. I was hoping this was a full-functionality wikipedia-like wiki. Thanks for all your great work!