The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Code for uploaded Images (2 posts)

  1. Mark (podz)
    Support Maven
    Posted 11 years ago #

    Is there a better way of handling the code that is generated when an image is uploaded ?
    In the (dim and distant) past, you could click and have the code transferred to the post area - that seems more elegant than what we have maybe, but then we have pages now don't we ....

  2. tis
    Posted 11 years ago #

    I've hacked my installation to give a slightly greater level of support. I'm sure someone can come up with a better way to do it:

    In upload.php I inserted

    $poc = urlencode( $piece_of_code );

    directly before

    $piece_of_code = htmlspecialchars( $piece_of_code );

    and inserted

    <a target="_blank" href="post.php?action=exact&content=<?php echo $poc; ?>"><?php _e('Create a new post with this image'); ?></a>

    directly before

    <strong><?php _e('Image Details') ?></strong>:

    (both insertions are near the end of the file)

    then in post.php I inserted

    case 'exact':
    $content = stripslashes($content);
    # Intentional fall through

    directly before

    default:<br />
    $title = __('Create New Post');<br />
    require_once ('./admin-header.php');

    This adds a link to the upload-completed page which creates a new post with the img link already inserted into the body.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.