Advertisement:

Author Topic: Image Upload from your board  (Read 36523 times)

Offline Pause

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,596
  • Official Cheesecake
    • @FWNetwork on Twitter
Image Upload from your board
« on: January 25, 2005, 10:05:16 PM »
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:
Code: [Select]
echo '
<script language="JavaScript" type="text/javascript"><!--
swapOptions();
// --></script>';


3. Add After:
Code: [Select]
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

Fusion Web Network
Wrestling Fusion + Wrestling Fusion Forums

Offline raedzaro

  • Jr. Member
  • **
  • Posts: 116
    • just to tell the world that I'm Jordanian
Re: Image Upload from your board
« Reply #1 on: March 26, 2005, 06:04:37 AM »
Thanks but how can Make it for Avatars?

Offline Gobo

  • Sr. Member
  • ****
  • Posts: 912
  • Gender: Male
  • Peace Be Upon You
    • Path To Peace
Re: Image Upload from your board
« Reply #2 on: November 25, 2005, 06:20:37 PM »
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

Offline nitecrawler

  • Semi-Newbie
  • *
  • Posts: 30
  • Gender: Male
  • I Love SMF, but need few more custom mods.
    • A+ Forwards
Re: Image Upload from your board
« Reply #3 on: May 28, 2006, 03:27:51 AM »
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! :)

Offline LCar

  • Semi-Newbie
  • *
  • Posts: 10
Re: Image Upload from your board
« Reply #4 on: June 07, 2007, 05:43:40 PM »
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?
It's because www.servimg.com [nofollow] has a 2mb limit instead of 1.5 of imageshack.us.
Hope you can help me.
Thanks in advance!
Cheers

Offline brandonroy

  • Jr. Member
  • **
  • Posts: 166
  • Gender: Male
    • Brandon
Re: Image Upload from your board
« Reply #5 on: January 24, 2009, 03:49:06 AM »
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


Offline FlixyaFriend

  • Semi-Newbie
  • *
  • Posts: 18
    • samsung ue46c8000
Re: Image Upload from your board
« Reply #7 on: February 05, 2009, 02:30:24 PM »

thanks for the useful tip  ;D

Offline Rumbaar

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,802
  • Gender: Male
  • Inherent Omniscience
    • Rumbaar.net
Re: Image Upload from your board
« Reply #8 on: March 10, 2009, 11:08:04 PM »
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 ]

Offline Willerby...

  • Full Member
  • ***
  • Posts: 401
  • Gender: Male
  • Where there's a Willerby, there's a way...
    • What's that caravan all about then?
Re: Image Upload from your board
« Reply #9 on: January 05, 2010, 03:36:49 AM »
Do these edits work for SMF RC2? Have just about had it with Simple Image Upload mod...

W
Chopsticks are one of the reasons the Chinese never invented custard

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 62,826
Re: Image Upload from your board
« Reply #10 on: January 05, 2010, 04:02:50 AM »
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.
And his eyes have all the seeming of a demon's that is dreaming,
And the lamp-light o'er him streaming throws his shadow on the floor

Offline Rik©

  • Full Member
  • ***
  • Posts: 605
  • Gender: Male
    • SimpleTweaks
Re: Image Upload from your board
« Reply #11 on: January 05, 2010, 04:47:13 AM »
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©

Offline Willerby...

  • Full Member
  • ***
  • Posts: 401
  • Gender: Male
  • Where there's a Willerby, there's a way...
    • What's that caravan all about then?
Re: Image Upload from your board
« Reply #12 on: January 05, 2010, 12:43:26 PM »
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!

Chopsticks are one of the reasons the Chinese never invented custard

Offline GrumpiGrampi

  • Newbie
  • *
  • Posts: 3
Re: Image Upload from your board
« Reply #13 on: January 05, 2010, 02:32:31 PM »
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.

Offline Willerby...

  • Full Member
  • ***
  • Posts: 401
  • Gender: Male
  • Where there's a Willerby, there's a way...
    • What's that caravan all about then?
Re: Image Upload from your board
« Reply #14 on: January 07, 2010, 03:59:48 PM »
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
Code: [Select]
// If this post already has attachments on it - give information about them.

Add BEFORE:
Code: [Select]
//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...
Chopsticks are one of the reasons the Chinese never invented custard

Offline CultureGlue

  • Jr. Member
  • **
  • Posts: 163
  • Everyone believes
    • Confo
Re: Image Upload from your board
« Reply #15 on: January 12, 2010, 09:54:56 AM »
looks usefull.. uhm.. it is