• Resolved cpclemens

    (@cpclemens)


    Hello.

    First, allow me to say how much I love this plugin! I’ve built a website entirely based on the plugin for history in Rochester, NY here: https://www.thisdayinrochester.org

    I’m wondering, is there any way to insert media with an event? I don’t see a method for that in the visual editor.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Anonymous User 393930

    (@anonymized-393930)

    Thanks for the nice feedback.

    The problem with having media is that you need to make sure that it’ll fit your layout. Most people don’t think about that and expect the plugin to somehow magically know what they want to do with the images so that the layout isn’t messed up when they are too tall or wide or both to fit. Since it isn’t possible to guess what they are trying to do and it makes people mad when it’s wrong I removed the media button to have an easier life.

    This plugin is really designed to handle short text items only. It’s not a good choice for images, video or full articles – better to just link to those instead.

    If you’d like to try it and have the media button back you can change line 368 of ‘this-day-in-history.php’ from

    <?php wp_editor('', 'event_name_v', array('media_buttons' => false, 'textarea_rows' => 3)); ?>

    to

    <?php wp_editor('', 'event_name_v', array('textarea_rows' => 3)); ?>

    and then make the same change on line 157 of tdih-list-table.class.php to make it show when editing, changing it from

    <?php wp_editor($event->event_name, 'event_name_v', array('media_buttons' => false, 'textarea_rows' => 3)); ?>

    to

    <?php wp_editor($event->event_name, 'event_name_v', 'textarea_rows' => 3)); ?>

    You’ll need to reapply this change for each new version of the plugin.

    • This reply was modified 6 years, 11 months ago by Anonymous User 393930.
    • This reply was modified 6 years, 11 months ago by Jan Dembowski.
    Thread Starter cpclemens

    (@cpclemens)

    That totally makes that you’d leave it out. I know a lot of people probably use this in sidebar widgets and stuff so it’d be a mess for sizing.

    I like the idea of including media, but I also like the idea of not trying to mess with something that works. haha… I appreciate the code, but I think I’ll start incorporating hyperlinks to content instead.

    Anonymous User 393930

    (@anonymized-393930)

    From version 3.0 you can now add media in the normal way, although you’ll need to be careful about the display if you include anything but text before a more tag.

    Is there an ideal size for the images? ie 70 x 70 ect.

    Anonymous User 393930

    (@anonymized-393930)

    No, you have to decide for yourself what look best with you theme.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Insert Media’ is closed to new replies.