Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: Enable adding images from local machine  (Read 3314 times)

calydon

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Enable adding images from local machine
« on: October 13, 2007, 12:18:51 PM »

Unless I'm mistaken, right now users can only enter URLs pointing to images. How difficult would it be to add a tinyMCE-like feature where you can browse for images on the local machine, upload them to a content folder and then add them to posts?
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Enable adding images from local machine
« Reply #1 on: October 13, 2007, 05:20:09 PM »

If you are using the default sNews 1.6 package... you can upload images using the "Files" management panel to any folder you have created in your domain's root. If you click the "Images" Editor button under the main textarea... when creating an new article... you get a pop-up asking you to insert the image URL and, after that, the alternate text that would go with the image. After that, the link string is inserted into the textarea.

As an example... if you had a "photos" folder in your domain root and you uploaded an image into it called "horse.jpg", then in the first pop-up (after clicking the Images Editor button), you would insert the path to the image as  - photos/horse.jpg and in the alternative text po-up you might insert "my favorite horse"... and the link will automatically be inserted into the textarea as  - <img src="photos/horse.jpg" alt="horses" />. From there... if you wanted to re-locate the image to another location in the text... you would cut and paste it to that location.

Mods have been developed and added to "packaged" versions of sNews that enhance the existing Files Upload panel, and allow you to click images from an Image Links panel to automatically insert them into the textarea. These mods were created by Mattonik... and they are currently included in my sNews 16 MESU package.

When you open the Image Links panel... a table displays. Mousing over the image links displays a thumb of uploaded images so you can see what they look like before choosing an image to insert. You can then choose one of four image options - the first will insert the full-sized image link into your textarea. The second will insert a text-link to the full-sized image. The third will insert a thumb that links to the full-sized image. And the fourth will insert a thumb that (when clicked) opens the full-sized image in a lightbox overlay.

This approach offers more versatility than one single editor button.
« Last Edit: October 13, 2007, 10:30:35 PM by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

calydon

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: Enable adding images from local machine
« Reply #2 on: October 13, 2007, 10:08:32 PM »

Thanks Keyrocks, I will check out MESU!
Logged