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

Main Menu

[TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page

Started by brandonroy, January 24, 2009, 11:20:16 PM

Previous topic - Next topic


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:

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


echo '

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

Add before:

echo '&nbsp;&nbsp;<a onclick="\'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.


Marcus Forsberg



So Long


CrazyZone - My SMF Forum

From the difficult the hardening of the man you can see


Hell Yeah!!! You rock buddy, everything is working fine. Any chance of automatically inserting the code after upload. :P : 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.


works fine
Quote from: SwapsRulez 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
this would be very tricky - i hope for it


¡¡NEW MOD: Sparkles User Names!!!




Jason Clemons
Former Team Member 2009 - 2012





hi demonsmasher, tinypic mod is available in mod site, search it