The MU forums have moved to WordPress.org

Inserting File Url by default? (6 posts)

  1. ben_allison
    Member
    Posted 14 years ago #

    I think it's kinda lame that the user needs to select None | File URL | Post URL, when sending an item from the Media Library to a post. Many users miss it entirely when using a blog for the first time and as a result files do not get inserted when working with anything other than an image. I'd like to have the File URL inserted by default in future installs when "Insert into post" is clicked.

    Any ideas how this might be possible? What do I need to change in media.php to allow this to happen? I've dug around but have had no success.

    Thanks!

  2. andrea_r
    Moderator
    Posted 14 years ago #

    Have you tried in different browsers?

    last I checked, one of those options was checked by default.

  3. ben_allison
    Member
    Posted 14 years ago #

    Firefox and Safari on Mac (most users I'm dealing with are Mac based too). Thing is, when you select one, it remains selected by default; but I'm finding that new users don't always know to click "File URL" that first time, and wonder why the PDF or XLS file they uploaded isn't appearing in a post.

  4. ben_allison
    Member
    Posted 14 years ago #

    Just checking back to see if anyone has further ideas.

  5. dsader
    Member
    Posted 14 years ago #

    WPMU 2.8.2
    An uncharacteristic core file hack:

    Edit the function image_link_input_fields in /wp-admin/includes/media.php

    line 840 becomes

    return "<input type='text' class='some goofy name to stop the java madness so only file url is linked' name='attachments[$post->ID][url]' value='" . esc_attr($file) . "' /><br />

    And remove the buttons.

    You could plugin:
    add_filter('attachment_fields_to_edit', 'your_function_that_does_the_same_thing');

    But I have to go make supper...

  6. ben_allison
    Member
    Posted 14 years ago #

    Thanks sooooooo much.

    BTW, what did you have for supper?

About this Topic

  • Started 14 years ago by ben_allison
  • Latest reply from ben_allison