• The new image uploading/thumbnailing feature is great, but there’s something else I need it do do. When you click on a thumbnail and tell it to send it to the editor, the image is aligned by default as just to be included in that line, so the picture doesn’t integrate very well into an article. Is there any way to change the menu to allow it to insert an “Align Left/Right” option so that the <img> tag will include align=”left” or align=”right”, depending on what the user wants?

    I tried changing the menu in inline-uploading.php but met with no success…

Viewing 9 replies - 1 through 9 (of 9 total)
  • You can do that with the WYSIWYG editor by clicking the image and clicking (text)align left/right

    The image tag (where the align tag would be) is standard for all the options (thumbnail, full image, linked, etc). Using a class attribute that only works when there is a specific menu entry would be complicated. However, it is easy to change the image tag, itself. I added a “class” tag (not sure why my CSS doesn’t work with an align tag):

    ab[{$ID}] = '<a class=\"imagelink\" href=\"{$image['guid']}\" onclick=\"doPopup({$ID});return false;\" title=\"{$title}\">';
    imga[{$ID}] = '<img id=\"image{$ID}\" src=\"$src\" alt=\"{$title}\" $height_width class=\"right\" />';
    imgb[{$ID}] = '<img id=\"image{$ID}\" src=\"{$image['guid']}\" alt=\"{$title}\" $height_width class=\"right\" />';

    These are the appropriate lines from inline-uploading.php. The only thing I’ve changed is:

    class=\"right\" (twice).

    With this method, ALL images added using the upload feature are aligned right by default.

    What file is that?

    “These are the appropriate lines from inline-uploading.php.”

    What I wrote “works”. And, I should have mentioned that there needs to be a class added to your stylesheet (in your theme folder). But, I’ve put the code back the way it was and have now added a plugin:

    https://wp-plugins.net/plugin/sticky_image/

    I can modify a template that puts the image wherever I want it. It works with wp2. The upload form is on the write post screen (where I think it should be). And there are other things I like about it (no pasting the image code in the box, change the image with a new upload, or delete the post / delete the image from the server).

    The other upload form is still there: Perhaps I’ll find a use for it, yet ??

    I installed your plugin but can’t figure out how to upload the image. All I see is an image box, a text box and the browse button.

    It’s not “my” plugin. If you see the browse button and the text box, it’s probably installed correctly (you’ve likely figured all this out by now). The photo is kept separate from the post and then included when the page is rendered (ie. is “sticky”): You don’t have to add the image code to the text box. Just browse, find an image on your hard drive, add a caption in the little “text” box … and save the post.

    I activated, but now am getting multuple W3C errors. What is it doing?

    From the readme (I really don’t “support” this plugin):

    1. Unzip folder to your plugin-directory (wp-contents/plugins)
    2. Change the file wp-admin/edit-form.php:

    Change around line 4:
    <form name="post" action="post.php" method="post" id="simple">
    to
    <form name="post" action="post.php" method="post" id="simple" enctype="multipart/form-data">
    <input type="hidden" name="MAX_FILE_SIZE" value="3072000" />

    3. Change the file wp-admin/edit-form-advanced.php:

    Change around line 10:
    <form name="post" action="post.php" method="post" id="post">
    to
    <form name="post" action="post.php" method="post" id="post" enctype="multipart/form-data">
    <input type="hidden" name="MAX_FILE_SIZE" value="3072000" />

    4. Set up an image path on your server, e.g. “wp-content/images”, give write-permission to everyone (chmod 777).

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Changing the way images are sent to the editor’ is closed to new replies.