nCode Image Resizer

Started by vbgamer45, May 18, 2008, 01:43:55 PM

Previous topic - Next topic

vbgamer45

Link to Mod

nCode Image Resizer


Original Author: m3talc0re
Previous Authors: Nibigo, live627
SMF Version: 2.0.X


Description:
o nCode Image Resizer for posted images.
o The user can then click on a bar above the image to see the full image in either the same window, a new window or inside the forum itself (the normal "enlarge" method)
o You can set the max width and height.
o Simple edit for custom themes

Thanks to: Original creators of the nCode Image Resizer plugin for vBulletin http://www.ncode.nl/

Changelog:
3.0 Update!
Added support to SMF 2.0.17 thanks to Deaks
Works better on all themes for SMF 2.0.x!

Version 2.0
+Added support for SMF 2.0.14
+Added support for SMF 1.1.x
Taken over by vbgamer45

    Version 1.4
    - Taken over by Runic
    - Updated for 2.0.x
    - Removed Support for 1.1

    Version 1.3.1
    * Updated for SMF 2.0 RC3

    Version 1.3
    - Added Support for SMF 2.0 RC2.
    - Added Support for SMF 1.1.11.
    - Code optimized (Now the css data is added to the /Theme/css/index.css instead of the index.template.php).
    - Changed the format of the mod from .mod to .xml

    Version 1.2
    - Added Support for SMF 2.0 RC1 & 1.1.8
    - Now all the themes load the same .js file
    - NIBOGO take over the nCode Image Resizer Mod

    Version 1.0
    - Modification Release

Why Not Visit:
http://www.smfhacks.com
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

TigerTails

#1
Great stuff, I've been needing something like this for a while.

Unfortunately I use a custom theme, and don't know how to make it work in this one!

Any help appreciated.

lonrot

#2
Okay, it works!

To enable this mod you must do this:

1) At > Features and Options > Basic Features > Leave 0 for Max width and Max height
2) At >" " > Layout and Options> Edit Resize Mode and width and lenght.
For example I placed 615 in the width field only.

The bad thing is that if you used image resize before, all the old posts would be already resized.
This mod only works for new posts.

Apllicmz

translate Portuguese and brazilian

thank you

<edit file>
$languagedir/Modifications.portuguese.php
</edit file>

<search for>
?>
</search for>

<add before>
// --- Begin added code - Advanced Visual Verification ---
$txt['ncode_imageresizer_warning_small'] = 'Clique para ver a barra esta imagem completa.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagem foi redimensionada. Clique para ver a barra esta imagem completa. A imagem original é calibrada% sx% 1 $ 2 $ s% 3 $ e pesa SKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagem foi redimensionada. Clique para ver a barra esta imagem completa. A imagem original é calibrada% sx% 1 $ 2 $ s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Clique para ver a barra esta pequena imagem.';
$txt['ncode_imageresizer_mode'] = 'Modo Reajustar';
$txt['ncode_imageresizer_original'] = 'Manter tamanho original';
$txt['ncode_imageresizer_enlarge_same'] = 'Aumentar no mesmo documento';
$txt['ncode_imageresizer_open_same'] = 'Abrir na mesma janela';
$txt['ncode_imageresizer_open_new'] = 'Abrir em uma nova janela';
$txt['ncode_imageresizer_max_width'] = 'Largura máxima';
$txt['ncode_imageresizer_max_height'] = 'Altura máxima<br /><span class="smalltext">Deixe em branco para não altura max.</span>';
// --- End added code ---

</add before>

<edit file>
$languagedir/Modifications.brazilian.php
</edit file>

<search for>
?>
</search for>

<add before>
// --- Begin added code - Advanced Visual Verification ---
$txt['ncode_imageresizer_warning_small'] = 'Clique para ver a barra esta imagem completa.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagem foi redimensionada. Clique para ver a barra esta imagem completa. A imagem original é calibrada% sx% 1 $ 2 $ s% 3 $ e pesa SKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagem foi redimensionada. Clique para ver a barra esta imagem completa. A imagem original é calibrada% sx% 1 $ 2 $ s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Clique para ver a barra esta pequena imagem.';
$txt['ncode_imageresizer_mode'] = 'Modo Reajustar';
$txt['ncode_imageresizer_original'] = 'Manter tamanho original';
$txt['ncode_imageresizer_enlarge_same'] = 'Aumentar no mesmo documento';
$txt['ncode_imageresizer_open_same'] = 'Abrir na mesma janela';
$txt['ncode_imageresizer_open_new'] = 'Abrir em uma nova janela';
$txt['ncode_imageresizer_max_width'] = 'Largura máxima';
$txt['ncode_imageresizer_max_height'] = 'Altura máxima<br /><span class="smalltext">Deixe em branco para não altura max.</span>';
// --- End added code ---

</add before>



Arveles

#4
Translate to Turkish:
<edit file>
$languagedir/Modifications.turkish.php
</edit file>

<search for>
?>
</search for>

<add before>
// --- Begin added code - Advanced Visual Verification ---
$txt['ncode_imageresizer_warning_small'] = 'Resmin gerçek boyutunu görmek için bu çubuğa tıklayın.';
$txt['ncode_imageresizer_warning_filesize'] = 'Bu resim yeniden boyutlandırıldı. Resmin gerçek boyutunu görmek için bu çubuğa tıklayın. Resimin orjinal ölçüleri %1$sx%2$s ve boyutu %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Bu resim yeniden boyutlandırıldı. Resmin gerçek boyutunu görmek için bu çubuğa tıklayın. Resimin orjinal ölçüleri %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Resmin küçük boyutunu görmek için bu çubuğa tıklayın.';
$txt['ncode_imageresizer_mode'] = 'Yeniden Boyutlandırma Modu';
$txt['ncode_imageresizer_original'] = 'Orjinal ölçüleri koru';
$txt['ncode_imageresizer_enlarge_same'] = 'Aynı sayfada genişlet';
$txt['ncode_imageresizer_open_same'] = 'Aynı pencerede aç';
$txt['ncode_imageresizer_open_new'] = 'Yeni pencerede aç';
$txt['ncode_imageresizer_max_width'] = 'Maksimum genişlik';
$txt['ncode_imageresizer_max_height'] = 'Maksimum yükseklik<br /><span class="smalltext">Yüksekliğe sınır koymamak için boş bırakın.</span>';
// --- End added code ---

</add before>


thanks..
Elveda SMF...

Gorgias

Great mod!!!

Translate to Spanish (the file is Modifications.spanish_es.php for Spain or Modifications.spanish.php for South America).


</add before>
<edit file>
$languagedir/Modifications.spanish_es.php
</edit file>

<search for>
?>
</search for>

<add before>
// --- Begin added code - Advanced Visual Verification ---
$txt['ncode_imageresizer_warning_small'] = 'Pincha en esta barra para ver la imagen en su tama&ntilde;o original.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagen ha sido redimensionada. Pincha en la barra para verla en su tama&ntilde;o original (%1$sx%2$s px y pesa %3$sKB).';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagen ha sido redimensionada. Pincha en la barra para verla en su tama&ntilde;o original (%1$sx%2$s px).';
$txt['ncode_imageresizer_warning_fullsize'] = 'Pincha en la barra para ver la imagen en peque&ntilde;o.';
$txt['ncode_imageresizer_mode'] = 'Mod redimensionador';
$txt['ncode_imageresizer_original'] = 'Mantener el tama&ntilde;o original';
$txt['ncode_imageresizer_enlarge_same'] = 'Aumentar sobre la misma ventana';
$txt['ncode_imageresizer_open_same'] = 'Abrir en la misma ventana';
$txt['ncode_imageresizer_open_new'] = 'Abrir en una nueva ventana';
$txt['ncode_imageresizer_max_width'] = 'Anchura m&aacute;xima';
$txt['ncode_imageresizer_max_height'] = 'Peso m&aacute;ximo<br /><span class="smalltext">Dejar en blanco para que no haya peso m&aacute;ximo.</span>';
// --- End added code ---

</add before>


Thanks for the mod  ;D

Regards!
Pallida Mors aequo pulsat pede pauperum tabernas regumque turres.
Vitae summa brevis spem nos vetat inchoare longam.


ForoCompeticion.com, el foro de automovilismo deportivo creado por y para aficionados: F1, GP2, Rallyes (WRC y nacionales), WTCC, DTM, etc. Biografías, historia, fotos y vídeos, seguimiento de pruebas, simuladores, organización de viajes y mucho más!!!

IsraelSKA

#6
I installed this nCode, but dont work..
i have this image in my forum, but dont show bar above the image and no resize... :(



im using smf 1.1.5

4b11l

Any chance of making this compatible with smf 2.0 beta 3.1?

karlbenson

It only works for
[img]http://...[/img]
but not images that have already been sized by smf.
[img width="100" height="100"]http://...[/img]

ruckstande

Yes I am using 1.1.15 also and this isn't working for me either. I am using the Alienation theme and when I add the line to the index template.php file I get a syntax error.

TigerTails

Quote from: ruckstande on May 19, 2008, 01:39:44 PM
Yes I am using 1.1.15 also and this isn't working for me either. I am using the Alienation theme and when I add the line to the index template.php file I get a syntax error.
Although I still havn't got it to work for my forum, make sure you copy the .js file over to your themes directory too, as that could cause an error I imagine.

sorosh1

Thanks, it works perfectly! You just have to edit index.template and i copyd the .js file also to the theme i use now. But thanks for this great mod! Really needed it!

Violat3r

Quote from: IsraelSKA on May 19, 2008, 01:02:33 AM
I installed this nCode, but dont work..
i have this image in my forum, but dont show bar above the image and no resize... :(



im using smf 1.1.5

Well im using 1.1.5 to and it seems to work ok for me, you must make sure that for all custom templates that you extract the "ncode_imageresizer.js" file from the mod zip and place it inside your custom themes directory (i.e. where all your themes template files are such as index.template.php and the others). I tested it without having the .js file in the directory and no error occurred for me, its just that the resize never happened and the bar never appeared.

Quote from: ruckstande on May 19, 2008, 01:39:44 PM
Yes I am using 1.1.15 also and this isn't working for me either. I am using the Alienation theme and when I add the line to the index template.php file I get a syntax error.

The syntax error sounds to me like maybe either something in the code didnt get copied or something else like that. Make sure that you place the code JUST BEFORE the closing </head> tag in your index.template.php and that its not maybe inside another code, which i have done sometimes on accident. Also, if you just copy/pasted the code from SMF's manual install instructions....dont. Its a nice tool to have but at least for ME when i paste it all the code is mashed together. So if thats the case for you then just go into the mod zip and open the "install.mod" and copy/paste the index.template.php code from there.

m3talc0re

You may also need to echo the added code on it's own. The code on its own searches for </head> and that's it. If you have something like echo ' </head>'; then you will need to either put the code like this: echo ' *code here* </head>'; or just echo ' *the code for the mod* '; Either way should work.
The real hell is your life gone wrong.

TigerTails

Ahah! I've got it working on my forum now.
It turns out I had double </head>s.

I had included the </head> from the default code, but didn't notice the original </head> was still there.

Violat3r

Awesome! This is a great mod and the more it gets working for people the better  :P

edi67

im not able to make it work in default theme some solution ?
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

salamoz.com

 this is  what iam looking for  man u solved my problem this  mod  resizes the images even that images  brought to the TP frontpage
guess what  it works with rt to left  forum
thanx bro i will put the arabic Translation soon

IsraelSKA

Quote from: Violat3r on May 19, 2008, 03:03:03 PM
Quote from: IsraelSKA on May 19, 2008, 01:02:33 AM
I installed this nCode, but dont work..
i have this image in my forum, but dont show bar above the image and no resize... :(



im using smf 1.1.5

Well im using 1.1.5 to and it seems to work ok for me, you must make sure that for all custom templates that you extract the "ncode_imageresizer.js" file from the mod zip and place it inside your custom themes directory (i.e. where all your themes template files are such as index.template.php and the others). I tested it without having the .js file in the directory and no error occurred for me, its just that the resize never happened and the bar never appeared.



Im using default theme..
Im checked the code but don't work ncode.. :(


kizer

Works great. I wanted something like this months ago and I'm glad I just happen to check the mod section today.

Im using 1.1.5
Default template
Own a Jeep? Links4Jeeps.com

Advertisement: