Aşağıdaki kendi yaptığım uygulamayı ben aynen kendi sitemde kullanıyorum sizinle paylaşmak istedim .
Kendi Temanız klasöründe
member_uploadform.html açıp kodu en aşağı ekleyiniz
Demo : www.enguzelresimler.net<script type="text/javascript" src = "/scripts/common/common.js" ></script>
<script type="text/javascript">
function highlight(field) {
field.focus();
field.select();
}
var url = "http://imageshack.us/";
var title = "ImageShack.us® - Image Hosting";
function favorites(){
if(document.all)
window.external.AddFavorite(url,title)
}
function disableme (what) {
what = document.getElementById(what);
what.disabled = true;
what.value="uploading...";
}
var buttonname = '"Browse..."';
function showoptions(what) {
var ext = what.value.substr(what.value.length - 3,3).toLowerCase();
switch (ext) {
case 'jpg':
case 'peg':
case 'png':
case 'gif':
case 'bmp':
case 'tif':
case 'iff':
show('resizeoptions');
hide('filetypeerror');
document.getElementById('butan').disabled=false;
document.getElementById('butan').value='host it!';
break;
case 'swf':
if (disableswf) {
document.getElementById('butan').disabled=true;
document.getElementById('butan').value=buttonname;
show('filetypeerror');
} else {
hide('resizeoptions');
hide('filetypeerror');
document.getElementById('butan').disabled=false;
document.getElementById('butan').value='host it!';
document.getElementById('butan').value='bad file type';
}
break;
case 'pdf':
hide('resizeoptions');
hide('filetypeerror');
document.getElementById('butan').disabled=false;
document.getElementById('butan').value='host it!';
break;
case '':
document.getElementById('butan').disabled=true;
document.getElementById('butan').value=buttonname;
default:
hide('resizeoptions');
show('filetypeerror');
document.getElementById('butan').disabled=true;
document.getElementById('butan').value='bad file type';
break;
}
}
function toggleuploadmode(mode)
{
document.getElementById('butan').value = 'host it!';
document.getElementById('butan').disabled = false;
document.getElementById('toggle'+mode).checked = true;
switch (mode)
{
case 0:
show('upfile', 'block');
hide('upurl');
hide('upvideo');
hide('upflash');
show('resizeoptions');
show('regtags');
show('butan_wrap');
document.getElementById('upform').action='http://imageshack.us/';
show('butan');
hide('swfbutan');
hide('recorder');
show('filetypeallowed');
hide('pipebytes');
break;
case 1:
hide('upfile');
hide('upvideo');
hide('upflash');
show('upurl', 'block');
show('resizeoptions');
show('regtags');
show('butan_wrap');
show('butan');
hide('swfbutan');
document.getElementById('upform').action='http://www.imageshack.us/transload.php';
hide('recorder');
show('filetypeallowed');
hide('pipebytes');
break;
case 2:
hide('upfile');
hide('upurl');
hide('upflash');
show('upvideo', 'block');
hide('resizeoptions');
hide('regtags');
show('butan');
show('butan_wrap');
hide('swfbutan');
hide('recorder');
show('filetypeallowed');
hide('pipebytes');
break;
case 3:
hide('upfile');
hide('upurl');
hide('upvideo');
show('upflash', 'block');
show('resizeoptions');
show('regtags');
hide('butan');
hide('butan_wrap');
show('swfbutan');
hide('recorder');
show('filetypeallowed');
hide('pipebytes');
break;
case 4:
hide('upfile', 'block');
hide('upurl');
hide('upvideo');
hide('upflash');
hide('resizeoptions');
hide('regtags');
hide('butan_wrap');
document.getElementById('upform').action='http://imageshack.us/';
hide('butan');
hide('swfbutan');
show('recorder');
hide('filetypeallowed');
hide('pipebytes');
break;
case 5:
hide('upfile');
hide('upurl');
hide('upvideo');
hide('upflash');
hide('resizeoptions');
hide('regtags');
hide('butan_wrap');
hide('butan');
hide('swfbutan');
hide('recorder');
hide('filetypeallowed');
show('pipebytes');
var src = document.getElementById('fpb').src;
if (src.indexOf('javascript') >= 0)
document.getElementById('fpb').src = 'http://imshk.pipebytes.com/imageshack.php';
break;
}
}
function toggleuploadmode2(file) {
if (file) {
show('upfile');
hide('upzip');
document.getElementById('upform').action='http://imageshack.us/index.php';
} else {
hide('upfile');
show('upzip');
document.getElementById('upform').action='http://imageshack.us/ie.php';
}
}
function focusfield(fl) {
if (fl.value=="paste image url here") {
fl.value='';
fl.style.color='black';
}
}
function checkemail()
{
var e_obj = document.getElementById('email');
if (!e_obj)
{
disableme('butan');
return true;
}
var email = e_obj.value;
if (email.length == 0)
{
disableme('butan');
return true;
}
var filter = /^[^@]+@(([a-zA-Z0-9\-])+\.)+([a-zA-Z]{2,4})+$/;
{
var ret = filter.test(email);
if (ret)
disableme('butan');
else
alert('Please enter valid email address');
return ret;
}
}
function opentags()
{
show('addtags');
show('addtagsdesc');
hide('at1');
}
function openemail()
{
show('autoreg');
show('autoregdesc');
hide('at1');
}
function show(id, type)
{
var o = document.getElementById(id);
if (o)
o.style.display = type || '';
}
function hide(id)
{
var o = document.getElementById(id);
if (o)
o.style.display = 'none';
}
function uploadstart()
{
var o = document.getElementById('uploader');
var ctrl = document.getElementById('email');
if (ctrl)
{
o.SetVariable('email', ctrl.value);
document.getElementById('hideregister').value = ctrl.value != '' ? 'yes' : '';
}
ctrl = document.getElementById('tags');
if (ctrl)
o.SetVariable('tags', ctrl.value);
ctrl = document.getElementById('optimage');
if (ctrl)
o.SetVariable('optimage', ctrl.checked ? '1' : '');
ctrl = document.getElementById('optsize');
if (ctrl)
o.SetVariable('optsize', ctrl.options[ctrl.selectedIndex].value);
ctrl = document.getElementById('rembar');
if (ctrl)
o.SetVariable('rembar', ctrl.checked ? '1' : '');
var c = get_cookie('myimages');
if (c && c != '')
o.SetVariable('cookie', c);
else
o.SetVariable('cookie', '');
o.SetVariable('go', '1');
}
function uploadcomplete(args)
{
var tokens = args.split(',');
var o = document.getElementById('swfpostcontainer');
o.innerHTML = '';
var counter = 0;
for (var i = 0; i < tokens.length; ++i)
{
var parts = tokens[i].split('/');
if (parts.length != 3)
continue;
o.innerHTML += '<input type="hidden" name="id[]" value="' + tokens[i] + '"/>';
counter++;
}
if (counter == 0)
{
alert('No files were uploaded');
}
else
{
var c = get_cookie('myimages');
if (c && c != '')
location.href = 'http://my.imageshack.us/v_images.php';
else
document.getElementById('swfpostform').submit();
}
}
-->
</script>
<script type="text/javascript" src="/scripts/yui/YAHOO.js"></script>
<script type="text/javascript" src="/scripts/yui/connection.js"></script>
<script type="text/javascript" src="/scripts/tooltips/fxtooltips.js"></script>
<link rel="stylesheet" type="text/css" href="/img/tooltips.css"/>
</head>
<body bgcolor="#F7F7F7">
<div id="mist" class="mist"></div>
<div id="mist" class="mist"></div>
<table width="661" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="34"> </td>
<td style="width:950;" align="right">
</td>
</tr>
<tr>
<td colspan="2" width="984">
<b><marquee scrolldelay="150">+ Show Advanced Linking basıp ordaki linki alınız (En aşağıdadır) </b></marquee></td>
</tr>
<!-- content -->
<tr>
<td colspan="2" width="984">
<table width="493" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="984">
<table cellpadding="5" width="1" border="1" bordercolor="#CCCCCC" class="table_decoration" align="center"><tr>
<td valign="top" width="6"><p> </p></td><td valign="top" width="748"><form method="post" action="http://www.imageshack.us/toolbar/pictures.php" id="swfpostform">
<input type="hidden" name="hideregister" id="hideregister" value=""/>
<div id="swfpostcontainer" style="display:none"></div>
</form>
<form method="post" action="http://imageshack.us/" enctype="multipart/form-data" onsubmit="return checkemail()" id="upform">
<script type="text/javascript" src="/scripts/common/magicbutton.js"></script>
<table cellspacing="0" cellpadding="0" border="0" style="width:646" height="204">
<tr>
<td colspan="3" style="padding:0;margin:0" width="614" height="21">
upload:
<input type="radio" id="toggle0" name="uploadtype" onclick="toggleuploadmode(0)" value="1" checked> <a href="#" onclick="toggleuploadmode(0)" title="upload an image" checked>
image</a>
<input type="radio" id="toggle1" name="uploadtype" onclick="toggleuploadmode(1)" value="2"> <a href="#" onclick="toggleuploadmode(1)" title="transload an image from a url">
url</a>
<input type="radio" id="toggle2" name="uploadtype" onclick="toggleuploadmode(2)" value="3"> <a href="#" onclick="toggleuploadmode(2)" title="upload a video with the ImageShack toolbar">
video</a>
<input type="radio" id="toggle3" name="uploadtype" onclick="toggleuploadmode(3)" value="4"> <a href="#" onclick="toggleuploadmode(3)" title="upload multiple images">
multiploader</a>
<input type="radio" id="toggle5" name="uploadtype" onclick="toggleuploadmode(5);" value="5"> <a href="#" title="send file to friend" onclick="toggleuploadmode(5);" href="#">
file exchange</a>
</tr>
<tr>
<td colspan="3" nowrap="NOWRAP" width="614" height="112">
<div id="upfile" style="width: 286; height: 21">
<input type="file" name="fileupload" size="50" style="height:20px;" onchange="showoptions(this)" id="fileupload"/>
</div>
<div id="upurl" style="display: none; width:183; height:21"><input type="text" id="fileupload" value="paste image url here" style="color: #888;height:20px"
onfocus="focusfield(this)" name="url" size="50">
</div>
<div id="upvideo" style="display: none">
<input type="text" value="" disabled="DISABLED" size="50" style="height:20px"/> <script type="text/javascript">_magic_button('height:20px;width:70px;background-color:#cccccc;')</script>
</div>
<div id="upflash" style="display: none; width:262; height:19">
</div>
</td>
</td>
</tr>
<tr>
<td colspan="3" width="614" height="71">
<table id="regtags" width="530">
<tr id="at1" style="display:none;">
</tr>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="MAX_FILE_SIZE" value="13145728">
<input type="hidden" name="refer" value="http://www.google.com.tr/search?hl=tr&q=imageshack&btnG=Ara&meta=">
<input type="hidden" name="brand" value="">
<span id="butan_wrap">
<input id="butan" style="width:135px;border:2px solid #FF6600" type="submit" value="Host it!" /> </span>
<input id="swfbutan" style="width:135px;display:none;border:2px solid #FF6600" type="button" value="start upload!" onclick="uploadstart()"/>
</form>
<!-- Start Google Analytics Tag -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-6232220-1");
pageTracker._initData();
pageTracker._setDomainName(".imageshack.us");
pageTracker._trackPageview(url_image_path);
</script>
<script type="text/javascript">pageTracker._setVar('HomePage');</script>
<!-- End Google Analytics tag -->
<!-- Start Quantcast tag -->
<script type="text/javascript">
_qoptions={
qacct:"p-65DrxcUXjcWq6",
labels:"Homepage"
};
</script>
<script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
<noscript>
<a href="http://www.quantcast.com/p-65DrxcUXjcWq6" target="_blank"><img src="http://pixel.quantserve.com/pixel/p-65DrxcUXjcWq6.gif?labels=MyPage" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/></a></noscript>
<!-- End Quantcast tag -->
<script type="text/javascript">
toggleuploadmode(0);
</script>
</td></tr></table>
<center>
</center>
<p align="center">
<a href="http://www.enguzelresimler.net" title="Gelecegin en iyi resim galeri sitesi | Resimler, Güzel Resimler, En Güzel Resimler, Resim, Resim Galerisi, Resimleri, Manzaralar, Manzara, Güncel Resimler Arşivi - türkin resim rehberi Akarsu,Resimleri
" target="_blank"> <font color="#FFFFFF">Ücretsiz resim indir </font>
</a><br />
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>