Advertisement:

Author Topic: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page  (Read 70230 times)

Offline brandonroy

  • Jr. Member
  • **
  • Posts: 166
  • Gender: Male
    • Brandon
[TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« on: January 24, 2009, 11:20:16 PM »
I disabled all attachments on board because the only thing my members upload are images. So instead of using my space on my server, I decided to let members use tinypic without ever leaving the post page! When users click the button that says "upload image" a popup shows with an upload form. Then gives them the bbcode to insert the image in their message.


Step 1: Download the attached html file at the bottom of this post.

Step 2: Upload that html file to a folder of your choice on your server (I use my root. Example: mysite.com/tinypic.html)

Step 3: Download the attached image button at the bottom of this post.

Step 4: Upload the image button to whatever image folder on your site that you want.

Open /Themes/YourTheme/Post.template.php

Find:
Code: [Select]
echo '
</td>
</tr>';
}

// Now start printing all of the smileys.
if (!empty($context['smileys']['postform']))

Add before:
Code: [Select]
echo '&nbsp;&nbsp;<a onclick="window.open(\'URL FOR YOUR TINYPIC HTML FILE HERE\',\'POPUP\',\'width=280,height=540,scrollbars=0\');return false;" href="#"><img src="URL FOR THE IMAGE BUTTON HERE" border="0"></a>';
Don't forget to update the above code with your own URL's for tinypic.html and for your image button! It should create a nice popup on the post page, and your users never have to leave your site to host an image.


Screenshots:







« Last Edit: January 25, 2009, 04:20:35 AM by brandonroy »

Offline Marcus Forsberg

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,607
  • Gender: Male
    • marcus.t.forsberg on Facebook
    • marcusforsberg on LinkedIn
    • @marcusforsberg on Twitter
    • marcusforsberg.net
Re: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« Reply #1 on: January 25, 2009, 04:44:23 AM »
Pretty nice tip :)
Do you want me to move this to Tips and Tricks?

Offline brandonroy

  • Jr. Member
  • **
  • Posts: 166
  • Gender: Male
    • Brandon
Re: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« Reply #2 on: January 25, 2009, 04:45:58 AM »
Pretty nice tip :)
Do you want me to move this to Tips and Tricks?

Be my guest!
:)

Offline djstew

  • Semi-Newbie
  • *
  • Posts: 24
Re: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« Reply #3 on: January 25, 2009, 10:02:38 AM »
i have to say, it does work. thanks you.


Offline Özgür

  • SMF Hero
  • ******
  • Posts: 3,923
  • Gender: Male
  • Özgür | jQuery Lover
    • Özgür Yalçın
Re: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« Reply #5 on: January 31, 2009, 02:25:43 PM »
Thank you, i translate and share (with your name) my language board. http://www.simplemachines.org/community/index.php?topic=289634.0. is this np?
Yeni forum projem: Özgür Nurettin Yalçın (Üye kaydı açıldı) | Android & jQuery Lover
Don't depend too much on anyone in this world. Because even your shadow leaves you when you're in darkness!
Twitter @ OzgurceFacebook @ Ozgurce
Özgür Yalçın | http://blog.mnyk.net/

Offline brandonroy

  • Jr. Member
  • **
  • Posts: 166
  • Gender: Male
    • Brandon
Re: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« Reply #6 on: January 31, 2009, 06:09:21 PM »
Thank you, i translate and share (with your name) my language board. http://www.simplemachines.org/community/index.php?topic=289634.0. is this np?

That's cool. no problem :)

Offline edi67

  • SMF Hero
  • ******
  • Posts: 1,532
  • Gender: Male
  • Italian Supporter
    • CrazyZone
Re: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« Reply #7 on: February 01, 2009, 02:22:08 PM »
simply great i love this
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Offline SwapsRulez

  • Jr. Member
  • **
  • Posts: 208
  • Gender: Male
  • Its better to burn out than to fade away...!!!
    • Project-BB
Re: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« Reply #8 on: February 01, 2009, 10:27:36 PM »
Hell Yeah!!! You rock buddy, everything is working fine. Any chance of automatically inserting the code after upload. :P
Project-BB.org : Educational Forum For Engineering, Diploma & Technical Students

The Engineering, Diploma & All technical students lounge for Free Projects, Seminars, Syllabus, Question Papers, College Assignments, Placement Papers, E-Books, Company Information & other technical stuffs.

Offline Jessikard

  • Jr. Member
  • **
  • Posts: 236
Re: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« Reply #9 on: February 26, 2009, 07:14:08 PM »
works fine
Hell Yeah!!! You rock buddy, everything is working fine. Any chance of automatically inserting the code after upload. :P
this would be very tricky - i hope for it

Offline 4Kstore

  • SMF Hero
  • ******
  • Posts: 4,165
  • Gender: Male
    • agustintari on Facebook
    • @agustintarifa on Twitter
    • SSIMPLE TEAM PAGE
Re: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« Reply #10 on: March 01, 2009, 03:44:19 PM »
Thanks!!! i translate (with credits) in spanish board.
http://www.simplemachines.org/community/index.php?topic=296442.0

Baiis!
NUEVOS MODS!!!


Offline NHWD

  • Jr. Member
  • **
  • Posts: 300
Re: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« Reply #12 on: March 02, 2009, 01:11:46 AM »
very useful thanks a lot!

Offline gift_ka

  • Semi-Newbie
  • *
  • Posts: 16
Re: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« Reply #13 on: March 05, 2009, 01:34:45 AM »
It's work. thx

Offline zilladotexe

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,086
  • Gender: Male
    • zilladotexe on GitHub
    • @zilladotexe on Twitter
    • XboxLeaders.com
Re: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« Reply #14 on: April 24, 2009, 07:55:01 PM »
Very nice brandonroy.
zilladotexe
Formerly known as "JBlaze"
Former Support & Customization     
Professional Bug Creator
Current Projects     
Xbox LIVE API
SM Classifieds
SimpleXBL
Important Links
Please, no PMs for support.
Unmanaged VPS Starting at $20/mo

Offline tooman

  • Full Member
  • ***
  • Posts: 489
  • Gender: Male
  • kakikukaku
    • Pantai Utara Forum
Re: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« Reply #15 on: May 18, 2009, 12:06:55 PM »
gud job :)

i have used :)

many thank brandonroy :)

Offline visagoo

  • Newbie
  • *
  • Posts: 1
Re: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« Reply #16 on: May 31, 2009, 11:18:55 PM »
thanks brandonroy it very useful.

Offline demonsmasher

  • Semi-Newbie
  • *
  • Posts: 19
Re: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« Reply #17 on: June 30, 2009, 02:40:55 PM »
Where is the post.template at?

Offline tooman

  • Full Member
  • ***
  • Posts: 489
  • Gender: Male
  • kakikukaku
    • Pantai Utara Forum
Re: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« Reply #18 on: June 30, 2009, 08:05:43 PM »
hi demonsmasher, tinypic mod is available in mod site, search it

Offline demonsmasher

  • Semi-Newbie
  • *
  • Posts: 19
Re: [TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page
« Reply #19 on: June 30, 2009, 08:17:52 PM »
thanks.

I found the post. temp.