Thread Rating:
  • 3 Vote(s) - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial - Tinypic image upload on newpost, quick replay and new replay.
#1
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
   


- quick replay
   


How to do?
First download, extract and upload tinypic.htm file in your forum root.

.zip   tinypic.zip (Size: 310 bytes / Downloads: 547)

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.
Reply
#2
Wow very nice tutorial! Smile
Reply
#3
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>
Reply
#4
Nice Smile
Reply
#5
This is nice! D:
Reply
#6
(05-28-2010, 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>
Reply
#7
AWESOME!

Very helpful indeed.
Reply
#8
This user has been denied support. This user has been denied support.
Hi afzulnizam! Can you make this for imageshack? Because tinypic use captcha now. Thank you.
I'm a proud MyBB user. Toungue
Reply
#9
(05-29-2010, 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.

.htm   imageshack.htm (Size: 753 bytes / Downloads: 320)

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>
Reply
#10
This user has been denied support. This user has been denied support.
Great! Thank you! Big Grin
I'm a proud MyBB user. Toungue
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)