Support » Requests and Feedback » Code for uploaded Images

  • Mark (podz)


    Support Maven

    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 ….

Viewing 1 replies (of 1 total)
  • 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.

Viewing 1 replies (of 1 total)
  • The topic ‘Code for uploaded Images’ is closed to new replies.