TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 19, 2024, 03:48:35 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 119
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 126
  • Total: 126

Imageshack.us Upload Block

Started by alan s, September 10, 2006, 05:41:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alan s

Place code in a

1. Javascript/html block if using tp_v0.86

2. Scriptbox if using tp_v0.95


<form action="http://www.imageshack.us/" method="post" enctype="multipart/form-data" target="_blank">
<img width="50" height="50" src="http://imageshack.us/img/imageshack.png"><b>Image Upload</b>!
<br />
<input type="hidden" name="MAX_FILE_SIZE" value="1048576">
<input type="hidden" name="aff" value="">

<input type="hidden" name="type" value="blank">
<input type="hidden" name="where" value="iframe">
<input type="file" class="textfield" name="fileupload" size="15"><br />
<input type="submit" value="host it!">
</form>


Demo : http://theteenzone.net/smf1.1rc3/


Enjoy!

jacortina

Well, I think this (in an html block) is pretty easy:

<iframe src="http://imageshack.us/iframe.php?txtcolor=111111&type=forum&size=15" scrolling="no" allowtransparency="true" frameborder="0" width="180" height="100"> You must have an iframe-compatable browser to view the ImageShack.us upload form.</iframe

But I just put it out (centered) under post forms (Post.template.php) and under the off-site avatar specification in the profile.

manji

Quote from: J.A.Cortina on September 10, 2006, 09:50:58 PM
Well, I think this (in an html block) is pretty easy:

<iframe src="http://imageshack.us/iframe.php?txtcolor=111111&type=forum&size=15" scrolling="no" allowtransparency="true" frameborder="0" width="180" height="100"> You must have an iframe-compatable browser to view the ImageShack.us upload form.</iframe

But I just put it out (centered) under post forms (Post.template.php) and under the off-site avatar specification in the profile.

Where exactly did you put it? It's in the /public_html/Themes/default/post.template.php?

I'm using the TP-Dilber theme.

Thanks!

jacortina

If the theme doesn't come with its own Post.template.php, then it should go in the default/Post.template.php.

No matter which, find the end of the post form which should be followed by the javascript to collapse the additional options:
</form>';

// Now some javascript to hide the additional options on load...
if (!empty($settings['additional_options_collapsable']) && !$context['show_additional_options'])
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
swapOptions();
// ]]></script>';


All you should have to do is add this just after:
echo '<center>
<iframe src="http://imageshack.us/iframe.php?txtcolor=111111&type=forum&size=40" scrolling="no" allowtransparency="true" frameborder="0" width="300" height="70"> You must have an iframe-compatable browser to view the ImageShack.us upload form.</iframe>
</center>';


There are some settings in there that you can tweak about the input box size, etc.

manji


vdubbia

is there anything like this available for Photobucket?

jacortina

The ImageShack upload form in the iframe is supplied by ImageShack (http://imageshack.us/iframe.php is a script they wrote and it runs on their server).

If Photobucket has that capability, then it can be utilized. But you have to find out if they do it.

G6Cad

I wonder what im doing wrong.
I have added the code, it doesent generate errors what so ever, it looks great in the post screen but the images does not show up on imageshack when I try and test it.
Any ideas on what it might be ?

jacortina

After pressing the 'Host It' button, your browser should open another tab (or window). Does this happen (do you have any options set to PREVENT a sript opening a new window)?

G6Cad

Yes it open up a page with image shacks homepage and the code generates for the image, but the image doesent show up there, nor in the forum when i use the code generated.
I have no scriptblock for imageshack, but i will test again and see if firefox are the reason.