Author Topic: Attach and Insert Photos Into Forum Posts  (Read 58896 times)

Offline Carl

  • Webmaster
  • Administrator
  • Watcher
  • ******
  • Posts: 3843
    • Carl's Sims 4 Guide
Attach and Insert Photos Into Forum Posts
« on: May 17, 2016, 10:33:04 PM »
Attach and Insert Photos Into Forum Posts

Index of Links:
- Important Note
- How To: Browse for the Photos
- How To: Insert a Photo (Attachment 1)
- An Example of How To: Insert a Photo into a Post
- How To: Add More Photos (Attachments)
- Limitations and Example Image Code
- Early Precautions
- Issues with Attaching and Inserting Photos




Important Note

Let's bring some color to the site shall we? I invite you to share your gameplay images within topics in an easier way, and story authors may enjoy having their images and posting taken care of in one place.

We have had numerous requests to bring the gallery feature back to the forum. However that presented some serious issues. For one, we had to moderate another entire area. Additionally, people would upload images that were large and then not use them in their stories. We could not keep track of those that were necessary and those that were just sitting there. It was used as storage space, and images were not compressed until they were put on the forum. So they were big, and that's bad. We only had 80GB of storage space on the old server and the gallery grew to 15GB due to uncompressed images. It was unsustainable, so I had to pull the plug.  :-\

Now that we have a more scalable server, I realized we can incorporate something using the forum's own attachment system so went hunting for a mod to do just that. A wonderful pair of SMF modders hath delivered. Resize Attached Images by Kays allows us to keep them at a reasonable size for both storage and bandwidth concerns, while dougiefresh's Post and PM Inline Attachments lets us put the attachments inside posts.

There are limitations to doing it this way, though it's really easy to share a single picture to help someone or to show off some accomplishment. Using this system for something that requires as many pictures as a story means planning ahead, know what images you need and where. We cannot preview the images until they've been uploaded to the forum. However, we can easily insert them in the right places if we rename them in a number sequence or else take note of the filenames of pictures we want to place between paragraphs. A little imagination can make this easier.

Edit: The Forum supports JPG (jpeg), BMP, PNG, and GIF image types. The last kind will not work as animated, it will be converted to jpeg by default.

Please have your screenshots in jpg format. 

** If you need help with this, please feel free to post questions or if you want to try attaching some photos, please do so in this thread!! :)

Back to top




Browse for the Photos

Pick a Photo from the folder where you've collected images from your story. It's 10x easier if you rename them something like 1, 2, 3, etc.

image-posting-tutorial-2.jpg

Back to top




Insert a Photo (Attachment 1)

From the attachment interface, select Insert Attachment 1, 2, 3, etc. as you go. The image you've selected to upload will be placed in the current location of the cursor.

image-posting-tutorial-3.jpg

An Example of how to do this step:
http://www.carls-sims-4-guide.com/forum/index.php?topic=26583.msg443688#msg443688

Back to top




More Attachments

More attachments at the bottom, will let you open many more 'Choose file' boxes.

image-posting-tutorial-4.jpg

Now continue those 4 simple steps. You can place the cursor and insert the next attachment each time. We do not yet allow multiple uploads at once, though it's safe to say it is not too hard as your browser will remember where you last opened a file :)

Don't forget to insert the photos into the message. - This way, they're not only attached to the post, but they're inserted into the message.

Back to top




Limitations and Example Image Code

Limitations: If you preview the post, you'll see [ Invalid Attachment ] where your pictures are. Why? They're not uploaded to the server yet. Compose your story or post assuming the picture will be there when you hit post. If you need a caption directly below it, assume putting a
Code: [Select]

attach id=4 msg=443597 float=center (Let's pretend there are [brackets] around that)
[b]Caption[/b]: directly beneath the picture

will turn out right, and also float the image to the center of the page if you like. Just don't go right, trust me, it'll look weird..

See the code for the attachments? Those are the message id of the post, and the number of the attachment. So the 4th one I uploaded will go there. Crafty Simmers might even skip clicking insert and relocating the cursor 15 times and instead just copy (Ctrl + C) that code, paste it (Ctrl +V) and change the id= to the next attachment number.   8)

Back to top




Early Precautions

Early Precautions: Because server security may kick you off for uploading many files, please compose your story post in notepad or copy it before you hit post and begin the upload on something with many pictures. Preview is safe, though as I said the images won't work until done. I don't want you to lose work. This should only be necessary for a while. I will tweak things to give people room to upload on slow internet.

Images will be downsampled to be 800x450 pixels. The rationale for this is 1. data size for storage space and 2. data size for people on mobile plans who read your stories. You are free to continue using other image hosting options, though people with slow internet will greatly prefer downloading the 30-90kb images you share here to 2MB colossal uncompressed images that can make a page require 45 Megabytes of download with 15 images. The whole post can be the size of one image.

If you don't use a program like Irfanview to change your files from PNG to JPG it may take some time to upload them, especially if they are directly from the game and you have slow internet. You may actually save some upload time if you batch replace them first. Mrsflynn has a tutorial for using Paint to convert an image here.  I personally recommend Irfanview [Download Here] because it will let you press the 'B' key, and navigate to your story pictures folder. From there you can add all, tinker the options and change them to JPG all at once. Be sure to set an output folder (you can simply make a folder inside the current one). How-To: Use Irfanview.

We have the rule of using .jpg instead of .png as it saves space on storage space and bandwidth.

Thank you all for being members, and collectively creating this awesome, kind, and helpful community. I hope this new feature works out, I'll try to help if things go wrong. Please keep backups of your pictures just in case the system bugs out on us. It looks stable enough for mass-use and both mods have undergone plenty of revisions since their initial release.

You can practice uploading in this thread. We'll leave it up a couple weeks then move it to the member zone where it can exist as a tutorial of sorts :)

Back to top




Issues with Attaching and Inserting Photos

Here are some troubleshooting tips to try:

1. Log out of the forum and close the browser. Then open it again and try the attachment again.

2. Clear your browser's cache to see if it helps.
https://www.wikihow.com/Clear-Your-Browser%27s-Cache

3. Make sure you have the profile layout option "Show WYSIWYG editor on post page by default" is not checked. If this option is checked it will make the attachments not work correctly.

Go to: Home Menu > Profile > Modify Profile > Look and Layout

As seen in this photo:

Click image to see larger view

Offline simfulicious

  • Immortal
  • *****
  • Posts: 993
  • Origin ID: petunia302007
    • Stories By Simfulicious
Re: Post & Story Images
« Reply #1 on: May 18, 2016, 06:41:52 AM »
@Carl Thank you for this...now maybe I will do my stories directly in the thread, the way everyone else does.  I didn't do it very often before because I hated having to go to a separate place to host my picture...now I just upload the files and am done.






Registered members do not see ads on this Forum. Register here.

Offline Carl

  • Webmaster
  • Administrator
  • Watcher
  • ******
  • Posts: 3843
    • Carl's Sims 4 Guide
Re: Post & Story Images
« Reply #2 on: May 18, 2016, 07:29:30 PM »
@simfulicious The only thing you didn't do there was insert it into the post properly. For people who just want to attach images, that's the way... but if you or anyone else were doing a story, you'd have the image inside the post by clicking the insert button next to where you chose which file to attach :) See Insert Attachment 1 here

I think this will have a lot of applications in normal posting situations, and not just stories. It's now much easier to slip a simple image in to help someone, or show off something from a new game pack, etc.

Offline simfulicious

  • Immortal
  • *****
  • Posts: 993
  • Origin ID: petunia302007
    • Stories By Simfulicious
Re: Post & Story Images
« Reply #3 on: May 18, 2016, 09:13:31 PM »
@Carl oh it will definitely be easier to post a single image that isn't part of a story. 


I tried the Insert Image link and it didn't put the image in the post.

Offline MrsFlynn

  • Admin Assistant
  • Administrator
  • Watcher
  • ******
  • Posts: 6142
How to Insert a Photo Into a Post
« Reply #4 on: May 18, 2016, 09:46:40 PM »
How to Insert a Photo Into a Post

1. First you go to your post and left-click Modify up to the right of the subject line.

ModifyPost.jpg

2. Click the Insert Attachment link to add image to the message. (Do the same for each additional image)

IA1.jpg

3. Click save as normal to show the message with the images inserted into the post.

See post in the link below for example:
http://www.carls-sims-4-guide.com/forum/index.php?topic=26583.msg443623#msg443623



If issues occur, try these tips:

1. Log out of the forum, close browser, then open it again and try the attachment(s) again.

2. Clear your browser's cache to see if that helps.

How to Clear Your Browser's Cache
http://www.wikihow.com/Clear-Your-Browser%27s-Cache
Welcome!! We hope you enjoy the forum!!  Thank you for visiting!!
–Need Help? Check our Member FAQs Here. * –Read and follow the Forum Rules, please! *

Offline sdhoey

  • Global Moderator
  • Watcher
  • ******
  • Posts: 4827
    • sdhoeys Sims & More
Re: Post & Story Images
« Reply #5 on: May 18, 2016, 10:28:07 PM »
72.jpg

I thought I would give this a try. You are the best Carl. I was wondering earlier why that was showing up when I was posting my update to my story.

Offline Carl

  • Webmaster
  • Administrator
  • Watcher
  • ******
  • Posts: 3843
    • Carl's Sims 4 Guide
Re: Post & Story Images
« Reply #6 on: May 18, 2016, 10:31:56 PM »
Glad you guys like it! I'm grateful @MrsFlynn cleaned up my post and helped show how to do things :D



Registered members do not see ads on this Forum. Register here.

Offline Nettlejuice

  • Baba Gothel
  • Watcher
  • ******
  • Posts: 2605
  • Mother knows best, Rapunzel
Re: Post & Story Images
« Reply #7 on: May 19, 2016, 06:18:33 AM »
@Carl Are the images only available to members when using mobile? I couldn't see them as a guest.
Chant: Life States (TS3) / Immortal Dynasty (TS4)




Mother Gothel & Baba Yaga Enthusiast

Offline Carl

  • Webmaster
  • Administrator
  • Watcher
  • ******
  • Posts: 3843
    • Carl's Sims 4 Guide
Re: Post & Story Images
« Reply #8 on: May 19, 2016, 07:22:32 AM »
@Nettlejuice Many thanks! It was just a permission on THIS board, but I did make it so that guests can view attachments and found what would be wrong if it were to happen anywhere else. Think I got them all :)

Offline simfulicious

  • Immortal
  • *****
  • Posts: 993
  • Origin ID: petunia302007
    • Stories By Simfulicious
Re: Post & Story Images
« Reply #9 on: May 19, 2016, 07:54:17 AM »


I couldn't get it to work using chrome, so I switched to explorer, and it works...

Offline Carl

  • Webmaster
  • Administrator
  • Watcher
  • ******
  • Posts: 3843
    • Carl's Sims 4 Guide
Re: Post & Story Images
« Reply #10 on: May 19, 2016, 12:57:46 PM »
Hmm, wonder if the cursor was in the type box when you clicked it on the other browser. I don't have any problem with Chrome, however I will say that it is entirely possible it is a browser cache thing @simfulicious

In Chrome press Ctrl + Shift + Delete and select to clear only cached images and files. That way you don't lose login information by nuking your cookies. This will make sure you get a current version of the forum page. Having a lot of issues like this lately but it's just all the changes, once things are normal and it's been about a month a cached version of the page will work just fine.

If anyone else has that problem, give it a try. I'm writing on Fallout 4 Far Harbor and the caching issue is so bad I had to reload the server just to get it to show me an updated image. *sigh*. I'll find a way to fix it :)


Offline Nettlejuice

  • Baba Gothel
  • Watcher
  • ******
  • Posts: 2605
  • Mother knows best, Rapunzel
Re: Post & Story Images
« Reply #11 on: May 19, 2016, 01:10:03 PM »
@Carl Thank you for clearing that up =D
Chant: Life States (TS3) / Immortal Dynasty (TS4)




Mother Gothel & Baba Yaga Enthusiast

Offline Carl

  • Webmaster
  • Administrator
  • Watcher
  • ******
  • Posts: 3843
    • Carl's Sims 4 Guide
Re: Post & Story Images
« Reply #12 on: May 19, 2016, 01:31:00 PM »
Aye, it'd defeats the purpose doesn't it? I'm sure loads of people like reading on mobile to pass the time! And here that is one of my main goals, to make things better for mobile readers... oops ;)

Offline sdhoey

  • Global Moderator
  • Watcher
  • ******
  • Posts: 4827
    • sdhoeys Sims & More
Re: Post & Story Images
« Reply #13 on: May 19, 2016, 02:28:09 PM »
I'm using chrome and I didn't have any problems. That's odd, I wonder why that is?

Offline Carl

  • Webmaster
  • Administrator
  • Watcher
  • ******
  • Posts: 3843
    • Carl's Sims 4 Guide
Re: Post & Story Images
« Reply #14 on: May 19, 2016, 03:32:09 PM »
Some browsers have an older copy of the forum's background code (that makes things work) or something to that effect. So they don't treat everything as they should be treated. This is why some people had white screens and errors when I moved servers. They were looking for things in places they don't exist, even though the current page would tell them exactly where that was. It didn't ask for the current, it went with the one it had already downloaded.

Since this is a new feature, a person might have a cached copy of the forum from 2-3 days before this came out and only have part of the code. It's frustrating as a developer, because I can't make the browsers flush their cache. I could trick it by changing file names, but we might have those white screen errors again. So it has to sort itself out, and user intervention by clearing it can fix it fast.

I say this as I assume we're all using the same version of chrome because it auto-updates.