Megaupload Button
Quick File Uploading for Your Users
by Mikers
Hey there gents.
Just a small little tut I wrote while writing up some guidelines for my site. I based it off
this tutorial, which allows uploading to TinyPic and Imageshack (if you scroll down a bit) And the creds go to that gent for giving me the idea, and the javascript pop-up aspect idea of this is accredited to
Mr. Dunlop03. Use this in combination with that tut, and your users should never need to use much of your attachment space. It's a very good alternative for those who have limited Disk Space and Bandwidth, or if you just wanna save on it anyway.
It makes use of Megaupload's Filebox service (you may have seen the BBCode), though you don't need special accounts or anything like that.
1. Upload the Files
Anyway, enough of my rambling. Let's get started, shall we?
First off, download megaupload.htm from the attachment, which I have created for your convenience.
megaupload.htm (Size: 603 bytes / Downloads: 1)
Upload it to your
forum root.
You'll also need a Megaupload logo or button, depending on where you intend to insert it. If you prefer the upload logo, like from the tutorial I mentioned earlier, use this. You'll have to edit and resize it yourself.
http://2.bp.blogspot.com/_LCph-cDpj_w/Sz...d+logo.jpg
If you prefer a round button, here you go. Once again, you'll need to resize it yourself.
http://essanet.net/FR/megaupload-logo.png
Or make your own. Whichever's fine with you.
Upload whatever you choose (and edit) to your forum's /image directory.
2. New Topic Insertion
(This is from the tutorial I based it on)
Go to ACP -> Templates & Styles -> Templates -> Your Style
Go to New Thread Templates -> newthread
Find,
Code:
<td class="trow2" valign="top"><strong>{$lang->your_message}</strong>{$smilieinserter}
Add after,
Code:
<a href="#" onClick="MyWindow=window.open('megaupload.htm.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://mysite.com/forum/images/uploadlogo.png" title="Megaupload File Hosting" alt="Megaupload" border="0"/></a>
Relplace "http://mysite.com/forum/images/uploadlogo.png" with the link to your Megaupload image.
--------
If you don't want it there, edit it to reflect where you want it to appear. I actually prefer to create an entire new box to contain mine, but it's your choice.
3. Quick Reply & New Reply Insertion
(This is also from the tutorial I based it on)
In Templates & Styles
Go to New Reply Templates -> newreply
Find,
Code:
<td class="trow2" valign="top"><strong>{$lang->your_message}</strong><br />{$smilieinserter}
Add After,
Code:
<a href="#" onClick="MyWindow=window.open('megaupload.htm.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://mysite.com/forum/images/uploadlogo.png" title="Megaupload File Hosting" alt="Megaupload" border="0"/></a>
Relplace "http://mysite.com/forum/images/uploadlogo.png" with the link to your Megaupload image.
---
In Templates & Styles
Go to Thread Templates -> showthread_quickreply
Find,
Code:
<label><input type="checkbox" class="checkbox" name="postoptions[disablesmilies]" value="1" /> <strong>{$lang->disable_smilies}</strong></label>{$closeoption}</span><br />
Add After,
Code:
<a href="#" onClick="MyWindow=window.open('megaupload.htm.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://mysite.com/forum/images/uploadlogo.png" title="Megaupload File Hosting" alt="Megaupload" border="0"/></a>
Relplace "http://mysite.com/forum/images/uploadlogo.png" with the link to your Megaupload image.
That's it. This is and the other tutorial are a BEAUTIFUL integration for Pars' tutorial
TopicStats, which adds a very beautiful posting suite below the Quick Reply. If you need direction on how to merge it with TopicStats, let me know.
That's it.
Once again, credits go to
Mr. Afzulnizam for his
tut that gave me the idea (and what I based it on), and
Mr. Dunlop03 for his Javascript code.
Peace.