News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Image Upload from your board

Started by Pause, January 25, 2005, 10:05:16 PM

Previous topic - Next topic

Pause

Well, if your board is the sort that has a lot of people posting images, you don't really want your bandwidth getting wasted do you? So here are instructions on how to make it so that images can be linked from somewhere else, but uploaded from your board

Credit to ImageShack.us for permission to post this.


These instructions will help you to install ImageShack into the reply and post-new-thread sections of your Simple Machines Forum, thus giving your visitors the ability to upload images directly. After upload, they may paste the images directly into their post box.

Skip Step 1 if you are using the default theme: Your bgcolor is 1E1E1E and your txtcolor is 000000.

Step 1: Finding the background and text colors of your forum so that you may assign them to your iframe and have complete integration.

   1. Go to the reply or post-new-topic page.
   2. Hit print-screen. Open up a graphics-editing program such as Adobe Photoshop(tm).
   3. Open a new document and paste the print-screen data into it.
   4. Use the color selection tool to find the hexadecimal value of the color UNDER the posting box and ABOVE the "Post" button: Click the eyedropper tool.
      Move it to the area mentioned above and click on the picture.
      In your software's toolbar, a new color loads.
      Click on this color, and you will see a hexadecimal value for bgcolor. You can also zoom in and find the color of your text this way.

Step 2: Pasting the 'ImageShack on your Site' form inside your forum.

The file that you will be working with are located in the following directory:

/home/USER_NAME/www/YOUR_FORUM_DIRECTORY/Themes/default/

If you are using different template (not default), please go to the directory associated with THAT different template.

Some templates do not have a Post.template.php file. Also, make sure to backup your files before doing any modifications to them.

1. Open Post.template.php . You can do this by using ftp to download the file Post.template.php , and then uploading it back once you are finished editing it.

2. search for the following instance:
echo '
<script language="JavaScript" type="text/javascript"><!--
swapOptions();
// --></script>';



3. Add After:
echo '<iframe src="http://www.imageshack.us/iframe.php?bgcolor=FFFFFF&txtcolor=111111&type=blank" scrolling="no" frameborder="0" width="280" height="70"> You must have an iframe-compatable browser to view the ImageShack.us upload form.</iframe>';

4. Save your changes. Login to your forum. Either click "Post New Thread" or reply to an existing thread in order to test out your new Image Hosting Service!
"You and me, inside that box, now." - The Doctor

Bite Fusion
Fusion Web Network
VG Fusion
Wrestling Fusion + Wrestling Fusion Forums

raedzaro

Thanks but how can Make it for Avatars?

Gobo

hi
thanks for the useful tip just what I needed

I just wanted to mention though that instead of making the color picking such a complicated task use this FREE utility called TribalXColor Picker

its small and works awesome...a very small window appear op top of all other apps and all u have to do is drag the color picker from its color picker square on to ANY thing which is on the screen and it will display its HEX codes as well as RGB and others

This is a MUST have for all people who deal with HEX color codes

http://dl.winsite.com/bin/Info?12500000038210

download available at winsite

Enjoy

nitecrawler

If you are using Firefox, then you can use Colorzilla extension for picking up the colour from any page. Just a mouse click is enough! :)

LCar

I'm new to SMF and this post helped me a lot!
Is there a way to use www.servimg.com [nofollow] instead of imageshack.us [nofollow]?
It's because www.servimg.com [nofollow] has a 2mb limit instead of 1.5 of imageshack.us [nofollow].
Hope you can help me.
Thanks in advance!
Cheers

brandonroy

I cannot get this uploader above the post/preview buttons for the life of me! No matter where I pput the code in post.template.php It always either goes aboce the topic summary or at the very top of the post page above the subject box


FlixyaFriend

samsung ue46c8000 [nofollow]

Rumbaar

Note brandonroy, that this tip was written in 2005, I'm sure the template layouts have changed since then.  You might have to tweak the code to match current template layouts.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

willerby

Do these edits work for SMF RC2? Have just about had it with Simple Image Upload mod...

W
What type of washing machine is September?

An autumnatic. :)

Arantor

I highly doubt it will work; the code is over 4 years old, and the 2.0 theme code is all replaced compared to 1.1.

Rik©

Hi  8)

There already is the Simple ImageShack mod, only for SMF1.
But i'm working on version 3 which will be released for SMF 1.1.x this week.
Then i'll start coding v3.1.0 for SMF2.
SIS v3 will have the option to add tags, upload into ImageShack account and more.

If you want to see the beta in action just register @ http://simpletweaks.co.nr and pm me

-Rik©

willerby

Thanks Rik. If you need a beta tester for SMF2 RC2 I'd be happy to get involved. A simple, reliable, external image hosting service seems to be impossible to obtain for RC2.

I have older generation members who just want to upload an image to their posts and as they have no idea how to resize or create flickr, photobucket etc accounts I am currenly at a loss.

Attachments are ok but killing my server!

What type of washing machine is September?

An autumnatic. :)

GrumpiGrampi

I just wanted to say that I am in the same boat as you, as my forum also caters primarily to the older generation. Let me know if you find a solution.

willerby

I thought I'd give this code a go on my test RC2 forum and it works fine.

Edits are still to post.template.php and I chose to put it above the attachments section eg.

Search for
// If this post already has attachments on it - give information about them.


Add BEFORE:
//IMAGESHACK
echo '<iframe src="http://www.imageshack.us/iframe.php?bgcolor=FFFFFF&txtcolor=111111&type=blank" scrolling="no" frameborder="0" width="280" height="70"> You must have an iframe-compatable browser to view the ImageShack.us upload form.</iframe>';


I only decided against using it as I'm waiting for Rik's simpler imageshack mod for RC2 - this one uploads the image to imageshack and opens it in a new browser window. Users then copy and paste from a range of url, html and bbc options under the image and insert that into their post.

Unfortunately that last step would confuse half my users  ::)

Nice code for other forums though and works neatly...
What type of washing machine is September?

An autumnatic. :)

CultureGlue


Advertisement: