[ABD] Hidden Imageshack uplad bar 1.0.0

Post your MODs, receive and provide feedback!
Topics in this forum are not for MOD support, they are for giving the author feedback.
Forum rules
The topics in this forum are not for general MOD support, they are for giving the MOD author some feedback, ideas and bug reports.
Darthmat
New member
New member
Posts: 6
Joined: 15 Jul 2008, 22:32
Contact:

Re: Hidden Imageshack uplad bar 1.0.0

Post by Darthmat »

I remember in phpbb2 there was one. You clicked upload an image and a small pop-up appeared.
User avatar
Fridge
New member
New member
Posts: 3
Joined: 22 May 2007, 23:19
Real name: Martin
Location: Rotterdam, The Netherlands

Re: Hidden Imageshack uplad bar 1.0.0

Post by Fridge »

I alway's used a imageshack upload function on my board but never thought about to make it hidden by default, so thnx for this idea :beer:

I'm also using a iframe but not hosted by imageshack and mine have a few more functions, came across mine from a old phpbb2 mod.

iframe.php

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ImageShack (TM) - Hosting</title>
<link rel="stylesheet" href="/imageshack.css" type="text/css">
</head>
<body style="background-color:transparent">
<script type="text/javascript">

function toggleuploadmode(file) {
   if (file) {
      document.getElementById('upfile').style.display='block';
      document.getElementById('upurl').style.display='none';
      document.getElementById('upform').action='http://www.imageshack.us/index.php';
   } else {
      document.getElementById('upfile').style.display='none';
      document.getElementById('upurl').style.display='block';
      document.getElementById('upform').action='http://imageshack.us/transload.php';
   }
}
function toggleuploadmode2(file) {
   if (file) {
      document.getElementById('upfile').style.display='block';
      document.getElementById('upzip').style.display='none';
      document.getElementById('upform').action='http://imageshack.us/index.php';
   } else {
      document.getElementById('upfile').style.display='none';
      document.getElementById('upzip').style.display='block';
      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';
   }
}

-->
</script>
<p align="center"><p><b>Imageshack Upload !</b></p>
<form method="post" action="http://imageshack.us/" enctype="multipart/form-data" target="_blank" onsubmit="disableme('butan')" id="upform">
<table cellspacing="0" cellpadding="0" border="0"><tr>

<td><p style="font-size: 11px;"><input type="radio" name="uploadtype" onclick="toggleuploadmode(true);" checked>
File&nbsp;&nbsp;<input type="radio" name="uploadtype" onclick="toggleuploadmode(false);"> URL&nbsp;&nbsp;</p></td>

<td width="2">&nbsp;</td>

<td><div id="upfile"><input type="file" name="fileupload" size="30" onchange="showoptions(this)" id="fileupload"></div>
<div id="upurl" style="display: none"><input type="text" id="fileupload" value="Paste image URL here ..." style="color: #888;"
onfocus="focusfield(this)" name="url" size="30"></div></td>

</tr></table>

<input type="hidden" name="MAX_FILE_SIZE" value="3145728">
<input type="hidden" name="aff" value="www.imageshack.us">
<input type="hidden" name="type" value="blank">
<input type="hidden" name="where" value="iframe">

<div id="resizeoptions">
  <input type="checkbox" name="optimage" id="optimage" value="1"  onclick="optsize.disabled=!this.checked"> Resize image ?
  <select name="optsize" id="optsize">
    <option value="100x100" >100x75 (Avatar)</option>
    <option value="150x150" >150x112 (Thumbnail)</option>
    <option value="320x320" selected>320x240 (For Websites & Email)</option>
    <option value="640x640" >640x480 (For Message Boards)</option>
    <option value="800x800" >800x600 (15" Monitor)</option>
    <option value="1024x1024" >1024x768 (17" Monitor)</option>
    <option value="1280x1280" >1280x1024 (19-inch monitor)</option>
    <option value="1600x1600" >1600x1200 (21-inch monitor)</option>
    <option value="resample" >optimize without resizing</option>
  </select>
<br />
<span style="color: #000000"> allowed:<b> jpg jpeg png gif bmp tif tiff swf < 1.53 megabytes.</b></span>
<br /><br />
<input id="butan" style="width:75px" type="submit" value="Host it !">
</div>
</form>
</body>
</html>


imageshack.css

Code: Select all

/* imageshack.css
------------------ */
body, p, td {
    font-family: Verdana, Arial;
    font-size: 11px;
    color: #111111;
}

p,div,img.para,input,form {
    margin: 0 0 6px 0;
}

textarea,input,select {
    font: 1.0em Verdana, Tahoma, Arial, Helvetica, sans-serif;
    background-color: #f9f9f9;
    border: solid 1px;
    border-color: #bbbbbb;
    padding: 0.2em;
    margin-bottom: 0.3em;
}


imageshack.html

Code: Select all

<script type="text/javascript" language="javascript">
function showhide(id){
el=document.getElementById(id).style;
el.display=(el.display == 'block')?'none':'block';
}
</script>

<style type="text/css">
h4 {cursor: pointer; cursor: hand;}
.hidden {display: none}
</style>
<div align="center">
<h4 onclick="showhide('1')">{L_IMAGESHACK_UPLOAD_BAR}</h4>
<div id="1" class="hidden">
<iframe src="./iframe.php?txtcolor=111111&type=blank&size=30" scrolling="no" allowtransparency="true" frameborder="0" width="400" height="160"></iframe>
</div>
</div>


Then it will look like:
[url=http://img54.imageshack.us/my.php?image=fridge0005uc0.jpg][img]http://img54.imageshack.us/img54/2784/fridge0005uc0.th.jpg[/img][/url]
Image
User avatar
Fridge
New member
New member
Posts: 3
Joined: 22 May 2007, 23:19
Real name: Martin
Location: Rotterdam, The Netherlands

Re: Hidden Imageshack uplad bar 1.0.0

Post by Fridge »

Cleaned up the iframe.php a bit so it passes validation at W3C

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ImageShack (TM) - Hosting</title>
<link rel="stylesheet" href="/imageshack.css" type="text/css">
</head>
<body style="background-color:transparent">
<script type="text/javascript">

function toggleuploadmode(file) {
   if (file) {
      document.getElementById('upfile').style.display='block';
      document.getElementById('upurl').style.display='none';
      document.getElementById('upform').action='http://www.imageshack.us/index.php';
   } else {
      document.getElementById('upfile').style.display='none';
      document.getElementById('upurl').style.display='block';
      document.getElementById('upform').action='http://imageshack.us/transload.php';
   }
}
function toggleuploadmode2(file) {
   if (file) {
      document.getElementById('upfile').style.display='block';
      document.getElementById('upzip').style.display='none';
      document.getElementById('upform').action='http://imageshack.us/index.php';
   } else {
      document.getElementById('upfile').style.display='none';
      document.getElementById('upzip').style.display='block';
      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';
   }
}

-->
</script>
<p style="text-align: center;"><p><strong>Imageshack Upload !</strong></p>
<form method="post" action="http://imageshack.us/" enctype="multipart/form-data" target="_blank" onsubmit="disableme('butan')" id="upform">
<table cellspacing="0" cellpadding="0" border="0"><tr>

<td><p style="font-size: 11px;"><input type="radio" name="uploadtype" onclick="toggleuploadmode(true);" checked>
File&nbsp;&nbsp;<input type="radio" name="uploadtype" onclick="toggleuploadmode(false);"> URL&nbsp;&nbsp;&nbsp;</p></td>

<td width="2">&nbsp;</td>

<td><div id="upfile"><input type="file" name="fileupload" size="30" onchange="showoptions(this)" id="fileupload2"></div>
<div id="upurl" style="display: none"><input type="text" id="fileupload" value="Paste image URL here ..." style="color: #888;"
onfocus="focusfield(this)" name="url" size="30"></div></td>

</tr></table>

<input type="hidden" name="MAX_FILE_SIZE" value="3145728">
<input type="hidden" name="aff" value="www.imageshack.us">
<input type="hidden" name="type" value="blank">
<input type="hidden" name="where" value="iframe">

<div id="resizeoptions">
  <input type="checkbox" name="optimage" id="optimage" value="1"  onclick="optsize.disabled=!this.checked"> Resize image ?
  <select name="optsize" id="optsize">
    <option value="100x100" >100x75 (Avatar)</option>
    <option value="150x150" >150x112 (Thumbnail)</option>
    <option value="320x320" selected>320x240 (For Websites & Email)</option>
    <option value="640x640" >640x480 (For Message Boards)</option>
    <option value="800x800" >800x600 (15" Monitor)</option>
    <option value="1024x1024" >1024x768 (17" Monitor)</option>
    <option value="1280x1280" >1280x1024 (19-inch monitor)</option>
    <option value="1600x1600" >1600x1200 (21-inch monitor)</option>
    <option value="resample" >optimize without resizing</option>
  </select>
</div>
<span style="color: #000000;"> Toegestaan:<strong> jpg jpeg png gif bmp tif tiff swf < 1.53 MB.</strong></span>

<div style="padding-top: 5pt;"><input id="butan" style="width:75px" type="submit" value="Host it !"></div>

</form>
</body>
</html>
Image
User avatar
Kamahl
Member
Member
Posts: 135
Joined: 02 Jan 2008, 13:08
Real name: Martin
Location: Slovakia
Contact:

Re: [ABD] Hidden Imageshack uplad bar 1.0.0

Post by Kamahl »

I need to focus on my new MODs, therefor I have abandoned some small not very favourite MODs. This is one of them.

If you are interested in my other project, feel free to visit:
http://www.phpbb.com/community/viewtopi ... &t=2008845
http://www.phpbb.com/community/viewtopi ... &t=2130866
http://www.phpbb.com/community/viewtopi ... &t=2097006
http://www.phpbb.com/community/viewtopi ... &t=1116985 (will be reworked soon)
Locked