MyBB Community Forums

Full Version: Tutorial - Tinypic image upload on newpost, quick replay and new replay.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Using plugin.tinypic.com, here is the simple tutorial how to allow user upload image to tinypic.com using popup browser on newpost, quick replay and new replay.

Screen shoot :
- In Newpost and Newreplay Template
[attachment=18414]


- quick replay
[attachment=18417]


How to do?
First download, extract and upload tinypic.htm file in your forum root.
[attachment=18416]

Go to Admin Cp -> Templates and Styles - > Templates -> Your Template Name

Click New Reply Templates -> newreply and find
<td class="trow2" valign="top"><strong>{$lang->your_message}</strong><br />{$smilieinserter}
After add
<p align="center"><a href="{$mybb->settings['bburl']}/tinypic.htm" onclick="return popup(this, 'notes')"><img src="http://static.tinypic.com/i/logo.gif" title="tinypic image upload" alt="tinypic" border="0"/></a></p>

Click New Thread Templates -> newthread and find
<td class="trow2" valign="top"><strong>{$lang->your_message}</strong>{$smilieinserter}
After add
<p align="center"><a href="{$mybb->settings['bburl']}/tinypic.htm" onclick="return popup(this, 'notes')"><img src="http://static.tinypic.com/i/logo.gif" title="tinypic image upload" alt="tinypic" border="0"/></a></p>

Click Show Thread Templates -> showthread_quickreply and find
<label><input type="checkbox" class="checkbox" name="postoptions[disablesmilies]" value="1" />&nbsp;<strong>{$lang->disable_smilies}</strong></label>{$closeoption}</span><br />
After add
<p align="center"><a href="{$mybb->settings['bburl']}/tinypic.htm" onclick="return popup(this, 'notes')"><img src="http://static.tinypic.com/i/logo.gif" title="tinypic image upload" alt="tinypic" border="0"/></a></p>

Click Header Templates -> header and put this script on the last part

<script type="text/javascript">
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=280,height=550,scrollbars=yes');
return false;
}
</script>
Your done.. Good luck.
Wow very nice tutorial! Smile
It doesnt open a popup windw ?
This works better :
<a href="#" onClick="MyWindow=window.open('tinypic.htm','MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=290,height=535');return false;"><img src="http://static.tinypic.com/i/logo.gif" title="tinypic image upload" alt="tinypic" border="0"/></a>
Nice Smile
This is nice! D:
(2010-05-28, 08:05 PM)dunlop03 Wrote: [ -> ]It doesnt open a popup windw ?
This works better :
<a href="#" onClick="MyWindow=window.open('tinypic.htm','MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=290,height=535');return false;"><img src="http://static.tinypic.com/i/logo.gif" title="tinypic image upload" alt="tinypic" border="0"/></a>
sorry my fault. I forget to insert this script on the first post Big Grin

<script type="text/javascript">
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=280,height=550,scrollbars=yes');
return false;
}
</script>
AWESOME!

Very helpful indeed.
Hi afzulnizam! Can you make this for imageshack? Because tinypic use captcha now. Thank you.
(2010-05-29, 12:27 PM)Valaki Wrote: [ -> ]Hi afzulnizam! Can you make this for imageshack? Because tinypic use captcha now. Thank you.
hi Valaki,

Sure why not. Here is imageshack.htm file.
[attachment=18422]

don't forget to edit code on the first post.

For example
Quote:<p align="center"><a href="{$mybb->settings['bburl']}/imageshack.htm" onclick="return popup(this, 'notes')"><img src="http://img163.imageshack.us/img163/613/iconupload.gif" title="imageshack" alt="imageshack" border="0"/></a></p>
Great! Thank you! Big Grin
Pages: 1 2 3