Support » Plugins » Added align=”left” to upload.php

  • Been poking around in wordpress 1.2.2 trying to customize it to my specific needs and decided to slightly modify the upload.php file as follows. Hope someone else finds some value in this as well.

    $piece_of_code = "<img src=&quot;". get_settings('fileupload_url') ."/$img1_name&quot; alt=&quot;$imgdesc&quot; />";

    And I added the bolded bit below:

    $piece_of_code = "<img src=&quot;". get_settings('fileupload_url') ."/$img1_name&quot; alt=&quot;$imgdesc&quot; <strong>align=&quot;left&quot;</strong> />";

    Then, after uploading your image, you’re presented with code like this that you can paste right into your post:

    <img src="" alt="blah blah" align="left" />

    …which saves you time in altering the img src tag right in your post every time you include a pic.

    Purpose? Well, when an image is linked to and positioned on your actual blog using the css “float” attribute, in some news aggregators after people subscribe to your RSS feed the image displays above the text of the post. Using align=”left or right” hard coded into the img src tag causes the text to wrap around the image in the aggregator. Looks nicer that’s all 😉

Viewing 1 replies (of 1 total)
  • OOPS! First time I’ve posted code snippets here and the tags showed up. Please disregard them in the second code snip above, what’s between them is what counts 😉

Viewing 1 replies (of 1 total)
  • The topic ‘Added align=”left” to upload.php’ is closed to new replies.