News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Imageshack script to upload images directly from post

Started by Camu, November 14, 2009, 04:34:38 AM

Previous topic - Next topic

Camu

SMF 2.0 RC2
I was tweaking a bit the Post.template.php to add the Imageshack's script in the bloc "Additionnal options" (when posting) and I have found where to add it.
Maybe it's not a good thing to add it there ... but it works.

So maybe that could help someone.

It's at line 479 to 486 in Post.template.php for the default theme.
Code (Find) Select
if (!$context['can_post_attachment_unapproved'])
echo '
<span class="alert">', $txt['attachment_requires_approval'], '</span>', '<br />';

echo '
</dd>
</dl>';
}


Just add the Imageshack code after the closing "dd" :
Code (Replace) Select
if (!$context['can_post_attachment_unapproved'])
echo '
<span class="alert">', $txt['attachment_requires_approval'], '</span>', '<br />';

echo '
</dd>
<iframe src="http://imageshack.us/iframe.php?txtcolor=111111&type=blank" scrolling="no" frameborder="0" width="280" height="70"> You must have an iframe-compatable browser to view the ImageShack.us upload form.</iframe>
</dl>';
}


See the screenshot below if you want to see it in action.

Too bad now I have found how to do it ... it's useless for me :'( .

Costa

Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

Rik©

Quote from: Costa on November 30, 2009, 06:52:31 PM
Cool, Thank you.:)

Why not package this?
There's already Simple ImageShack (SMF 1.1.x)
--> http://custom.simplemachines.org/mods/index.php?mod=134

A new version will be launched within days (using the ImageShack API) which will be even better...
After official release i will code a SMF 2 version of the mod-package.

- Rik©

Advertisement: