Advertisement:

Author Topic: nCode Image Resizer  (Read 207945 times)

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,361
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
nCode Image Resizer
« on: May 18, 2008, 01:43:55 PM »
Link to Mod

nCode Image Resizer


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

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:
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
« Last Edit: July 09, 2010, 01:11:28 AM by live627 »
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

Offline TigerTails

  • Newbie
  • *
  • Posts: 6
    • Unseen Britain - Urban Exploration Community
Re: nCode Image Resizer
« Reply #1 on: May 18, 2008, 06:19:35 PM »
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.
« Last Edit: May 18, 2008, 06:25:27 PM by TigerTails »

Offline lonrot

  • Jr. Member
  • **
  • Posts: 334
Re: nCode Image Resizer
« Reply #2 on: May 18, 2008, 08:28:37 PM »
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.
« Last Edit: May 18, 2008, 08:46:01 PM by lonrot »

Offline Joomlamz

  • SMF Hero
  • ******
  • Posts: 2,594
  • Gender: Male
  • Suporte SmfPT
    • apllicmz on Facebook
    • apllicmz on GitHub
    • https://www.linkedin.com/in/aplic on LinkedIn
    • @aplichosting on Twitter
    • Webdesign
Re: nCode Image Resizer
« Reply #3 on: May 18, 2008, 08:43:45 PM »
translate Portuguese and brazilian

thank you

Code: [Select]
<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>



Offline Arveles

  • Full Member
  • ***
  • Posts: 561
  • Gender: Male
Re: nCode Image Resizer
« Reply #4 on: May 18, 2008, 09:10:55 PM »
Translate to Turkish:
Code: [Select]
<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..
« Last Edit: May 19, 2008, 02:48:28 PM by Egitimforumu.Com »
Elveda SMF...
www.eleleyiz.net

Offline Gorgias

  • Jr. Member
  • **
  • Posts: 115
  • de Gilead
    • ForoCompetición.com
Re: nCode Image Resizer
« Reply #5 on: May 19, 2008, 12:22:46 AM »
Great mod!!!

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

Code: [Select]
</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!!!

Offline IsraelSKA

  • Semi-Newbie
  • *
  • Posts: 33
Re: nCode Image Resizer
« Reply #6 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
« Last Edit: May 19, 2008, 03:18:07 AM by IsraelSKA »

Offline 4b11l

  • Jr. Member
  • **
  • Posts: 355
Re: nCode Image Resizer
« Reply #7 on: May 19, 2008, 02:35:33 AM »
Any chance of making this compatible with smf 2.0 beta 3.1?

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,629
  • Gender: Male
    • @mortonssols on Twitter
    • Criminal Solicitors
Re: nCode Image Resizer
« Reply #8 on: May 19, 2008, 10:01:37 AM »
It only works for
Code: [Select]
[img]http://...[/img]but not images that have already been sized by smf.
Code: [Select]
[img width="100" height="100"]http://...[/img]

Offline ruckstande

  • Jr. Member
  • **
  • Posts: 116
  • SMF 1.1.7
    • PestBoxLive
Re: nCode Image Resizer
« Reply #9 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.

Offline TigerTails

  • Newbie
  • *
  • Posts: 6
    • Unseen Britain - Urban Exploration Community
Re: nCode Image Resizer
« Reply #10 on: May 19, 2008, 02:32:39 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.

Offline sorosh1

  • Semi-Newbie
  • *
  • Posts: 76
Re: nCode Image Resizer
« Reply #11 on: May 19, 2008, 02:42:01 PM »
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!

Offline Violat3r

  • Semi-Newbie
  • *
  • Posts: 34
  • Gender: Male
  • Insanity IS Sanity!
    • Shadows Elite Website
Re: nCode Image Resizer
« Reply #12 on: May 19, 2008, 03:03:03 PM »
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.

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.

Offline m3talc0re

  • Full Member
  • ***
  • Posts: 630
  • Gender: Male
  • Life Sux, use hax, lol.
Re: nCode Image Resizer
« Reply #13 on: May 19, 2008, 07:24:59 PM »
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.

Offline TigerTails

  • Newbie
  • *
  • Posts: 6
    • Unseen Britain - Urban Exploration Community
Re: nCode Image Resizer
« Reply #14 on: May 19, 2008, 07:57:32 PM »
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.

Offline Violat3r

  • Semi-Newbie
  • *
  • Posts: 34
  • Gender: Male
  • Insanity IS Sanity!
    • Shadows Elite Website
Re: nCode Image Resizer
« Reply #15 on: May 20, 2008, 02:12:22 AM »
Awesome! This is a great mod and the more it gets working for people the better  :P

Offline edi67

  • SMF Hero
  • ******
  • Posts: 1,532
  • Gender: Male
  • Italian Supporter
    • CrazyZone
Re: nCode Image Resizer
« Reply #16 on: May 20, 2008, 04:41:20 AM »
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

Offline salamoz.com

  • Newbie
  • *
  • Posts: 9
Re: nCode Image Resizer
« Reply #17 on: May 20, 2008, 05:22:08 AM »
 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

Offline IsraelSKA

  • Semi-Newbie
  • *
  • Posts: 33
Re: nCode Image Resizer
« Reply #18 on: May 20, 2008, 11:10:32 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.. :(


Offline kizer

  • Jr. Member
  • **
  • Posts: 383
  • Gender: Male
    • Links4Jeeps.com
Re: nCode Image Resizer
« Reply #19 on: May 20, 2008, 12:59:17 PM »
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