• Can anyone think of a way I could add a function to the admin uploader’s various media options?

    I have one problem in particular – let me elaborate: Currently when you click on an image (or whatever media) in the uploader via the admin interface you are presented with some options – ‘using thumbnail’, ‘not linked’, ‘send to editor’ etc. I would like to add this other option: ‘send to excerpt’. This would function exactly the same as ‘send to editor’, with the obvious exception of sending the appropriate image/media file code to the excerpt.

    I am creating a website for a friend who is not that tech-savvy – I would like them to be able to use a thumb for the excerpt which would be displayed on the home page, and then see the full sized image on the post’s page. Currently, this would involve the user doing a couple of clumsy cut and pastes.

    Please help. Thank you.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Not quite what you’re asking for, but assuming this is a single post <> single image issue we’re discussing, perhaps my Post Image plugin would work for you here:

    https://guff.szub.net/2006/02/09/post-image/

    You could set it up to display the thumbnail on the home page (without post content); they’d only need to add the image to the post — or you could even configure the single post template to display the image automatically.

    Thread Starter Shaun

    (@shaun)

    Thanks Kafaesqui for the swift reply.

    I’ll give it a go. It still feels a bit hacked because the thumbnail that it will show on the home page is always the first one that is uploaded when creating the post right?

    So I’ll have to tell my friend to make sure the first image they upload in the post is the one they want to represent the post on the home page… could be a problem. What happens if the post page contains multiple images, or if the user makes a mistake? If only there was a way to select which thumb is shown through the admin, like a check-box by the image or equivalent.

    Anyway, I’ll tell you how it goes and if you have any other suggestions, drop a comment.

    Cheers again

    Post Image will display, if it exists, an image sporting the ID or post-name (the post’s title in url format, or the post slug)). Otherwise it will go with the first uploaded image.

    The goal was to make things as hands-off as possible for the author (and keep the coding to a minimum!). However, I could certainly make a simple change to the plugin where if an attachment’s title or description were say something like ‘post-image,’ then it would use that one.

    Thread Starter Shaun

    (@shaun)

    wow – thank you again for taking your time.

    “Post Image will display, if it exists, an image sporting the ID or post-name (the post’s title in url format, or the post slug)). Otherwise it will go with the first uploaded image.”

    Was this on the plugin page on your website? Am I just being stupid?

    I love the idea of being able to add ‘post-image’ to the attachment title and Post Image would choose that one. Am I correct in assuming this could just be part of the title? i.e. I wouldn’t have to title every attachment just post-image, I would have the flexibility to include a custom title such as experimental work post-image, or even post-image experimental work. Also, if the user decided they made the wrong decision could they then appropriately include ‘post-image’ in the title and this would override their first choice?

    Are these amendments really that simple? Would you really do them?

    Sorry, sorry I know I’ve committed the all-too-common sin of asking three more questions when you only meant to answer one. Please forgive me. Your help is really appreciated (I will definitely be donating via your site).

    Was this on the plugin page on your website? Am I just being stupid?

    No, not being stupid. I did mention this in the support thread I link to on the post, but not in the post article itself. I’ll rectify the oversight.

    Am I correct in assuming this could just be part of the title?

    I can definitely make sure the plugin tests for the text appearing *within* the attachment’s title.

    if the user decided they made the wrong decision could they then appropriately include ‘post-image’ in the title and this would override their first choice?

    The plugin would work dynamically here (as it does now when providing a custom field to override the image), so you’d be able to add or remove it at any time.

    Are these amendments really that simple? Would you really do them?

    Yep. Yep. I only make such offers when I can actually provide them without too much difficulty. I leave the miracles to the WP developers…

    Sorry.

    No worries. As it’s just a venial sin, you can clear things up with a couple Our Bloggers and a small donation to WordPress. ;)

    Thread Starter Shaun

    (@shaun)

    Fantastic!

    Can you update me with progress made to the Post Image plugin here? Or should i look somewhere else?

    The WordPress community always surprises me with it’s generosity ??

    Thread Starter Shaun

    (@shaun)

    Excellent, I’ll give it a go.

    On another point, did you know if someone doesn’t enter an image into a post, IE6 still displays a red ‘x’ missing image symbol. You can see my example here: https://www.flickr.com/photo_zoom.gne?id=345721711&size=l. Where as in Firefox it does what I like and displays nothing – see here: https://www.flickr.com/photo_zoom.gne?id=345721617&size=l.

    You’ve already done more than was required, so don’t pick your brain too much. Am I being ignorant again? Is there a quick solution? Or does IE6 just display the red ‘x’ when there is no image present all the time?

    so don’t pick your brain too much.

    Honestly, I should bang my head on the desk for this one. I penned it in for a fix with the update, then completely passed it over.

    I just put up R1.1.1, which squashes this bug.

    Thread Starter Shaun

    (@shaun)

    The post-image function works perfectly… exactly what I needed thank you.

    Unfortunately the dreaded red ‘X’ is still there in IE6.0 when I don’t insert an image in a post. Any ideas? If you need me to post code here just say, but I’m pretty sure I’ve done everything correctly. Again, thank you.

    Shaun, it would help me track down the problem if you could reply with the following:

    1. The template tag code for Post Image you’re using in your template(s).

    2. The source for your page(s) (i.e. View Source in your browser), specifically the portion of the source where the image would be located.

    Thread Starter Shaun

    (@shaun)

    1. The template tag code for Post Image you’re using in your template(s).

    <div class="entry">
    <!--start of Image-Post plugin-->
    <a href="<?php the_permalink(); ?>"><img src="<?php post_image('/images/post.jpg', true, false); ?>" /></a>
    </div>
    <!--end of image-Post plugin-->
    </div>

    2. The source for your page(s) (i.e. View Source in your browser), specifically the portion of the source where the image would be located..

    This is the code used for the page in the screenshot I sent you with multiple images inside square boxes. Where the code is <img src="" /> is where there should be no image (and no Red ‘X’ in IE). This code created two of these boxes, the first without an image, the second with.

    <div class="image-post-archive-float">
    <div class="image-post-archive">
    <div class="entry">
    <!--start of Post-Image plugin-->
    <a href="https://localhost:8888/hanaforward/this-should-be-nothing-in-ie"><img src="" /></a>
    </div>
    <!--end of Post-Image plugin-->
    </div>
    <!--faking the minimum height of the coloured rectangle surrounding the text-->
    <div class="image-post-archive-fake-height">&nbsp;
    </div>
    <h5 class="image-post-archive-title" id="post-16"><a href="https://localhost:8888/hanaforward/this-should-be-nothing-in-ie" rel="bookmark" title="Permanent Link to this should be nothing in IE">this should be nothing in IE</a></h5>

    </div>

    <div class="image-post-archive-float">
    <div class="image-post-archive">
    <div class="entry">
    <!--start of Post-Image plugin-->
    <a href="https://localhost:8888/hanaforward/post-image-tester-should-be-pirate"><img src="https://localhost:8888/hanaforward/wp-content/uploads/2007/01/shaun_pirate.thumbnail.jpg&quot; /></a>
    </div>
    <!--end of Post-Image plugin-->
    </div>

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘‘send to excerpt’ functionality’ is closed to new replies.