Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: vbgamer45 on May 18, 2008, 01:43:55 PM

Title: nCode Image Resizer
Post by: vbgamer45 on May 18, 2008, 01:43:55 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=1197)

nCode Image Resizer


Original Author: m3talc0re
Previous Authors: Nibigo, live627 (http://www.simplemachines.org/community/index.php?action=profile;u=154736)
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/ (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 (http://www.smfhacks.com)
Title: Re: nCode Image Resizer
Post by: TigerTails 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.
Title: Re: nCode Image Resizer
Post by: lonrot 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.
Title: Re: nCode Image Resizer
Post by: Apllicmz on May 18, 2008, 08:43:45 PM
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>
Title: Re: nCode Image Resizer
Post by: Arveles on May 18, 2008, 09:10:55 PM
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..
Title: Re: nCode Image Resizer
Post by: Gorgias 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).


</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!
Title: Re: nCode Image Resizer
Post by: IsraelSKA on May 19, 2008, 01:02:33 AM
I installed this nCode, but dont work..
i have this image  (http://www.wallpaper.cz/primo/old_ir/warcraft3nightelfs2--c1600xc1200.jpg) in my forum, but dont show bar above the image and no resize... :(



im using smf 1.1.5
Title: Re: nCode Image Resizer
Post by: 4b11l on May 19, 2008, 02:35:33 AM
Any chance of making this compatible with smf 2.0 beta 3.1?
Title: Re: nCode Image Resizer
Post by: karlbenson on May 19, 2008, 10:01:37 AM
It only works for
[img]http://...[/img]
but not images that have already been sized by smf.
[img width="100" height="100"]http://...[/img]
Title: Re: nCode Image Resizer
Post by: 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.
Title: Re: nCode Image Resizer
Post by: TigerTails on May 19, 2008, 02:32:39 PM
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.
Title: Re: nCode Image Resizer
Post by: sorosh1 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!
Title: Re: nCode Image Resizer
Post by: 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  (http://www.wallpaper.cz/primo/old_ir/warcraft3nightelfs2--c1600xc1200.jpg) 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.
Title: Re: nCode Image Resizer
Post by: m3talc0re 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.
Title: Re: nCode Image Resizer
Post by: TigerTails 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.
Title: Re: nCode Image Resizer
Post by: Violat3r 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
Title: Re: nCode Image Resizer
Post by: edi67 on May 20, 2008, 04:41:20 AM
im not able to make it work in default theme some solution ?
Title: Re: nCode Image Resizer
Post by: salamoz.com 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
Title: Re: nCode Image Resizer
Post by: IsraelSKA on May 20, 2008, 11:10:32 AM
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  (http://www.wallpaper.cz/primo/old_ir/warcraft3nightelfs2--c1600xc1200.jpg) 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.. :(

Title: Re: nCode Image Resizer
Post by: kizer 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
Title: Re: nCode Image Resizer
Post by: Violat3r on May 20, 2008, 03:03:16 PM
Quote from: IsraelSKA on May 20, 2008, 11:10:32 AM
Im using default theme..
Im checked the code but don't work ncode.. :(

Just to clarify, have you made sure that you set image max size parameters in: "Features and Options > Layout and Options"? Its at the bottom and the first option is a drop-box asking what resize mode you want, then the 2nd option asks for the maximum size before it starts to resize the image. Its default is nothing, so you MUST first enter a max size before it will work.
Title: Re: nCode Image Resizer
Post by: ruckstande on May 20, 2008, 03:12:39 PM
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  (http://www.wallpaper.cz/primo/old_ir/warcraft3nightelfs2--c1600xc1200.jpg) 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.
Thanks, I'll try that because that is exactly what I did. I'll give it another shot
Title: Re: nCode Image Resizer
Post by: IsraelSKA on May 20, 2008, 04:35:45 PM
Quote from: Violat3r on May 20, 2008, 03:03:16 PM
Quote from: IsraelSKA on May 20, 2008, 11:10:32 AM
Im using default theme..
Im checked the code but don't work ncode.. :(

Just to clarify, have you made sure that you set image max size parameters in: "Features and Options > Layout and Options"? Its at the bottom and the first option is a drop-box asking what resize mode you want, then the 2nd option asks for the maximum size before it starts to resize the image. Its default is nothing, so you MUST first enter a max size before it will work.


I did...
Title: Re: nCode Image Resizer
Post by: IsraelSKA on May 20, 2008, 05:45:55 PM
Quote from: Violat3r on May 19, 2008, 03:03:03 PM

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.



Yes!
nCode work in my forum...


Thanks ;)
Title: Re: nCode Image Resizer
Post by: Violat3r on May 20, 2008, 06:07:09 PM
lol awesome and no problem!
Title: Re: nCode Image Resizer
Post by: edi67 on May 21, 2008, 04:39:14 AM
hi m3talc0re if you want i made some change and your version work for smf 2 beta 3.1 too ;)

http://rapidshare.com/files/116468172/ncode_imageresizer_smf_231.zip.html
Title: Re: nCode Image Resizer
Post by: ruckstande on May 21, 2008, 12:51:06 PM
Quote from: m3talc0re 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.
I soooo don't understand. I tried copying and pasting from the .mod file and it didn't work and I had to restore the index file from a template.
Title: Re: nCode Image Resizer
Post by: Succubus Evaligan on May 21, 2008, 03:41:59 PM
works great, thanks
Title: Re: nCode Image Resizer
Post by: Violat3r on May 21, 2008, 08:01:22 PM
Quote from: ruckstande on May 21, 2008, 12:51:06 PM
Quote from: m3talc0re 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.
I soooo don't understand. I tried copying and pasting from the .mod file and it didn't work and I had to restore the index file from a template.

Would you mind posting your current index.template.php (the one with the added code for this mod) so maybe we can see visually what may be wrong.
Title: Re: nCode Image Resizer
Post by: neotan on May 24, 2008, 11:27:22 AM
Quote from: ruckstande on May 21, 2008, 12:51:06 PM
Quote from: m3talc0re 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.
I soooo don't understand. I tried copying and pasting from the .mod file and it didn't work and I had to restore the index file from a template.


I copied the replacement code from install.mod instead and it worked well
Title: Re: nCode Image Resizer
Post by: trenchteam on May 29, 2008, 06:11:26 AM
Great Mod Core! ;D
Title: Re: nCode Image Resizer
Post by: mycorollas on May 29, 2008, 09:27:02 PM
for any of you that have the Resample Big Attached Images Mod also

the Resample Big Attached Images Mod relies on the input in the max height and width of posts setting
since you have to set the settings to 0 for this mod to work, they obviously can't work together

sooooo

what I did was change the Post.php file in sources (the file Resample Big Attached Images Mod adds its code to)
and find the line that Resample Big Attached Images Mod added


$maxWidth = $modSettings['max_image_width'];
$maxHeight = $modSettings['max_image_height'];


and replace it with


$maxWidth = $modSettings['ncode_imageresizer_max_width'];
$maxHeight = $modSettings['ncode_imageresizer_max_height'];


which will then also (pertinently) resize attachments as well as images in the post to what ever you chose in the admin setting for this mod

worked great for me in 1.1.5 :D
Title: Re: nCode Image Resizer
Post by: DistantJ on June 07, 2008, 04:59:42 PM
I liked this, but I'd like to be able to change the border colour to black. Since the text colour of my forum is white, it's unreadable on the border!
Title: Re: nCode Image Resizer
Post by: Violat3r on June 18, 2008, 02:18:54 AM
Are you talking about that bar at the top where it displays the text? You want that box to be black? If so, find this line in your index.template.php:
table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
{
background-color: #fefee1; /* the bgcolor behind the text and image */


Now change the hex code that is #fefee1 to #000000 if you want completely black or any other darker shade or w/e color you want, but it must be a hex color code. Although if your interested, i made my own modification for my forum and your welcome to try it out; find that same line and change the part to:

background-image:url(', $settings['images_url'], '/imageresizeback.gif); background-repeat:repeat-x; /* the bgcolor behind the text and image */

Then place the attached image in your themes image folder. The other attached image is an example of what mine looks like:
Title: Re: nCode Image Resizer
Post by: DistantJ on June 18, 2008, 12:32:17 PM
Aha, it's CSS. Brilliant, thank you for your instructions and supplying me with the image :) really good of you to go out of your way to do that! :)
Title: Re: nCode Image Resizer
Post by: Violat3r on June 18, 2008, 08:37:05 PM
meh, it was a simple copy/paste of my already existing code lol. Not really much work involved, but thank you anyway! =D
Title: Re: nCode Image Resizer
Post by: Afro on June 20, 2008, 01:22:38 PM
Hello,
I initially installed ncode_image resizer mod.
Then i decided to uninstall it .
After editing the files, these errors started appearing on my forum error log from all angles..

8: Undefined index: ncode_imageresizer_warning_filesize
File: /home/afrowall/public_html/Themes/default/languages/ModSettings.english-utf8.php (main_above sub template - eval?)
Line: 320
==
8: Undefined index: ncode_imageresizer_warning_fullsize
File: /home/afrowall/public_html/Themes/default/Admin.template.php (main_above sub template - eval?)
Line: 322
==

8: Undefined index: ncode_imageresizer_warning_no_filesize
File: /home/afrowall/public_html/Themes/dilbermc/BoardIndex.template.php (main_above sub template - eval?)
Line: 321

.There are more but all of them seems to be connected to

8: Undefined index: ncode_imageresizer_warning_no_filesize.
and ((main_above sub template - eval?))

please what am i supposed to do about that?
Title: Re: nCode Image Resizer
Post by: Violat3r on June 20, 2008, 06:16:12 PM
Did you get any errors at all when you clicked the uninstall button? Or did it just say "Test Successful" for all of them?
Title: Re: nCode Image Resizer
Post by: Afro on June 21, 2008, 06:29:37 AM
I did not install this mod properly in the first place.
that was why i decided to remove it.
I was very inexperienced when i installed it but i know better now.
I dont use the default theme, so i always have to modify some more files with each mod i install.
I will have to go to the mod again and see the files it execute.the try to work on them and see what happens. i will be back with my results.
Title: Re: nCode Image Resizer
Post by: Afro on June 21, 2008, 03:10:51 PM
ok, i have fixed it now,..thanks to ye all.
Title: Re: nCode Image Resizer
Post by: b33z on June 26, 2008, 07:17:46 AM

index.template.php:

Code (find) Select
background-color: #fefee1; /* the bgcolor behind the text and image */


Code (replace with) Select
background-image:url(', $settings['images_url'], '/imageresizeback.gif); background-repeat:repeat-x; /* the bgcolor behind the text and image */


thanks for this! perfect!
Title: Re: nCode Image Resizer
Post by: Dante_Arg on June 29, 2008, 09:17:44 PM
Hi, i ve one problem with this mod:

I already install the mod manually but i cant see the text over the pop-up window.... im using Black_red theme. When iam using default theme the text is ok but when i m using my theme it disappears.

Also i modified index.template.php from my folder theme and default too.

What can be happening?





hahaah i am n00b, nevermind, the colour of font and background is the same XD
Title: Re: nCode Image Resizer
Post by: b33z on July 11, 2008, 03:38:23 AM
Quote from: Dante_Arg on June 29, 2008, 09:17:44 PM
Hi, i ve one problem with this mod:

I already install the mod manually but i cant see the text over the pop-up window.... im using Black_red theme. When iam using default theme the text is ok but when i m using my theme it disappears.

Also i modified index.template.php from my folder theme and default too.

What can be happening?





hahaah i am n00b, nevermind, the colour of font and background is the same XD

dont feel bad.. i did that same thing with a different mod, took me like two days to figure it out! but we just keep on learnin! hehe..
Title: Re: nCode Image Resizer
Post by: Dr. Beast on July 18, 2008, 05:53:21 AM
I installed this mod but don't have any new options under Layout and Options?  ::)
Title: Re: nCode Image Resizer
Post by: mymktp1 on July 24, 2008, 12:23:05 PM
Hi... I'm having the same problem everyone else had... except I couldn't solve it... I can't get the tab that opens orignal size to appear can some please take a look at my index.template.php and see what the problem might be thank you :P oh... bye the way I am also using the orange template
Title: Re: nCode Image Resizer
Post by: hhy89 on July 31, 2008, 01:27:51 PM
for manuel setup
phpmyadmin; setup table code 's   :-\
Title: Re: nCode Image Resizer
Post by: MoreBloodWine on August 05, 2008, 06:49:41 PM
Does anyone have a site with this mod installed that I can look at ?
Title: Re: nCode Image Resizer
Post by: locau on August 12, 2008, 10:11:27 AM
Is there any chance of getting a new option to show the image ? I'm looking for Lightbox !

Anyone able to do this ?
Title: Re: nCode Image Resizer
Post by: MissyNL on August 13, 2008, 02:08:54 PM
Quote from: locau on August 12, 2008, 10:11:27 AM
Is there any chance of getting a new option to show the image ? I'm looking for Lightbox !

Anyone able to do this ?

Hi.. this should be a good mod for you.. however.. know that once you have installed the lightbox.. when you click on that image.. it is going to open in de mode of this mod and it's opening in the lightbox...

So.. my question is... can the link to open it in it's original size be disabled in this mod, so that it only can open in the lightbox??
Title: Re: nCode Image Resizer
Post by: kizer on August 13, 2008, 03:06:45 PM
Quote from: MoreBloodWine on August 05, 2008, 06:49:41 PM
Does anyone have a site with this mod installed that I can look at ?

Heres the script in action.
http://www.links4jeeps.com/forum/index.php?topic=8371.msg62440#msg62440
Title: Re: nCode Image Resizer
Post by: knaphih on August 15, 2008, 09:40:35 AM
wow...it sure works on the link u gave kizer...... im using the theme Classic-FS which i downloaded from the SMF theme site..... It doesnt have the language folder..im not able to see the image wen i installed it.....sure i did the theme index modification alright....any ideas?
Title: Re: nCode Image Resizer
Post by: Axodious on August 15, 2008, 06:36:08 PM
I'm using the DarkWoW theme on SMF 1.1.5, the mod installed fine. However when I go to the Layout and Options at the bottom it shows a drop box and 2 edit boxes that are both blank with no text beside them. Also the mod doesn't work at all no changes to any images, for editting the index.template.php are you suppose to just copy the ncode part from the default index.template.php ? That is what I did and it still didnt work.

Attatched is a screenshot of the layout and options page.
Title: Re: nCode Image Resizer
Post by: knaphih on August 15, 2008, 11:05:53 PM
nevermind..ive got it working on my forum now...superb mod btw
Title: Re: nCode Image Resizer
Post by: Axodious on August 24, 2008, 01:47:03 AM
Quote from: axodious on August 15, 2008, 06:36:08 PM
I'm using the DarkWoW theme on SMF 1.1.5, the mod installed fine. However when I go to the Layout and Options at the bottom it shows a drop box and 2 edit boxes that are both blank with no text beside them. Also the mod doesn't work at all no changes to any images, for editting the index.template.php are you suppose to just copy the ncode part from the default index.template.php ? That is what I did and it still didnt work.

Attatched is a screenshot of the layout and options page.

Anyone got a fix for this issue yet?
Title: Re: nCode Image Resizer
Post by: triantis7 on August 24, 2008, 07:00:09 AM
Hello i tried to translate to Greek, but my site doesnt recognise the language..
my site is in Greek, i have installed the greek package!
I open with dreamweaver the install.mod and change in greek,but as you see at the photo my site doesnt recognise Greek!
Do you know why?
Title: Re: nCode Image Resizer
Post by: n00dle on August 25, 2008, 07:03:44 PM
I got this to work but I cant see any text in the bar above the image.. it just has the little icon and the tan bar without any words...
(http://imageshack.us)
(http://g.imageshack.us/g.php?h=528&i=blahblahxu6.png)
Title: Re: nCode Image Resizer
Post by: linette97 on August 26, 2008, 10:11:20 PM
Thanks for this Mod! it's great! I modified it in my custom theme index.template.php.

1st I had problems because I was copying & pasting from SMF Manual install instructions & a error would occur. So I read this topic and found out that sometimes copying from SMF would mess up the code.. So I did what was said, take the code from install.mod file. My issue was that file was a AVI file!!! so when I tried to open it, it would open in windows media player (nothing played of course).. So I decided to Open With notepad and the codes were hard to read!!! They didn't look like the normal codes... SOOOO after maybe an hour of trying to figure it out! I said let me try and copy & paste it to MS Word and don't you know the code came out clear as day and after pasting into index.template, IT FINALLY WORKED!! phew!! this manual install is a killer! But I'm loving my theme so I gotta do it!
Just letting you guys know in case someone has the same issues as I did!!

Thanks again for this great mod!
Title: Re: nCode Image Resizer
Post by: gaodogo on September 01, 2008, 01:09:19 AM
This is a great mod. Thank you for sharing this with us.

I have translated this mode into to Simple Chinese.

Find Edit (if you are using a custom theme, you should change :Modifications.chinese-simplified-utf8.php" in the  "languages" folder of that theme.)
./$languagesdir/Modifications.chinese-simplified-utf8.php


Find
?>

Add Before:

<add before>
// --- Begin added code - Advanced Visual Verification ---
$txt['ncode_imageresizer_warning_small'] = '点击这里看原图';
$txt['ncode_imageresizer_warning_filesize'] = '此图片大小已经自动更改,点击这里看原图. 图片原始大小为 %1$sx%2$s x %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = '此图片大小已经自动更改,点击这里看原图. 图片原始大小为%1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = '点击这里看小图';
$txt['ncode_imageresizer_mode'] = '图片大小自动更改模式';
$txt['ncode_imageresizer_original'] = '保持原本大小';
$txt['ncode_imageresizer_enlarge_same'] = '在同一文件中变大';
$txt['ncode_imageresizer_open_same'] = '用同一窗口显示';
$txt['ncode_imageresizer_open_new'] = '用新窗口显示';
$txt['ncode_imageresizer_max_width'] = '最大宽度';
$txt['ncode_imageresizer_max_height'] = '最大高度<br />
<span class="smalltext">不填入数字则不会设定最大高度</span>';
// --- End added code ---
</add before>
Title: Re: nCode Image Resizer
Post by: Nibogo on September 11, 2008, 08:08:11 PM
Any update for SMF 2.0??

Thanks
Title: Re: nCode Image Resizer
Post by: Sabre™ on September 20, 2008, 05:17:30 PM
Everyone having issues with not seeing the writing on the bar, and or Admin panel for this mod, go to your       Themes/default/languages/Modifications.english.php  template, and make sure this code is installed

// --- Begin added code - Advanced Visual Verification ---
$txt['ncode_imageresizer_warning_small'] = 'Click this bar to view the full image.';
$txt['ncode_imageresizer_warning_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s and weighs %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Click this bar to view the small image.';
$txt['ncode_imageresizer_mode'] = 'Resize Mode'; $txt['ncode_imageresizer_original'] = 'Keep original size';
$txt['ncode_imageresizer_enlarge_same'] = 'Enlarge in same document';
$txt['ncode_imageresizer_open_same'] = 'Open in same window';
$txt['ncode_imageresizer_open_new'] = 'Open in new window';
$txt['ncode_imageresizer_max_width'] = 'Maximum width';
$txt['ncode_imageresizer_max_height'] = 'Maximum height<br /><span class="smalltext">Leave blank for no max height.</span>';
// --- End added code ---



If youre using UTF8, then you will have to do the manual installation to that language file.
Title: Re: nCode Image Resizer
Post by: export! on September 27, 2008, 01:49:48 PM
Not working for me yet.   I have not touched my Themes from the default install.  I installed the mod and set it up as follows;

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.

I have confirmed that the javascript is in my theme folder
Title: Re: nCode Image Resizer
Post by: W. Riker on September 30, 2008, 04:21:16 AM
There are no more exceedingly large images for me!

Great job you done!
Title: Re: nCode Image Resizer
Post by: Assimo on October 06, 2008, 04:52:49 AM
Quote from: export! on September 27, 2008, 01:49:48 PM
Not working for me yet.   I have not touched my Themes from the default install.  I installed the mod and set it up as follows;

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.

I have confirmed that the javascript is in my theme folder

Also for me, this mod don't work correctly...
Title: Re: nCode Image Resizer
Post by: export! on October 06, 2008, 08:29:15 AM
Mine appeared to install properly without any complaints but it has no effect on large image attachments.  I'm still seeing huge attachments with postings.
Title: Re: nCode Image Resizer
Post by: MothMan on October 08, 2008, 11:31:40 PM
Wondering if there's a way to tweak this mod so that the 'header bar' above the images does not appear, and instead the thumbnailed image itself becomes the link to the full-size image.

Would like everything else to operate as it does now... just 'move' the link from the header bar to the image itself, and then get rid of the header bar.
Title: Re: nCode Image Resizer
Post by: aED on October 12, 2008, 11:44:55 PM
Works fine but the header that says it has been resized is not aligned with the image any workaround to this...

Title: Re: nCode Image Resizer
Post by: Hoochie Coochie Man on October 14, 2008, 06:31:57 AM
How can we solve this xhtml error?

there is no attribute "onload"

Any help would be great.
Thanks..
Title: Re: nCode Image Resizer
Post by: albpower on October 14, 2008, 11:23:36 AM
I uploaded the package and installed succsesfully but images are still large I'm using smf 1.1.6 help me please
Title: Re: nCode Image Resizer
Post by: aED on October 16, 2008, 01:06:31 AM
Quote from: albpower on October 14, 2008, 11:23:36 AM
I uploaded the package and installed succsesfully but images are still large I'm using smf 1.1.6 help me please

you should change the settings in the admin panel
Title: Re: nCode Image Resizer
Post by: MothMan on November 07, 2008, 06:35:13 PM
Quote from: MothMan on October 08, 2008, 11:31:40 PM
Wondering if there's a way to tweak this mod so that the 'header bar' above the images does not appear, and instead the thumbnailed image itself becomes the link to the full-size image.

Would like everything else to operate as it does now... just 'move' the link from the header bar to the image itself, and then get rid of the header bar.

Bump?
Title: Re: nCode Image Resizer
Post by: Tibian on November 08, 2008, 11:43:39 PM
I am using a custom theme, but

> Enlarge in same document - Enlarges the image inside of the forum.
> Enlarge in same window - will take the user to the full sized image in the same window.
> Enlarge in new window - will show the full sized image in a new window.

Don't show up in my options... the size does however.

I also moved and followed the correct edits to the files but no luck S:

help would be greatly appreciated.
Title: Re: nCode Image Resizer
Post by: Sabre™ on November 09, 2008, 01:18:20 AM
Make sure the language strings were inserted into your  modifications.english.php in your default theme, and your custom theme if it has its own language folder/dir with that template

If you are using UTF8, then you will need to add that code to your modifications-UTF8.english.php    <~~it will be something like that with UTF8 in it



add this to either template
// --- Begin added code - Advanced Visual Verification ---
$txt['ncode_imageresizer_warning_small'] = 'Click this bar to view the full image.';
$txt['ncode_imageresizer_warning_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s and weighs %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Click this bar to view the small image.';
$txt['ncode_imageresizer_mode'] = 'Resize Mode';
$txt['ncode_imageresizer_original'] = 'Keep original size';
$txt['ncode_imageresizer_enlarge_same'] = 'Enlarge in same document';
$txt['ncode_imageresizer_open_same'] = 'Open in same window';
$txt['ncode_imageresizer_open_new'] = 'Open in new window';
$txt['ncode_imageresizer_max_width'] = 'Maximum width';
$txt['ncode_imageresizer_max_height'] = 'Maximum height<br /><span class="smalltext">Leave blank for no max height.</span>';
// --- End added code ---
Title: Re: nCode Image Resizer
Post by: Tibian on November 09, 2008, 01:39:59 AM
Quote from: Sabre™ on November 09, 2008, 01:18:20 AM
Make sure the language strings were inserted into your  modifications.english.php in your default theme, and your custom theme if it has its own language folder/dir with that template

If you are using UTF8, then you will need to add that code to your modifications-UTF8.english.php    <~~it will be something like that with UTF8 in it



add this to either template
// --- Begin added code - Advanced Visual Verification ---
$txt['ncode_imageresizer_warning_small'] = 'Click this bar to view the full image.';
$txt['ncode_imageresizer_warning_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s and weighs %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Click this bar to view the small image.';
$txt['ncode_imageresizer_mode'] = 'Resize Mode';
$txt['ncode_imageresizer_original'] = 'Keep original size';
$txt['ncode_imageresizer_enlarge_same'] = 'Enlarge in same document';
$txt['ncode_imageresizer_open_same'] = 'Open in same window';
$txt['ncode_imageresizer_open_new'] = 'Open in new window';
$txt['ncode_imageresizer_max_width'] = 'Maximum width';
$txt['ncode_imageresizer_max_height'] = 'Maximum height<br /><span class="smalltext">Leave blank for no max height.</span>';
// --- End added code ---


At the time of your reply, it was already included. So that can't be the source :S however my custom theme does not have any language folder. Also using Tinyportal modification if that makes any difference.
Title: Re: nCode Image Resizer
Post by: Sabre™ on November 09, 2008, 02:02:02 AM
No, if your custom theme has no lang folder, then it will grab the file from the default theme.
And you are not using UTF8 lang files?

Can you post a link to your site?
Title: Re: nCode Image Resizer
Post by: Tibian on November 09, 2008, 02:21:41 AM
www.thekots.com

I am not 100% sure that they aren't UTF8 files and I haven't seen any UTF8 named files... but I did have the modifications.english.php file so... I would assume not.
Title: Re: nCode Image Resizer
Post by: Sabre™ on November 09, 2008, 04:39:22 AM
When you ask for assistance, you need to provide as much info as you can buddy. :)
Your board is not even SMF, and since I am learning as I walk, I dont have the knowledge to assist you.

I dont see why your lang strings aren't showing, but then again I have no experience whatsoever with phpBB and its layout/structure.
If you see no UTF8 named files, then your board wont be using them.

Someone with more knowledge maybe better suited to your question.
Sorry I couldnt be of assistance, and good luck :)

EDIT
hmmm whats up with that site? It switches back n forth or something.
Are you running both boards?
Title: Re: nCode Image Resizer
Post by: Tibian on November 09, 2008, 01:43:54 PM
You should be redirected to www.thekots.com/king after the splash page. I redid it all yesterday -- and yes the forums I am currently using or rather SWITCHING to is SMF.

I am not sure why the index would be switching other than cookies, but I'll have a look at that as well.

Just out of a stroke of hope, I'll post my modifications.english.php;

<?php
// --- Begin added code - Advanced Visual Verification ---
$txt['ncode_imageresizer_warning_small'] = 'Click this bar to view the full image.';
$txt['ncode_imageresizer_warning_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s and weighs %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Click this bar to view the small image.';
$txt['ncode_imageresizer_mode'] = 'Resize Mode';
$txt['ncode_imageresizer_original'] = 'Keep original size';
$txt['ncode_imageresizer_enlarge_same'] = 'Enlarge in same document';
$txt['ncode_imageresizer_open_same'] = 'Open in same window';
$txt['ncode_imageresizer_open_new'] = 'Open in new window';
$txt['ncode_imageresizer_max_width'] = 'Maximum width';
$txt['ncode_imageresizer_max_height'] = 'Maximum height<br /><span class="smalltext">Leave blank for no max height.</span>';
// --- End added code ---
?>


The theme is based on http://custom.simplemachines.org/themes/index.php?lemma=107 (http://custom.simplemachines.org/themes/index.php?lemma=107) Aa New Damage by m3talcore; if that helps as well.

the .js is uploaded to both default and theme folders, and I double checked my edits based on the instructions found http://custom.simplemachines.org/mods/index.php?mod=1197 (http://custom.simplemachines.org/mods/index.php?mod=1197)

I am not sure what else to give you. The only option that shows up is under Admin --> Features and Options; Max width of posted pictures (0 = disable) - Set to 800
Max height of posted pictures (0 = disable) - Set to 600

Layout and Options --> Edit Resize Mode and width and length DOES NOT show up.


Title: Re: nCode Image Resizer
Post by: Tibian on November 09, 2008, 01:45:24 PM
Since you want more information; here is my index.template from my DEFAULT folder.
<?php
// Version: 1.1.5; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />', empty($context['robot_no_index']) ? '' '
<meta name="robots" content="noindex" />'
'
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?fin11"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";
// ]]></script>
<title>'
$context['page_title'], '</title>';

// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?fin11" media="print" />';

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
{
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>'
;

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

function shrinkHeaderIC(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>
<!-- nCode Image Resizer -->
<script type="text/javascript" src="'
$settings['theme_url'], '/ncode_imageresizer.js"></script>
<style type="text/css">
<!--
table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
{
background-color: #fefee1; /* the bgcolor behind the text and image */
}
table.ncode_imageresizer_warning {
color: #000000; /* the font color */
border: 1px solid #CCCDCD; /* the border around the whole thing */
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 10px;
vertical-align: middle;
text-decoration: none;
}

table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}
-->
</style>'
;

// What is the mode?
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode 'newwindow';
else
$mode 'none';
}
else
$mode 'none';

echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
NcodeImageResizer.BBURL = "'
$settings['images_url'], '";
NcodeImageResizer.MODE = "'
$mode'";
NcodeImageResizer.MAXWIDTH = "'
, empty($modSettings['ncode_imageresizer_max_width']) ? : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "'
, empty($modSettings['ncode_imageresizer_max_height']) ? : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \''
$txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \''
$txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \''
$txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \''
$txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>
</head>
<body>'
;

echo '
<div class="tborder" '
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' '''>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">'
;

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">'
$context['forum_name'], '</span>';
else
echo '
<img src="'
$settings['header_logo_url'], '" style="margin: 4px;" alt="'$context['forum_name'], '" />';

echo '
</td>
<td align="right" class="catbg">
<img src="'
$settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
</td>
</tr>
</table>'
;


// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>'
;

if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> '
$txt['hello_member_ndt'], ' <b>'$context['user']['name'] , '</b></span>
</td>'
;

// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' 
$context['current_time'], '</span>';

// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="'
$settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>'
;

if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">'
$context['user']['avatar']['image'], '</td>';

echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">'
;

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a> <br />
<a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />';

}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];

// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>'
$txt[616], '</b><br />';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=viewmembers;sa=browse;type=approve">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'], '<br />';

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
'
$txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>

<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">'
$txt['smf53'], '</option>
<option value="1440">'
$txt['smf47'], '</option>
<option value="10080">'
$txt['smf48'], '</option>
<option value="43200">'
$txt['smf49'], '</option>
<option value="-1" selected="selected">'
$txt['smf50'], '</option>
</select>
<input type="submit" value="'
$txt[34], '" /><br />
<span class="middletext">'
$txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>'
;
}

echo '
</td>
</tr>
</table>
</td>
</tr>
</table>'
;

echo '
<table id="upshrinkHeader2"'
, empty($options['collapse_header']) ? '' ' style="display: none;"'' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>'
;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>'
$txt[102], '</b>: '$context['random_news_line'], '</span>
</td>'
;
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '" style="margin: 0;">
<a href="'
$scripturl'?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="'
$txt[182], '" style="width: 11ex;" />
<input type="hidden" name="advanced" value="0" />'
;

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="'
$context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form>
</td>
</tr>
</table>
</div>'
;


// Show the menu here, according to the menu sub template.
template_menu();


// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">'
;
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'right' 'left''">
<a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="'
$settings['images_url'], '/powered-mysql.gif" alt="'$txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://www.php.net/" target="_blank"><img id="powered-php" src="'
$settings['images_url'], '/powered-php.gif" alt="'$txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
'
theme_copyright(), '
</td>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'left' 'right''">
<a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="'
$settings['images_url'], '/valid-xhtml10.gif" alt="'$txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="'
$settings['images_url'], '/valid-css.gif" alt="'$txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
</tr>
</table>'
;

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}'
;
else
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}'
;

echo '
// ]]></script>'
;
}

echo '
</div>'
;

// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div>
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context$settings$options;

echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;>&nbsp;';
}

echo '</div>';
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

// Work out where we currently are.
$current_action 'home';
if (in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
$current_action 'admin';
if (in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''help''pm''forum''tpadmin')))

$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';
if (isset($_GET['dl']))
$current_action 'dlmanager';

if (isset($_GET['board']) || isset($_GET['topic']) || $context['current_action']=='forum')
$current_action 'forum';

if ($context['current_action']=='tpadmin')
$current_action 'admin';

if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first 'last';
$last 'first';
}
else
{
$first 'first';
$last 'last';
}

// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' 
$first '">&nbsp;</td>';

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'home' 'active_back' 'back' '">
<a href="'
$scripturl'">' $txt[103] , '</a>
</td>' 
$current_action == 'home' '<td class="maintab_active_' $last '">&nbsp;</td>' '';
if(
$settings['TPortal_front_type']!='boardindex')
// Show the [forum] button.
echo ($current_action=='forum' || $context['browser']['is_ie4']) ? '<td class="maintab_active_first">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action=='forum' 'active_back' 'back' '">
<a href="'
$scripturl'?action=forum">'.$txt['tp-forum'].'</a>
</td>' 
$current_action=='forum' '<td class="maintab_active_last">&nbsp;</td>' '';

// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'help' 'active_back' 'back' '">
<a href="'
$scripturl'?action=help">' $txt[119] , '</a>
</td>' 
$current_action == 'help' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'search' 'active_back' 'back' '">
<a href="'
$scripturl'?action=search">' $txt[182] , '</a>
</td>' 
$current_action == 'search' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'admin' 'active_back' 'back' '">
<a href="'
$scripturl'?action=admin">' $txt[2] , '</a>
</td>' 
$current_action == 'admin' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'profile' 'active_back' 'back' '">
<a href="'
$scripturl'?action=profile">' $txt[79] , '</a>
</td>' 
$current_action == 'profile' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'pm' 'active_back' 'back' '">
<a href="'
$scripturl'?action=pm">' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</a>
</td>' 
$current_action == 'pm' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'calendar' 'active_back' 'back' '">
<a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a>
</td>' 
$current_action == 'calendar' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'mlist' 'active_back' 'back' '">
<a href="'
$scripturl'?action=mlist">' $txt[331] , '</a>
</td>' 
$current_action == 'mlist' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'login' 'active_back' 'back' '">
<a href="'
$scripturl'?action=login">' $txt[34] , '</a>
</td>' 
$current_action == 'login' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'register' 'active_back' 'back' '">
<a href="'
$scripturl'?action=register">' $txt[97] , '</a>
</td>' 
$current_action == 'register' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'logout' 'active_back' 'back' '">
<a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a>
</td>' 
$current_action == 'logout' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// The end of tab section.
echo '
<td class="maintab_' 
$last '">&nbsp;</td>
'
;
// TinyPortal
 if($context['TPortal']['leftbar'])
             echo 
'<td style="padding-left: 1ex;"><a href="javascript:void(0);" onclick="shrinkHeaderLeftbar(!current_leftbar); return false;"><img id="upshrinkLeftbar" src="'$settings['images_url'], '/', empty($options['collapse_leftbar']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempLeftbar" src="'$settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" /></td>';
         if(
$context['TPortal']['rightbar'])
             echo 
'<td style="padding-left: 1ex;"><a href="javascript:void(0);" onclick="shrinkHeaderRightbar(!current_rightbar); return false;"><img id="upshrinkRightbar" src="'$settings['images_url'], '/', empty($options['collapse_rightbar']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempRightbar" src="'$settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" /></td>';
// TinyPortal end
echo '

</tr>
</table>'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'last' 'first' '">&nbsp;</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_back">'implode(' &nbsp;|&nbsp; '$button_strip) , '</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'first' 'last' '">&nbsp;</td>';
}

?>


Title: Re: nCode Image Resizer
Post by: Tibian on November 09, 2008, 01:48:31 PM
Here is the index.template from my THEME folder;

<?php
// Version: 1.1; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />', empty($context['robot_no_index']) ? '' '
<meta name="robots" content="noindex" />'
'
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?fin11"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";
// ]]></script>
<title>'
$context['page_title'], '</title>';

// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
 
echo '
  <link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?fin11" media="print" />';


/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>'
;

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

function shrinkHeaderIC(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>
<script language="javascript" type="text/javascript" src="'
$settings['images_url'], '/preloader.js"></script>
<!-- nCode Image Resizer -->
<script type="text/javascript" src="'
$settings['theme_url'], '/ncode_imageresizer.js"></script>
<style type="text/css">
<!--
table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
{
background-color: #fefee1; /* the bgcolor behind the text and image */
}
table.ncode_imageresizer_warning {
color: #000000; /* the font color */
border: 1px solid #CCCDCD; /* the border around the whole thing */
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 10px;
vertical-align: middle;
text-decoration: none;
}

table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}
-->
</style>'
;

// What is the mode?
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode 'newwindow';
else
$mode 'none';
}
else
$mode 'none';

echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
NcodeImageResizer.BBURL = "'
$settings['images_url'], '";
NcodeImageResizer.MODE = "'
$mode'";
NcodeImageResizer.MAXWIDTH = "'
, empty($modSettings['ncode_imageresizer_max_width']) ? : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "'
, empty($modSettings['ncode_imageresizer_max_height']) ? : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \''
$txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \''
$txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \''
$txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \''
$txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>
</head>
<body>'
;
// header goes below here
echo '
<!-- Added Header -->
<a name="top"></a>
<div align="center">
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="'
$settings['images_url'], '/forum_body_01.gif" alt="" /></td>
<td width="1000" height="192" align="left" valign="top">
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1000" height="198" background="'
$settings['images_url'], '/forum_body_02.jpg" align="center" valign="bottom">
</td>
</tr>
<tr>
<td width="1000" height="18" align="center" valign="middle" background="'
$settings['images_url'], '/forum_body_04.jpg">
'
template_menu();
echo 
'
</td>
</tr>
<tr>
<td width="1000" background="http://thekots.com/king/Themes/NewDamage/images/forum_body_05.jpg" "height="35"><a href="http://www.thekots.com/king/dkp"><div align="center"><a href="http://www.thekots.com/king/dkp"><img src="http://thekots.com/king/Themes/NewDamage/images/DKP.gif" border="0"></a> 
</div></td>
</tr>
</table>
</td>
<td><img src="'
$settings['images_url'], '/forum_body_01.gif" alt="" /></td>
</tr>
</table>
<!-- END header -->
<!-- BEGIN content sections -->
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1000" align="center" valign="top" class="content-bg">
<!-- End added header -->
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1000" align="left" valign="top">
<div class="tborder" '
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' '''>';


// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>'
;

if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> '
$txt['hello_member_ndt'], ' <b>'$context['user']['name'] , '</b></span>
</td>'
;

// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' 
$context['current_time'], '</span>';

// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="'
$settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>'
;

if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">'
$context['user']['avatar']['image'], '</td>';

echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">'
;

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a> <br />
<a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />';
}

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
{
echo ((isset($current_action) && $curent_action == 'pm') || $context['browser']['is_ie4']) ? '' '' '
<span class="smalltext"><a href="'
$scripturl'?action=pm">Private Messages</a>: '$context['user']['unread_messages'], ' Unread, '$context['user']['messages'], ' Total.</span><br />';
}

// Otherwise they're a guest - send them a lovely greating...
else
echo $txt['welcome_guest'];

// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>'
$txt[616], '</b><br />';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=viewmembers;sa=browse;type=approve">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'], '<br />';

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
'
$txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>

<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<input type="text" name="user" class="input1" value="Username" onBlur="if(this.value==\'\') this.value=\'Username\';" onFocus="if(this.value==\'Username\') this.value=\'\';" /> <input type="password" name="passwrd" class="input1" value="password" onBlur="if(this.value==\'\') this.value=\'password\';" onFocus="if(this.value==\'password\') this.value=\'\';" />
<select name="cookielength" class="input1">
<option value="60">'
$txt['smf53'], '</option>
<option value="1440">'
$txt['smf47'], '</option>
<option value="10080">'
$txt['smf48'], '</option>
<option value="43200">'
$txt['smf49'], '</option>
<option value="-1" selected="selected">'
$txt['smf50'], '</option>
</select>
<input class="button" type="submit" value="'
$txt[34], '" /><br />
<span class="middletext">'
$txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>'
;
}

echo '
</td>
</tr>
</table>
</td>
</tr>
</table>'
;

echo '
<table id="upshrinkHeader2"'
, empty($options['collapse_header']) ? '' ' style="display: none;"'' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>'
;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>'
$txt[102], '</b>: '$context['random_news_line'], '</span>
</td>'
;
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '" style="margin: 0;">
<a href="'
$scripturl'?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input class="input1" type="text" name="search" onBlur="if(this.value==\'\') this.value=\'Search...\';" onFocus="if(this.value==\'Search...\') this.value=\'\';" value="Search..." style="width: 190px;" />&nbsp;
<input class="button" type="submit" name="submit" value="'
$txt[182], '" style="width: 11ex;" />
<input type="hidden" name="advanced" value="0" />'
;

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="'
$context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form>
</td>
</tr>
</table>
</div>'
;




// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">'
;
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="28%" valign="middle" align="left">
Theme by <a href="http://www.m3talc0re.com/" target="_blank" style="font-size:10px;">m3talc0re</a>.
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
'
theme_copyright(), '
</td>
<td width="28%" valign="middle" align="right">
<a href="http://www.mysql.com/" target="_blank" style="font-size:10px;">MySQL</a>&nbsp;|&nbsp;<a href="http://www.php.net/" target="_blank" style="font-size:10px;">PHP</a>&nbsp;|&nbsp;<a href="http://validator.w3.org/check/referer" target="_blank" style="font-size:10px;">XHTML</a>&nbsp;|&nbsp;<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank" style="font-size:10px;">CSS</a>
</td>
</tr>
</table>'
;

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}'
;
else
echo '
var window_oldOnload = window.onload;

window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}'
;

echo '
// ]]></script>'
;
}

echo '
</div>
<!-- Added footer -->
</td>
</tr>
</table>
<table width="900" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="855" height="25" align="left" valign="middle" id="copyright-text">
</td>
<td rowspan="2" width="45" height="50" align="right" valign="top">
</td>
</tr>
<tr>
<td width="855" height="20" align="left" valign="middle" id="legal-text">
</td>
</tr>
</table>
<!-- END Legal -->
</td>
</tr>
</table>
<!-- END content sections -->
<!-- BEGIN footer -->
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="500" height="81" align="left" valign="top">
<img src="'
$settings['images_url'], '/header_11.jpg" width="500" height="81" alt="" /></td>
<td width="500" height="81" align="left" valign="top">
<img src="'
$settings['images_url'], '/header_12.jpg" width="500" height="81" alt="" /></td>
</tr>
</table>
<!-- END footer -->
</div>'
;

// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div>
</body></html>'
;
}

// Footer goes above here
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context$settings$options;

echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex; padding-left:8px; padding-right:8px;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;&raquo;&nbsp;';
}

echo '</div>';
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

// Work out where we currently are.
$current_action 'home';
if (in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
$current_action 'admin';
if (in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''help''pm')))
$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first 'last';
$last 'first';
}
else
{
$first 'first';
$last 'last';
}

// Show the start of the tab section.
echo '
<ul class="main-navigation">'
;

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-home"><a href="'
$scripturl'">' $txt[103] , '</a></li>' $current_action == 'home' '' '';

// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-help"><a href="'
$scripturl'?action=forum">' $txt[119] , '</a></li>' $current_action == 'forum' '' '';

// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-search"><a href="'
$scripturl'?action=search">' $txt[182] , '</a></li>' $current_action == 'search' '' '';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-admin"><a href="'
$scripturl'?action=admin">' $txt[2] , '</a></li>' $current_action == 'admin' '' '';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-profile"><a href="'
$scripturl'?action=profile">' $txt[79] , '</a></li>' $current_action == 'profile' '' '';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-messages"><a href="'
$scripturl'?action=pm">' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</a></li>' $current_action == 'pm' '' '';

// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-calendar"><a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a></li>' $current_action == 'calendar' '' '';

// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-members"><a href="'
$scripturl'?action=mlist">' $txt[331] , '</a></li>' $current_action == 'mlist' '' '';


// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-login"><a href="'
$scripturl'?action=login">' $txt[34] , '</a></li>' $current_action == 'login' '' '';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-register"><a href="'
$scripturl'?action=register">' $txt[97] , '</a></li>' $current_action == 'register' '' '';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '' '' '
<li class="mainNav-logout"><a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a></li>' $current_action == 'logout' '' '';

// The end of tab section.
echo '</ul>';

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'last' 'first' '">&nbsp;</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_back">'implode(' &nbsp;|&nbsp; '$button_strip) , '</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'first' 'last' '">&nbsp;</td>';
}

?>

Title: Re: nCode Image Resizer
Post by: Sabre™ on November 09, 2008, 04:36:40 PM
This is the board I see

Right click and view image for larger view
phpbb ??  Your SMF one is there also.
It is an easy solution, and you'll see it soon ;)

The above information should suffice when someone comes to assist you.

Good luck
Title: Re: nCode Image Resizer
Post by: Tibian on November 09, 2008, 05:05:02 PM
Whoops :o

Fixed that -- or at least it SHOULD be fixed now.

The PHP one is using lytebox -- but that's not the website I want to use. It's still up there just for reference and I haven't gotten around to deleting the files or databases yet.

The website should be redirecting to www.thekots.com/king (http://www.thekots.com/king) where the SMF is installed. That is where my problem lies with not having the nCode image resizer work. So JUST worry about thekots.com/king
Title: Re: nCode Image Resizer
Post by: Hoochie Coochie Man on November 09, 2008, 06:09:39 PM
Quote from: *erhan on October 14, 2008, 06:31:57 AM
How can we solve this xhtml error?

there is no attribute "onload"

Any help would be great.
Thanks..
bump...
Title: Re: nCode Image Resizer
Post by: FragaCampos on November 15, 2008, 04:30:20 PM
Thanks a lot! Working on 1.1.7!
Title: Re: nCode Image Resizer
Post by: Nibogo on December 01, 2008, 04:29:11 PM
I create a new version of this mod for SMF 2.0 , tested and works great , also if you are not using the default theme with this package you dont have to upload the js file to the theme directory

SMF 2.0 ONLY
Title: Re: nCode Image Resizer
Post by: xmusic on December 10, 2008, 11:47:43 PM
hai its work fine for me,but it working in default themes only,aim using dreakbreak theme need to work for the theme also
Title: Re: nCode Image Resizer
Post by: Nibogo on December 11, 2008, 04:34:39 PM
Quote from: xmusic on December 10, 2008, 11:47:43 PM
hai its work fine for me,but it working in default themes only,aim using dreakbreak theme need to work for the theme also

You need to uplaod the .js file to the theme directory
Title: Re: nCode Image Resizer
Post by: xmusic on December 18, 2008, 10:43:18 AM
working great thank u some much
Title: Re: nCode Image Resizer
Post by: Nibogo on December 18, 2008, 04:22:25 PM
Quote from: xmusic on December 18, 2008, 10:43:18 AM
working great thank u some much

You are welcome ;)
Title: Re: nCode Image Resizer
Post by: aED on January 31, 2009, 03:16:21 AM
Thanks Nibogo for the updated version!
Title: Re: nCode Image Resizer
Post by: Rehash D Internet on January 31, 2009, 06:07:35 AM
This isn't working for me on 1.1.7 with the More Style theme. Any ideas? It's installed fine but is totally ineffective in practice.
Title: Re: nCode Image Resizer
Post by: aED on January 31, 2009, 06:40:45 AM
If you are using other theme than the default-core then you need to manually add the codes its only the index.template.php  that needs edit.
Title: Re: nCode Image Resizer
Post by: Rehash D Internet on January 31, 2009, 02:14:23 PM
I managed it, thanks.
Title: Re: nCode Image Resizer
Post by: X3mE on February 01, 2009, 01:27:05 PM
Thanks NBG!!! Working great :)

Serbian translation:
// --- Begin added code - nCode Image Resizer ---
$txt['ncode_imageresizer_warning_small'] = 'Kliknite na ovaj bar da vidite sliku u punoj veličini.';
$txt['ncode_imageresizer_warning_filesize'] = 'Ovoj slici su smanjene dimenzije. Klknite na ovaj bar da je vidite u punoj veličini. Orginalna slika je dimenzija %1$sx%2$s i teška je %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Ovoj slici su smanjene dimenzije. Klknite na ovaj bar da je vidite u punoj veličini. Orginalna slika je dimenzija %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Kliknite na ovaj bar da vidite umanjeni prikaz.';
$txt['ncode_imageresizer_mode'] = 'Način promene dimenzija';
$txt['ncode_imageresizer_original'] = 'Zadrži originalnu veličinu';
$txt['ncode_imageresizer_enlarge_same'] = 'Povećaj u istom prozoru';
$txt['ncode_imageresizer_open_same'] = 'Otvori u istom prozoru';
$txt['ncode_imageresizer_open_new'] = 'Otvori u novom prozoru';
$txt['ncode_imageresizer_max_width'] = 'Maksimalna dužina';
$txt['ncode_imageresizer_max_height'] = 'Maksimalna širina<br /><span class="smalltext">Ostavite prazno da ne menja dimenzije po širini.</span>';
// --- End added code ---
Title: Re: nCode Image Resizer
Post by: timned88 on February 17, 2009, 10:12:39 PM
just installed into 2.0RC1... went right in.  can't wait to try it out.
Title: Re: nCode Image Resizer
Post by: timned88 on February 17, 2009, 10:38:03 PM
Quote from: karlbenson on May 19, 2008, 10:01:37 AM
It only works for
[img]http://...[/img]
but not images that have already been sized by smf.
[img width="100" height="100"]http://...[/img]

does that mean this mod does not work on attachments?  only hotlinked images?
i have only been able to get it to work with hotlinked images.  SMF2.0RC1
Title: Re: nCode Image Resizer
Post by: nikku on February 22, 2009, 12:24:53 PM
great mod ! works great on default theme 2.0 R1. But I try to add it to babylon theme and is not working.

i uploaded the file ncode_imageresizer.js to theme directory (/public_html/forum/Themes/babylon)  but is not working. Then I tried to add the ncode_imageresizer.js to /public_html/forum/Themes/babylon/scripts did not work either ? What do i do wrong ? Where to copy ?
Title: Re: nCode Image Resizer
Post by: Nibogo on February 22, 2009, 01:27:08 PM
Add the index.template edit on your file
Title: Re: nCode Image Resizer
Post by: nikku on February 22, 2009, 01:59:09 PM
thanks for the tip... in the end i figured it out. I opened index.template.php from default theme, and copy pasted the code found there to my index.template from babylon theme. I added the code before </head>  ...  seems to work  :D  I did correctly ?


echo '<!-- nCode Image Resizer -->
<script type="text/javascript" src="', $settings['default_theme_url'], '/ncode_imageresizer.js"></script>
<style type="text/css">
<!--
table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
{
background-color: #fefee1; /* the bgcolor behind the text and image */
}
table.ncode_imageresizer_warning {
color: #000000; /* the font color */
border: 1px solid #CCCDCD; /* the border around the whole thing */
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 10px;
vertical-align: middle;
text-decoration: none;
}

table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}
-->
</style>';

// What is the mode?
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode = 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode = 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode = 'newwindow';
else
$mode = 'none';
}
else
$mode = 'none';

echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
NcodeImageResizer.BBURL = "', $settings['images_url'], '";
NcodeImageResizer.MODE = "', $mode, '";
NcodeImageResizer.MAXWIDTH = "', empty($modSettings['ncode_imageresizer_max_width']) ? 0 : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "', empty($modSettings['ncode_imageresizer_max_height']) ? 0 : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \'', $txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \'', $txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \'', $txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \'', $txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>';

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the main header object.
var mainHeader = new smfToggle("upshrink", ', empty($options['collapse_header']) ? 'false' : 'true', ');
mainHeader.useCookie(', $context['user']['is_guest'] ? 1 : 0, ');
mainHeader.setOptions("collapse_header", "', $context['session_id'], '");
mainHeader.addToggleImage("upshrink", "/upshrink.gif", "/upshrink2.gif");
mainHeader.addTogglePanel("user_section");
mainHeader.addTogglePanel("news_section");
// ]]></script>';

echo '
Title: Re: nCode Image Resizer
Post by: timned88 on February 22, 2009, 02:06:09 PM
Quote from: nikku on February 22, 2009, 01:59:09 PM
what index template to what file ? i do not understand what to do :(

../themes/default/index.template.php
Title: Re: nCode Image Resizer
Post by: timned88 on February 22, 2009, 02:07:26 PM
Quote from: timned88 on February 17, 2009, 10:38:03 PM
Quote from: karlbenson on May 19, 2008, 10:01:37 AM
It only works for
[img]http://...[/img]
but not images that have already been sized by smf.
[img width="100" height="100"]http://...[/img]

does that mean this mod does not work on attachments?  only hotlinked images?
i have only been able to get it to work with hotlinked images.  SMF2.0RC1

BUMP!
Title: Re: nCode Image Resizer
Post by: X3mE on February 22, 2009, 03:48:38 PM
It's designed to work only for linked images.
Title: Re: nCode Image Resizer
Post by: timned88 on February 22, 2009, 03:53:12 PM
no worries...  i found a way via hard code and back-end to make it work for attachments.  not as elegant but it works.
could there be a future version that works for attachments as well?
Title: Re: nCode Image Resizer
Post by: Nibogo on March 08, 2009, 10:25:25 PM
Metalcore allows me to take over this mod so I sent a PM to SleePy and I hope to be the developer of this mod today or tomorrow.

:)
Title: Re: nCode Image Resizer
Post by: Özgür on March 08, 2009, 10:35:29 PM
NIBOGO   
I hope you solve xhtml problem =) (onload .. http://www.simplemachines.org/community/index.php?topic=240057.msg1751682#msg1751682)
Title: Re: nCode Image Resizer
Post by: aED on March 09, 2009, 12:21:02 AM
IS there already an updated version of this MOD for RC1?
Title: Re: nCode Image Resizer
Post by: Özgür on March 09, 2009, 01:14:58 AM
http://www.simplemachines.org/community/index.php?action=dlattach;topic=240057.0;attach=78111
Title: Re: nCode Image Resizer
Post by: aED on March 09, 2009, 01:19:22 AM
Thanks  Özgür´
Title: Re: nCode Image Resizer
Post by: Nibogo on March 09, 2009, 06:10:33 PM
Quote from: Özgür´ on March 08, 2009, 10:35:29 PM
NIBOGO  
I hope you solve xhtml problem =) (onload .. http://www.simplemachines.org/community/index.php?topic=240057.msg1751682#msg1751682)

I will try to fix all the bugs and update the mod ^^
Title: Re: nCode Image Resizer
Post by: Nibogo on March 09, 2009, 07:46:32 PM
Changelogs:

Version 1.2 - March 09, 2009
- 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 - May 16, 2008
- Modification Release
Title: Re: nCode Image Resizer
Post by: aristides_03 on March 10, 2009, 12:29:17 AM
Thanks for the modification and the Spanish translation
Title: Re: nCode Image Resizer
Post by: problemwt2.0 on March 10, 2009, 09:31:53 AM
hi :) this mod is also resizing images in signatures :( any way to disable this ?

thanx :)
Title: Re: nCode Image Resizer
Post by: Nibogo on March 10, 2009, 03:06:43 PM
Quote from: problemwt2.0 on March 10, 2009, 09:31:53 AM
hi :) this mod is also resizing images in signatures :( any way to disable this ?

thanx :)

I don't think of this is necessary , because if you don't want big images in post you don't want big images on signatures ;)
Title: Re: nCode Image Resizer
Post by: edi67 on March 10, 2009, 07:17:48 PM
Bravo nibogo another good mod to check ;) i use this by time and work ok
Title: Re: nCode Image Resizer
Post by: DegJ on March 12, 2009, 12:04:44 AM
Hey! Great mod!
but right now if you click a large image it totally flows over to the right, as seen in my attachments images, the first one is good, but the 2nd one shows what I mean.
is there any way you can make it centralise itself, instead of just overflowing to the right? much alike with a lightbox, like just centralise itself.
(( its a bit different in the default theme, but its about the same, you need to scroll at the bottom))
I did a minor sketch in paint on how I mean, making it expand both to the left and the right, instead of just to the right.
or, have the option, to maybe set the absolute maximum size of images, like, max 700px when minimized, and up to 1600px when you click the maximize, even tho the picture might be 1900px, to prevent overflow. even tho i'd rather just have it go centralised instead ;)
Title: Re: nCode Image Resizer
Post by: Nibogo on March 14, 2009, 08:05:56 PM
Quote from: DegJ on March 12, 2009, 12:04:44 AM
Hey! Great mod!
but right now if you click a large image it totally flows over to the right, as seen in my attachments images, the first one is good, but the 2nd one shows what I mean.
is there any way you can make it centralise itself, instead of just overflowing to the right? much alike with a lightbox, like just centralise itself.
(( its a bit different in the default theme, but its about the same, you need to scroll at the bottom))
I did a minor sketch in paint on how I mean, making it expand both to the left and the right, instead of just to the right.
or, have the option, to maybe set the absolute maximum size of images, like, max 700px when minimized, and up to 1600px when you click the maximize, even tho the picture might be 1900px, to prevent overflow. even tho i'd rather just have it go centralised instead ;)


Anyway if you put the image in the center you will have the same problem because the image will enlarge the left part of the wndow , the best option is open the image in a new window if you have images with a size bigger than 1600 px
Title: Re: nCode Image Resizer
Post by: -!¦[·ÃNÐ¥·]¦!- on April 01, 2009, 01:59:08 PM
I have a problem, I installed everything perfectly, I reviewed the files manually, translated it into Spanish, copied ncode_imageresizer.js  to / Themes / default and configured it in Themes and Design, but not working, what happens?

Thanks!  ;)
Title: Re: nCode Image Resizer
Post by: hhy89 on April 01, 2009, 05:18:36 PM
ncode_imageresizer.js copy your own theme
Title: Re: nCode Image Resizer
Post by: Nibogo on April 01, 2009, 05:39:27 PM
Quote from: -!¦[·ÃNÐ¥·]¦!- on April 01, 2009, 01:59:08 PM
I have a problem, I installed everything perfectly, I reviewed the files manually, translated it into Spanish, copied ncode_imageresizer.js  to / Themes / default and configured it in Themes and Design, but not working, what happens?

Thanks!  ;)

Do you have to enable this mod in the admin panel and set the maximun width and height
Title: Re: nCode Image Resizer
Post by: problemwt2.0 on April 01, 2009, 06:39:35 PM
hi bro :)

i juss wan to ask u 1 question :)

this mod is resizing every image

nd if only want this mod to resize image which are bigger than 700x800 nt resize any image which is smaller than that res :) please tell me how to do so if possible :)

thanx :)

edit : i'm using 2.0 RC1
Title: Re: nCode Image Resizer
Post by: Nibogo on April 01, 2009, 07:14:03 PM
You set the maximun height and width, If any image is bigger than that parameters will be resized but not the other images
Title: Re: nCode Image Resizer
Post by: problemwt2.0 on April 02, 2009, 06:59:26 AM
Quote from: NIBOGO on April 01, 2009, 07:14:03 PM
You set the maximun height and width, If any image is bigger than that parameters will be resized but not the other images

tried nt working  :(

Features and Options/General/Max width/hight of posted pictures


i set it b not working please help me  :-[
Title: Re: nCode Image Resizer
Post by: Nibogo on April 02, 2009, 03:41:46 PM
Did you edit your Theme??

The mod only works on SMF Theme Default, you have to make the manual edit for your theme
Title: Re: nCode Image Resizer
Post by: problemwt2.0 on April 02, 2009, 04:00:30 PM
Quote from: NIBOGO on April 02, 2009, 03:41:46 PM
Did you edit your Theme??

The mod only works on SMF Theme Default, you have to make the manual edit for your theme

well i'm using this theme on custom theme bro :P any other suggestion ?
Title: Re: nCode Image Resizer
Post by: -!¦[·ÃNÐ¥·]¦!- on April 04, 2009, 02:19:47 PM
Quote from: NIBOGO on April 01, 2009, 05:39:27 PM
Quote from: -!¦[·ÃNÐ¥·]¦!- on April 01, 2009, 01:59:08 PM
I have a problem, I installed everything perfectly, I reviewed the files manually, translated it into Spanish, copied ncode_imageresizer.js  to / Themes / default and configured it in Themes and Design, but not working, what happens?

Thanks!  ;)

Do you have to enable this mod in the admin panel and set the maximun width and height

I edit manually my own theme and copy ncode_imageresizer.js there, also in the admin panel, I selected 'Enlarge in same document' and 650width, but it doesn't work  :(
Title: Re: nCode Image Resizer
Post by: Nibogo on April 04, 2009, 06:26:35 PM
check the Subs.php edit also if your site is loading the .js script
Title: Re: nCode Image Resizer
Post by: -!¦[·ÃNÐ¥·]¦!- on April 04, 2009, 06:36:41 PM
Thanks for your help! But, how do I do that? Here is Subs.php

Title: Re: nCode Image Resizer
Post by: hhy89 on April 04, 2009, 08:08:23 PM
Max width of posted pictures (0 = disable)     
Max height of posted pictures (0 = disable)

will be 0
Title: Re: nCode Image Resizer
Post by: -!¦[·ÃNÐ¥·]¦!- on April 06, 2009, 01:01:26 PM
It works now! Thanks!  :D
Title: Re: nCode Image Resizer
Post by: hhy89 on April 06, 2009, 06:02:08 PM
no problem ;D
Title: Re: nCode Image Resizer
Post by: d0brin on April 21, 2009, 03:42:54 PM
I have a problem with this mod, when i post an image it is resized yes but nowhare i can see a button that on lick it will show me the full image size i think on hte discription of the mod was mentioned that it includes a button to restore the original size on click right?
Title: Re: nCode Image Resizer
Post by: Nibogo on April 21, 2009, 06:30:48 PM
Quote from: d0brin on April 21, 2009, 03:42:54 PM
I have a problem with this mod, when i post an image it is resized yes but nowhare i can see a button that on lick it will show me the full image size i think on hte discription of the mod was mentioned that it includes a button to restore the original size on click right?

Nop, you have a bar in the top of the image to restore the original size of the image if you select the option in the admin panel
Title: Re: nCode Image Resizer
Post by: Özgür on April 21, 2009, 06:41:27 PM
NIBOGO we still have a xhtml error.

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.rockayseri.net%2Frk%2Fhaberler%2Fthe-revolution-day-rock-metal-festivali-(kayseri)%2F&charset=(detect+automatically)&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.654

:(
Title: Re: nCode Image Resizer
Post by: hhy89 on April 22, 2009, 01:46:40 AM
subs.php
array(
'tag' => 'img',
'type' => 'unparsed_content',
'parameters' => array(
'alt' => array('optional' => true),
'width' => array('optional' => true, 'value' => ' width="$1"', 'match' => '(\d+)'),
'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
),
'content' => '<img src="$1" alt="{alt}"{width}{height} border="0" onload="NcodeImageResizer.createOn(this);" class="bbc_img" />',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
'disabled_content' => '($1)',
),

replace
array(
'tag' => 'img',
'type' => 'unparsed_content',
'parameters' => array(
'alt' => array('optional' => true),
'width' => array('optional' => true, 'value' => ' width="$1"', 'match' => '(\d+)'),
'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
),
'content' => '<img src="$1" alt="{alt}"{width}{height} class="bbc_img" />',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
'disabled_content' => '($1)',
),

u do it but now it works only [ img] [ /img]
not work [ img width=xx height=xx] [ /img]
Title: Re: nCode Image Resizer
Post by: claudio_o on April 27, 2009, 04:32:02 PM
Not working here. :(
I'm using SMF 1.1.8 + TP with SMF default theme.
It says everything is installed successfully and I also manually checked all the modified files.

Themes/default/index.template.php has the nCode script section before the </head> tag so it's ok.
Sources/Subs.php also has the correct code I think.
Sources/ModSettings.php also ok. :(

Under Features and Options - Basic Features, Max width and Max height are 0 like suggested before.
What could be the problem?

EDIT
Ok, I found what's the problem (???).
If I translate Modifications.english.php nCode doesn't work. :-\

Here's my translated file Modifications.italian-utf8.php, what's wrong with it?
<?php
// Version: 1.1; Modifications

// --- Begin added code - Advanced Visual Verification ---
$txt['ncode_imageresizer_warning_small'] = 'Clicca su questa barra per vedere l\'immagine ingrandita.';
$txt['ncode_imageresizer_warning_filesize'] = 'L\'immagine &egrave; stata ridimensionata. Clicca su questa barra per ingrandirla. L\'immagine originale &egrave; grande %1$sx%2$s e pesa %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'L\'immagine &egrave; stata ridimensionata. Clicca su questa barra per ingrandirla. L\'immagine originale &egrave; grande %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Clicca su questa barra per vedere l\'immagine ridimensionata.';
$txt['ncode_imageresizer_mode'] = 'Modalit&agrave; ridimensionamento';
$txt['ncode_imageresizer_original'] = 'Mantieni le dimensioni originali';
$txt['ncode_imageresizer_enlarge_same'] = 'Apri nella stessa pagina';
$txt['ncode_imageresizer_open_same'] = 'Apri nella stessa finestra';
$txt['ncode_imageresizer_open_new'] = 'Apri in una nuova finestra';
$txt['ncode_imageresizer_max_width'] = 'Larghezza massima';
$txt['ncode_imageresizer_max_height'] = 'Altezza massima<br /><span class="smalltext">Lascia vuoto per nessun limite.</span>';
// --- End added code ---

?>


EDIT 2
If I remove all the backslash (\') in my translation it starts to work again...
Title: Re: nCode Image Resizer
Post by: Ashdaw on May 03, 2009, 06:55:00 PM
Thank you for making this MOD available. I had issues with it but have sorted them out. I use a custom theme and it took me 15 mins to figure out what I had to do. I am not so well at the moment and all the words on screen have a little haze for me due to the flu :(

I did figure it out though and I am so pleased with the end result. :)
Title: Re: nCode Image Resizer
Post by: islam2hamy on May 17, 2009, 02:40:12 PM
Thank you , very good mod ,

Arabic translation :

// --- Begin added code - Advanced Visual Verification ---
$txt['ncode_imageresizer_warning_small'] = 'إضغط هنا لمشاهدة الصورة بحجمها الطبيعى.';
$txt['ncode_imageresizer_warning_filesize'] = 'هذه الصورة تم إعداة تحجيمها. إضغط على هذا الشريط لمشاهدتها بحجمها الاصلى. الحجم الاصلى للصورة هو %1$sx%2$s و حجم الملف هو %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'هذه الصورة تم إعداة تحجيمها. إضغط على هذا الشريط لمشاهدتها بحجمها الاصلى. الحجم الاصلى للصورة هو %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'إغط هنا لتصغير الصورة.';
$txt['ncode_imageresizer_mode'] = 'مود إعدادة تحجيم الصور';
$txt['ncode_imageresizer_original'] = 'الاحتفاظ بالحجم الطبيعى';
$txt['ncode_imageresizer_enlarge_same'] = 'تكبير فى نفس الصفحة';
$txt['ncode_imageresizer_open_same'] = 'فتح فى نفس النافذة';
$txt['ncode_imageresizer_open_new'] = 'فتح فى نافذة جديدة';
$txt['ncode_imageresizer_max_width'] = 'أقصى عرض';
$txt['ncode_imageresizer_max_height'] = 'أقصى إرتفاع<br /><span class="smalltext">اتركها فارغة اذا لم تكن تريد حد أقصى للارتفاع.</span>';
// --- End added code ---


please before put the translation in the file be sure that the file encode is UTF-8
Title: Re: nCode Image Resizer
Post by: Nibogo on May 17, 2009, 02:59:28 PM
Thanks for the italian and arabic translation, I will include that languages in the next release
Title: Re: nCode Image Resizer
Post by: Mack450 on May 17, 2009, 07:47:46 PM
How do I make this work? Everything seems to be in order except for the index.template.php
Title: Re: nCode Image Resizer
Post by: Nibogo on May 17, 2009, 09:31:08 PM
Quote from: Mack450 on May 17, 2009, 07:47:46 PM
How do I make this work? Everything seems to be in order except for the index.template.php

Edit your index.template.php adding the nCode code for that file
Title: Re: nCode Image Resizer
Post by: JackWise on May 19, 2009, 06:08:58 AM
Hi,

Congratulations for this nice mode.  ;)

One question,

How can I make the alert box smaller ?

JW
Title: Re: nCode Image Resizer
Post by: MissyNL on May 19, 2009, 03:27:38 PM
Hi.. love this mod!! here is the dutch translation:

// --- Begin added code - Advanced Visual Verification ---
$txt['ncode_imageresizer_warning_small'] = 'Klik deze titelbar om de volledige afbeeld te bekijken.';
$txt['ncode_imageresizer_warning_filesize'] = 'Deze afbeelding is verkleint. Klik de titelbar om de volledige afbeelding te zien. De originele afbeelding heeft een formaat van %1$sx%2$s and groote %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Deze afbeelding is verkleint. Klik de titelbar om de volledige afbeelding te zien. De originele afbeelding heeft een formaat van %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Klik deze titelbar om de kleine afbeelding te bekijken.';
$txt['ncode_imageresizer_mode'] = 'Resize Mode';
$txt['ncode_imageresizer_original'] = 'Behoud orignele grootte';
$txt['ncode_imageresizer_enlarge_same'] = 'Vergroot in het zelfde document';
$txt['ncode_imageresizer_open_same'] = 'Open in de zelfde venster';
$txt['ncode_imageresizer_open_new'] = 'Open in een nieuwe window';
$txt['ncode_imageresizer_max_width'] = 'Maximum breedte';
$txt['ncode_imageresizer_max_height'] = 'Maximum hoogte<br /><span class="smalltext">Laat leeg voor geen maximum hoogte.</span>';
// --- End added code ---
Title: Re: nCode Image Resizer
Post by: Nibogo on May 19, 2009, 03:37:49 PM
thanks I will add dutch for the next release
Title: Re: nCode Image Resizer
Post by: Sakae on May 26, 2009, 09:57:04 PM
Quote from: NIBOGO on March 10, 2009, 03:06:43 PM
Quote from: problemwt2.0 on March 10, 2009, 09:31:53 AM
hi :) this mod is also resizing images in signatures :( any way to disable this ?

thanx :)

I quote that.

I use your mod to resize images bigger than 400px of width because of my SimplePortal MOD installed (so the home page don't get scrambled), but unfortunately most of my members signatures are a little bigger than this size.

If there's a way of desactivating this mod just for signatures, it would be awesome.

Meanwhile, here's the Modifications.portuguese_brazilian-utf8 translation:

// --- Begin added code - nCode Image Resizer ---
$txt['ncode_imageresizer_warning_small'] = 'Clique para ver em tamanho normal.';
$txt['ncode_imageresizer_warning_filesize'] = 'Imagem redimensionada. Clique para ver em tamanho normal. Imagem %1$sx%2$s com %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Imagem redimensionada. Clique para ver em tamanho normal. Imagem %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Clique para ver em tamanho reduzido.';
$txt['ncode_imageresizer_mode'] = 'Modo de redimensionamento';
$txt['ncode_imageresizer_original'] = 'Manter tamanho original';
$txt['ncode_imageresizer_enlarge_same'] = 'Aumentar na mesma janela';
$txt['ncode_imageresizer_open_same'] = 'Abrir na mesma janela';
$txt['ncode_imageresizer_open_new'] = 'Abrir em nova janela';
$txt['ncode_imageresizer_max_width'] = 'Largura m&aacute;xima';
$txt['ncode_imageresizer_max_height'] = 'Altura m&aacute;xima<br /><span class="smalltext">Deixe em branco para manter a largura.</span>';
// --- End added code ---
Title: Re: nCode Image Resizer
Post by: MissyNL on May 28, 2009, 06:59:44 AM
Hi.. i was wondering if it is possible to make an exeption for the admin. This because i have images on my frontpage that are 800 px width... and now i have to turn it into a flash in order to prefend a resize... Maybe by enabling it or something for the ones who don't want this feature?
Title: Re: nCode Image Resizer
Post by: ElectricSquid on May 29, 2009, 07:35:30 AM
Hi, I just installed this mod and it's a GREAT addition to my forum. Thank You!!

... but I have one suggestion, It would be easier for the end user if you put the CSS code in the style.css file instead of index.template.php
This way the end user can find the css attributes all in one place when they change the colors and layout of their forum.
Title: Re: nCode Image Resizer
Post by: ElectricSquid on May 29, 2009, 07:57:12 AM
OK, I moved the CSS code to style.css and noticed that the font color was not responding to my changes. In fact,  it wasn't responding even before I moved it.
A simple move of
        "color: #000000;"
from "table.ncode_imageresizer_warning"
    to "table.ncode_imageresizer_warning td"
made it work without issue.
Just figured I'd pass that info on to anyone else that might have had that issue.

I'm using SMF 1.1.9
TinyPortal 0.9.8
w/ a heavily modified custom theme
Title: Re: nCode Image Resizer
Post by: harisx on June 07, 2009, 11:54:52 AM
Hello...

This MOD working great in my forum...but, how to disaffect this mod function to any images at user signature??

Please come and visit my forum at http://www.vitanouva.net

Thanks for your help ;)
Title: Re: nCode Image Resizer
Post by: Sakae on June 07, 2009, 02:36:25 PM
Ok, I might have a solution to disable this MOD for signatures. Not sure if works, I haven't tested because I use SMF 2.0 RC1-1.

For those using SMF 1.1.x, try to install Signature Settings Mod and allow signatures being the width you need.

http://custom.simplemachines.org/mods/index.php?mod=528
Title: Re: nCode Image Resizer
Post by: ElectricSquid on June 07, 2009, 06:08:33 PM
I looked into the support topic for that mod and it seems as if they are having an error issue with it at this time.

Title: Re: nCode Image Resizer
Post by: harisx on June 08, 2009, 07:18:51 AM
i used SMF 2.0 RC1-1 version too
Title: Re: nCode Image Resizer
Post by: Nibogo on June 08, 2009, 05:30:24 PM
Quote from: harisx on June 08, 2009, 07:18:51 AM
i used SMF 2.0 RC1-1 version too

I don't have any code for that yet, you are more than free to create it but I wont do that
Title: Re: nCode Image Resizer
Post by: baioslaio on June 09, 2009, 10:41:37 AM
Kind of work but the text wont appear anywhere :(

Title: Re: nCode Image Resizer
Post by: silverf0x on June 09, 2009, 11:46:05 AM
hi i've installed this mod today on my 2.1RC1-1 forum

it's working fine on default theme, but not on any other themes i have

i've uploaded the ncode_imageresizer.js to themes dir

here is my index.template.php

<?php
// Version: 2.0 Beta 4; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '2.0 Beta 4';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status separate from topic icons? */
$settings['separate_sticky_lock'] = true;

/* Does this theme use the strict doctype? */
$settings['strict_doctype'] = false;

/* Does this theme use post previews on the message index? */
$settings['message_index_preview'] = false;
}

// The main sub template above the content.
function template_html_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title_html_safe'], '" />
<meta name="keywords" content="'
$context['meta_keywords'], '" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/script.js?b4"></script>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/theme.js?b4"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_default_theme_url = "'
$settings['default_theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";'$context['show_pm_popup'] ? '
if (confirm("' 
$txt['show_personal_messages'] . '"))
window.open("' 
$scripturl '?action=pm");' '''
var ajax_notification_text = "'
$txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "'
$txt['modify_cancel'], '";
// ]]></script>
<title>'
$context['page_title_html_safe'], '</title>';

// Please don't index these Mr Robot.
if (!empty($context['robot_no_index']))
echo '
<meta name="robots" content="noindex" />'
;

// The ?b4 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style'$context['theme_variant'], '.css?b4" />';

echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/print.css?b4" media="print" />';

// IE7 needs some fixes for styles.
if ($context['browser']['is_ie7'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/ie7.css" />';
// ..and IE6!
elseif ($context['browser']['is_ie6'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/ie6.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name_html_safe'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="'
$scripturl'?board='$context['current_board'], '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
{
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the main header object.
var mainHeader = new smfToggle("upshrink", '
, empty($options['collapse_header']) ? 'false' 'true'');
mainHeader.useCookie('
$context['user']['is_guest'] ? 0');
mainHeader.setOptions("collapse_header", "'
$context['session_id'], '");
mainHeader.addToggleImage("upshrink", "/upshrink.gif", "/upshrink2.gif");
mainHeader.addTogglePanel("user_section");
mainHeader.addTogglePanel("news_section");
// ]]></script>
<!-- google analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3420549-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

<!-- google analytics -->

'
;

echo '
<script src="http://www.pequenasnotaveis.com.br/script/swfobject_modified.js" type="text/javascript"></script>
</head>
<body>'
;
}

function 
template_body_above()
{
global $context$settings$options$scripturl$txt$modSettings;

echo 
'
<div id="wrapper">

<!-- Top flash -->
<div id="topflash">
<!-- fla -->

<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="262">
  <param name="movie" value="'
$settings['images_url'], '/topo.swf" />
  <param name="quality" value="high" />
  <param name="wmode" value="opaque" />
  <param name="swfversion" value="7.0.70.0" />
  <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don'
t want users to see the prompt. -->
  <
param name="expressinstall" value="http://www.pequenasnotaveiscom.br/script/expressInstall.swf" />
  <!-- 
Next object tag is for non-IE browsersSo hide it from IE using IECC. -->
  <!--[if !
IE]>-->
  <
object type="application/x-shockwave-flash" data="', $settings['images_url'], '/topo.swf" width="100%" height="262">
    <!--<![endif]-->
    <
param name="quality" value="high" />
    <
param name="wmode" value="opaque" />
    <
param name="swfversion" value="7.0.70.0" />
    <
param name="expressinstall" value="http://www.pequenasnotaveis.com.br/script/expressInstall.swf" />
    <!-- 
The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <
div>
      <
h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
      <
p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    </
div>
    <!--[if !
IE]>-->
  </
object>
  <!--<![endif]-->
</
object>
<
script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>

<!-- fla -->
</div>
<!-- Top flash -->

<div id="header">
<!-- <div id="logo">
<a href="'.$scripturl.'" title=""></a>
</div> -->';
if (!empty($settings['
enable_news']))
echo '
<div id="news"><p>', $context['random_news_line'], '</p></div>';
echo '
</div
<div id="toolbar">
<div id="nav">
',template_menu(),'
</div>
</div>
<div id="userinfo">
<b>', $context['common_stats']['total_posts'], '</b', $txt['posts'], ' ', $txt['in'], ' <b>', $context['common_stats']['total_topics'], '</b', $txt['topics'], '', $txt['by'], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b', $txt['members'], '</span> -
', $txt['latest_member'], ': <b', $context['common_stats']['latest_member']['link'], '</b>';
echo '
</div>
<div id="searchfield">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input class="biginput" type="text" name="search" value="', $txt['search'], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt['search'], '...\';" style="width: 170px;" /> ';

// Search within current topic?
if (!empty($context['
current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';

// If we'
re on a certain boardlimit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form><br />
</div>'
;
echo '
<div id="mainarea">
<div id="adsense">
<script type="text/javascript"><!--
google_ad_client = "pub-6717987246331038";
/* 728x90, criado 23/02/08 */
google_ad_slot = "8353186740";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
'
;

// Show the navigation tree.
theme_linktree();

}

function 
template_body_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>
'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footer">
'
theme_copyright(), '
<br />Theme by <a href="http://www.cybercreations.com.br">Cyber</a>'
;

// Show the load time?
if ($context['show_load_time'])
echo '<br />';

echo '
</div>'
;
}

function 
template_html_below()
{
global $context$settings$options$scripturl$txt$modSettings;

echo 
'
</div>
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree($force_show false)
{
global $context$settings$options$shown_linktree;

// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;

//!!! Temporarily don't do it twice.
if (!empty($shown_linktree))
return;
$shown_linktree true;

echo '
<ul id="linktree">'
;

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
echo '
<li'
, ($link_num == count($context['linktree']) - 1) ? ' class="last"' '''>';
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '
<a href="' 
$tree['url'] . '"><span>' $tree['name'] . '</span></a>' '<span>' $tree['name'] .'</span>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;>';

echo '
</li>'
;
}
echo '
</ul>'
;
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

echo '
<ul>'
;
foreach ($context['menu_buttons'] as $act => $button)
echo '<li><a '$button['active_button'] ? ' class="current"' '' ' href="'$button['href'], '"><span>'$button['title'], '</span></a></li>';

// The end of tab section.

       
echo '
</ul>'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$context$txt$scripturl;

// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
{
if (!isset($value['test']) || !empty($context[$value['test']]))
$buttons[] = '<a href="' $value['url'] . '" ' . (isset($value['custom']) ? $value['custom'] : '') . '><span>' $txt[$value['text']] . '</span></a>';
}

if (empty($buttons))
return '';

// Make the last one, as easy as possible.
$buttons[count($buttons) - 1] = str_replace('<span>''<span class="last">'$buttons[count($buttons) - 1]);

echo '
<div class="buttonlist'
$direction != 'top' '_bottom' '''">
<ul class="clearfix">
<li>'
implode('</li><li>'$buttons), '</li>
</ul>
</div>'
;

}

?>
Title: Re: nCode Image Resizer
Post by: Sabre™ on June 09, 2009, 12:00:31 PM
@ baioslaio
Check that the language strings were inserted into your Modifications.english.php.
If youre using UTF8 language file, then copy the strings into your Modifications.english-utf8.php.
The same applies if youre using a language file other than english. eg. Modifications.Klingon.php

Hope that helps :)


@ silverf0x
Try this

<?php
// Version: 2.0 Beta 4; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '2.0 Beta 4';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status separate from topic icons? */
$settings['separate_sticky_lock'] = true;

/* Does this theme use the strict doctype? */
$settings['strict_doctype'] = false;

/* Does this theme use post previews on the message index? */
$settings['message_index_preview'] = false;
}

// The main sub template above the content.
function template_html_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title_html_safe'], '" />
<meta name="keywords" content="'
$context['meta_keywords'], '" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/script.js?b4"></script>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/theme.js?b4"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_default_theme_url = "'
$settings['default_theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";'$context['show_pm_popup'] ? '
if (confirm("' 
$txt['show_personal_messages'] . '"))
window.open("' 
$scripturl '?action=pm");' '''
var ajax_notification_text = "'
$txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "'
$txt['modify_cancel'], '";
// ]]></script>
<title>'
$context['page_title_html_safe'], '</title>';

// Please don't index these Mr Robot.
if (!empty($context['robot_no_index']))
echo '
<meta name="robots" content="noindex" />'
;

// The ?b4 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style'$context['theme_variant'], '.css?b4" />';

echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/print.css?b4" media="print" />';

// IE7 needs some fixes for styles.
if ($context['browser']['is_ie7'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/ie7.css" />';
// ..and IE6!
elseif ($context['browser']['is_ie6'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/ie6.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name_html_safe'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="'
$scripturl'?board='$context['current_board'], '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
{
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}

echo '<!-- nCode Image Resizer -->
<script type="text/javascript" src="'
$settings['default_theme_url'], '/ncode_imageresizer.js"></script>
<style type="text/css">
<!--
table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
{
background-color: #fefee1; /* the bgcolor behind the text and image */
}
table.ncode_imageresizer_warning {
color: #000000; /* the font color */
border: 1px solid #CCCDCD; /* the border around the whole thing */
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 10px;
vertical-align: middle;
text-decoration: none;
}

table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}
-->
</style>'
;

// What is the mode?
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode 'newwindow';
else
$mode 'none';
}
else
$mode 'none';

echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
NcodeImageResizer.BBURL = "'
$settings['images_url'], '";
NcodeImageResizer.MODE = "'
$mode'";
NcodeImageResizer.MAXWIDTH = "'
, empty($modSettings['ncode_imageresizer_max_width']) ? : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "'
, empty($modSettings['ncode_imageresizer_max_height']) ? : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \''
$txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \''
$txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \''
$txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \''
$txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>'
;

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the main header object.
var mainHeader = new smfToggle("upshrink", '
, empty($options['collapse_header']) ? 'false' 'true'');
mainHeader.useCookie('
$context['user']['is_guest'] ? 0');
mainHeader.setOptions("collapse_header", "'
$context['session_id'], '");
mainHeader.addToggleImage("upshrink", "/upshrink.gif", "/upshrink2.gif");
mainHeader.addTogglePanel("user_section");
mainHeader.addTogglePanel("news_section");
// ]]></script>
<!-- google analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3420549-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

<!-- google analytics -->

'
;

echo '
<script src="http://www.pequenasnotaveis.com.br/script/swfobject_modified.js" type="text/javascript"></script>
</head>
<body>'
;
}

function 
template_body_above()
{
global $context$settings$options$scripturl$txt$modSettings;

echo 
'
<div id="wrapper">

<!-- Top flash -->
<div id="topflash">
<!-- fla -->

<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="262">
  <param name="movie" value="'
$settings['images_url'], '/topo.swf" />
  <param name="quality" value="high" />
  <param name="wmode" value="opaque" />
  <param name="swfversion" value="7.0.70.0" />
  <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don'
t want users to see the prompt. -->
  <
param name="expressinstall" value="http://www.pequenasnotaveiscom.br/script/expressInstall.swf" />
  <!-- 
Next object tag is for non-IE browsersSo hide it from IE using IECC. -->
  <!--[if !
IE]>-->
  <
object type="application/x-shockwave-flash" data="', $settings['images_url'], '/topo.swf" width="100%" height="262">
    <!--<![endif]-->
    <
param name="quality" value="high" />
    <
param name="wmode" value="opaque" />
    <
param name="swfversion" value="7.0.70.0" />
    <
param name="expressinstall" value="http://www.pequenasnotaveis.com.br/script/expressInstall.swf" />
    <!-- 
The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <
div>
      <
h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
      <
p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    </
div>
    <!--[if !
IE]>-->
  </
object>
  <!--<![endif]-->
</
object>
<
script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>

<!-- fla -->
</div>
<!-- Top flash -->

<div id="header">
<!-- <div id="logo">
<a href="'.$scripturl.'" title=""></a>
</div> -->';
if (!empty($settings['
enable_news']))
echo '
<div id="news"><p>', $context['random_news_line'], '</p></div>';
echo '
</div
<div id="toolbar">
<div id="nav">
',template_menu(),'
</div>
</div>
<div id="userinfo">
<b>', $context['common_stats']['total_posts'], '</b', $txt['posts'], ' ', $txt['in'], ' <b>', $context['common_stats']['total_topics'], '</b', $txt['topics'], '', $txt['by'], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b', $txt['members'], '</span> -
', $txt['latest_member'], ': <b', $context['common_stats']['latest_member']['link'], '</b>';
echo '
</div>
<div id="searchfield">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input class="biginput" type="text" name="search" value="', $txt['search'], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt['search'], '...\';" style="width: 170px;" /> ';

// Search within current topic?
if (!empty($context['
current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';

// If we'
re on a certain boardlimit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form><br />
</div>'
;
echo '
<div id="mainarea">
<div id="adsense">
<script type="text/javascript"><!--
google_ad_client = "pub-6717987246331038";
/* 728x90, criado 23/02/08 */
google_ad_slot = "8353186740";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
'
;

// Show the navigation tree.
theme_linktree();

}

function 
template_body_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>
'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footer">
'
theme_copyright(), '
<br />Theme by <a href="http://www.cybercreations.com.br">Cyber</a>'
;

// Show the load time?
if ($context['show_load_time'])
echo '<br />';

echo '
</div>'
;
}

function 
template_html_below()
{
global $context$settings$options$scripturl$txt$modSettings;

echo 
'
</div>
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree($force_show false)
{
global $context$settings$options$shown_linktree;

// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;

//!!! Temporarily don't do it twice.
if (!empty($shown_linktree))
return;
$shown_linktree true;

echo '
<ul id="linktree">'
;

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
echo '
<li'
, ($link_num == count($context['linktree']) - 1) ? ' class="last"' '''>';
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '
<a href="' 
$tree['url'] . '"><span>' $tree['name'] . '</span></a>' '<span>' $tree['name'] .'</span>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;>';

echo '
</li>'
;
}
echo '
</ul>'
;
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

echo '
<ul>'
;
foreach ($context['menu_buttons'] as $act => $button)
echo '<li><a '$button['active_button'] ? ' class="current"' '' ' href="'$button['href'], '"><span>'$button['title'], '</span></a></li>';

// The end of tab section.

       
echo '
</ul>'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$context$txt$scripturl;

// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
{
if (!isset($value['test']) || !empty($context[$value['test']]))
$buttons[] = '<a href="' $value['url'] . '" ' . (isset($value['custom']) ? $value['custom'] : '') . '><span>' $txt[$value['text']] . '</span></a>';
}

if (empty($buttons))
return '';

// Make the last one, as easy as possible.
$buttons[count($buttons) - 1] = str_replace('<span>''<span class="last">'$buttons[count($buttons) - 1]);

echo '
<div class="buttonlist'
$direction != 'top' '_bottom' '''">
<ul class="clearfix">
<li>'
implode('</li><li>'$buttons), '</li>
</ul>
</div>'
;

}

?>


P.S
Are you aware that for every custom theme which contains its own index.template.php file, you will need to make the edits for them?
Title: Re: nCode Image Resizer
Post by: silverf0x on June 09, 2009, 12:10:58 PM
@ Sabre™

thanks a lot, it's working now!  :D

what u've edited?
Title: Re: nCode Image Resizer
Post by: Sabre™ on June 09, 2009, 12:17:56 PM
My pleasure buddy :)

When you download a mod, on that download page beneath the mod([THIS] (http://custom.simplemachines.org/mods/index.php?mod=1197) mod for example), you will see this text
'Manual Install Instructions for SMF'
You select your version of SMF, then press the 'Parse' button.
The next page will show you what code to add, where to add it, and what templates to add them to.

Happy learning mate :)
Title: Re: nCode Image Resizer
Post by: baioslaio on June 10, 2009, 05:05:01 AM
Quote from: Sabre™ on June 09, 2009, 12:00:31 PM
@ baioslaio
Check that the language strings were inserted into your Modifications.english.php.
If youre using UTF8 language file, then copy the strings into your Modifications.english-utf8.php.
The same applies if youre using a language file other than english. eg. Modifications.Klingon.php

Hope that helps :)


@ silverf0x
Try this

<?php
// Version: 2.0 Beta 4; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '2.0 Beta 4';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status separate from topic icons? */
$settings['separate_sticky_lock'] = true;

/* Does this theme use the strict doctype? */
$settings['strict_doctype'] = false;

/* Does this theme use post previews on the message index? */
$settings['message_index_preview'] = false;
}

// The main sub template above the content.
function template_html_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title_html_safe'], '" />
<meta name="keywords" content="'
$context['meta_keywords'], '" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/script.js?b4"></script>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/theme.js?b4"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_default_theme_url = "'
$settings['default_theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";'$context['show_pm_popup'] ? '
if (confirm("' 
$txt['show_personal_messages'] . '"))
window.open("' 
$scripturl '?action=pm");' '''
var ajax_notification_text = "'
$txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "'
$txt['modify_cancel'], '";
// ]]></script>
<title>'
$context['page_title_html_safe'], '</title>';

// Please don't index these Mr Robot.
if (!empty($context['robot_no_index']))
echo '
<meta name="robots" content="noindex" />'
;

// The ?b4 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style'$context['theme_variant'], '.css?b4" />';

echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/print.css?b4" media="print" />';

// IE7 needs some fixes for styles.
if ($context['browser']['is_ie7'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/ie7.css" />';
// ..and IE6!
elseif ($context['browser']['is_ie6'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/ie6.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name_html_safe'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="'
$scripturl'?board='$context['current_board'], '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
{
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}

echo '<!-- nCode Image Resizer -->
<script type="text/javascript" src="'
$settings['default_theme_url'], '/ncode_imageresizer.js"></script>
<style type="text/css">
<!--
table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
{
background-color: #fefee1; /* the bgcolor behind the text and image */
}
table.ncode_imageresizer_warning {
color: #000000; /* the font color */
border: 1px solid #CCCDCD; /* the border around the whole thing */
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 10px;
vertical-align: middle;
text-decoration: none;
}

table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}
-->
</style>'
;

// What is the mode?
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode 'newwindow';
else
$mode 'none';
}
else
$mode 'none';

echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
NcodeImageResizer.BBURL = "'
$settings['images_url'], '";
NcodeImageResizer.MODE = "'
$mode'";
NcodeImageResizer.MAXWIDTH = "'
, empty($modSettings['ncode_imageresizer_max_width']) ? : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "'
, empty($modSettings['ncode_imageresizer_max_height']) ? : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \''
$txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \''
$txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \''
$txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \''
$txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>'
;

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the main header object.
var mainHeader = new smfToggle("upshrink", '
, empty($options['collapse_header']) ? 'false' 'true'');
mainHeader.useCookie('
$context['user']['is_guest'] ? 0');
mainHeader.setOptions("collapse_header", "'
$context['session_id'], '");
mainHeader.addToggleImage("upshrink", "/upshrink.gif", "/upshrink2.gif");
mainHeader.addTogglePanel("user_section");
mainHeader.addTogglePanel("news_section");
// ]]></script>
<!-- google analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3420549-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

<!-- google analytics -->

'
;

echo '
<script src="http://www.pequenasnotaveis.com.br/script/swfobject_modified.js" type="text/javascript"></script>
</head>
<body>'
;
}

function 
template_body_above()
{
global $context$settings$options$scripturl$txt$modSettings;

echo 
'
<div id="wrapper">

<!-- Top flash -->
<div id="topflash">
<!-- fla -->

<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="262">
  <param name="movie" value="'
$settings['images_url'], '/topo.swf" />
  <param name="quality" value="high" />
  <param name="wmode" value="opaque" />
  <param name="swfversion" value="7.0.70.0" />
  <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don'
t want users to see the prompt. -->
  <
param name="expressinstall" value="http://www.pequenasnotaveiscom.br/script/expressInstall.swf" />
  <!-- 
Next object tag is for non-IE browsersSo hide it from IE using IECC. -->
  <!--[if !
IE]>-->
  <
object type="application/x-shockwave-flash" data="', $settings['images_url'], '/topo.swf" width="100%" height="262">
    <!--<![endif]-->
    <
param name="quality" value="high" />
    <
param name="wmode" value="opaque" />
    <
param name="swfversion" value="7.0.70.0" />
    <
param name="expressinstall" value="http://www.pequenasnotaveis.com.br/script/expressInstall.swf" />
    <!-- 
The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <
div>
      <
h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
      <
p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    </
div>
    <!--[if !
IE]>-->
  </
object>
  <!--<![endif]-->
</
object>
<
script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>

<!-- fla -->
</div>
<!-- Top flash -->

<div id="header">
<!-- <div id="logo">
<a href="'.$scripturl.'" title=""></a>
</div> -->';
if (!empty($settings['
enable_news']))
echo '
<div id="news"><p>', $context['random_news_line'], '</p></div>';
echo '
</div
<div id="toolbar">
<div id="nav">
',template_menu(),'
</div>
</div>
<div id="userinfo">
<b>', $context['common_stats']['total_posts'], '</b', $txt['posts'], ' ', $txt['in'], ' <b>', $context['common_stats']['total_topics'], '</b', $txt['topics'], '', $txt['by'], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b', $txt['members'], '</span> -
', $txt['latest_member'], ': <b', $context['common_stats']['latest_member']['link'], '</b>';
echo '
</div>
<div id="searchfield">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input class="biginput" type="text" name="search" value="', $txt['search'], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt['search'], '...\';" style="width: 170px;" /> ';

// Search within current topic?
if (!empty($context['
current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';

// If we'
re on a certain boardlimit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form><br />
</div>'
;
echo '
<div id="mainarea">
<div id="adsense">
<script type="text/javascript"><!--
google_ad_client = "pub-6717987246331038";
/* 728x90, criado 23/02/08 */
google_ad_slot = "8353186740";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
'
;

// Show the navigation tree.
theme_linktree();

}

function 
template_body_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>
'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footer">
'
theme_copyright(), '
<br />Theme by <a href="http://www.cybercreations.com.br">Cyber</a>'
;

// Show the load time?
if ($context['show_load_time'])
echo '<br />';

echo '
</div>'
;
}

function 
template_html_below()
{
global $context$settings$options$scripturl$txt$modSettings;

echo 
'
</div>
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree($force_show false)
{
global $context$settings$options$shown_linktree;

// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;

//!!! Temporarily don't do it twice.
if (!empty($shown_linktree))
return;
$shown_linktree true;

echo '
<ul id="linktree">'
;

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
echo '
<li'
, ($link_num == count($context['linktree']) - 1) ? ' class="last"' '''>';
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '
<a href="' 
$tree['url'] . '"><span>' $tree['name'] . '</span></a>' '<span>' $tree['name'] .'</span>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;>';

echo '
</li>'
;
}
echo '
</ul>'
;
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

echo '
<ul>'
;
foreach ($context['menu_buttons'] as $act => $button)
echo '<li><a '$button['active_button'] ? ' class="current"' '' ' href="'$button['href'], '"><span>'$button['title'], '</span></a></li>';

// The end of tab section.

       
echo '
</ul>'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$context$txt$scripturl;

// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
{
if (!isset($value['test']) || !empty($context[$value['test']]))
$buttons[] = '<a href="' $value['url'] . '" ' . (isset($value['custom']) ? $value['custom'] : '') . '><span>' $txt[$value['text']] . '</span></a>';
}

if (empty($buttons))
return '';

// Make the last one, as easy as possible.
$buttons[count($buttons) - 1] = str_replace('<span>''<span class="last">'$buttons[count($buttons) - 1]);

echo '
<div class="buttonlist'
$direction != 'top' '_bottom' '''">
<ul class="clearfix">
<li>'
implode('</li><li>'$buttons), '</li>
</ul>
</div>'
;

}

?>


P.S
Are you aware that for every custom theme which contains its own index.template.php file, you will need to make the edits for them?


Thanks :)
Changing in the utf8 fix'd it!
Title: Re: nCode Image Resizer
Post by: .Vapor on June 11, 2009, 04:13:08 PM
Wonderful mod...thank you very much !
Title: Re: nCode Image Resizer
Post by: Lighting_site on June 15, 2009, 02:41:08 AM
Quote from: lonrot 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.

Dont work for my :S
Title: Re: nCode Image Resizer
Post by: Sabre™ on June 15, 2009, 05:00:49 AM
Since you haven't explained what the exact problem is, [This Link] (http://docs.simplemachines.org/index.php?topic=494) will help others to help you.

Thank You :)
Title: Re: nCode Image Resizer
Post by: Bruno36 on June 16, 2009, 10:07:12 AM
Hello!

When I replace the 2 lines:

$txt['ncode_imageresizer_warning_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s and weighs %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s.';


with:

$txt['ncode_imageresizer_warning_filesize'] = 'Cette image a été redimensionnée. Cliquez sur cette barre pour afficher l\'image complète. L\'image originale est de taille %1$sx%2$s et pèse %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Cette image a été redimensionnée. Cliquez sur cette barre pour afficher l\'image complète. L\'image originale est de taille %1$sx%2$s.';


The images are not resized
Title: Re: nCode Image Resizer
Post by: Nibogo on June 16, 2009, 03:01:40 PM
You can't use characters like "é" you must put just e
Title: Re: nCode Image Resizer
Post by: Bruno36 on June 17, 2009, 02:28:42 AM
This does not work :(

Quote$txt['ncode_imageresizer_warning_filesize'] = 'Cette image a ete redimensionnee. Cliquez sur cette barre pour afficher l\'image complete. L\'image originale est de taille %1$sx%2$s et pese %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Cette image a ete redimensionnee. Cliquez sur cette barre pour afficher l\'image complete. L\'image originale est de taille %1$sx%2$s.';

Login: invite
Passe: 123456
http://www.scooter-chinois-4t.com/documentations/(tutoriel)-le-secret-de-la-transmission-kymco/
Title: Re: nCode Image Resizer
Post by: Nibogo on June 17, 2009, 03:01:36 PM
Try without the "L\'image originale est de taille %1$sx%2$s et pese %3$sKB" and "\'i"
Title: Re: nCode Image Resizer
Post by: Bruno36 on June 17, 2009, 03:25:40 PM
If I remove the "\ 'i" not a bug, why?
The mod is not compatible UTF8?
Title: Re: nCode Image Resizer
Post by: malcomxar on June 22, 2009, 01:06:44 AM
Hi, great mod, really useful, but just one single detail,  is it possible to make it not resize the images from signatures?

Regards!

Title: Re: nCode Image Resizer
Post by: gbsothere on July 05, 2009, 07:33:48 AM
This is a fantastic mod and is saving me from having to follow along behind posters who seem to ignore the image constraints on our forum and constantly fill the threads with ugly scrollbars created by images that are too large.  :)

I do have, though, an odd request and, considering the nature of it, if you want to tell me to go fly a kite, NIBOGO, I quite understand. You see, I'm also using another mod on my site found HERE (http://custom.simplemachines.org/mods/index.php?mod=1477) called Bakers Dozen Pages.  (The support thread suggests that the author is no longer supporting it.)  This mod gives you a "blank page" that you can design the way you wish and doesn't have the same size limits that the forum's posting pages have.  You may use the entire page for one image, if you wish.  We were, in fact.  We had a full-sized map that was visible with you clicked the button that mod created on the front page.  The map has been resized, now.

Is there any sort of "exception" that could be added to Image Resizer's code that would stop it from resizing images added to Bakers Dozen Pages?

If not, then no worries; it's such a much-needed mod that I can live with this issue.

Thanks!
Title: Re: nCode Image Resizer
Post by: miregrobar on July 09, 2009, 05:48:18 AM
i dont see top bar with text even on my default theme. :(
Title: Re: nCode Image Resizer
Post by: Nibogo on July 09, 2009, 10:51:31 AM
Quote from: miregrobar on July 09, 2009, 05:48:18 AM
i dont see top bar with text even on my default theme. :(

You must set the settings in the admin panel, add the strings to your language and verify if your site is loading the ncode_imagersizer.js file
Title: Re: nCode Image Resizer
Post by: betty02 on July 14, 2009, 06:01:48 AM
Ok ive uploaded the .zip now what do i do? Ive read the ReadMe but it tells me nothing?
Title: Re: nCode Image Resizer
Post by: olow1983 on July 14, 2009, 07:35:35 AM
grate mod ...... thank you  :)
Title: Re: nCode Image Resizer
Post by: Costa on July 16, 2009, 09:45:42 AM
Translation to brazilian

Modifications.portuguese_brazilian.php

// --- Begin added code - Advanced Visual Verification --- translated by Costa at simplemachines.org
$txt['ncode_imageresizer_warning_small'] = 'Clique nesta barra para visualizar a imagem no tamanho original.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s e %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Clique nesta barra para visualizar a imagem pequena.';
$txt['ncode_imageresizer_mode'] = 'Modo de redimensionamento';
$txt['ncode_imageresizer_original'] = 'Mantenha o tamanho original';
$txt['ncode_imageresizer_enlarge_same'] = 'Aumente 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 haver altura máxima.</span>';
// --- End added code ---


Modifications.portuguese_brazilian-utf-8.php

// --- Begin added code - Advanced Visual Verification --- translated by Costa at simplemachines.org
$txt['ncode_imageresizer_warning_small'] = 'Clique nesta barra para visualizar a imagem no tamanho original.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s e %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Clique nesta barra para visualizar a imagem pequena.';
$txt['ncode_imageresizer_mode'] = 'Modo de redimensionamento';
$txt['ncode_imageresizer_original'] = 'Mantenha o tamanho original';
$txt['ncode_imageresizer_enlarge_same'] = 'Aumente 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&aacute;xima';
$txt['ncode_imageresizer_max_height'] = 'Altura m&aacute;xima<br /><span class="smalltext">Deixe em branco para n&atilde;o haver altura m&aacute;xima.</span>';
// --- End added code ---


To Portuguese
Modification.portuguese_pt.php

[/]
// --- Begin added code - Advanced Visual Verification --- translated by Costa at simplemachines.org
$txt['ncode_imageresizer_warning_small'] = 'Clique nesta barra para visualizar a imagem no tamanho original.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s e %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Clique nesta barra para visualizar a imagem pequena.';
$txt['ncode_imageresizer_mode'] = 'Modo de redimensionamento';
$txt['ncode_imageresizer_original'] = 'Mantenha o tamanho original';
$txt['ncode_imageresizer_enlarge_same'] = 'Aumente 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 haver altura máxima.</span>';
// --- End added code ---
[]
Modifications.portuguese_pt-utf8.php

[/]
// --- Begin added code - Advanced Visual Verification --- translated by Costa at simplemachines.org
  $txt['ncode_imageresizer_warning_small'] = 'Clique nesta barra para visualizar a imagem no tamanho original.';
  $txt['ncode_imageresizer_warning_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s e %3$sKB.';
  $txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s.';
  $txt['ncode_imageresizer_warning_fullsize'] = 'Clique nesta barra para visualizar a imagem pequena.';
  $txt['ncode_imageresizer_mode'] = 'Modo de redimensionamento';
  $txt['ncode_imageresizer_original'] = 'Mantenha o tamanho original';
  $txt['ncode_imageresizer_enlarge_same'] = 'Aumente 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&aacute;xima';
  $txt['ncode_imageresizer_max_height'] = 'Altura m&aacute;xima<br /><span class="smalltext">Deixe em branco para n&atilde;o haver altura m&aacute;xima.</span>';
  // --- End added code ---
[]

Farewell[/]
Title: Re: nCode Image Resizer
Post by: Nibogo on July 16, 2009, 03:30:12 PM
Thanks costa :)
Title: Re: nCode Image Resizer
Post by: Costa on July 16, 2009, 04:10:16 PM
be my guest NIBOGO ;)
Title: Re: nCode Image Resizer
Post by: LHW on July 16, 2009, 05:12:37 PM
Great Mod!  Thanks!
Title: Re: nCode Image Resizer
Post by: xye on July 20, 2009, 09:33:21 PM
I can see the drop down menu and all the size boxes. And i left the boxes in "Basic Options" 0 and the ones in "Layout and options" 200 and i selected an option from the dropdown menu.

However, I tried posting an image, but it doe not get resized. How can i fix it? Thanks a bunch

-Xye
Title: Re: nCode Image Resizer
Post by: Rohan_ on July 28, 2009, 05:12:03 AM
hi . i have 1.1.10 and i installed this MOD but its not resizing the images .. i have changed the settings in layout and options .. and in features and options the settings are set on 0 , 0 ... everything is set ok .. but its not working for me .. please please helpp
Title: Re: nCode Image Resizer
Post by: Rohan_ on July 29, 2009, 04:19:27 AM
Guys my problem is solved ..


New members of this mod .. read this post carefully ...

if u are using a custom theme not Default and u installed this mod and its not resizing your pics then do the index.template.php file's changes from Default theme to ur custom theme .. then it will work :) and delete the codes that this mod added to your default theme's index.template file
Title: Re: nCode Image Resizer
Post by: Shark-Time on July 31, 2009, 10:51:23 AM
Wow working great for me now... Thanks mates.... Really nice mod..Heads off...
Title: Re: nCode Image Resizer
Post by: Rohan_ on August 07, 2009, 07:32:34 AM
hey i am having a really big problem after using this mod .. please see this topic and please solve it
http://www.simplemachines.org/community/index.php?topic=329423
Title: Re: nCode Image Resizer
Post by: Rohan_ on August 21, 2009, 08:04:35 AM
hey the problem is solved .. the problem is not in ur mod .. its our mistake ..
Title: Re: nCode Image Resizer
Post by: ShadyGame on August 26, 2009, 07:59:19 AM
Quote from: NIBOGO on July 09, 2009, 10:51:31 AM
Quote from: miregrobar on July 09, 2009, 05:48:18 AM
i dont see top bar with text even on my default theme. :(

You must set the settings in the admin panel, add the strings to your language and verify if your site is loading the ncode_imagersizer.js file
how do i know if its loading that file?

i instaled all files without errors but the pictures dont get resized :S

i already configured to keep original size

Maximum width 500
Title: Re: nCode Image Resizer
Post by: Rohan_ on August 26, 2009, 11:06:24 AM
do not configure that for keep original size .. select resize in same window
Title: Re: nCode Image Resizer
Post by: Cheese Head on September 06, 2009, 11:42:57 PM
OK, installed the mod in my SMF 2.0 RC1, no problems.

Set Admin > Features & Options > General > Max Width & Max Height from "640x480" to "0x0".

Set Admin > Features & Options > Layout > Resize Mode to "Enlarge in Same Doc" & Max Width & Max Height to "200x200".

Old linked Images are resizing correctly with clickable bar at top of pictures, many thanks, now controls the size of images that members link to!

What doesn't seem to be working is that attached images, even new ones are displayed at old 640x480 and no click here bar at top. When I click on the image, it does open full size in my forum and when I click again it closes, but no menubar to click and the image is clickable.

Any advice appreciated, thanks John.
Title: Re: nCode Image Resizer
Post by: TheListener on September 06, 2009, 11:44:11 PM
Are there any errors in your error log?
Title: Re: nCode Image Resizer
Post by: Cheese Head on September 06, 2009, 11:53:46 PM
Good question, never looked before.

Went to Admin > Log which opened a new browser window called "Error Log" eek ! ! ! It says:

Apply filter of type:  All errors (182787) | General (62) | Undefined (182632) | User (93)

See attached screen shot, looks like I have bigger problems which I should post in a different thread, correct?
Title: Re: nCode Image Resizer
Post by: TheListener on September 06, 2009, 11:56:38 PM
Before you do remind me the smf version you use.

Please make a note of what is said in my sig regarding the error log.
Title: Re: nCode Image Resizer
Post by: Sabre™ on September 06, 2009, 11:58:30 PM
@ Cheese Head
those errors are to do with the chat mod you have installed.
I would also suggest removing your image/attachment, as it has details that (if in the wrong hands) could be used against you.
Title: Re: nCode Image Resizer
Post by: Cheese Head on September 07, 2009, 12:00:22 AM
@TheListener: SMF 2.0 RC1

@Sabre™: Done, removed, thanks!
Title: Re: nCode Image Resizer
Post by: TheListener on September 07, 2009, 12:03:00 AM
Quote from: Cheese Head on September 07, 2009, 12:00:22 AM
@TheListener: SMF 2.0 RC1

@Sabre™: Done, removed, thanks!


This mod will help you say bye to some errors.
Title: Re: nCode Image Resizer
Post by: Cheese Head on September 07, 2009, 12:05:27 AM
QuoteThis mod will help you say bye to some errors.
??

OK, hope so, I'll post problems with my Error Log in a separate thread tomorrow, thanks, John.

Title: Re: nCode Image Resizer
Post by: TheListener on September 07, 2009, 12:07:09 AM
Pm me if you want help to eradicate the errors and I will do the best i can.
Title: Re: nCode Image Resizer
Post by: Sabre™ on September 07, 2009, 12:12:03 AM
Post those errors in the chat mods support thread John.
They will be better handled there as the mods author and users which utilise that mod will see them.
Than in a new separate thread I mean ;)
regards
Title: Re: nCode Image Resizer
Post by: Cheese Head on September 07, 2009, 12:49:30 AM
@TheListener: Thanks very much for offer, but it's almost midnight here and I need to go to bed.

@Sabre™: I think that is better plan, will do tomorrow.

Many thanks both, goodnight!
Title: Re: nCode Image Resizer
Post by: TheListener on September 07, 2009, 12:52:30 AM
Almost 6am here
Title: Re: nCode Image Resizer
Post by: amlucent on September 08, 2009, 10:26:58 PM
I have noticed images posted from within our SMF Media Gallery do not get resized, example http://gwgoodolddays.net/forums/index.php?topic=1570.0 .  SMG is a very popular mod so I am wondering if there is a known work around?
Title: Re: nCode Image Resizer
Post by: Rohan_ on September 09, 2009, 01:57:33 AM
i checked the topic u provided .. i see the image is resizing .. everything seems fine
Title: Re: nCode Image Resizer
Post by: ElectricSquid on September 10, 2009, 08:12:58 AM
Quote from: timned88 on February 22, 2009, 03:53:12 PM
no worries...  i found a way via hard code and back-end to make it work for attachments.  not as elegant but it works.
could there be a future version that works for attachments as well?

I'm looking for the same thing.
Is there a way to make this mod work for attachments too?
This would make image resizing more standardized around the forum.
Title: Re: nCode Image Resizer
Post by: Nibogo on September 10, 2009, 03:04:57 PM
SMF Already resize the big attachments
Title: Re: nCode Image Resizer
Post by: ElectricSquid on September 10, 2009, 05:28:17 PM
Quote from: NIBOGO on September 10, 2009, 03:04:57 PM
SMF Already resize the big attachments

Yes, with the GD module. I understand that.
But that makes it where there are two different ways images are resized.

I would like to have the forum more standardized when it comes to image resizing.
...and nCode Image Resizer is my top choice for this job.
Title: Re: nCode Image Resizer
Post by: amlucent on September 10, 2009, 07:39:32 PM
Quote from: Rohan_ on September 09, 2009, 01:57:33 AM
i checked the topic u provided .. i see the image is resizing .. everything seems fine

I edited the post and it seems that the user used the html code from the gallery instead of IMG tags.. so I fixed it.  There is no way that it could auto resize html images could it?
Title: Re: nCode Image Resizer
Post by: andrewjs18 on September 10, 2009, 11:17:56 PM
This isn't working for me.

I'm running 2.0 RC 1.2

I set my max width & height in:

admin>features and options>general (800X600)

&

admin>features and options>layout (enlarge in same document 800X600)

please advise
Title: Re: nCode Image Resizer
Post by: Rohan_ on September 11, 2009, 02:33:01 AM
Quote from: andrewjs18 on September 10, 2009, 11:17:56 PM
This isn't working for me.

I'm running 2.0 RC 1.2

I set my max width & height in:

admin>features and options>general (800X600)

&

admin>features and options>layout (enlarge in same document 800X600)

please advise
are you using a custom theme ? if yes them made the changes of index.template file to your theme's file manually :)
Title: Re: nCode Image Resizer
Post by: ElectricSquid on September 13, 2009, 10:30:30 PM
I've been going thorough my site validating the XHTML and eliminating errors.
Thats when i found an error that nCode Image Resizer is creating.
The short version is that the attribute "onload" is invalid for XHTML 1.0 Transitional.

Here's what the W3.org validator (http://validator.w3.org) says about this error...
Doctype:   XHTML 1.0 Transitional

Quote

Validation Output: 1 Error

there is no attribute X
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Line 683, column 173: Attribute "onload" exists, but can not be used for this element.
...etal2.png" alt="" border="0" onload="NcodeImageResizer.createOn(this);" /></a>


The above quoted error is from a div tag located in a users sig, below is the full tag. But this same error happens on every pic that nCode resizes on the page. For some reason "onload" is not a correct attribute to use with XHTML 1.0 Transitional, which SMF uses.

    <div class="signature"><a href="http://redneckfabrication.com" target="_blank"><img src="http://redneckfabrication.com/images/RFmetal2.png" alt="" border="0" onload="NcodeImageResizer.createOn(this);" /></a></div>

So what do I use instead of onload?
How do we get around this and get correct with XHTML 1.0 Transitional?
Title: Re: nCode Image Resizer
Post by: [PT]Snake on October 14, 2009, 11:01:44 AM
not working on my custom theme

a) for some reason my smf is resizing images already, even tho i have no image limits, is this normal?

b) after instaling (and modifying my index.template), there is no bar over the user images. I even tested creating a new post, still nothing.

any feedback?
Title: Re: nCode Image Resizer
Post by: Sabre™ on October 14, 2009, 12:50:42 PM
Copy the .js file to your custom theme.
See if that helps.
Title: Re: nCode Image Resizer
Post by: mentar on October 25, 2009, 03:36:01 PM
Quote from: MissyNL on May 19, 2009, 03:27:38 PM
Hi.. love this mod!! here is the dutch translation:

// --- Begin added code - Advanced Visual Verification ---
$txt['ncode_imageresizer_warning_small'] = 'Klik deze titelbar om de volledige afbeeld te bekijken.';
$txt['ncode_imageresizer_warning_filesize'] = 'Deze afbeelding is verkleint. Klik de titelbar om de volledige afbeelding te zien. De originele afbeelding heeft een formaat van %1$sx%2$s and groote %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Deze afbeelding is verkleint. Klik de titelbar om de volledige afbeelding te zien. De originele afbeelding heeft een formaat van %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Klik deze titelbar om de kleine afbeelding te bekijken.';
$txt['ncode_imageresizer_mode'] = 'Resize Mode';
$txt['ncode_imageresizer_original'] = 'Behoud orignele grootte';
$txt['ncode_imageresizer_enlarge_same'] = 'Vergroot in het zelfde document';
$txt['ncode_imageresizer_open_same'] = 'Open in de zelfde venster';
$txt['ncode_imageresizer_open_new'] = 'Open in een nieuwe window';
$txt['ncode_imageresizer_max_width'] = 'Maximum breedte';
$txt['ncode_imageresizer_max_height'] = 'Maximum hoogte<br /><span class="smalltext">Laat leeg voor geen maximum hoogte.</span>';
// --- End added code ---

Heya, I don't want to be rude or anything, but the spelling is not really great...below the correct translation:


// --- Begin added code - Advanced Visual Verification ---
$txt['ncode_imageresizer_warning_small'] = 'Klik hier om het volledige formaat te zien.';
$txt['ncode_imageresizer_warning_filesize'] = 'Deze afbeelding is verkleind. Klik hier om het volledige formaat te zien. Het formaat van het origineel is %1$sx%2$s en is %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Deze afbeelding is verkleind. Klik hier om het volledige formaat te zien. Het formaat van het origineel is %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Klik hier om de kleinere afbeelding te zien.';
$txt['ncode_imageresizer_mode'] = 'Schalingsmodus';
$txt['ncode_imageresizer_original'] = 'Behoud originele grootte';
$txt['ncode_imageresizer_enlarge_same'] = 'Vergroot in hetzelfde venster';
$txt['ncode_imageresizer_open_same'] = 'Open in hetzelfde venster';
$txt['ncode_imageresizer_open_new'] = 'Open in nieuw venster';
$txt['ncode_imageresizer_max_width'] = 'Maximum breedte';
$txt['ncode_imageresizer_max_height'] = 'Maximum hoogte<br /><span class="smalltext">Laat leeg voor geen maximum.</span>';
// --- End added code ---


Title: Re: nCode Image Resizer
Post by: [PT]Snake on October 29, 2009, 07:49:47 PM
Quote from: Sabre™ on October 14, 2009, 12:50:42 PM
Copy the .js file to your custom theme.
See if that helps.
still nothing. images are getting resized and all, but no link to open in new window.
Title: Re: nCode Image Resizer
Post by: mprayii on November 04, 2009, 08:53:39 AM
I was getting a lot of errors when installing this mod, finally after several uninstall / re-installs I think what fixed it was modding the template file of my theme PRIOR to installing the package - I have no idea why this worked, but it did. No errors in the logs.

However it seems that my default langauge folder/file doesnt get picked up in this mod - I must have to edit one of the files to point it correctly, I guess if I was told which file points to this and where in the file it does so I would be able to fix it.

Here is an example:

http://newenglandjeepz.org/forum/technical-discussion/extreme-hardkore-appliance-tech/msg74062/#new

Look at the picture and notice the "information" bar at the top of the pic, this is what I need to fix.

Thanks!
Title: Re: nCode Image Resizer
Post by: gbsothere on November 04, 2009, 08:59:30 AM
Have you tried placing an exact copy of Modifications.english.php (including this mod's edits) in your Theme's language folder (as well as in default's language folder)?
Title: Re: nCode Image Resizer
Post by: mprayii on November 04, 2009, 09:31:38 AM
That would make sense, since I did created the language file in my theme and only added the nCode mode to it and it worked for the images, but messed everything else up (so I backtracked and deleted it).

the only thing about doing it that way is if I am no longer the admin for this board, It kind of leaves a gray area for anyone taking my place. Would rather just change the pointing link within the mod. If it can be done.
Title: Re: nCode Image Resizer
Post by: Astro1 on November 08, 2009, 11:24:25 PM
Any idea on 2.0 RC2 compatibility? When?
Title: Re: nCode Image Resizer
Post by: صلاح الدين on November 12, 2009, 08:06:46 AM
we waiting this mod to work with rc2...it not working with IE 5 or 6 ...  :'( [/]
Title: Re: nCode Image Resizer
Post by: Pentaxian on November 12, 2009, 11:08:20 AM
Hi NIBOGO,

Could you please let us know if this mod will be available in 2.0 RC2 in the near future? As I administrate an photography forum this is a very important mod for me. I really love it and I am waiting to go to RC2 as soon as this mod is available.

So, your work is really appreciated.

Kindest,
Pentaxian
Title: Re: nCode Image Resizer
Post by: drhamza on November 12, 2009, 12:56:16 PM
Quote from: Pentaxian on November 12, 2009, 11:08:20 AM
Hi NIBOGO,

Could you please let us know if this mod will be available in 2.0 RC2 in the near future? As I administrate an photography forum this is a very important mod for me. I really love it and I am waiting to go to RC2 as soon as this mod is available.

So, your work is really appreciated.

Kindest,
Pentaxian
Title: Re: nCode Image Resizer
Post by: Nibogo on November 12, 2009, 02:44:00 PM
When I have time to do it, actually I am finishing my school
Title: Re: nCode Image Resizer
Post by: Pentaxian on November 12, 2009, 04:58:41 PM
Well, first things first! All the best with finishing your school!
Title: Re: nCode Image Resizer
Post by: drhamza on November 12, 2009, 10:17:07 PM
oh, good luck NIBOGO
Title: Re: nCode Image Resizer
Post by: meko me on November 29, 2009, 12:58:54 AM
waiting....
Title: Re: nCode Image Resizer
Post by: LG965 on December 02, 2009, 06:54:37 AM
please update your mod for smf version 1.1.11

thanks guy!
Title: Re: nCode Image Resizer
Post by: Dark Proxy on December 03, 2009, 08:55:50 PM
Can you please update your SMF MOD to SMF Version 1.1.11

Thank you very much.
Title: Re: nCode Image Resizer
Post by: gbsothere on December 04, 2009, 08:01:37 AM
Quote from: Dark Proxy on December 03, 2009, 08:55:50 PM
Can you please update your SMF MOD to SMF Version 1.1.11

Thank you very much.



It works fine for me in 1.1.11, after finding, in Subs.php

            'content' => '<img src="$1" alt="" border="0" onload="NcodeImageResizer.createOn(this);" />',
            'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),


.....and replacing it with

            'content' => '<img src="$1" alt="" border="0" onload="NcodeImageResizer.createOn(this);" />',
            'validate' => create_function('&$tag, &$data, $disabled', '
               $data = strtr($data, array(\'<br />\' => \'\'));
               if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
                  $data = \'http://\' . $data;
            '),



The upgrade to 1.1.11 did overwrite the "Find" (first) code above and I had to manually keep the nCode Image Resizer code in place when manually upgrading.  It would be the section just after:

'),
'disabled_content' => '($1)',
),
array(
'tag' => 'img',
'type' => 'unparsed_content',



that you would replace with the second code.
Title: Re: nCode Image Resizer
Post by: nassatellite on December 04, 2009, 01:59:27 PM
for 2.0.RC2 ?
Title: Re: nCode Image Resizer
Post by: genusis on December 04, 2009, 05:46:40 PM
could you please Redo the package for SMF 2.0 RC2 thank you =].
Title: Re: nCode Image Resizer
Post by: ih8pavement on December 05, 2009, 11:34:52 PM
RC2 Also!  8)
Title: Re: nCode Image Resizer
Post by: nassatellite on December 06, 2009, 04:59:07 AM
2.0.RC2 Paketini dört gözle bekliyoruz.
Title: Re: nCode Image Resizer
Post by: Carlos Faria on December 06, 2009, 05:44:28 PM
Quote from: gbsothere on December 04, 2009, 08:01:37 AM
It works fine for me in 1.1.11, after finding, in Subs.php

            'content' => '<img src="$1" alt="" border="0" onload="NcodeImageResizer.createOn(this);" />',
            'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),


.....and replacing it with

            'content' => '<img src="$1" alt="" border="0" onload="NcodeImageResizer.createOn(this);" />',
            'validate' => create_function('&$tag, &$data, $disabled', '
               $data = strtr($data, array(\'<br />\' => \'\'));
               if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
                  $data = \'http://\' . $data;
            '),



The upgrade to 1.1.11 did overwrite the "Find" (first) code above and I had to manually keep the nCode Image Resizer code in place when manually upgrading.  It would be the section just after:

'),
'disabled_content' => '($1)',
),
array(
'tag' => 'img',
'type' => 'unparsed_content',



that you would replace with the second code.

Does not work for me.

The code (Subs.php):

array(
'tag' => 'img',
'type' => 'unparsed_content',
        'content' => '<img src="$1" alt="" border="0" onload="NcodeImageResizer.createOn(this);" />',
                'validate' => create_function('&$tag, &$data, $disabled', '
               $data = strtr($data, array(\'<br />\' => \'\'));
               if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
                  $data = \'http://\' . $data;
            '),
'disabled_content' => '($1)',
'parameters' => array(
'alt' => array('optional' => true),
'width' => array('optional' => true, 'value' => ' width="$1"', 'match' => '(\d+)'),
'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
),
'content' => '<img src="$1" alt="{alt}"{width}{height} border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disabled_content' => '($1)',
),


Already thank you.
Title: Re: nCode Image Resizer
Post by: gbsothere on December 06, 2009, 05:48:41 PM
Quote from: [T]uGa [M]aSter on December 06, 2009, 05:44:28 PM
Does not work for me.

The code (Subs.php):

array(
'tag' => 'img',
'type' => 'unparsed_content',
        'content' => '<img src="$1" alt="" border="0" onload="NcodeImageResizer.createOn(this);" />',
                'validate' => create_function('&$tag, &$data, $disabled', '
               $data = strtr($data, array(\'<br />\' => \'\'));
               if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
                  $data = \'http://\' . $data;
            '),
'disabled_content' => '($1)',
'parameters' => array(
'alt' => array('optional' => true),
'width' => array('optional' => true, 'value' => ' width="$1"', 'match' => '(\d+)'),
'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
),
'content' => '<img src="$1" alt="{alt}"{width}{height} border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disabled_content' => '($1)',
),


Already thank you.





Can you attach your entire Subs.php?

Title: Re: nCode Image Resizer
Post by: Carlos Faria on December 06, 2009, 05:53:45 PM
Attached...
Title: Re: nCode Image Resizer
Post by: gbsothere on December 06, 2009, 06:09:51 PM
 [T]uGa [M]aSter, your Subs.php has a lot of duplicate code in it and also a lot of the code that should have been replaced by the upgrade is still there.  (You did upgrade to 1.1.11, didn't you?)

If you did upgrade, then can you give me a list of all your mods?  The file will have to be parsed from scratch.


Title: Re: nCode Image Resizer
Post by: Carlos Faria on December 06, 2009, 06:15:01 PM
Quote from: gbsothere on December 06, 2009, 06:09:51 PM
[T]uGa [M]aSter, your Subs.php has a lot of duplicate code in it and also a lot of the code that should have been replaced by the upgrade is still there.  (You did upgrade to 1.1.11, didn't you?)

If you did upgrade, then can you give me a list of all your mods?  The file will have to be parsed from scratch.

O.o

I did the update and everything went well.

MODs:

Member Color Link 3.0.7
Advanced XFire Field 2.0a
Aeva ~ Auto-Embed Video & Audio 7.0
Ad Management 2.3.1
Hide SMF Version 1.0.5
The Rules 1.2
nCode Image Resizer 1.2
1.3.3 Related Topics
Shared Forum Mod 0.2.5.4
SMF 1.0.19 / 1.1.11 Update 1.0


The other files have the same error?
Title: Re: nCode Image Resizer
Post by: gbsothere on December 06, 2009, 06:16:50 PM
Quote from: [T]uGa [M]aSter on December 06, 2009, 06:15:01 PM
O.o

I did the update and everything went well.

MODs:

Member Color Link 3.0.7
Advanced XFire Field 2.0a
Aeva ~ Auto-Embed Video & Audio 7.0
Ad Management 2.3.1
Hide SMF Version 1.0.5
The Rules 1.2
nCode Image Resizer 1.2
1.3.3 Related Topics
Shared Forum Mod 0.2.5.4
SMF 1.0.19 / 1.1.11 Update 1.0


The other files have the same error?


Let me just check all the mods from this list that edit Subs.php and see if I can clean it up.  It'll take me a few minutes.   

Title: Re: nCode Image Resizer
Post by: gbsothere on December 06, 2009, 06:40:55 PM
[T]uGa [M]aSter, try the attached Subs.php.

I need to tell you, though, that I can't find where you found Shared Forum Mod 0.2.5.4 for 1.1.x here, so I can't check to see if it parses Subs.php.  If it does and you have the parsing instructions, you'll need to add it to this file.

You may need to clear your cache and refresh after uploading this file.
Title: Re: nCode Image Resizer
Post by: Carlos Faria on December 06, 2009, 07:03:59 PM
Quote from: gbsothere on December 06, 2009, 06:40:55 PM
[T]uGa [M]aSter, try the attached Subs.php.

I need to tell you, though, that I can't find where you found Shared Forum Mod 0.2.5.4 for 1.1.x here, so I can't check to see if it parses Subs.php.  If it does and you have the parsing instructions, you'll need to add it to this file.

You may need to clear your cache and refresh after uploading this file.

Works!

Here is the Shared Forum Mod 0.2.5.4 for 1.1.x (http://www.simplemachines.org/community/index.php?topic=158330.0)

Thank You Very Much!  :D
Title: Re: nCode Image Resizer
Post by: gbsothere on December 06, 2009, 07:13:42 PM
Quote from: [T]uGa [M]aSter on December 06, 2009, 07:03:59 PM
Works!

Here is the Shared Forum Mod 0.2.5.4 for 1.1.x (http://www.simplemachines.org/community/index.php?topic=158330.0)

Thank You Very Much!  :D


I have to register on Sarge's site to download the zip and I'm waiting on a confirmation email.  When it comes, I'll download it and check the parsing.  If it edits Subs.php, I'll post again with a new attachment and PM you a "heads up" to look for it.

:)
Title: Re: nCode Image Resizer
Post by: Carlos Faria on December 07, 2009, 03:47:54 AM
Quote from: gbsothere on December 06, 2009, 07:13:42 PM
Quote from: [T]uGa [M]aSter on December 06, 2009, 07:03:59 PM
Works!

Here is the Shared Forum Mod 0.2.5.4 for 1.1.x (http://www.simplemachines.org/community/index.php?topic=158330.0)

Thank You Very Much!  :D


I have to register on Sarge's site to download the zip and I'm waiting on a confirmation email.  When it comes, I'll download it and check the parsing.  If it edits Subs.php, I'll post again with a new attachment and PM you a "heads up" to look for it.

:)

Thanks  :D
Title: Re: nCode Image Resizer
Post by: gbsothere on December 07, 2009, 08:02:54 AM
Quote from: [T]uGa [M]aSter on December 07, 2009, 03:47:54 AM
Thanks  :D



I still don't have the confirmation email to register, [T]uGa [M]aSter, but if you have a zip of that mod, open it and find the install.xml file.  All the files the mod edits will be in there and if Subs.php is listed, then its edits will be there. If it's not listed, then you don't have anything to worry about.

If you have difficulty finding it, let me know and I'll PM you an email address to send the zip to.

:)
Title: Re: nCode Image Resizer
Post by: Carlos Faria on December 07, 2009, 08:33:01 AM
Quote from: gbsothere on December 07, 2009, 08:02:54 AM
I still don't have the confirmation email to register, [T]uGa [M]aSter, but if you have a zip of that mod, open it and find the install.xml file.  All the files the mod edits will be in there and if Subs.php is listed, then its edits will be there. If it's not listed, then you don't have anything to worry about.

If you have difficulty finding it, let me know and I'll PM you an email address to send the zip to.

:)

I found nothing related to the Subs.php.


Thank you very much!
Title: Re: nCode Image Resizer
Post by: gbsothere on December 07, 2009, 08:42:29 AM
Quote from: [T]uGa [M]aSter on December 07, 2009, 08:33:01 AM

I found nothing related to the Subs.php.


Thank you very much!



That's good news.

Title: Re: nCode Image Resizer
Post by: infyquest on December 08, 2009, 03:51:30 PM
this is for 2.0 RC2
the attachment...

update
---------
removing the zip (a request from NIBOGO)
Title: Re: nCode Image Resizer
Post by: Nibogo on December 08, 2009, 09:00:12 PM
Quote from: infyquest on December 08, 2009, 03:51:30 PM
this is for 2.0 RC2
the attachment...

Remove the package I don't give you the permission to distribute a new version
Title: Re: nCode Image Resizer
Post by: infyquest on December 10, 2009, 12:49:46 PM
Then update it asap
Title: Re: nCode Image Resizer
Post by: Nibogo on December 10, 2009, 06:28:30 PM
Quote from: infyquest on December 10, 2009, 12:49:46 PM
Then update it asap

When I have time....
Title: Re: nCode Image Resizer
Post by: uffepuffe on December 11, 2009, 03:36:07 AM
This mod is great and it solves a big issue for us. I do however have one big problem with it, it works fine for the deault theme but not att al for our "Oxygene" theme. I have moved the "ncode_imageresizer.js" to the ./Themes/oxygene/ aswell as edited the ./Themes/oxygene/index.template.php according to the instructions but I still don't get it to work with that template. The images just show up large size without the bar at the top like before I installed the mod.

There is no "Modifications.english.php" file for this theme to be edited...

Oh, and we're running 1.1.8!

Any suggestions?

U
Title: Re: nCode Image Resizer
Post by: nassatellite on December 11, 2009, 04:42:47 AM
this is for 2.0 RC2 için ne zaman güncelleyeceksiniz?
Title: Re: nCode Image Resizer
Post by: Pentaxian on December 11, 2009, 03:49:46 PM
Quote from: NIBOGO on December 08, 2009, 09:00:12 PM
Quote from: infyquest on December 08, 2009, 03:51:30 PM
this is for 2.0 RC2
the attachment...

Remove the package I don't give you the permission to distribute a new version

Are you waiting until people want to pay you for (a new version of) this mod?
Title: Re: nCode Image Resizer
Post by: Spoogs on December 11, 2009, 03:53:36 PM
People are busy and do have lives outside of smf... give the author sometime to get to it. Keep in mind he doesnt have to update if he doesnt feel like it and comments like that wont make him want to get to it any faster.
Title: Re: nCode Image Resizer
Post by: Nibogo on December 11, 2009, 03:54:34 PM
Quote from: Pentaxian on December 11, 2009, 03:49:46 PM

Are you waiting until people want to pay you for (a new version of) this mod?

No, I just want to keep the credits for create this mod so a official 2.0 RC2 will come when I have time to do it ;)

Quote from: Spoogs on December 11, 2009, 03:53:36 PM
People are busy and do have lives outside of smf... give the author sometime to get to it. Keep in mind he doesnt have to update if he doesnt feel like it and comments like that wont make him want to get to it any faster.

Thanks Spoogs, Nice explanation :)
Title: Re: nCode Image Resizer
Post by: dr.wills on December 11, 2009, 08:10:36 PM
 :) great mod, thank you
Title: Re: nCode Image Resizer
Post by: nassatellite on December 12, 2009, 06:38:18 AM
ne zaman 2.0.RC2 için yayınlayacaksınız?
Title: Re: nCode Image Resizer
Post by: uffepuffe on December 14, 2009, 08:57:04 AM
Quote from: uffepuffe on December 11, 2009, 03:36:07 AM
This mod is great and it solves a big issue for us. I do however have one big problem with it, it works fine for the deault theme but not att al for our "Oxygene" theme. I have moved the "ncode_imageresizer.js" to the ./Themes/oxygene/ aswell as edited the ./Themes/oxygene/index.template.php according to the instructions but I still don't get it to work with that template. The images just show up large size without the bar at the top like before I installed the mod.

There is no "Modifications.english.php" file for this theme to be edited...

Oh, and we're running 1.1.8!

Any suggestions?

U

*bump*
Title: Re: nCode Image Resizer
Post by: wildebeast on December 27, 2009, 05:55:48 AM
Folks, somewhere a few posts ago, the mod author explained that he is finishing his schooling and will get to the updates when he has time - his schooling is a lot more important - give him time and have patience.
Title: Re: nCode Image Resizer
Post by: gbsothere on December 27, 2009, 07:50:05 AM
Quote from: uffepuffe on December 14, 2009, 08:57:04 AM
Quote from: uffepuffe on December 11, 2009, 03:36:07 AM
This mod is great and it solves a big issue for us. I do however have one big problem with it, it works fine for the deault theme but not att al for our "Oxygene" theme. I have moved the "ncode_imageresizer.js" to the ./Themes/oxygene/ aswell as edited the ./Themes/oxygene/index.template.php according to the instructions but I still don't get it to work with that template. The images just show up large size without the bar at the top like before I installed the mod.

There is no "Modifications.english.php" file for this theme to be edited...

Oh, and we're running 1.1.8!

Any suggestions?

U

*bump*


Just a thought: try moving a copy of the Modifications.english.php that is on your server (Themes/default/languages) into your custom theme's language folder, as well (Themes/oxygene/languages).  Worth a try.

And, as always, make sure that the language setting in your forum matches the extension of the language file you're using (if you're using utf8, for example).
Title: Re: nCode Image Resizer
Post by: Cap. Price on December 30, 2009, 04:34:03 PM
Quote from: ElectricSquid on September 13, 2009, 10:30:30 PM
I've been going thorough my site validating the XHTML and eliminating errors.
Thats when i found an error that nCode Image Resizer is creating.
The short version is that the attribute "onload" is invalid for XHTML 1.0 Transitional.

Here's what the W3.org validator (http://validator.w3.org) says about this error...
Doctype:   XHTML 1.0 Transitional

Quote

Validation Output: 1 Error

there is no attribute X
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Line 683, column 173: Attribute "onload" exists, but can not be used for this element.
...etal2.png" alt="" border="0" onload="NcodeImageResizer.createOn(this);" /></a>


The above quoted error is from a div tag located in a users sig, below is the full tag. But this same error happens on every pic that nCode resizes on the page. For some reason "onload" is not a correct attribute to use with XHTML 1.0 Transitional, which SMF uses.

    <div class="signature"><a href="http://redneckfabrication.com" target="_blank"><img src="http://redneckfabrication.com/images/RFmetal2.png" alt="" border="0" onload="NcodeImageResizer.createOn(this);" /></a></div>

So what do I use instead of onload?
How do we get around this and get correct with XHTML 1.0 Transitional?

AND?

any solution?, thankz.


SOLVED! :)
Title: Re: nCode Image Resizer
Post by: eflanim on January 02, 2010, 07:42:07 AM
2.0 RC2 ne zaman yayınlanacak? Bekliyoruz :)
Title: Re: nCode Image Resizer
Post by: amlucent on January 03, 2010, 03:57:03 AM
Quote from: NIBOGO on December 08, 2009, 09:00:12 PM
Quote from: infyquest on December 08, 2009, 03:51:30 PM
this is for 2.0 RC2
the attachment...

Remove the package I don't give you the permission to distribute a new version

Can he release instructions on how to manually alter your existing package to work with RC2 opposed to redistributing the package?
Title: Re: nCode Image Resizer
Post by: motomaniacs on January 03, 2010, 05:12:14 AM
helo this mod also effect to my forum signature
how can this mod working without bugging the signature?
Title: Re: nCode Image Resizer
Post by: Arkino on January 17, 2010, 01:00:23 AM
Bug time at SMF 1.1.11

./Sources/Subs.php

Find:
'content' => '<img src="$1" alt="" border="0" />',

But now at the new version is:
'content' => '<div class="codeheader">' . $txt['smf238'] . ':</div><div class="code">' . ($context['browser']['is_gecko'] ? '<pre style="margin-top: 0; display: inline;">$1</pre>' : '$1') . '</div>',

How should I to do for put this line at Subs if the line is diferent?
onload="NcodeImageResizer.createOn(this);" />',

Greetings
Title: Re: nCode Image Resizer
Post by: ffingers on January 18, 2010, 11:03:11 AM
actually that is the wrong lines...to fix it 1.1.11 (i have a lot of mods...dunno if an unmodded site has this issue...) but find this

array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="{alt}"{width}{height} border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disabled_content' => '($1)',
),


and replace it with this

array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="{alt}"{width}{height} border="0" onload="NcodeImageResizer.createOn(this);"/>',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disabled_content' => '($1)',
),




Title: Re: nCode Image Resizer
Post by: ʟink on January 18, 2010, 12:59:29 PM
Those of you asking for this to be updated for RC2 - I just installed this on my RC2 forum and it worked fine; you just need to emulate "SMF 2.0" in the package manager to install.
Title: Re: nCode Image Resizer
Post by: YogiBear on January 18, 2010, 02:01:40 PM
When you switch back to RC2 do all your other mods show and work OK, Link?

This mod looks a must as even though I can set a maximum picture size for normal [ img] type links when the gigapixel brigade get to work using url anything can happen!
Title: Re: nCode Image Resizer
Post by: ʟink on January 18, 2010, 07:42:04 PM
As far as I know, emulating the version in the package manager just makes it so it will override your current version info temporarily, so the mod installer doesn't stop because it's told that it's not supported for your version yet. Emulating a previous version doesn't actually remove or enable other features, nor does it make all mods work with it.

Alternatively, you could just modify package-info.xml in the mod package, but that's more work. :P
Title: Re: nCode Image Resizer
Post by: Pentaxian on January 19, 2010, 02:04:11 AM
If your site is in RC2.0 you don't need to and cannot emulate RC2.0 You need to emulate an older version!


But in doing that I got:The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

So...
Title: Re: nCode Image Resizer
Post by: marko_andres on February 01, 2010, 07:58:11 PM
Funciona para 2.0 RC2??
work in 2.0 RC2?
Title: Re: nCode Image Resizer
Post by: Nibogo on February 01, 2010, 08:19:13 PM
Quote from: marko_andres on February 01, 2010, 07:58:11 PM
Funciona para 2.0 RC2??
work in 2.0 RC2?

http://www.simplemachines.org/community/index.php?topic=240057.msg2461462#msg2461462
Title: Re: nCode Image Resizer
Post by: 4Kstore on February 04, 2010, 09:39:55 PM
Work perfect in rc2 !! ;) Thanks!
Title: Re: nCode Image Resizer
Post by: Nibogo on February 04, 2010, 09:52:41 PM
Quote from: 4kstore on February 04, 2010, 09:39:55 PM
Work perfect in rc2 !! ;) Thanks!

Glad to know it
Title: Re: nCode Image Resizer
Post by: tbk22 on February 06, 2010, 07:41:25 AM
Its not working on my RC2 at least


I upload the mod and when I click install it says "there are no actions defined for the install"
Title: Re: nCode Image Resizer
Post by: tbk22 on February 06, 2010, 05:45:28 PM
Quote from: tbk22 on February 06, 2010, 07:41:25 AM
Its not working on my RC2 at least


I upload the mod and when I click install it says "there are no actions defined for the install"

any help on this?
Title: Re: nCode Image Resizer
Post by: Nibogo on February 13, 2010, 05:15:53 PM
Changelog:

Version 1.3 - Feb 13, 2010
- Added Support for SMF 2.0 RC2.
- Added Support for SMF 1.1.11.
- Added Portuguese_pt, Portuguese_brazilian, Turkish, Arabic, Dutch, Spanish, Spanish_latin and Spanish_es with and without UTF8.
- 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
Title: Re: nCode Image Resizer
Post by: LG965 on February 14, 2010, 04:47:55 AM
thank you NIBOGO

I have v1.1.11 and I did to work your old version 1.2.  I have installed new version now and i think there is error in istall-smf1.xml at line 51


<add><![CDATA[echo '<!-- nCode Image Resizer -->


I deleted #echo'# and so work fine


This is Italian translation to put in Modifications.italian.php file


$txt['ncode_imageresizer_warning_small'] = 'Click su questa barra per vederla intera.';
$txt['ncode_imageresizer_warning_filesize'] = 'Questa immagine è stata ridimensionata. Quella originale è di %1$sx%2$s e %3$sKB, clicca qui per visualizzarla.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Questa immagine è stata ridimensionata. Originale di %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Click su questa barra per vederla ridotta.';
$txt['ncode_imageresizer_mode'] = 'Opzioni di ridimensionamento';
$txt['ncode_imageresizer_original'] = 'Mantieni dimensioni originali';
$txt['ncode_imageresizer_enlarge_same'] = 'Ingrandisci nello stesso documento';
$txt['ncode_imageresizer_open_same'] = 'Apri nella stessa finestra';
$txt['ncode_imageresizer_open_new'] = 'Apri in una nuova finestra';
$txt['ncode_imageresizer_max_width'] = 'Larghezza massima';
$txt['ncode_imageresizer_max_height'] = 'Altezza massima<br /><span class="smalltext">Lascia vuoto per non ridimensionare.</span>';

Title: Re: nCode Image Resizer
Post by: tbk22 on February 14, 2010, 06:56:49 AM
NIBOGO I installed the mod on my RC 2 forum and it simply does nothing... Images are still bigger  than what I wanted
Title: Re: nCode Image Resizer
Post by: Nibogo on February 14, 2010, 08:01:50 PM
Quote from: tbk22 on February 14, 2010, 06:56:49 AM
NIBOGO I installed the mod on my RC 2 forum and it simply does nothing... Images are still bigger  than what I wanted

You must configure the mod in the admin panel
Title: Re: nCode Image Resizer
Post by: tbk22 on February 15, 2010, 12:48:42 PM
Quote from: NIBOGO on February 14, 2010, 08:01:50 PM
Quote from: tbk22 on February 14, 2010, 06:56:49 AM
NIBOGO I installed the mod on my RC 2 forum and it simply does nothing... Images are still bigger  than what I wanted

You must configure the mod in the admin panel

I know... I have it like this



And it does nothing

Its in Portuguese but I think you can get the picture
Title: Re: nCode Image Resizer
Post by: XxDrAg0nxX on February 16, 2010, 08:35:04 AM
1.     Execute Modification     ./Sources/ModSettings.php     Test successful
2.    Execute Modification    ./Sources/Subs.php    Test failed
3.    Execute Modification    ./Themes/default/index.template.php    Test successful

My Version is 1.1.11

Checked that file its permission is 777

:(
Title: Re: nCode Image Resizer
Post by: tbk22 on February 16, 2010, 09:24:46 PM
Quote from: tbk22 on February 15, 2010, 12:48:42 PM
Quote from: NIBOGO on February 14, 2010, 08:01:50 PM
Quote from: tbk22 on February 14, 2010, 06:56:49 AM
NIBOGO I installed the mod on my RC 2 forum and it simply does nothing... Images are still bigger  than what I wanted

You must configure the mod in the admin panel

I know... I have it like this



And it does nothing

Its in Portuguese but I think you can get the picture

And I tested on Internet Explorer and It foes this
Title: Re: nCode Image Resizer
Post by: Arkino on February 17, 2010, 12:38:01 PM
Quote from: XxDrAg0nxX on February 16, 2010, 08:35:04 AM
1.     Execute Modification     ./Sources/ModSettings.php     Test successful
2.    Execute Modification    ./Sources/Subs.php    Test failed
3.    Execute Modification    ./Themes/default/index.template.php    Test successful

My Version is 1.1.11

Checked that file its permission is 777

:(

I said it, it has a bug. someone can fix it? It is not possible to install in 1.1.11
Title: Re: nCode Image Resizer
Post by: XxDrAg0nxX on February 18, 2010, 12:45:58 PM
I dont think we have the right to demand anyone to fix it, just have to wait patiently for NIBOGO to fix the problem

btw  I downgraded to 1.1.10 the problem still exists :(
Title: Re: nCode Image Resizer
Post by: FragaCampos on February 18, 2010, 01:12:37 PM
Arkino e XxDrAg0nxX, the mod is working in SMF 1.1.11
You have to consult the mod parser and make the changes to Subs.php manually.
Title: Re: nCode Image Resizer
Post by: Dr3amstor on February 18, 2010, 01:53:35 PM
I've installed this Mod and the same error came up:

QuoteExecute Modification    ./Sources/Subs.php    Test failed

So followed FragaCampos advise and now all my images are gone can't see any...

SMF 1.1.11
Title: Re: nCode Image Resizer
Post by: Nibogo on February 18, 2010, 02:03:04 PM
The mods work great on SMF 1.1.11 Fresh Install if you can't have it working just do the manual edit
Title: Re: nCode Image Resizer
Post by: Dr3amstor on February 18, 2010, 04:38:37 PM
I can't get it to work anyhow. >:(

What a shame.
Title: Re: nCode Image Resizer
Post by: XxDrAg0nxX on February 19, 2010, 03:01:27 AM
Quote from: NIBOGO on February 18, 2010, 02:03:04 PM
The mods work great on SMF 1.1.11 Fresh Install if you can't have it working just do the manual edit

So I just run the package install and it will auto skip modifying that sub file?
Title: Re: nCode Image Resizer
Post by: XxDrAg0nxX on February 19, 2010, 03:32:16 AM
Template Parse Error!
There was a problem loading the /Themes/default/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Parse error: syntax error, unexpected T_STRING, expecting T_PAAMAYIM_NEKUDOTAYIM in .../Themes/default/index.template.php on line 173

164:
165: echo '
166: document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");
167:
168: document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";
169:
170: current_header_ic = mode;
171: }
172: // ]]></script>

173: echo '<!-- nCode Image Resizer -->

174: <script type="text/javascript" src="', $settings['default_theme_url'], '/ncode_imageresizer.js"></script>';
175:
176: // What is the mode?
177: $mode = 'none';


I had to remove the echo'
Title: Re: nCode Image Resizer
Post by: tbk22 on February 21, 2010, 08:18:16 AM
Quote from: tbk22 on February 16, 2010, 09:24:46 PM
Quote from: tbk22 on February 15, 2010, 12:48:42 PM
Quote from: NIBOGO on February 14, 2010, 08:01:50 PM
Quote from: tbk22 on February 14, 2010, 06:56:49 AM
NIBOGO I installed the mod on my RC 2 forum and it simply does nothing... Images are still bigger  than what I wanted

You must configure the mod in the admin panel

I know... I have it like this



And it does nothing

Its in Portuguese but I think you can get the picture

And I tested on Internet Explorer and It does this


Any help with this?
Title: Re: nCode Image Resizer
Post by: LiBen on February 21, 2010, 06:38:18 PM
The day before the new version came out, I tried the mod on 1.1.11 and had to make a small adjustment to make it work.

It works great but.... now some members prefer thumbnails, others a medium resize and yet another group would like to see it just "as is".

This is why I thought that it might be useful to have a version that is adjustable by the individual member.
Off course compatible with 1.1.11

Does anyone have any ideas how to do this?
Title: Re: nCode Image Resizer
Post by: LiBen on February 22, 2010, 09:17:48 AM
Quote from: motomaniacs on January 03, 2010, 05:12:14 AM
helo this mod also effect to my forum signature
how can this mod working without bugging the signature?

All images can be made immune to the mod by using a small adjustment.

affected image:
[img][/img]

non-affected image:
[img width=850][/img]

De mod will not shrink the image when it has an intended width. You can use any width, 850 is just an example.
This adjustment is not for the php-files!!!
Anyone can use it in his/her signature or post.
Title: Re: nCode Image Resizer
Post by: صلاح الدين on February 22, 2010, 10:21:03 AM
arabic ....

// --- Begin added code - nCode Image Resizer ---
$txt['ncode_imageresizer_warning_small'] = 'إضغط على هذا الإطار لمشاهدة الصورة بحجمها الأصلي.';
$txt['ncode_imageresizer_warning_filesize'] = 'انقر على هذا شريط لعرض الصورة الكاملة. الحجم الاصلي للصورة هو %1$sx%2$s.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'انقر على هذا شريط لعرض الصورة الكاملة. الحجم الاصلي للصورة هو %1$sx%2$s';
$txt['ncode_imageresizer_warning_fullsize'] = 'انقر هنا لمشاهدة الصورة المصغرة.';
$txt['ncode_imageresizer_mode'] = 'مود تغيير حجم الصور';
$txt['ncode_imageresizer_original'] = 'الحفاظ على الحجم الأصلي للصورة';
$txt['ncode_imageresizer_enlarge_same'] = 'التكبير في نفس المكان';
$txt['ncode_imageresizer_open_same'] = 'فتح الصورة في نفس النافذة';
$txt['ncode_imageresizer_open_new'] = 'فتح الصورة في نافذة جديدة';
$txt['ncode_imageresizer_max_width'] = 'الحد الأقصى للعرض';
$txt['ncode_imageresizer_max_height'] = 'الحد الأقصى للطول<br /><span class="smalltext">أتركه فارغ لعدم تحديد الحد الأقصى لطول.</span>';
// --- End added code ---
Title: Re: nCode Image Resizer
Post by: drav on February 23, 2010, 08:45:26 AM
Small problem with 2.0 RC2 on custom theme. The bar above the image is not showing up correctly. It's working fine with the default template. I have attached image. Anyone know what is causing the problem?

Thanks  :)
Title: Re: nCode Image Resizer
Post by: luuuciano on February 23, 2010, 10:05:14 AM
hola Nibogo!

antes que nada te comento que me parece fantastico el mod! nos es muy útil en el foro...

ahora el asunto de este mensaje... se me ocurrió pasar validación xhtml al sitio y veo que el script tuyo la rompe... y creo que es por lo que sigue:


   <script language="JavaScript" type="text/javascript"><!-- // -->
   NcodeImageResizer.BBURL = "', $settings['images_url'], '";
   NcodeImageResizer.MODE = "', $mode, '";
   NcodeImageResizer.MAXWIDTH = "', empty($modSettings['ncode_imageresizer_max_width']) ? 0 : (int) $modSettings['ncode_imageresizer_max_width'], '";
   NcodeImageResizer.MAXHEIGHT = "', empty($modSettings['ncode_imageresizer_max_height']) ? 0 : (int) $modSettings['ncode_imageresizer_max_height'], '";
   vbphrase = new Array();
   vbphrase[\'ncode_imageresizer_warning_small\'] = \'', $txt['ncode_imageresizer_warning_small'], '\';
   vbphrase[\'ncode_imageresizer_warning_filesize\'] = \'', $txt['ncode_imageresizer_warning_filesize'], '\';
   vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \'', $txt['ncode_imageresizer_warning_no_filesize'], '\';
   vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \'', $txt['ncode_imageresizer_warning_fullsize'], '\';
   // ]]></script>';


los ]] son de un CDATA, que no está definido arriba

debería ser entonces:
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

saludos y mil gracias por el mod!
Title: Re: nCode Image Resizer
Post by: XxDrAg0nxX on February 23, 2010, 11:02:00 AM
Quote from: motomaniacs on January 03, 2010, 05:12:14 AM
helo this mod also effect to my forum signature
how can this mod working without bugging the signature?

Did u manage to solve the problem?

I am on 1.1.11
Just figured out that it was the image resizer affecting signature pics.

Style.css
.signature {    max-height: 100px;

Does not affect the pics anymore, instead the full image is shown in a scroller window
Title: Re: nCode Image Resizer
Post by: shadowcrews on February 25, 2010, 01:55:08 PM
i just cant get the image to  fit the exact screen, it show up so small and when click it resize too big
Title: Re: nCode Image Resizer
Post by: idrees on February 28, 2010, 09:37:56 AM
i hav installed nCode Image Resizer on my foum and the image id not been resized,,,,,,,,,,,,
i am using smf 1.1.11
the resize bar is not been displayed on the resized pic......
plz tell me what to do...............
my forum is: http://www.palaceforum.co.cc
here is my index.template.php file
Title: Re: nCode Image Resizer
Post by: Membre on February 28, 2010, 05:04:57 PM
Very nice ! Thanks.
Title: Re: nCode Image Resizer
Post by: distante on March 03, 2010, 10:25:16 AM
@NIBOGO

I was checking my W3 validation and found 3 errors regarding this mod, I already fix one deleting 3 characters in index.template.php.

The normal code is something like:

Quote from: Replace Withecho '<!-- nCode Image Resizer -->
   <script type="text/javascript" src="', $settings['default_theme_url'], '/ncode_imageresizer.js"></script>';

   // What is the mode?
   $mode = 'none';   
   if (isset($modSettings['ncode_imageresizer_mode']))
   {
      if ($modSettings['ncode_imageresizer_mode'] == 1)
         $mode = 'enlarge';
      elseif ($modSettings['ncode_imageresizer_mode'] == 2)
         $mode = 'samewindow';
      elseif ($modSettings['ncode_imageresizer_mode'] == 3)
         $mode = 'newwindow';      
   }

   echo '
   <script language="JavaScript" type="text/javascript"><!-- // -->
   NcodeImageResizer.BBURL = "', $settings['images_url'], '";
   NcodeImageResizer.MODE = "', $mode, '";
   NcodeImageResizer.MAXWIDTH = "', empty($modSettings['ncode_imageresizer_max_width']) ? 0 : (int) $modSettings['ncode_imageresizer_max_width'], '";
   NcodeImageResizer.MAXHEIGHT = "', empty($modSettings['ncode_imageresizer_max_height']) ? 0 : (int) $modSettings['ncode_imageresizer_max_height'], '";
   vbphrase = new Array();
   vbphrase[\'ncode_imageresizer_warning_small\'] = \'', $txt['ncode_imageresizer_warning_small'], '\';
   vbphrase[\'ncode_imageresizer_warning_filesize\'] = \'', $txt['ncode_imageresizer_warning_filesize'], '\';
   vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \'', $txt['ncode_imageresizer_warning_no_filesize'], '\';
   vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \'', $txt['ncode_imageresizer_warning_fullsize'], '\';
   // ]]></script>';

   // Output any remaining HTML headers. (from mods, maybe?)

I deleted that part  (  ]]>  ) and the w3 validator past ok, the mod is working fine (at least looks like). ( http://www.simplemachines.org/community/index.php?topic=368581.msg2521811#msg2521811)

This part that I deleted has a special function?

pd: I know, my English sucks U_U
Title: Re: nCode Image Resizer
Post by: luuuciano on March 03, 2010, 03:03:25 PM
that is related with this post http://www.simplemachines.org/community/index.php?topic=240057.msg2512691#msg2512691

(sorry I posted it in spanish...)

the first line should be
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
Title: Re: nCode Image Resizer
Post by: distante on March 03, 2010, 03:15:13 PM
Really 2 there are two errors with nCODE and W3 validation (at least for me), the other one I can't found where to fix it.

says :

Quote
Line 277, Column 141: there is no attribute "onload"

.../114197.jpg" alt="" border="0" onload="NcodeImageResizer.createOn(this);" clas...

That " is the problem says W3.
Title: Re: nCode Image Resizer
Post by: luuuciano on March 03, 2010, 03:41:07 PM
mmm, I am trying with xhtml transitional and it says

Line 158, Column 328: there is no attribute "onload"

like, "look man, it shoul not be onload code/atributes in xhtml transitional"

?
Title: Re: nCode Image Resizer
Post by: Storek on March 06, 2010, 10:21:33 AM
Thanks for this mod but can anyone tell me how to fix this problem:

To its not colored where picture is on custom theme
Title: Re: nCode Image Resizer
Post by: Nibogo on March 06, 2010, 10:42:32 AM
Quote from: Storek on March 06, 2010, 10:21:33 AM
Thanks for this mod but can anyone tell me how to fix this problem:
To its not colored where picture is on custom theme

You must add this code to the end of your index.css file of your theme:

table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
{
background-color: #fefee1; /* the bgcolor behind the text and image */
}
table.ncode_imageresizer_warning {
color: #000000; /* the font color */
border: 1px solid #CCCDCD; /* the border around the whole thing */
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 10px;
vertical-align: middle;
text-decoration: none;
}

table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}
Title: Re: nCode Image Resizer
Post by: Membre on March 06, 2010, 12:57:06 PM
Quote from: Storek on March 06, 2010, 10:21:33 AM
Thanks for this mod but can anyone tell me how to fix this problem:

To its not colored where picture is on custom theme

Try CTRL+F5
Title: Re: nCode Image Resizer
Post by: gallitin on March 08, 2010, 12:14:12 PM
Quote from: NIBOGO on February 18, 2010, 02:03:04 PM
The mods work great on SMF 1.1.11 Fresh Install if you can't have it working just do the manual edit

What's the manual edit??

I'm getting the below error as well:

1.     Execute Modification     ./Sources/ModSettings.php     Test successful
2.    Execute Modification    ./Sources/Subs.php    Test failed
3.    Execute Modification    ./Themes/default/index.template.php    Test successful

My Version is 1.1.11

Checked that file its permission is 777
Title: Re: nCode Image Resizer
Post by: Nibogo on March 08, 2010, 10:17:29 PM
I don't think I'm going to continue the development of this mod, currently SMF 2.0 RC3 integrate a toggle for resized images to their original size just like attachments.

The current version works great on SMF 2.0 RC2 & 1.1.11 so I don't think we need additional updates plus it should work on 2.0 RC3 in case that someone wants to use it
Title: Re: nCode Image Resizer
Post by: LiBen on March 09, 2010, 08:29:03 AM
Quote from: gallitin on March 08, 2010, 12:14:12 PM
2.    Execute Modification    ./Sources/Subs.php    Test failed

Check the difference between the original file and your current file.
Then rewrite the part of the mod which concerns that file.
Title: Re: nCode Image Resizer
Post by: LiBen on March 09, 2010, 08:32:28 AM
Quote from: NIBOGO on March 08, 2010, 10:17:29 PM
I don't think I'm going to continue the development of this mod

Quote from: www.filippijnen.org on February 21, 2010, 06:38:18 PM
It works great but.... now some members prefer thumbnails, others a medium resize and yet another group would like to see it just "as is".

This is why I thought that it might be useful to have a version that is adjustable by the individual member.
Off course compatible with 1.1.11

Maybe an idea for a new version???
Title: Re: nCode Image Resizer
Post by: Nibogo on March 09, 2010, 01:15:43 PM
Quote from: www.filippijnen.org on March 09, 2010, 08:32:28 AM
Quote from: NIBOGO on March 08, 2010, 10:17:29 PM
I don't think I'm going to continue the development of this mod

Quote from: www.filippijnen.org on February 21, 2010, 06:38:18 PM
It works great but.... now some members prefer thumbnails, others a medium resize and yet another group would like to see it just "as is".

This is why I thought that it might be useful to have a version that is adjustable by the individual member.
Off course compatible with 1.1.11

Maybe an idea for a new version???

No
Title: Re: nCode Image Resizer
Post by: drav on March 11, 2010, 05:20:07 PM
Quote from: NIBOGO on March 06, 2010, 10:42:32 AM
Quote from: Storek on March 06, 2010, 10:21:33 AM
Thanks for this mod but can anyone tell me how to fix this problem:
To its not colored where picture is on custom theme

You must add this code to the end of your index.css file of your theme:

table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
{
background-color: #fefee1; /* the bgcolor behind the text and image */
}
table.ncode_imageresizer_warning {
color: #000000; /* the font color */
border: 1px solid #CCCDCD; /* the border around the whole thing */
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 10px;
vertical-align: middle;
text-decoration: none;
}

table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}


This does not work. Simply, for some reason, the mod doesn't work with any custom themes. Well, I haven't managed to get it to work. I'd be interested to know if anyone has.
Title: Re: nCode Image Resizer
Post by: luuuciano on March 11, 2010, 05:29:16 PM
it works in custom themes... I am using actualism by crip, and it works great

btw, Im sad because the no more updates nibogo's choice... :(
its a nice mod
Title: Re: nCode Image Resizer
Post by: gbsothere on March 11, 2010, 05:32:57 PM
Quote from: drav on March 11, 2010, 05:20:07 PM

This does not work. Simply, for some reason, the mod doesn't work with any custom themes. Well, I haven't managed to get it to work. I'd be interested to know if anyone has.


drav, did you add this mod's parsing to your custom theme's index.template.php?  That must be done in order for it to properly work for a custom theme.  If you installed via package manager, it only edited the default theme's template.

The instructions are on the mod's page, just use the pull-down to find the edits for your SMF version's index.template.php.

:)
Title: Re: nCode Image Resizer
Post by: Nibogo on March 11, 2010, 05:42:44 PM
Quote from: luuuciano on March 11, 2010, 05:29:16 PM
it works in custom themes... I am using actualism by crip, and it works great

btw, Im sad because the no more updates nibogo's choice... :(
its a nice mod

I'm only maintaining mods that I use on my website, I was using the nCode Mod but the toggle for big images integrated in SMF 2.0 RC3 is pretty cool and I don't need to load any additional css and js code so I'm going to use it. Anyway it should work on SMF 2.0 RC3 so I don't need we need updates
Title: Re: nCode Image Resizer
Post by: luuuciano on March 11, 2010, 06:06:54 PM
But, can you see the big images in new windows using the new rc3 toggle?
That is nice, because you do not need to scroll the post slider to see the big image (like it happens in this forum, for example), it gets worse if you have more than 1 image...
(I have not upgraded to rc3 yet)
Title: Re: nCode Image Resizer
Post by: Nibogo on March 11, 2010, 07:21:42 PM
Quote from: luuuciano on March 11, 2010, 06:06:54 PM
But, can you see the big images in new windows using the new rc3 toggle?
That is nice, because you do not need to scroll the post slider to see the big image (like it happens in this forum, for example), it gets worse if you have more than 1 image...
(I have not upgraded to rc3 yet)

I don't think that open images is the best option I find it annoying for every single image that I want to see, I only used this mod in the View in Same Window mode as the toggle do it I don't need it anymore
Title: Re: nCode Image Resizer
Post by: meko me on March 12, 2010, 03:51:49 AM
please update rc3 please :)
Title: Re: nCode Image Resizer
Post by: Nibogo on March 12, 2010, 08:23:24 AM
Quote from: meko me on March 12, 2010, 03:51:49 AM
please update rc3 please :)

Quote from: NIBOGO on March 08, 2010, 10:17:29 PM
I don't think I'm going to continue the development of this mod, currently SMF 2.0 RC3 integrate a toggle for resized images to their original size just like attachments.

The current version works great on SMF 2.0 RC2 & 1.1.11 so I don't think we need additional updates plus it should work on 2.0 RC3 in case that someone wants to use it
Title: Re: nCode Image Resizer
Post by: drav on March 12, 2010, 10:11:03 AM
Quote from: gbsothere on March 11, 2010, 05:32:57 PM
Quote from: drav on March 11, 2010, 05:20:07 PM

This does not work. Simply, for some reason, the mod doesn't work with any custom themes. Well, I haven't managed to get it to work. I'd be interested to know if anyone has.


drav, did you add this mod's parsing to your custom theme's index.template.php?  That must be done in order for it to properly work for a custom theme.  If you installed via package manager, it only edited the default theme's template.

The instructions are on the mod's page, just use the pull-down to find the edits for your SMF version's index.template.php.

:)

Yep, I installed it [correctly] manually on two custom themes. It caused major issues for me. Over a few days the error log generated 3000 errors. I have manually installed mods more complicated than this one, like flash chat for example, and I've never had any problems with any of them. Don't get me wrong, I'm open to the idea that I myself made some sort of mistake, but it's unlikely since I attempted several installs from backups and none of them worked. It's something of a mystery. And now I have residual error issues so I guess I have to re-edit my custom themes' index templates to completely solve the problem. I don't understand why it didn't work...I had the same problem as another member mentioned. To be honest I don't want to know. I'm just going to purge all traces of this mod from my forum and forget about it.
Title: Re: nCode Image Resizer
Post by: Eclipse16V on March 15, 2010, 02:18:56 AM
Nice Mod

Please update it for SMF 2.0RC3  ;)

Thanks
Title: Re: nCode Image Resizer
Post by: meko me on March 15, 2010, 04:40:10 AM
hi NIBOGO alright i installed this manually on RC3 mod is not working properly

images are nt getting resized to fit the forum they are getting resized though :s please kindly help me

for example please kindly see the s.s

http://i44.tinypic.com/332ur9w.jpg
Title: Re: nCode Image Resizer
Post by: meko me on March 15, 2010, 04:41:04 AM
Quote from: Eclipse16V on March 15, 2010, 02:18:56 AM
Nice Mod

Please update it for SMF 2.0RC3  ;)

Thanks

it's working on rc3 :)
Title: Re: nCode Image Resizer
Post by: meko me on March 17, 2010, 11:24:14 AM
please reply  NIBOGO
Title: Re: nCode Image Resizer
Post by: Ashdaw on March 19, 2010, 10:18:48 AM
Quote from: gallitin on March 08, 2010, 12:14:12 PM
Quote from: NIBOGO on February 18, 2010, 02:03:04 PM
The mods work great on SMF 1.1.11 Fresh Install if you can't have it working just do the manual edit

What's the manual edit??

I'm getting the below error as well:

1.     Execute Modification     ./Sources/ModSettings.php     Test successful
2.    Execute Modification    ./Sources/Subs.php    Test failed
3.    Execute Modification    ./Themes/default/index.template.php    Test successful

My Version is 1.1.11

Checked that file its permission is 777

Like this guy, I can't get it to work and have the SAME failure in the subs.php. The text that is supposed to be there to replace just isn't there and, if I do the edit on what LOOKS right in the subs file, I lose the ability to link images :(
This mod worked extra well on my site before I did the upgrade to version 1.1.11. I removed the instance of nCode that was on there before and removed the old file from my server but it still won't work, ANY insight would be good :D
THANKS...
Title: Re: nCode Image Resizer
Post by: Ashdaw on March 21, 2010, 05:26:32 PM
Bump
Title: Re: nCode Image Resizer
Post by: poomkupz on March 22, 2010, 02:38:52 PM
plese upgrade to rc 3

:-[
Title: Re: nCode Image Resizer
Post by: Nibogo on March 22, 2010, 05:57:17 PM
Quote from: poomkupz on March 22, 2010, 02:38:52 PM
plese upgrade to rc 3

:-[

You should read before ask:

http://www.simplemachines.org/community/index.php?topic=240057.msg2535719#msg2535719
Title: Re: nCode Image Resizer
Post by: luuuciano on March 23, 2010, 02:21:09 AM
btw, the new toggle in rc3... is active by default? have to be activated?

I can not find it... and images are just showed at 100%
Title: Re: nCode Image Resizer
Post by: Nibogo on March 23, 2010, 02:18:33 PM
Quote from: luuuciano on March 23, 2010, 02:21:09 AM
btw, the new toggle in rc3... is active by default? have to be activated?

I can not find it... and images are just showed at 100%

It's you just need to set a maximun width and height for posted images

As I said it's working for me pretty well :)
Title: Re: nCode Image Resizer
Post by: luuuciano on March 23, 2010, 04:04:13 PM
mmm, thats is odd... I had it in 0, but then changed it to 600 width, and 600 height...
but things like this: http://cbabikes.com.ar/foros/index.php/topic,1028.0.html
just shows the pictures at 100%...

I have tried changing to default, core themes... and the same (and deleted the file cache, just in case)

that rc3 toggle works with external images too?
Title: Re: nCode Image Resizer
Post by: Nibogo on March 23, 2010, 04:23:25 PM
You should ask for support in the support board
Title: Re: nCode Image Resizer
Post by: Ashdaw on March 27, 2010, 05:24:17 AM
I will ask this again. I would like to know how I can fix the problem I now have with this Mod and version 1.1.11.

1.     Execute Modification     ./Sources/ModSettings.php     Test successful
2.    Execute Modification    ./Sources/Subs.php    Test failed
3.    Execute Modification    ./Themes/default/index.template.php    Test successful
Title: Re: nCode Image Resizer
Post by: luuuciano on March 27, 2010, 11:00:33 AM
install it

go here
http://custom.simplemachines.org/mods/index.php?mod=1197

do a parse to 1.1.11... do the changes to subs.php by yourself
upload the file

at least I would do that... no idea if there is a better way to go


or better, before install it check the parse, subs.php file and study what is ahppening, why it fails to do the change...
Title: Re: nCode Image Resizer
Post by: Ashdaw on March 28, 2010, 07:40:04 AM
Quote from: luuuciano on March 27, 2010, 11:00:33 AM
install it
go here
http://custom.simplemachines.org/mods/index.php?mod=1197
do a parse to 1.1.11... do the changes to subs.php by yourself
upload the file
at least I would do that... no idea if there is a better way to go
or better, before install it check the parse, subs.php file and study what is happening, why it fails to do the change...

I did that but, the text that is supposed to be there just isn't. It's hard to replace something that isn't there.
All of that code is missing from my Subs.psp :(
Thanks for trying though. :)

array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 || strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disabled_content' => '($1)',
),
Title: Re: nCode Image Resizer
Post by: luuuciano on March 28, 2010, 11:03:15 AM
upload your Subs.php here
Title: Re: nCode Image Resizer
Post by: Ashdaw on March 30, 2010, 03:00:52 AM
Thanks very much luuciano. :)

Title: Re: nCode Image Resizer
Post by: luuuciano on March 30, 2010, 07:21:30 AM
your code from lines 1348 through 1352 have changed... you may search that lines in a full install 1.1.11 Subs.php file, replace them in your Subs.php, upload it and try to install the mod...
as always, do a backup first
Title: Re: nCode Image Resizer
Post by: marko_andres on April 08, 2010, 11:22:13 PM
If i replace the v.1.2 for the v.1.3, will have a problem?

i use the 1.1.11 SMF version
Title: Re: nCode Image Resizer
Post by: tycms on April 11, 2010, 11:43:31 AM
Quote from: ElectricSquid on September 13, 2009, 10:30:30 PM
I've been going thorough my site validating the XHTML and eliminating errors.
Thats when i found an error that nCode Image Resizer is creating.
The short version is that the attribute "onload" is invalid for XHTML 1.0 Transitional.

Here's what the W3.org validator (http://validator.w3.org) says about this error...
Doctype:   XHTML 1.0 Transitional

Quote

Validation Output: 1 Error

there is no attribute X
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Line 683, column 173: Attribute "onload" exists, but can not be used for this element.
...etal2.png" alt="" border="0" onload="NcodeImageResizer.createOn(this);" /></a>


The above quoted error is from a div tag located in a users sig, below is the full tag. But this same error happens on every pic that nCode resizes on the page. For some reason "onload" is not a correct attribute to use with XHTML 1.0 Transitional, which SMF uses.

    <div class="signature"><a href="http://redneckfabrication.com" target="_blank"><img src="http://redneckfabrication.com/images/RFmetal2.png" alt="" border="0" onload="NcodeImageResizer.createOn(this);" /></a></div>

So what do I use instead of onload?
How do we get around this and get correct with XHTML 1.0 Transitional?

Any solutions on this?
Title: Re: nCode Image Resizer
Post by: Miasma on April 17, 2010, 10:51:03 AM
1.   Execute Modification   ./Sources/ManageSettings.php   Test failed
2.   Execute Modification   ./Sources/Subs.php   Test failed

On clean install of 2rc3.
Title: Re: nCode Image Resizer
Post by: tycms on April 17, 2010, 02:22:12 PM
Miasma, did you try "Emulate version SMF 2.0 RC2"?
http://www.simplemachines.org/community/index.php?topic=49410.msg2584095#msg2584095

I am not currently using nCode Image Resizer, but I remember that I could install it on RC3. It it doesn't work, I can check it again and help you.
Title: Re: nCode Image Resizer
Post by: luuuciano on April 17, 2010, 06:37:37 PM
btw... weeks ago an NCIR user uploaded here a version that worked and was packed to be used against rc3...
that file/post was deleted?
Title: Re: nCode Image Resizer
Post by: Nibogo on April 17, 2010, 07:01:25 PM
It was a package that was deleted for 2.0 RC2 and as I said before I don't allow redistributions of my mods in any way
Title: Re: nCode Image Resizer
Post by: ishaan on April 18, 2010, 08:35:00 PM
Hello Brother.!!

I am installed ur nCode Image Resizer  mod.

But a msg is showing all image's top

"This image has been resized. click this bar.................."

I want to remove that msg tag. is it possible ? plss tell me how ?

Powered by SMF 1.1.11






Title: Re: nCode Image Resizer
Post by: flapjack on April 18, 2010, 08:39:41 PM
what version of SMF?
Title: Re: nCode Image Resizer
Post by: ishaan on April 19, 2010, 12:55:16 AM
My version is SMF 1.1.11
Title: Re: nCode Image Resizer
Post by: Downfall on April 23, 2010, 07:38:27 AM
This doesn't work on RC3, any advice?
Title: Re: nCode Image Resizer
Post by: luuuciano on April 23, 2010, 08:01:01 AM
I have it installed on rc3, it works
Title: Re: nCode Image Resizer
Post by: GaLaTaMaN on April 23, 2010, 11:34:23 AM
I want to delete the yellow box with the message at the top of each resized image.

My version is 2.0 RC2, how can I do this ?

Thank You
Title: Re: nCode Image Resizer
Post by: Joker™ on May 02, 2010, 07:27:03 AM
echo '<!-- nCode Image Resizer -->
<script type="text/javascript" src="', $settings['default_theme_url'], '/ncode_imageresizer.js"></script>';

// What is the mode?
$mode = 'none';
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode = 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode = 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode = 'newwindow';
}

echo '
<script language="JavaScript" type="text/javascript"><!-- // -->
NcodeImageResizer.BBURL = "', $settings['images_url'], '";
NcodeImageResizer.MODE = "', $mode, '";
NcodeImageResizer.MAXWIDTH = "', empty($modSettings['ncode_imageresizer_max_width']) ? 0 : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "', empty($modSettings['ncode_imageresizer_max_height']) ? 0 : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \'', $txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \'', $txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \'', $txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \'', $txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>';

// Output any remaining HTML headers. (from mods, maybe?)



In this code on index.template.php , this line

   // ]]></script>';

produces error on W3C validation

i made it to

   // ></script>';

n it worked properly.

NIBOGO bro can u give a look to this also .
Title: Re: nCode Image Resizer
Post by: tycms on May 02, 2010, 10:46:25 AM
Sid2varun,

Does this mod completely pass W3C validation now?
Title: Re: nCode Image Resizer
Post by: Joker™ on May 02, 2010, 12:46:04 PM
for me after making the change it passed the validation for my site

else on W3C was site was not getting valid for XHTML due to above mentioned piece of code
Title: Re: nCode Image Resizer
Post by: tycms on May 02, 2010, 03:37:02 PM
So, it was this simple. :) Thank you sid2varun.
Title: Re: nCode Image Resizer
Post by: luuuciano on May 03, 2010, 10:11:40 AM
that was reported before in this thread
Title: Re: nCode Image Resizer
Post by: Joker™ on May 03, 2010, 10:16:38 AM
Quote from: luuuciano on May 03, 2010, 10:11:40 AM
that was reported before in this thread

ohh i missed that ... i just got that error and thought of writing the solution which worked for me in the thread :)
Title: Re: nCode Image Resizer
Post by: DaRKeN_58 on May 05, 2010, 01:21:53 AM
Quote from: XxDrAg0nxX on February 19, 2010, 03:32:16 AM
Template Parse Error!
There was a problem loading the /Themes/default/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Parse error: syntax error, unexpected T_STRING, expecting T_PAAMAYIM_NEKUDOTAYIM in .../Themes/default/index.template.php on line 173

164:
165: echo '
166: document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");
167:
168: document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";
169:
170: current_header_ic = mode;
171: }
172: // ]]></script>

173: echo '<!-- nCode Image Resizer -->

174: <script type="text/javascript" src="', $settings['default_theme_url'], '/ncode_imageresizer.js"></script>';
175:
176: // What is the mode?
177: $mode = 'none';


I had to remove the echo'



In my theme I have it like this:
/ / ]]></ Script> ';

echo '
<! - NCode Image Resizer ->
<script type="text/javascript" src="', $settings['default_theme_url'],'/ncode_imageresizer.js"> </ script> ';





In the default theme:

/ / ]]></ Script> ';

echo '
<! - NCode Image Resizer ->
<script type="text/javascript" src="', $settings['default_theme_url'],'/ncode_imageresizer.js"> </ script> ';




I changed the default theme for a moment to see how it gives reputation with a MOD and I got this error:


Parse error: syntax error, unexpected T_STRING, expecting T_PAAMAYIM_NEKUDOTAYIM



Remove echo 'default theme and that if the site appeared, what happens is that the theme I use (not default theme) if you have echo' but the page does not fail.

Why does this happen?
Title: Re: nCode Image Resizer
Post by: schmooot on May 07, 2010, 05:50:16 PM
Quote from: Ashdaw on March 28, 2010, 07:40:04 AM

I did that but, the text that is supposed to be there just isn't. It's hard to replace something that isn't there.
All of that code is missing from my Subs.psp :(
Thanks for trying though. :)

array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 || strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disabled_content' => '($1)',
),


I know on my subs.php this part was different
if (strpos($data, \'http://\') !== 0 || strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;


Mine looked like this:
if (strpos($data, \'ftp://\') !== 0 && strpos($data, \'ftps://\') !== 0)
$data = \'ftp://\' . $data;


It was on line 1237...the only line the mod changes is 1234 so I just copied line 1234 from the mod list and used it to replace my line.

Then I just ignored the error in the package manager and it went through.



On another note I did have to remove the echo' from my index.template.php file on line 173 in order to get rid of the parse error.  Thanks for that XxDrAg0nxX

I am using 1.1.11 BTW
Title: Re: nCode Image Resizer
Post by: schmooot on May 07, 2010, 06:49:24 PM
just having a small problem with the resize bar not showing up.  I see a few other people have had this problem and they were told to check a few things...which I have done

I am using 1.1.11, default theme. 

I set the max width and height under basic settings, as well as the resize mode and max width and max height under the layout and options section.  My images do resize to my set values  but I have no bar to show the full image.  Is there another setting I am missing that will enable/disable it?

I installed the package correctly and made sure my modifications/english file is correct as well as the .js file in the proper location.


The only things I have done different from a normal install are:
I had to manually add the code into my subs.php file, and I had to remove the echo' out of my index.template.php in order to get rid of the parse error I was getting
Title: Re: nCode Image Resizer
Post by: minos on May 11, 2010, 11:32:54 PM
its not compatible with 2.0 rc3   any updates soon?
Title: Re: nCode Image Resizer
Post by: luuuciano on May 11, 2010, 11:38:22 PM
no, look latests posts of nibogo

maybe he wants to give the code/mod/whatever to someone that wants to continue developing it!

what do you think nibogo?
Title: Re: nCode Image Resizer
Post by: distante on May 12, 2010, 12:57:22 AM
Quote from: minos on May 11, 2010, 11:32:54 PM
its not compatible with 2.0 rc3   any updates soon?

As far as I know, RC3 doesn't need this mod, It has it for default
Title: Re: nCode Image Resizer
Post by: luuuciano on May 12, 2010, 01:01:44 AM
but is still useful if you have a forum with a lot of "old" images
the new rc3 "image toggle" only works with new images... as it adds a new class to it

or maybe you like to open full image sizes in other window, because your forum style do not work properly with images rezided "in place"
Title: Re: nCode Image Resizer
Post by: ★ѕραη∂αυєя★ on May 12, 2010, 06:42:02 PM
doesn't work in 1.1.11 :(



I think the problem is in urls

Quotehttp://http//i41.tinypic.com/11tsw38.jpg

source code:

<img src="http://http://i41.tinypic.com/11tsw38.jpg" alt="" border="0" onload="NcodeImageResizer.createOn(this);" />
Title: Re: nCode Image Resizer
Post by: kkattfish on May 20, 2010, 06:07:53 PM
just installed on 2.0 rc3 and it crashes the ie tab when i try to add an attachment.  not sure if its the mod or something else not getting along with it.  it has never done that before installing this mod though. 

just fyi
Title: Re: nCode Image Resizer
Post by: Nibogo on May 20, 2010, 06:40:53 PM
live627 is the new developer of this mod :)
Title: Re: nCode Image Resizer
Post by: luuuciano on May 20, 2010, 06:56:44 PM
great decision nibogo!
congratulations to you and live627!

I wish the best for both
Title: Re: nCode Image Resizer
Post by: live627 on May 20, 2010, 08:00:55 PM
Well actually he put the mod up for grabs yesterday and I asked for it - the transfer was within minutes (I am so impressed) and updated the mod in a jiffy.
Title: Re: nCode Image Resizer
Post by: kkattfish on May 20, 2010, 11:34:12 PM
just in case you didn't see my previous post the upgrade didn't go so well for you apparently.  its continuing to crash ie tabs after uninstall.  i will do a manual removal tomorrow in hopes of correcting the issue this mod caused. 
hopefully its just a conflict with one of the other mods i have and not something in your mod
Title: Re: nCode Image Resizer
Post by: live627 on May 21, 2010, 12:05:56 AM
please do give an update once you did your thing. I assume you run 2.0 RC3?
Title: Re: nCode Image Resizer
Post by: kkattfish on May 21, 2010, 05:35:01 PM
can i get some help please.  i installed this yesterday, was crashing ie tabs i am running 2.0 rc3.  i removed it, then doubled checked it to make sure everything was removed.  i don't see anything leftover but i am getting a ton of these in my logs.
please help, i just want to remove this for now and get my errors cleared up.  I think it must be conflicting with another mod


 
    Today at 02:28:11 PM
e1823d4af0406137347049ae9d1a6462
Type of error: Undefined 
http://www.kjkldjkjklfdfd.com/index.php?wwwRedirect8: Undefined index: ncode_imageresizer_warning_fullsizeFile: /home/themonke/public_html/jkljfkdjskldjfkld.com/Themes/default/PortalArticles.template.php (main_above sub template - eval?)
Line: 206 
Title: Re: nCode Image Resizer
Post by: luuuciano on May 21, 2010, 06:04:45 PM
download your site and search for ncode_image
you will find where to erase it

or do a parse of the mod, look where are located de added lines and find them
Title: Re: nCode Image Resizer
Post by: live627 on May 21, 2010, 06:26:25 PM
PortalArticles.template.php is part of Simple Portal. I suggest ti ask at simpleportal.net since I have no clue how that portal works.
Title: Re: nCode Image Resizer
Post by: Bugo on May 22, 2010, 07:42:52 AM
Russian translation (please paste BOTH files into package)
Title: Re: nCode Image Resizer
Post by: Sabre™ on May 22, 2010, 09:53:53 AM
There is no link to the mod in the first post.
Good on ya Live for picking this up :)
Title: Re: nCode Image Resizer
Post by: simpleinter on May 24, 2010, 09:15:35 AM
today i try to install on smf 1.1.11 but file subs.php is error.
then i try to manual install.
after finish i back on my post but every image on page can't show?

how could i fix this.  :(
thanks
Title: Re: nCode Image Resizer
Post by: simpleinter on May 24, 2010, 11:20:11 AM
Now i can fix it  ;D

file ./Themes/default/index.template.php

echo '<!-- nCode Image Resizer -->
<script type="text/javascript" src="', $settings['default_theme_url'], '/ncode_imageresizer.js"></script>';


echo ' is not use for me smf 1.1.11  :P
Title: Re: nCode Image Resizer
Post by: ukhalik2 on May 24, 2010, 12:21:19 PM
how to set my size for this mod?
Title: Re: nCode Image Resizer
Post by: kkattfish on May 24, 2010, 02:25:22 PM
i already did a parse and removed from where i was supposed to still getting errors.  i am downloading a fresh backup now to search for the ncode_image
Quote from: luuuciano on May 21, 2010, 06:04:45 PM
download your site and search for ncode_image
you will find where to erase it

or do a parse of the mod, look where are located de added lines and find them

this is happening on all pages not just portal so it is something with this mod and would appreciate help if you have any.  here is another error
Guest
    Today at 11:16:37 AM
ddfa1a5506f2da07b40fc9cdb9b5efed
Type of error: Undefined 
http://www.xjklxjkjkxjkx.com/index.php?board=12.08: Undefined index: ncode_imageresizer_warning_fullsizeFile: /home/themonke/public_html/xjkljxkjkld.com/Themes/default/MessageIndex.template.php (main_above sub template - eval?)
Line: 206 

Quote from: live627 on May 21, 2010, 06:26:25 PM
PortalArticles.template.php is part of Simple Portal. I suggest ti ask at simpleportal.net since I have no clue how that portal works.

Title: Re: nCode Image Resizer
Post by: kkattfish on May 24, 2010, 02:34:34 PM
more errors on different files

BBC
70.xxx.xxx.2   
    Today at 11:16:14 AM
3d0d0989e65531828b8330b7fdac2b7e
Type of error: Undefined 
http://www.xjxjxjxj.com/index.php?topic=238.0;topicseen8: Undefined index: ncode_imageresizer_warning_fullsizeFile: /home/themonke/public_html/xjxjxjxjx.com/Themes/default/Display.template.php (main_above sub template - eval?)
Line: 206 

BBC
70.xxx.xxx.2   
    Today at 11:16:08 AM
3d0d0989e65531828b8330b7fdac2b7e
Type of error: Undefined 
http://www.xjxjxjxjxjx.com/index.php?action=unread;start=08: Undefined index: ncode_imageresizer_warning_fullsizeFile: /home/themonke/public_html/xjjsdjdjsjs.com/Themes/default/Recent.template.php (main_above sub template - eval?)
Line: 206 

Guest
70.xxx.xxx.193   
    Today at 11:16:07 AM
ddfa1a5506f2da07b40fc9cdb9b5efed
Type of error: Undefined 
http://www.xjxjxjxjxjxjx.com/index.php?action=forum8: Undefined index: ncode_imageresizer_warning_no_filesizeFile: /home/themonke/public_html/xjxjxjxjxjxjx.com/Themes/helios_multi20rc3b/BoardIndex.template.php (main_above sub template - eval?)
Line: 205 
Title: Re: nCode Image Resizer
Post by: kkattfish on May 24, 2010, 05:45:30 PM
i'm getting the below error with users using ie, trying to give more detail
index.php is attached as well

Title: Re: nCode Image Resizer
Post by: luuuciano on May 24, 2010, 07:03:57 PM
are you sure that you "cleaned" ncode right?

I see nCode Image Resizer codes in your site

or you do not want to remove it?
Title: Re: nCode Image Resizer
Post by: kkattfish on May 24, 2010, 11:47:51 PM
i thought so, but if you are seeing it then i guess i didn't.  i will go back and try it again. 

i want ncode removed from my site.

can you show or tell me where you are seeing the ncode codes please?
Title: Re: nCode Image Resizer
Post by: luuuciano on May 24, 2010, 11:50:59 PM
ctrl+u at the homepage
then search for ncode
:)
Title: Re: nCode Image Resizer
Post by: Sabre™ on May 24, 2010, 11:58:14 PM
Quote from: kkattfish on May 24, 2010, 11:47:51 PM
can you show or tell me where you are seeing the ncode codes please?

In your helios themes index.template.php.
You may have uninstalled the package ok, but custom themes may need a manual approach.
Title: Re: nCode Image Resizer
Post by: kkattfish on May 25, 2010, 11:37:46 AM
Quote from: luuuciano on May 24, 2010, 11:50:59 PM
ctrl+u at the homepage
then search for ncode
:)
well you tried to help but you weren't very much

Quote from: Sabre™ on May 24, 2010, 11:58:14 PM
Quote from: kkattfish on May 24, 2010, 11:47:51 PM
can you show or tell me where you are seeing the ncode codes please?

In your helios themes index.template.php.
You may have uninstalled the package ok, but custom themes may need a manual approach.
thank you sabre!  i had made the helios theme my default so i figured i wouldn't need to edit the theme itself since it was in the default folder already.  kind of odd actually.  anyways i removed all the ncode code so hopefully this disaster is gone.  hopefully it works better with other versions of smf, i would NOT recommend it on smf 2.0 rc3. 
Title: Re: nCode Image Resizer
Post by: Sabre™ on May 25, 2010, 02:03:51 PM
My pleasure buddy :)
I'm not sure what issue(s) you had with it(too busy to read back), but it works absolutely flawless within my rc3 setups.
Although I'm going to search for an alternative with my next project.
Title: Re: nCode Image Resizer
Post by: Anoniempje on May 27, 2010, 09:35:25 AM
Hi, keep getting

QuoteTemplate Parse Error!

There was a problem loading the /Themes/anone/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
syntax error, unexpected T_STRING, expecting T_PAAMAYIM_NEKUDOTAYIM
with my index.template.php Anone theme. I run 1.1.11

the whole file is at pastebin.com/0TQ70bvs

I manually installed edited the files mentioned in the manual install parse of the mode. This is the only file that causes the error. i copied the js file to the theme folder.
Title: Re: nCode Image Resizer
Post by: Andrés Zc on June 04, 2010, 07:47:12 PM
Hi.
I fixed some bugs in Ncode Image Resizer V1.3 for Smf 1.1.11. The errors appears in the Subs.php and index.template files. Also, I corrected the translate to spanish.





/Sources/Subs.php


In the parse site says "search" but this is incorrect:


array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 || strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disabled_content' => '($1)',
),


The correct form is:

array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disabled_content' => '($1)',
),


In the parse site says "replace with" but this is incorrect:

array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" onload="NcodeImageResizer.createOn(this);" />',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 || strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disabled_content' => '($1)',
),


The correct form is:

array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" onload="NcodeImageResizer.createOn(this);" />',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disabled_content' => '($1)',
),





/Themes/default/index.template.php

search:

</head>

In the parse site says "replace with" but this is incorrect:

echo '<!-- nCode Image Resizer -->
<script type="text/javascript" src="', $settings['default_theme_url'], '/ncode_imageresizer.js"></script>';

// What is the mode?
$mode = 'none';
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode = 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode = 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode = 'newwindow';
}

echo '
<script language="JavaScript" type="text/javascript"><!-- // -->
NcodeImageResizer.BBURL = "', $settings['images_url'], '";
NcodeImageResizer.MODE = "', $mode, '";
NcodeImageResizer.MAXWIDTH = "', empty($modSettings['ncode_imageresizer_max_width']) ? 0 : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "', empty($modSettings['ncode_imageresizer_max_height']) ? 0 : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \'', $txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \'', $txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \'', $txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \'', $txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>

</head>


The correct form is:

<!-- nCode Image Resizer -->
<script type="text/javascript" src="', $settings['default_theme_url'], '/ncode_imageresizer.js"></script>';

// What is the mode?
$mode = 'none';
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode = 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode = 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode = 'newwindow';
}

echo '
<script language="JavaScript" type="text/javascript"><!-- // -->
NcodeImageResizer.BBURL = "', $settings['images_url'], '";
NcodeImageResizer.MODE = "', $mode, '";
NcodeImageResizer.MAXWIDTH = "', empty($modSettings['ncode_imageresizer_max_width']) ? 0 : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "', empty($modSettings['ncode_imageresizer_max_height']) ? 0 : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \'', $txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \'', $txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \'', $txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \'', $txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>

</head>





In Modifications.spanish.php, In Modifications.spanish_latin.php, In Modifications.spanish_es.php

The incorrect form is:



// --- Begin added code - nCode Image Resizer ---
$txt['ncode_imageresizer_warning_small'] = 'Has click en esta barra para ver la imagen en su tama&ntilde;o original.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagen ha sido redimensionada. Has click 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. Has click en la barra para verla en su tama&ntilde;o original (%1$sx%2$s px).';
$txt['ncode_imageresizer_warning_fullsize'] = 'Has click en la barra para ver la imagen en peque&ntilde;o.';
$txt['ncode_imageresizer_mode'] = 'Redimensionar Imagenes';
$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 ---


The correct way for the above files is:

// --- Begin added code - nCode Image Resizer ---
$txt['ncode_imageresizer_warning_small'] = 'Has click en esta barra para ver la imagen en su tamaño original.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagen ha sido redimensionada. Has click en la barra para verla en su tamaño original (%1$sx%2$s px y pesa %3$sKB).';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagen ha sido redimensionada. Has click en la barra para verla en su tamaño original (%1$sx%2$s px).';
$txt['ncode_imageresizer_warning_fullsize'] = 'Has click en la barra para ver la imagen en pequeño.';
$txt['ncode_imageresizer_mode'] = 'Redimensionar Imagenes';
$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 ---


Greetings...
Title: Re: nCode Image Resizer
Post by: pittu on June 09, 2010, 07:14:51 PM
If there are images in the old posts what I have to do to resize them too?

thank you!
Title: Re: nCode Image Resizer
Post by: pittu on June 10, 2010, 05:54:00 PM
Anybody?

If there are images in the old posts what I have to do to resize them too?
Title: Re: nCode Image Resizer
Post by: luuuciano on June 10, 2010, 06:17:32 PM
images in old posts should be resized too...
that is a rc3 problem, not ncode image resizer...

in fact, the biggest reason because Im using it is because that... to solve that rc3 fault
and because I like the way nir shows resized images (it works better in my current them also)
Title: Re: nCode Image Resizer
Post by: pittu on June 10, 2010, 07:46:22 PM
I installed the mod.

Image resizng but NO YELLOW bar to click on it.

===================

My IE throwing error:

Line: 138
Error: 'NcodeImageResizer' is Undefined

========================

My admin logs showing:


8: Undefined index: ncode_imageresizer_modeFile: /home/xxxxxx/public_html/community/Sources/ManageServer.php
Line: 1801
Title: Re: nCode Image Resizer
Post by: pittu on June 10, 2010, 08:51:50 PM
Both above errors are gone after I modified /classic/index.template.php manually.

But still no bar above resized image to click on ... :(
Title: Re: nCode Image Resizer
Post by: live627 on June 10, 2010, 09:05:53 PM
Go to http://custom.simplemachines.org/mods/index.php?action=parse

Scroll down to "./Themes/default/css/index.css"

Make sure the code snippet is in all active themes

This is justa guess, as I never used nir
Title: Re: nCode Image Resizer
Post by: pittu on June 10, 2010, 09:15:01 PM
I am using 'classic' folder. Bu there is no 'css' folder or index.css.

But the code snippet is added to /default/css/index.css
Title: Re: nCode Image Resizer
Post by: live627 on June 10, 2010, 09:44:09 PM
link please
Title: Re: nCode Image Resizer
Post by: Sakae on June 11, 2010, 08:27:18 AM
This MOD is brilliant.

Should come by default on SMF!!!!!!!!
Title: Re: nCode Image Resizer
Post by: pittu on June 11, 2010, 11:21:48 AM
Quote from: live627 on June 10, 2010, 09:44:09 PM
link please

It is test site on localserver.

What exactly I need to check please? It is not working with default theme either :( (I am using classic)

I manually checked all files. Everything is in place. Images are resizng, but no bar to click on ...
Title: Re: nCode Image Resizer
Post by: jaisi on June 11, 2010, 04:31:42 PM
hi guys, I installed the mod Sucesfully.

Image resizng but NO YELLOW bar to click on it.

And I'am useing ie 8: and forum version r3 and theme is custum thems facebook Variant by bdc

please see attached file for more Errors
Title: Re: nCode Image Resizer
Post by: pittu on June 11, 2010, 05:42:14 PM
Quote from: luuuciano on May 12, 2010, 01:01:44 AM
but is still useful if you have a forum with a lot of "old" images
the new rc3 "image toggle" only works with new images... as it adds a new class to it

or maybe you like to open full image sizes in other window, because your forum style do not work properly with images rezided "in place"

How to enable this image toggle feature in RC3?
Title: Re: nCode Image Resizer
Post by: luuuciano on June 11, 2010, 06:22:13 PM
just configure max image width, etc... all in the smf admin (do not remember wich section, you will have to search...)
Title: Re: nCode Image Resizer
Post by: ormuz on June 24, 2010, 09:37:56 PM
There is no topbar on smf 1.1.x

what is wrong with this mod?
Title: Re: nCode Image Resizer
Post by: punjablovers on June 25, 2010, 06:39:05 PM
I installed it on Inferno Theme and it is not working, what is the problem.
Title: Re: nCode Image Resizer
Post by: drav on June 26, 2010, 09:37:39 AM
Any answers to the yellow bar problem?

It works with default theme on 1.1.11 but no bar on custom themes.

Edit...ah, I missed the style.css edit for the custom theme. Working now. Clearly this is why some others are having the same problem.

Insert at end of file


table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
{
background-color: #fefee1; /* the bgcolor behind the text and image */
}
table.ncode_imageresizer_warning {
color: #000000; /* the font color */
border: 1px solid #CCCDCD; /* the border around the whole thing */
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 10px;
vertical-align: middle;
text-decoration: none;
}

table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}

Title: Re: nCode Image Resizer
Post by: jaisi on June 28, 2010, 06:23:44 AM
hi guys, I installed the mod Sucesfully. Image resizng but NO YELLOW bar to click on it.
And I'am useing ie 7and  8: and forum version r3 and theme is default.

please see attached file for more Errors
Title: Re: nCode Image Resizer
Post by: Pinball Nation on July 02, 2010, 06:15:24 AM
Hello,im using 2.0 rc3.I installed this mod earlier and it worked but uninstalled it.I decided to ininstall it again and it will not work at all.The install was a success with no errors.Any idea's?
Title: Re: nCode Image Resizer
Post by: luuuciano on July 02, 2010, 08:14:39 AM
do a parse, and check all the code & files are there?
Title: Re: nCode Image Resizer
Post by: Pinball Nation on July 02, 2010, 11:14:15 AM
Just checked an the code edits were made and the js file is in themes default.
Title: Re: nCode Image Resizer
Post by: ormuz on July 02, 2010, 11:45:30 AM
Just install all manual, with the parse, and no yellow box...
Title: Re: nCode Image Resizer
Post by: Cereus on July 06, 2010, 04:29:45 AM
Quote from: Andrés zc on June 04, 2010, 07:47:12 PM
Hi.
I fixed some bugs in Ncode Image Resizer V1.3 for Smf 1.1.11. The errors appears in the Subs.php and index.template files. Also, I corrected the translate to spanish.


I made some changes just like you, but did not work. Do you use any other theme or default?

Hugs.
Title: Re: nCode Image Resizer
Post by: jaisi on July 07, 2010, 11:35:40 AM
Quote from: jaisi on June 28, 2010, 06:23:44 AM
hi guys, I installed the mod Sucesfully. Image resizng but NO YELLOW bar to click on it.
And I'am useing ie 7and  8: and forum version r3 and theme is default.

please see attached file for more Errors

need help please reply me
Title: Re: nCode Image Resizer
Post by: Cereus on July 08, 2010, 04:30:36 AM
Bug fixed for SMF 1.1.x only to the default theme.

MOD corrected in the Annex.
Title: Re: nCode Image Resizer
Post by: Umbus on July 08, 2010, 10:49:11 AM
Who i configure the ncode image resizer too smf 2.0 RC3?
Title: Re: nCode Image Resizer
Post by: Cereus on July 09, 2010, 12:44:57 AM
Quote from: jaisi on July 07, 2010, 11:35:40 AM
Quote from: jaisi on June 28, 2010, 06:23:44 AM
hi guys, I installed the mod Sucesfully. Image resizng but NO YELLOW bar to click on it.
And I'am useing ie 7and  8: and forum version r3 and theme is default.

please see attached file for more Errors

need help please reply me

Try to change the Style.css of your theme.

Hugs.
Title: Re: nCode Image Resizer
Post by: live627 on July 09, 2010, 01:03:15 AM
Quote from: jaisi on July 07, 2010, 11:35:40 AM
Quote from: jaisi on June 28, 2010, 06:23:44 AM
hi guys, I installed the mod Sucesfully. Image resizng but NO YELLOW bar to click on it.
And I'am useing ie 7and  8: and forum version r3 and theme is default.

please see attached file for more Errors

need help please reply me

Follow these instructions:

Quote from: drav on June 26, 2010, 09:37:39 AM
Any answers to the yellow bar problem?

It works with default theme on 1.1.11 but no bar on custom themes.

Edit...ah, I missed the style.css edit for the custom theme. Working now. Clearly this is why some others are having the same problem.

Insert at end of file


table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
{
background-color: #fefee1; /* the bgcolor behind the text and image */
}
table.ncode_imageresizer_warning {
color: #000000; /* the font color */
border: 1px solid #CCCDCD; /* the border around the whole thing */
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 10px;
vertical-align: middle;
text-decoration: none;
}

table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}


Title: Re: nCode Image Resizer
Post by: Umbus on July 09, 2010, 08:17:28 AM
how i configure the ncode image resizer too smf 2.0 RC3?
Title: Re: nCode Image Resizer
Post by: live627 on July 09, 2010, 10:25:12 AM
More details would be nice...
Title: Re: nCode Image Resizer
Post by: Cereus on July 12, 2010, 06:39:17 PM
Quote from: Umbus on July 09, 2010, 08:17:28 AM
how i configure the ncode image resizer too smf 2.0 RC3?

> Admin > Features and Options > General.
Title: Re: nCode Image Resizer
Post by: distante on July 16, 2010, 09:46:11 PM
Ok, I was able to see the yellow bar in RC3

Do this Steps!

1. First UNINSTALL the mod
2. Go to Admin > Features and Options > Layout
3. In Max width of posted pictures (0 = disable) and Max height of posted pictures (0 = disable) fill with 0!
4. REINSTALL nCode Mode.
5. Enjoy

:D
Title: Re: nCode Image Resizer
Post by: luuuciano on July 17, 2010, 01:48:43 AM
i have a 610 Max width of posted pictures... and it works ok

maybe your problem was another thing, related to a bad implementation... and your "reinstallation" was successful

(or maybe not... no time to try your theory... eheheh)
Title: Re: nCode Image Resizer
Post by: distante on July 17, 2010, 04:09:10 AM
:P Y tried to reinstall without change anything and it doesn't work, but well the PHP is like a woman, you never really know what is doing! xD
Title: Re: nCode Image Resizer
Post by: [PT]Snake on July 27, 2010, 06:02:50 AM
No imagebar here, checked both CSS and Index, the code is there.

Also, i can't find the resizing mode on the admin panel, anyone found it (the mode, not the size).
Title: Re: nCode Image Resizer
Post by: live627 on July 27, 2010, 03:03:30 PM
Does it appear in default theme?
Title: Re: nCode Image Resizer
Post by: sattninja on August 17, 2010, 02:11:53 PM
can someone help me here

i am trying to change the color of the box in the index.css for my custom theme i  edited the code 100 times for the background and the text and nothing changes ever if i do it in the default theme css file the color changes but no matter what i enter in my custom theme css it stays the same color never changes i am lost here it makes no sense
Title: Re: nCode Image Resizer
Post by: sattninja on August 17, 2010, 03:09:13 PM
forget it i figured it out
Title: Re: nCode Image Resizer
Post by: Dani88 on September 05, 2010, 06:00:59 PM
I do not work for me, can not get walk
Title: Re: nCode Image Resizer
Post by: live627 on September 05, 2010, 06:57:08 PM
Until you give me more information, no answer will be provided.
Title: Re: nCode Image Resizer
Post by: ormuz on September 07, 2010, 10:11:57 PM
I still don't have the bar on my custom theme. Mod updated to 1.3, smf 1.1. code aded, css added, and no bar...
Title: Re: nCode Image Resizer
Post by: live627 on September 08, 2010, 12:44:52 AM
Make sure the Javascriot is added and working
Title: Re: nCode Image Resizer
Post by: ormuz on September 08, 2010, 09:11:43 AM
Yes, everything is installed... Is there an specific option in the admin to activate?
Title: Re: nCode Image Resizer
Post by: MoinFaraz on September 27, 2010, 11:25:53 AM
Using custom theme, got error while installing through package manager under
/sources/sub.php, did manual install on smf ver 1.1.11, can see the mod options under admin panel
like set height & width, but while in action the mod is doing no good
on the other hand its making the forum to display no images at all
all it says in the progress is 'looking for site http..."
i mean not showing the full thing like looking for site http://www.imageshar.us...

if you need i will upload my modified files so that it will be easy for u to track the bug

Regards
Title: Re: nCode Image Resizer
Post by: MoinFaraz on September 28, 2010, 12:39:04 PM
No one seems to be taking care of this mod ?

Is their anyone here who can assist me please...
Title: Re: nCode Image Resizer
Post by: Cereus on October 01, 2010, 03:43:18 AM
Quote from: Costa on July 16, 2009, 09:45:42 AM
Translation to brazilian

Modifications.portuguese_brazilian.php

// --- Begin added code - Advanced Visual Verification --- translated by Costa at simplemachines.org
$txt['ncode_imageresizer_warning_small'] = 'Clique nesta barra para visualizar a imagem no tamanho original.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s e %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Clique nesta barra para visualizar a imagem pequena.';
$txt['ncode_imageresizer_mode'] = 'Modo de redimensionamento';
$txt['ncode_imageresizer_original'] = 'Mantenha o tamanho original';
$txt['ncode_imageresizer_enlarge_same'] = 'Aumente 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 haver altura máxima.</span>';
// --- End added code ---


Modifications.portuguese_brazilian-utf-8.php

// --- Begin added code - Advanced Visual Verification --- translated by Costa at simplemachines.org
$txt['ncode_imageresizer_warning_small'] = 'Clique nesta barra para visualizar a imagem no tamanho original.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s e %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Clique nesta barra para visualizar a imagem pequena.';
$txt['ncode_imageresizer_mode'] = 'Modo de redimensionamento';
$txt['ncode_imageresizer_original'] = 'Mantenha o tamanho original';
$txt['ncode_imageresizer_enlarge_same'] = 'Aumente 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&aacute;xima';
$txt['ncode_imageresizer_max_height'] = 'Altura m&aacute;xima<br /><span class="smalltext">Deixe em branco para n&atilde;o haver altura m&aacute;xima.</span>';
// --- End added code ---


To Portuguese
Modification.portuguese_pt.php

[/]
// --- Begin added code - Advanced Visual Verification --- translated by Costa at simplemachines.org
$txt['ncode_imageresizer_warning_small'] = 'Clique nesta barra para visualizar a imagem no tamanho original.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s e %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Clique nesta barra para visualizar a imagem pequena.';
$txt['ncode_imageresizer_mode'] = 'Modo de redimensionamento';
$txt['ncode_imageresizer_original'] = 'Mantenha o tamanho original';
$txt['ncode_imageresizer_enlarge_same'] = 'Aumente 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 haver altura máxima.</span>';
// --- End added code ---
[]
Modifications.portuguese_pt-utf8.php

[/]
// --- Begin added code - Advanced Visual Verification --- translated by Costa at simplemachines.org
  $txt['ncode_imageresizer_warning_small'] = 'Clique nesta barra para visualizar a imagem no tamanho original.';
  $txt['ncode_imageresizer_warning_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s e %3$sKB.';
  $txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s.';
  $txt['ncode_imageresizer_warning_fullsize'] = 'Clique nesta barra para visualizar a imagem pequena.';
  $txt['ncode_imageresizer_mode'] = 'Modo de redimensionamento';
  $txt['ncode_imageresizer_original'] = 'Mantenha o tamanho original';
  $txt['ncode_imageresizer_enlarge_same'] = 'Aumente 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&aacute;xima';
  $txt['ncode_imageresizer_max_height'] = 'Altura m&aacute;xima<br /><span class="smalltext">Deixe em branco para n&atilde;o haver altura m&aacute;xima.</span>';
  // --- End added code ---
[]

Farewell[/]


Please, correct the PORTUGUESE translation! The codes (%1$sx%2$s and %3$sKB) still wrong in many MOD translations.

Gratz.
Title: Re: nCode Image Resizer
Post by: avjshah on October 05, 2010, 06:38:46 PM
what line i need to insert in index.template ?

I am using avaremu theme on my forum.
Title: Re: nCode Image Resizer
Post by: ProtoGT on October 10, 2010, 09:23:50 PM
I installed this mod then my images didn't appear anymore, I uninstalled the mod and they still don't appear! Any thoughts on what to do?
Title: Re: nCode Image Resizer
Post by: vladoniki on November 11, 2010, 08:13:38 AM
Dear frends, can I use that mod on SMF 1.1.12? I have tryed it, but noting changes in my forum - the images are still too big, not resized. Samo advices, or it is not possible to use it with 1.1.12?

Many thanks in advance! :)
Title: Re: nCode Image Resizer
Post by: jaisi on November 12, 2010, 06:30:07 AM
PLease Update for RC4 also
Title: Re: nCode Image Resizer
Post by: Huxy on November 12, 2010, 07:39:33 AM
Hi all...

I'm quite new to forum setup, and I was darn proud when I got my forum up.

Here's the issue, I'd love to have this mod on my forum, but I got absolutely no idea on how to install it. Also, I use the DarkBreak skin.
Could anyone pretty please help me?

Forum version: SMF 1.1.11
Host: 000webhost.com
Title: Re: nCode Image Resizer
Post by: Huxy on November 15, 2010, 06:34:10 PM
...haz to bump!
Title: Re: nCode Image Resizer
Post by: distante on November 21, 2010, 10:47:05 AM
Works Fine in RC4 ;)
Title: Re: nCode Image Resizer
Post by: jaisi on November 24, 2010, 09:11:04 AM
please update this mod for rc4
Title: Re: nCode Image Resizer
Post by: distante on November 29, 2010, 12:02:34 PM
Quote from: jaisi on November 24, 2010, 09:11:04 AM
please update this mod for rc4

am I invisible?

Quote from: distante on November 21, 2010, 10:47:05 AM
Works Fine in RC4 ;)
Title: Re: nCode Image Resizer
Post by: jaisi on November 30, 2010, 03:16:22 AM
hello guys please tell me its' working or not in r4 i'am traing to install i'am getting some Error please let me know.

thanks
Title: Re: nCode Image Resizer
Post by: HunterP on November 30, 2010, 06:26:25 PM
Quote from: Andrés Zc on June 04, 2010, 07:47:12 PMI fixed some bugs in Ncode Image Resizer V1.3 for Smf 1.1.11. The errors appears in the Subs.php and index.template files. Also, I corrected the translate to spanish.

Although I've downloaded the most recent package, I had to apply your changes before I got it working. I experienced a weird error though, in the upper left corner ]]> appeared.

I had to remove // ]]> in the line :

   // ]]></script>

To make it disappear...

For the author; Would it be possible to add extra resizing for quoted images? Currently I'm using the "Image Quote Removal Package" which shows a button in stead of the image, but I'd like to see a clickable thumbnail when an image gets quoted.
Title: Re: nCode Image Resizer
Post by: Sakae on December 02, 2010, 06:01:12 PM
Quote from: Arkhan Holycross on October 01, 2010, 03:43:18 AM
Quote from: Costa on July 16, 2009, 09:45:42 AM
Translation to brazilian

Modifications.portuguese_brazilian.php

// --- Begin added code - Advanced Visual Verification --- translated by Costa at simplemachines.org
$txt['ncode_imageresizer_warning_small'] = 'Clique nesta barra para visualizar a imagem no tamanho original.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s e %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Clique nesta barra para visualizar a imagem pequena.';
$txt['ncode_imageresizer_mode'] = 'Modo de redimensionamento';
$txt['ncode_imageresizer_original'] = 'Mantenha o tamanho original';
$txt['ncode_imageresizer_enlarge_same'] = 'Aumente 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 haver altura máxima.</span>';
// --- End added code ---


Modifications.portuguese_brazilian-utf-8.php

// --- Begin added code - Advanced Visual Verification --- translated by Costa at simplemachines.org
$txt['ncode_imageresizer_warning_small'] = 'Clique nesta barra para visualizar a imagem no tamanho original.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s e %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Clique nesta barra para visualizar a imagem pequena.';
$txt['ncode_imageresizer_mode'] = 'Modo de redimensionamento';
$txt['ncode_imageresizer_original'] = 'Mantenha o tamanho original';
$txt['ncode_imageresizer_enlarge_same'] = 'Aumente 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&aacute;xima';
$txt['ncode_imageresizer_max_height'] = 'Altura m&aacute;xima<br /><span class="smalltext">Deixe em branco para n&atilde;o haver altura m&aacute;xima.</span>';
// --- End added code ---


To Portuguese
Modification.portuguese_pt.php

[/]
// --- Begin added code - Advanced Visual Verification --- translated by Costa at simplemachines.org
$txt['ncode_imageresizer_warning_small'] = 'Clique nesta barra para visualizar a imagem no tamanho original.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s e %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Clique nesta barra para visualizar a imagem pequena.';
$txt['ncode_imageresizer_mode'] = 'Modo de redimensionamento';
$txt['ncode_imageresizer_original'] = 'Mantenha o tamanho original';
$txt['ncode_imageresizer_enlarge_same'] = 'Aumente 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 haver altura máxima.</span>';
// --- End added code ---
[]
Modifications.portuguese_pt-utf8.php

[/]
// --- Begin added code - Advanced Visual Verification --- translated by Costa at simplemachines.org
  $txt['ncode_imageresizer_warning_small'] = 'Clique nesta barra para visualizar a imagem no tamanho original.';
  $txt['ncode_imageresizer_warning_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s e %3$sKB.';
  $txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagem foi redimensionada. Clique nesta barra para visualizar a imagem no tamanho original. A imagem original tem %1$sx%2$s.';
  $txt['ncode_imageresizer_warning_fullsize'] = 'Clique nesta barra para visualizar a imagem pequena.';
  $txt['ncode_imageresizer_mode'] = 'Modo de redimensionamento';
  $txt['ncode_imageresizer_original'] = 'Mantenha o tamanho original';
  $txt['ncode_imageresizer_enlarge_same'] = 'Aumente 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&aacute;xima';
  $txt['ncode_imageresizer_max_height'] = 'Altura m&aacute;xima<br /><span class="smalltext">Deixe em branco para n&atilde;o haver altura m&aacute;xima.</span>';
  // --- End added code ---
[]

Farewell[/]


Please, correct the PORTUGUESE translation! The codes (%1$sx%2$s and %3$sKB) still wrong in many MOD translations.

Gratz.

It sure is messed up.

I'm using, for portuguese_brazilian.php:

// --- Begin added code - nCode Image Resizer ---
$txt['ncode_imageresizer_warning_small'] = 'Clique aqui para ver no tamanho original';
$txt['ncode_imageresizer_warning_filesize'] = 'Imagem redimensionada - Clique para aumentar. Tamanho original: %1$sx%2$s com %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Imagem redimensionada - Clique para aumentar. Tamanho original: %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Clique para diminuir.';
$txt['ncode_imageresizer_mode'] = 'Reajustar tamanho de imagens';
$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 ter altura max.</span>';
// --- End added code ---


And for portuguese_brazilian-utf8.php:

// --- Begin added code - nCode Image Resizer ---
$txt['ncode_imageresizer_warning_small'] = 'Clique aqui para ver no tamanho original';
$txt['ncode_imageresizer_warning_filesize'] = 'Imagem redimensionada - Clique para aumentar. Tamanho original: %1$sx%2$s com %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Imagem redimensionada - Clique para aumentar. Tamanho original: %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Clique para diminuir.';
$txt['ncode_imageresizer_mode'] = 'Reajustar tamanho de imagens';
$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&aacute;xima';
$txt['ncode_imageresizer_max_height'] = 'Altura m&aacute;xima<br /><span class="smalltext">Deixe em branco para n&atilde;o ter altura max.</span>';
// --- End added code ---
Title: Re: nCode Image Resizer
Post by: tomikulmala on December 05, 2010, 03:59:13 AM
Any chance of getting a fix to this mod so it would work with 1.1.12?

It gives an error with subs.php when trying to apply the mod.

I'm using default theme and using the following extensions:
- Ad Managment    2.3
- Custom Profile Field Mod    3.20
- Auto Embed Video/Audio Clips    3.1.2
- reCAPTCHA for SMF    0.9.6
Title: Re: nCode Image Resizer
Post by: HunterP on December 05, 2010, 08:59:17 AM
Quote from: tomikulmala on December 05, 2010, 03:59:13 AMAny chance of getting a fix to this mod so it would work with 1.1.12?
It gives an error with subs.php when trying to apply the mod.

Have a look at this posting :

http://www.simplemachines.org/community/index.php?topic=240057.msg2654722#msg2654722
Title: Re: nCode Image Resizer
Post by: HunterP on December 20, 2010, 01:13:15 PM

Maybe an odd question, but would it be possible to make the max-dimensions a user setting? I have the max witdh at 750px now, due to some complaints. On my screen there is lots of space left, and I don't think that I'm the only one. I had an other MOD installed before which automatically scaled, using the users resolution but that MOD didn't seem to work correctly, so I switched to this one.
Title: Re: nCode Image Resizer
Post by: Imso on December 31, 2010, 09:06:49 AM
Quote from: Andrés Zc on June 04, 2010, 07:47:12 PM
Hi.
I fixed some bugs in Ncode Image Resizer V1.3 for Smf 1.1.11. The errors appears in the Subs.php and index.template files. Also, I corrected the translate to spanish.





/Sources/Subs.php


In the parse site says "search" but this is incorrect:


array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 || strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disabled_content' => '($1)',
),


The correct form is:

array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disabled_content' => '($1)',
),


In the parse site says "replace with" but this is incorrect:

array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" onload="NcodeImageResizer.createOn(this);" />',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 || strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disabled_content' => '($1)',
),


The correct form is:

array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" onload="NcodeImageResizer.createOn(this);" />',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disabled_content' => '($1)',
),





/Themes/default/index.template.php

search:

</head>

In the parse site says "replace with" but this is incorrect:

echo '<!-- nCode Image Resizer -->
<script type="text/javascript" src="', $settings['default_theme_url'], '/ncode_imageresizer.js"></script>';

// What is the mode?
$mode = 'none';
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode = 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode = 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode = 'newwindow';
}

echo '
<script language="JavaScript" type="text/javascript"><!-- // -->
NcodeImageResizer.BBURL = "', $settings['images_url'], '";
NcodeImageResizer.MODE = "', $mode, '";
NcodeImageResizer.MAXWIDTH = "', empty($modSettings['ncode_imageresizer_max_width']) ? 0 : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "', empty($modSettings['ncode_imageresizer_max_height']) ? 0 : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \'', $txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \'', $txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \'', $txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \'', $txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>

</head>


The correct form is:

<!-- nCode Image Resizer -->
<script type="text/javascript" src="', $settings['default_theme_url'], '/ncode_imageresizer.js"></script>';

// What is the mode?
$mode = 'none';
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode = 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode = 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode = 'newwindow';
}

echo '
<script language="JavaScript" type="text/javascript"><!-- // -->
NcodeImageResizer.BBURL = "', $settings['images_url'], '";
NcodeImageResizer.MODE = "', $mode, '";
NcodeImageResizer.MAXWIDTH = "', empty($modSettings['ncode_imageresizer_max_width']) ? 0 : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "', empty($modSettings['ncode_imageresizer_max_height']) ? 0 : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \'', $txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \'', $txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \'', $txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \'', $txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>

</head>





In Modifications.spanish.php, In Modifications.spanish_latin.php, In Modifications.spanish_es.php

The incorrect form is:



// --- Begin added code - nCode Image Resizer ---
$txt['ncode_imageresizer_warning_small'] = 'Has click en esta barra para ver la imagen en su tama&ntilde;o original.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagen ha sido redimensionada. Has click 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. Has click en la barra para verla en su tama&ntilde;o original (%1$sx%2$s px).';
$txt['ncode_imageresizer_warning_fullsize'] = 'Has click en la barra para ver la imagen en peque&ntilde;o.';
$txt['ncode_imageresizer_mode'] = 'Redimensionar Imagenes';
$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 ---


The correct way for the above files is:

// --- Begin added code - nCode Image Resizer ---
$txt['ncode_imageresizer_warning_small'] = 'Has click en esta barra para ver la imagen en su tamaño original.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagen ha sido redimensionada. Has click en la barra para verla en su tamaño original (%1$sx%2$s px y pesa %3$sKB).';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagen ha sido redimensionada. Has click en la barra para verla en su tamaño original (%1$sx%2$s px).';
$txt['ncode_imageresizer_warning_fullsize'] = 'Has click en la barra para ver la imagen en pequeño.';
$txt['ncode_imageresizer_mode'] = 'Redimensionar Imagenes';
$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 ---


Greetings...
They should just update the file. I'm a noob and don't know how to edit files yet.
Title: Re: nCode Image Resizer
Post by: luuuciano on January 05, 2011, 03:39:07 PM
Quote from: HunterP on November 30, 2010, 06:26:25 PM
Although I've downloaded the most recent package, I had to apply your changes before I got it working. I experienced a weird error though, in the upper left corner ]]> appeared.

I had to remove // ]]> in the line :

   // ]]></script>

To make it disappear...

The proper way to fix it is adding --><![CDATA[
You will have something like
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
NcodeImageResizer.BBURL = "', $settings['images_url'], '";
NcodeImageResizer.MODE = "', $mode, '";
NcodeImageResizer.MAXWIDTH = "', empty($modSettings['ncode_imageresizer_max_width']) ? 0 : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "', empty($modSettings['ncode_imageresizer_max_height']) ? 0 : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \'', $txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \'', $txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \'', $txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \'', $txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>';
Title: Re: nCode Image Resizer
Post by: impreza on January 05, 2011, 04:14:24 PM
great addition, thanks
Title: Re: nCode Image Resizer
Post by: agent47 on January 08, 2011, 03:22:36 PM
For some reason, images don't seem to resize for me. Is there some ammendments I have to make to the code in order to get it working, I see nothing on the Admin CP too? :S
Someone please help me out?
How do I get I get it to auto-resize?
Title: Re: nCode Image Resizer
Post by: LiBen on January 13, 2011, 01:20:57 PM
Quote from: HunterP on December 20, 2010, 01:13:15 PM
would it be possible to make the max-dimensions a user setting?

It would have my vote!  :)
Title: Re: nCode Image Resizer
Post by: Dzonny on January 23, 2011, 05:22:30 PM
When i install this mod on RC4 (without errors) i got forum crashed, and i have to uninstall it manually.
Will you update mod to work with RC4 maybe?

Regards.
Title: Re: nCode Image Resizer
Post by: Joazo on January 29, 2011, 04:34:32 AM
Any support for 2.0 RC4 any soon please?
Title: Re: nCode Image Resizer
Post by: dukeofgaming on February 01, 2011, 02:29:34 AM
I've attached the modified file for the 1.1.12 installation, just replace in the downloaded .zip file and install.

I had to make some hacks of my own because of my own template to index.template.php, adding manually the lines indicated before the head tag. Also, I had to add the style.css rules. For default template nothing needs to be added though.
Title: Re: nCode Image Resizer
Post by: alpheus on February 09, 2011, 08:35:08 AM
When I fix that code into index.template;

echo '<!-- nCode Image Resizer -->
<script type="text/javascript" src="', $settings['default_theme_url'], '/ncode_imageresizer.js"></script>';

// What is the mode?
$mode = 'none';
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode = 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode = 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode = 'newwindow';
}

echo '
<script language="JavaScript" type="text/javascript"><!-- // -->
NcodeImageResizer.BBURL = "', $settings['images_url'], '";
NcodeImageResizer.MODE = "', $mode, '";
NcodeImageResizer.MAXWIDTH = "', empty($modSettings['ncode_imageresizer_max_width']) ? 0 : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "', empty($modSettings['ncode_imageresizer_max_height']) ? 0 : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \'', $txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \'', $txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \'', $txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \'', $txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>

</head>


I am getting this warning;

Template Parse Error!

There was a problem loading the /Themes/log_control1/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
syntax error, unexpected T_STRING, expecting T_PAAMAYIM_NEKUDOTAYIM
Title: Re: nCode Image Resizer
Post by: Swifty550 on February 19, 2011, 08:12:06 PM
Will this ever be updated for RC5?
Title: Re: nCode Image Resizer
Post by: noaccess on March 12, 2011, 04:46:27 AM
In RC5 it install without errors, but it doesn't function at all.
Title: Re: nCode Image Resizer
Post by: noaccess on March 25, 2011, 07:48:44 AM
Has anyone managed to make this work in RC5?
Title: Re: nCode Image Resizer
Post by: HunterP on March 25, 2011, 09:49:38 AM
Quote from: noaccess on March 25, 2011, 07:48:44 AM
Has anyone managed to make this work in RC5?

Works fine with me. I only added 2.0 RC5 in the packageinfo.xml
Title: Re: nCode Image Resizer
Post by: noaccess on March 25, 2011, 11:44:56 AM
Quote from: HunterP on March 25, 2011, 09:49:38 AM
Quote from: noaccess on March 25, 2011, 07:48:44 AM
Has anyone managed to make this work in RC5?

Works fine with me. I only added 2.0 RC5 in the packageinfo.xml
Well mine installed, but it just doesn't do anything to the images on my forum. I've also set the options...
Title: Re: nCode Image Resizer
Post by: jaisi on March 25, 2011, 01:33:26 PM
same here doesn't work R5 could you please attaehed that pakage
Title: Re: nCode Image Resizer
Post by: HunterP on March 25, 2011, 02:26:41 PM
Quote from: jaisi on March 25, 2011, 01:33:26 PM
same here doesn't work R5 could you please attaehed that pakage
Title: Re: nCode Image Resizer
Post by: noaccess on March 26, 2011, 02:59:43 AM
Even after checking every single code that was added (was correctly added), it didn't work. so instead I installed: http://custom.simplemachines.org/mods/index.php?mod=1769
Title: Re: nCode Image Resizer
Post by: shoeboxjoe on April 05, 2011, 03:53:05 PM
SMF 1.1.13, Custom Theme (Black Rain), No images load at all after nCode installed, red X in IE and nothing in FF.

I installed ncode, installed subs.php manually, copied ncode_imageresizer.js to all themes, also manually edited index.template.php for all themes, max size and width set to 0 and set nCode drop down and height/width options. Now all previous and new linked images don't load at all. Any thoughts? I'm sure its something stupid i missed, thanks!
Title: Re: nCode Image Resizer
Post by: jaisi on April 07, 2011, 01:28:07 PM
Please make this mod to R5 Also..... please
Title: Re: nCode Image Resizer
Post by: HunterP on April 07, 2011, 01:51:10 PM
Quote from: jaisi on April 07, 2011, 01:28:07 PM
Please make this mod to R5 Also..... please

It works for RC5. Either emulate or edit the package-info.xml.

http://www.hulpverleningsforum.nl/forum/index.php?topic=3895.msg858518#msg858518

That is on RC5, no problems at all.
Title: Re: nCode Image Resizer
Post by: jaisi on April 07, 2011, 02:19:04 PM
Hunter Sir could you please attached that mod here..
Title: Re: nCode Image Resizer
Post by: HunterP on April 07, 2011, 04:03:32 PM
Quote from: jaisi on April 07, 2011, 02:19:04 PM
Hunter Sir could you please attached that mod here..

I attached my package-info on the previous page.
Title: Re: nCode Image Resizer
Post by: jaisi on April 07, 2011, 04:04:36 PM
ok let me try first and i will tell you
Title: Re: nCode Image Resizer
Post by: jaisi on April 07, 2011, 04:13:49 PM
Thanks hunter its work great Thank you again
Title: Re: nCode Image Resizer
Post by: HunterP on April 07, 2011, 04:15:07 PM
Quote from: jaisi on April 07, 2011, 04:13:49 PM
Thanks hunter its work great Thank you again

Title: Re: nCode Image Resizer
Post by: jaisi on April 07, 2011, 04:16:51 PM
Quote from: HunterP on April 07, 2011, 04:15:07 PM
Quote from: jaisi on April 07, 2011, 04:13:49 PM
Thanks hunter its work great Thank you again



Sorry to say but i'am geeting this Error

http://******/index.php?action=admin;area=packages;sa=install;package=nCode_Image_Resizer_1_3_1.zip2: fclose(): supplied argument is not a valid stream resourceFile: /home/**/public_html/forum/Sources/Subs-Package.php
Line: 2502
Title: Re: nCode Image Resizer
Post by: HunterP on April 07, 2011, 05:16:01 PM
Quote from: jaisi on April 07, 2011, 04:16:51 PM
Sorry to say but i'am geeting this Error

If it's only the error and the package is working, don't worry. Get that error myself once in a while but the (de)installed package itself doesn't show any errors.
Title: Re: nCode Image Resizer
Post by: Kriostasys on April 09, 2011, 05:22:23 PM
for 1.1.13 & 2.0 RC5
sorry only 3 languages
Title: Re: nCode Image Resizer
Post by: noaccess on May 21, 2011, 06:31:34 AM
Quote from: Kriostasys on April 09, 2011, 05:22:23 PM
for 1.1.13 & 2.0 RC5
sorry only 3 languages
It doesn't do anything at all, 2.0 RC5... uninstalled it.
Title: Re: nCode Image Resizer
Post by: aishaweb on May 21, 2011, 06:43:13 AM
Quote from: noaccess on May 21, 2011, 06:31:34 AM
Quote from: Kriostasys on April 09, 2011, 05:22:23 PM
for 1.1.13 & 2.0 RC5
sorry only 3 languages
It doesn't do anything at all, 2.0 RC5...

yes it does....
Title: Re: nCode Image Resizer
Post by: noaccess on May 21, 2011, 06:52:11 AM
Not on mine anyway, no error, installed fine... just doesn't do anything... changed some of the settings several times... etc.
Title: Re: nCode Image Resizer
Post by: aishaweb on May 21, 2011, 06:57:52 AM
did you change the max image sizes?  if you dont and leave them at 0 it wont have any effect because it just lets the image be whatever size it is.
Title: Re: nCode Image Resizer
Post by: Kriostasys on May 21, 2011, 12:18:02 PM
in the original version
as well as this he established the size of the images in:
ADMIN
Features and Options
Layout and Options
Title: Re: nCode Image Resizer
Post by: InstilledBee on May 24, 2011, 04:03:41 AM
This mod seems to have problems on 1.1.13, the code edit on index.template.php is buggy.

The code edit:


echo '<!-- nCode Image Resizer -->
<script type="text/javascript" src="', $settings['default_theme_url'], '/ncode_imageresizer.js"></script>';

// What is the mode?
$mode = 'none';
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode = 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode = 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode = 'newwindow';
}

echo '
<script language="JavaScript" type="text/javascript"><!-- // -->
NcodeImageResizer.BBURL = "', $settings['images_url'], '";
NcodeImageResizer.MODE = "', $mode, '";
NcodeImageResizer.MAXWIDTH = "', empty($modSettings['ncode_imageresizer_max_width']) ? 0 : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "', empty($modSettings['ncode_imageresizer_max_height']) ? 0 : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \'', $txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \'', $txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \'', $txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \'', $txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>

</head>


is missing a semicolon on the preceeding line.

Anyways I don't know if the issue has been brought up already, or the problem only happened to me, but would like to let the mod author know regardless. :)
Title: Re: nCode Image Resizer
Post by: noaccess on May 26, 2011, 11:16:10 AM
Quote from: aishaweb on May 21, 2011, 06:57:52 AM
did you change the max image sizes?  if you dont and leave them at 0 it wont have any effect because it just lets the image be whatever size it is.
I don't have a small forum and I know what I'm doing after all these years... adjusting some stupid settings is not the issue. It simply doesn't work and doesn't output any errors either. Now it could be my particular setup that is causing this, but I doubt it and I don't feel like going through everything to find out what it is either.
Title: Re: nCode Image Resizer
Post by: jaisi on June 23, 2011, 01:15:23 PM
Please make this mod to 2.0 Gold  Also..... please
Title: Re: nCode Image Resizer
Post by: Jessica. on June 23, 2011, 01:19:33 PM
Quote from: jaisi on June 23, 2011, 01:15:23 PM
Please make this mod to 2.0 Gold  Also..... please

I have 2.0 Gold and had installed this mod without problems
Title: Re: nCode Image Resizer
Post by: jaisi on June 23, 2011, 01:23:32 PM
could you share with us.....
Title: Re: nCode Image Resizer
Post by: Jessica. on June 23, 2011, 01:31:17 PM
all I did was emulate to the version 2.0 RC3 and I was able to install it. go to advanced at the bottom of Browse packages to do that

if 2.0 RC3 won't work try a different one until [Install Mod] appears :S
Title: Re: nCode Image Resizer
Post by: jaisi on June 28, 2011, 06:35:16 AM
Its not working in 2.0 version please help me how to install this mod in 2.0 version
Title: Re: nCode Image Resizer
Post by: Jessica. on June 28, 2011, 10:33:14 AM
did you emulate?
Title: Re: nCode Image Resizer
Post by: Alpay on June 29, 2011, 05:01:05 AM
Quote from: Jessica. on June 28, 2011, 10:33:14 AM
did you emulate?

sources/subs.php error :)
Title: Re: nCode Image Resizer
Post by: Barakk on July 04, 2011, 02:53:36 AM
I can install mod version 1.3.1 just fine in 2.0 RTM, but for some reason it doesn't do anything. Emulating "SMF 2.0 RC3" doesn't let me install the mod at all.
Configuration/Settings/Layout/"Max width/height of posted pictures" is set just fine.

Am I missing something obvious like an Enable button?
Title: Re: nCode Image Resizer
Post by: jaisi on July 04, 2011, 06:47:37 AM
Great its work Thanks for infirming
Title: Re: nCode Image Resizer
Post by: Dean313 on August 06, 2011, 05:13:25 PM
Quote from: HunterP on March 25, 2011, 02:26:41 PM
Quote from: jaisi on March 25, 2011, 01:33:26 PM
same here doesn't work R5 could you please attaehed that pakage

I changed it, but it still wont work, any idea why?
Title: Re: nCode Image Resizer
Post by: MissyNL on August 31, 2011, 03:29:10 PM
Are you going to update it for 2.0 gold?
Title: Re: nCode Image Resizer
Post by: luuuciano on September 26, 2011, 02:37:37 PM
Firebug shows an error:
NcodeImageResizer is not defined
index.php?action=unread;all;start=0()index....start=0 (línea 53)
[Interrumpir en este error] NcodeImageResizer.BBURL = "http://domain.com/Themes/default/images";
Title: Re: nCode Image Resizer
Post by: Help12345 on September 26, 2011, 04:18:31 PM
work in smf 2.0.1 ?
Title: Re: nCode Image Resizer
Post by: HunterP on October 02, 2011, 03:51:19 AM
Quote from: Help12345 on September 26, 2011, 04:18:31 PM
work in smf 2.0.1 ?

If it does in 2.0, it works in 2.01.

If not, you should emulate version 2.0 in "Advanced" (in the Package Manager)
Title: Re: nCode Image Resizer
Post by: spikespiegel on October 05, 2011, 11:32:03 AM
I have nCode Image Resizer installed but it's not working. I already checked for the modified files, but they all have the correct code.

Here, the image that is not being resized:
http://forum.mghospedagem.com/sonhos-e-aspiracoes/teste-123/msg371/#msg371
Title: Re: nCode Image Resizer
Post by: spikespiegel on October 05, 2011, 06:59:44 PM
Just as I expected, as the code was modified correctly during installation, nothing was wrong at all.


I suggest the developer to reconsider making usage instructions. Cause this mod isn't a good thing to work with if you don't know where to go after installing it.


Here, the instrunctions.


1 - After installing it, go to admin > features and options > general

NOTE: GENERALLLLLLLLLLL, don't do like many people here that are saying that you must click on layout tab, it's not layout tab, it's general tab.


2 - Find the part where you can adjust the width and height. Don't forget to configure the re-size option from the drop down box. Just remembering you that you can configure everything at the same page, admin > features and options > general


3 - You may have noticed some anger tone in my text. Well, after getting 2 days in a row, sleeping bad (only 4 hours), just to solve an issue of a single mod, and by the way, uninstalling it, installing other ones, seeing things don't work up,  then getting back to the same mod to re-install it, test it, edit the code, it's really frustrating. SERIOUSLY.
Title: Re: nCode Image Resizer
Post by: AMWebby on October 08, 2011, 06:09:52 AM
Quote from: InstilledBee on May 24, 2011, 04:03:41 AM
This mod seems to have problems on 1.1.13, the code edit on index.template.php is buggy.

The code edit:


echo '<!-- nCode Image Resizer -->
<script type="text/javascript" src="', $settings['default_theme_url'], '/ncode_imageresizer.js"></script>';

// What is the mode?
$mode = 'none';
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode = 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode = 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode = 'newwindow';
}

echo '
<script language="JavaScript" type="text/javascript"><!-- // -->
NcodeImageResizer.BBURL = "', $settings['images_url'], '";
NcodeImageResizer.MODE = "', $mode, '";
NcodeImageResizer.MAXWIDTH = "', empty($modSettings['ncode_imageresizer_max_width']) ? 0 : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "', empty($modSettings['ncode_imageresizer_max_height']) ? 0 : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \'', $txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \'', $txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \'', $txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \'', $txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>

</head>


is missing a semicolon on the preceeding line.

Anyways I don't know if the issue has been brought up already, or the problem only happened to me, but would like to let the mod author know regardless. :)
Is it missing a semi colon or an apostrophe followed by a semi colon?

This seems to be my problem installing this as it installs fine with the exception that I have to manually add the subs.php line but then it gives me an error loading index.template.php and the only way I can get out of that is to revert to the earlier version of index.template.php

I ask because I'm not a wizard coder and noticed that the preceding </script>'; was written like that, not </script>;
Title: Re: nCode Image Resizer
Post by: luuuciano on October 08, 2011, 11:20:41 AM
AMWebby, attach the whole file
Title: Re: nCode Image Resizer
Post by: remingtone on November 01, 2011, 06:55:47 PM
Quote from: budun on April 11, 2010, 11:43:31 AM
Quote from: ElectricSquid on September 13, 2009, 10:30:30 PM
I've been going thorough my site validating the XHTML and eliminating errors.
Thats when i found an error that nCode Image Resizer is creating.
The short version is that the attribute "onload" is invalid for XHTML 1.0 Transitional.

Here's what the W3.org validator (http://validator.w3.org) says about this error...
Doctype:   XHTML 1.0 Transitional

Quote

Validation Output: 1 Error

there is no attribute X
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Line 683, column 173: Attribute "onload" exists, but can not be used for this element.
...etal2.png" alt="" border="0" onload="NcodeImageResizer.createOn(this);" /></a>


The above quoted error is from a div tag located in a users sig, below is the full tag. But this same error happens on every pic that nCode resizes on the page. For some reason "onload" is not a correct attribute to use with XHTML 1.0 Transitional, which SMF uses.

    <div class="signature"><a href="http://redneckfabrication.com" target="_blank"><img src="http://redneckfabrication.com/images/RFmetal2.png" alt="" border="0" onload="NcodeImageResizer.createOn(this);" /></a></div>

So what do I use instead of onload?
How do we get around this and get correct with XHTML 1.0 Transitional?

Any solutions on this?
any ideas?
Title: Re: nCode Image Resizer
Post by: Cordwainer on November 15, 2011, 06:41:23 PM
Hey, I have this problem (http://www.simplemachines.org/community/index.php?topic=459323.0). Any help?

EDIT: Wow, it seems like my problem is the exact opposite of many people in this thread. I want to get rid of the bar :P
Title: Re: nCode Image Resizer
Post by: Cordwainer on November 17, 2011, 09:53:42 PM
Bump?
Title: Re: nCode Image Resizer
Post by: Norweschendir on November 20, 2011, 06:49:14 AM
hey there,
i installed this mod to smf 2.0.1 and it works with a few adjustments. so the autoinstall does not work for Subs and ManageSettings. i had to add this by myself.

BUT: please, please, please add a line into the readme how to handle this mod. i.e. where to find the settings for (admin > features and options > general) or that you have to insert some settings in the database before the mod will work. (or use the general tab in the forum - if you find it... )
i spend more time to find the settings or the values i had to insert in the database as to install this mod. so may you can add some defaultsettings into the database during installing?

and now, a german translation, feel free to use!

// --- Begin added code - nCode Image Resizer ---
$txt['ncode_imageresizer_warning_small'] = 'Hier klicken um das ganze Bild anzuzeigen.';
$txt['ncode_imageresizer_warning_filesize'] = 'Dieses Bild wurde verkleinert. Hier klicken um das ganze Bild anzuzeigen. Die Originalgröße ist %1$sx%2$s und ist %3$sKB groß;.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Dieses Bild wurde verkleinert. Hier klicken um das ganze Bild anzuzeigen. Die Originalgröße ist %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Hier klicken um das Bild zu verkleinern.';
$txt['ncode_imageresizer_mode'] = 'Bild Gr&ouml;&szlig;en&auml;nderungsmodus';
$txt['ncode_imageresizer_original'] = 'Originalgr&ouml;&szlig;e beibehalten';
$txt['ncode_imageresizer_enlarge_same'] = 'Vergr&ouml;&szlig;ern im selben Dokument';
$txt['ncode_imageresizer_open_same'] = 'Im selben Fenster &ouml;ffnen';
$txt['ncode_imageresizer_open_new'] = 'In neuem Fenster &ouml;ffnen';
$txt['ncode_imageresizer_max_width'] = 'Maximale Breite';
$txt['ncode_imageresizer_max_height'] = 'Maximale H&ouml;he<br /><span class="smalltext">Leer lassen f&uuml;r keine H&ouml;henbeschr&auml;nkung.</span>';

// --- End added code ---
Title: Re: nCode Image Resizer
Post by: Cordwainer on November 28, 2011, 08:10:42 PM
Is there any way to get rid of the bar?
Title: Re: nCode Image Resizer
Post by: Cordwainer on December 03, 2011, 03:04:38 PM
Any?
Title: Re: nCode Image Resizer
Post by: HunterP on December 03, 2011, 03:25:25 PM
Quote from: Cordwainer on November 28, 2011, 08:10:42 PM
Is there any way to get rid of the bar?

What bar?
Title: Re: nCode Image Resizer
Post by: Cordwainer on December 03, 2011, 03:45:17 PM
Quote from: HunterP on December 03, 2011, 03:25:25 PM
What bar?

The bar above the image that you click to expand the image. I think it looks ugly, and I'd rather get rid of it and have the entire image be clickable to expand in a new tab.
Title: Re: nCode Image Resizer
Post by: HunterP on December 03, 2011, 03:58:25 PM
Quote from: Cordwainer on December 03, 2011, 03:45:17 PM
The bar above the image that you click to expand the image. I think it looks ugly, and I'd rather get rid of it and have the entire image be clickable to expand in a new tab.

Ah, you want the image to be clickable. But how do you know if an image is resized? How do you know that it IS clickable?
Title: Re: nCode Image Resizer
Post by: Cordwainer on December 04, 2011, 01:23:39 AM
If an image appears cropped, shrunk, or low-detail, the natural impulse (as far as I'm aware) is that it's a thumbnail and that it can be clicked to expand it. You know it's clickable because your mouse cursor changes to a hand with an extended index finger whenever you hover over it or any other link / object / interactive thing in your browser.

The bar is superfluous, and it creates an awful buffer when you're posting lots and lots of images which I do because I run a gaming forum.
Title: Re: nCode Image Resizer
Post by: Cordwainer on December 04, 2011, 01:26:51 AM
Also, I wouldn't mind if as a consequence all images were clickable, because why not? It's often nicer to examine an image by itself, and since most of the images we'll be posting are high-resolution you'd expect most of them to be resized.
Title: Re: nCode Image Resizer
Post by: HunterP on December 04, 2011, 05:18:00 AM
Quote from: Cordwainer on December 04, 2011, 01:26:51 AM
Also, I wouldn't mind if as a consequence all images were clickable, because why not? It's often nicer to examine an image by itself, and since most of the images we'll be posting are high-resolution you'd expect most of them to be resized.

But what if someone links an image? Like this :

(http://www.simplemachines.org)

The image should already be clickable by the BBcode. Your suggestion might cause conflicts.
Title: Re: nCode Image Resizer
Post by: Cordwainer on December 04, 2011, 05:51:13 AM
I can see where a user might want to have an image link to somewhere else, so maybe I could implement a custom tag to fix that.
Title: Re: nCode Image Resizer
Post by: jaisi on January 02, 2012, 01:01:34 PM
anybody going to update this mod for 2.02  gold ???? i really need this mod for 2.0.2 .


THanks in advnave
Title: Re: nCode Image Resizer
Post by: luuuciano on January 04, 2012, 03:15:49 PM
Have you tried emulating previous version?
Im using it without problems

Wel... just 2 JS error reported by firebug... have someone solved that?
Title: Re: nCode Image Resizer
Post by: chili on January 05, 2012, 09:48:07 AM
new in here :) just made my first forum using the SMF .. and i badly need this mod for 2.02  .. and i'm not that great at coding so it has to be as installer .. 
Title: Re: nCode Image Resizer
Post by: luuuciano on January 05, 2012, 12:06:33 PM
Quote from: chili on January 05, 2012, 09:48:07 AM
new in here :) just made my first forum using the SMF .. and i badly need this mod for 2.02  .. and i'm not that great at coding so it has to be as installer .. 

http://wiki.simplemachines.org/smf/How_can_install_a_mod_that_doesn%27t_work_in_my_SMF_version
Title: Re: nCode Image Resizer
Post by: chili on January 05, 2012, 04:03:38 PM
Thank you so much for trying to help .. but it still doesn't work .. i get an error " there's a missmatch of mod and smf  ver. :(
Title: Re: nCode Image Resizer
Post by: Swifty550 on March 21, 2012, 07:30:29 AM
Quote from: chili on January 05, 2012, 04:03:38 PM
Thank you so much for trying to help .. but it still doesn't work .. i get an error " there's a missmatch of mod and smf  ver. :(

Emulate the version number.
Title: Re: nCode Image Resizer
Post by: olihar on March 26, 2012, 04:02:50 PM
Has anyone thought about have-ing a Thickbox kind of style to the larger image after you click so things to dark and you focus on the image instead of it getting scrollbars for fixed width layouts.

Guess Thickbox is not being developed any more... I guess something like this would work the same way.
http://www.shadowbox-js.com/index.html (http://www.shadowbox-js.com/index.html)
Title: Re: nCode Image Resizer
Post by: Zuća on May 14, 2012, 01:22:42 PM
how to integrate mod with smf gallery ?
Title: Re: nCode Image Resizer
Post by: Biology Forums on June 11, 2012, 10:52:27 PM
Doesn't SMF have this feature already, where you can set the maximum width and height of a linked image? What difference is this?
Title: Re: nCode Image Resizer
Post by: Arantor on June 11, 2012, 11:02:38 PM
The first line of the description explains the difference; it makes it easier to open it in place or in a new tab.
Title: Re: nCode Image Resizer
Post by: Biology Forums on June 11, 2012, 11:18:06 PM
Quote from: Arantor on June 11, 2012, 11:02:38 PM
The first line of the description explains the difference; it makes it easier to open it in place or in a new tab.

So, the function is the same, other than the fact that it allows you to open and see the whole image. I don't have this problem, since I use highslide. Regardless, a great alternative.
Title: Re: nCode Image Resizer
Post by: Kochan on June 14, 2012, 08:11:47 AM
Hi could you tell me if this mod works with Polish Lang?
Title: Re: nCode Image Resizer
Post by: dandanch on October 01, 2012, 12:29:31 AM
It looks to have install ok, but I can't seem to find the setting? I'm running 2.0.2.
Title: Re: nCode Image Resizer
Post by: mtxpert on November 06, 2012, 09:10:25 AM
I tried installing this on SMF 2.0.2 but no luck, even tried using the emulator set to SMF 2.0 RC2 - still no luck as the installer rattled off a ton of errors.
I could really use this on my forum, could someone to do this is how to install the mod for dummies for me?
Thanks!
Title: Re: nCode Image Resizer
Post by: dexy.paluba.info on November 25, 2012, 11:06:23 AM
Will this mod work on 1.1.16?
Title: Re: nCode Image Resizer
Post by: FragaCampos on December 06, 2012, 11:04:57 AM
Yes, it's working on mine.
Title: Re: nCode Image Resizer
Post by: Jack_40k on January 17, 2013, 10:56:39 PM
Please upgrade to 2.0.3 :D!!!!!!
Title: Re: nCode Image Resizer
Post by: HunterP on January 18, 2013, 02:53:01 AM
Quote from: Jack_40k on January 17, 2013, 10:56:39 PM
Please upgrade to 2.0.3 :D!!!!!!

It works fine on 2.0.3. Just emulate an older version

How to install a mod that doesn't work in my SMF version (http://wiki.simplemachines.org/smf/How_can_I_install_a_mod_that_doesn%27t_work_in_my_SMF_version)
Title: Re: nCode Image Resizer
Post by: Cereus on February 14, 2013, 09:52:23 PM
I've fixed it to portuguese (all). Some codes were broken.

To SMF 2.0.2, I don't know if it works on higher versions.

Mod edit: Attachment removed waiting for a response from the author.
Title: Re: nCode Image Resizer
Post by: kat on February 15, 2013, 06:37:17 AM
Note:

I've notified the author of the mod about this, in case it infringes his licence. :)
Title: Re: nCode Image Resizer
Post by: Tavsih on March 29, 2013, 02:47:40 AM
Sorry for bump
I installed it on 2.0.4 But doesnt resize any image.Where i can set settings etc?
Title: Re: nCode Image Resizer
Post by: Antros22 on April 26, 2013, 04:21:42 PM
Quote from: terrible on March 29, 2013, 02:47:40 AM
Sorry for bump
I installed it on 2.0.4 But doesnt resize any image.Where i can set settings etc?

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.



i install in my smf 2.0.4

works like a charm :D
Title: Re: nCode Image Resizer
Post by: brynn on July 17, 2013, 06:11:21 PM
Hi Friends,
I've just installed nCode Image Resizer 1.4 on SMF 2.04 (with Tiny Portal), apparently successfully.  But it doesn't seem to be working.  I can't find any controls for it (on the mod site it says the H and W can be set).  And when I inserted a large image into a message, it wasn't resized.

Since it says on the mod site "simple edit for custom themes" I tried switching to the default theme (Curve), but it doesn't get resized in that theme either.

Any idea what I can do?  I'm not sure what kind of info to post, that would help you.  But I'll be glad to, if you can tell me what to post.

Thank you very much  :)

Edit
Ok, never mind.  It turns out that SMF already can resize images.  So I don't need it after all.  Sorry to bother you  :)
Title: Re: nCode Image Resizer
Post by: Melfina on August 07, 2013, 10:21:02 AM
I've translated the language codes to spanish as I needed it, I haven't checked all mod post pages though, I don't know if it had been posted already. Feel free to add it to the mod package.

Modifications.spanish_es-utf8.php

// --- Begin added code - nCode Image Resizer ---
$txt['ncode_imageresizer_warning_small'] = 'Haz click en esta barra para ver la imagen a tama&ntilde;o completo.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagen ha sido redimensionada. Haz click en esta barra para ver la imagen a tama&ntilde;o completo. La imagen original tiene un tama&ntilde;o de %1$sx%2$s y pesa %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagen ha sido redimensionada. Haz click en esta barra para ver la imagen a tama&ntilde;o completo. La imagen original tiene un tama&ntilde;o de %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Haz click en esta barra para ver la imagen peque&ntilde;a.';
$txt['ncode_imageresizer_mode'] = 'Modo de redimensionamiento';
$txt['ncode_imageresizer_original'] = 'Mantener el tama&ntilde;o original';
$txt['ncode_imageresizer_enlarge_same'] = 'Aumentar en el mismo documento';
$txt['ncode_imageresizer_open_same'] = 'Abrir en la misma ventana';
$txt['ncode_imageresizer_open_new'] = 'Abrir en una ventana nueva';
$txt['ncode_imageresizer_max_width'] = 'Ancho m&aacute;ximo';
$txt['ncode_imageresizer_max_height'] = 'Alto m&aacute;ximo<br /><span class="smalltext">Déjalo en blanco para no establecer un l&iacute;mite de alto.</span>';
$txt['ncodecopy'] = 'nCode Image Resizer Mod &copy; <a href="http://www.bryandeakin.com">Bryan Runic Deakin</a>';
// --- End added code ---


Modifications.spanish_es.php

// --- Begin added code - nCode Image Resizer ---
$txt['ncode_imageresizer_warning_small'] = 'Haz click en esta barra para ver la imagen a tama&ntilde;o completo.';
$txt['ncode_imageresizer_warning_filesize'] = 'Esta imagen ha sido redimensionada. Haz click en esta barra para ver la imagen a tama&ntilde;o completo. La imagen original tiene un tama&ntilde;o de %1$sx%2$s y pesa %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'Esta imagen ha sido redimensionada. Haz click en esta barra para ver la imagen a tama&ntilde;o completo. La imagen original tiene un tama&ntilde;o de %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Haz click en esta barra para ver la imagen peque&ntilde;a.';
$txt['ncode_imageresizer_mode'] = 'Modo de redimensionamiento';
$txt['ncode_imageresizer_original'] = 'Mantener el tama&ntilde;o original';
$txt['ncode_imageresizer_enlarge_same'] = 'Aumentar en el mismo documento';
$txt['ncode_imageresizer_open_same'] = 'Abrir en la misma ventana';
$txt['ncode_imageresizer_open_new'] = 'Abrir en una ventana nueva';
$txt['ncode_imageresizer_max_width'] = 'Ancho m&aacute;ximo';
$txt['ncode_imageresizer_max_height'] = 'Alto m&aacute;ximo<br /><span class="smalltext">D&eacute;jalo en blanco para no establecer un l&iacute;mite de alto.</span>';
$txt['ncodecopy'] = 'nCode Image Resizer Mod &copy; <a href="http://www.bryandeakin.com">Bryan Runic Deakin</a>';
// --- End added code ---
Title: Re: nCode Image Resizer
Post by: kamili34 on April 08, 2014, 02:36:11 PM
 
Quote


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.

First point done, but cant find second options, I use aqua style and when I installed I set to modify files in this style. Where to find that 2nd options to set?
Title: Re: nCode Image Resizer
Post by: JoeBrodsky on July 20, 2014, 03:20:23 PM
I am having a problem where the images aren't being resized correctly, any help? I have to scroll to the right to see the full image.

See picture below

Title: Re: nCode Image Resizer
Post by: Steve on February 01, 2015, 07:04:03 PM
Why does changing the line for the font color have no affect?

   table.ncode_imageresizer_warning {
      color: #82705B; /* the font color */
      border: 1px solid #A88900; /* the border around the whole thing */
      cursor: pointer;
   }
Title: Re: nCode Image Resizer
Post by: H0MiCiDE on May 12, 2017, 11:13:19 PM
How do you changed the "This image has been resized. Click this bar to view the full image. The original image is sized XXXXX." text?
I want it to say "Click to Enlarge" or get rid of the function entirely.
Title: Re: nCode Image Resizer
Post by: luuuciano on May 13, 2017, 04:59:09 PM
Quote from: xH0MiCiDEx on May 12, 2017, 11:13:19 PM
How do you changed the "This image has been resized. Click this bar to view the full image. The original image is sized XXXXX." text?
I want it to say "Click to Enlarge" or get rid of the function entirely.


Go here http://custom.simplemachines.org/mods/index.php?mod=1197 then click on PARSE, then search  a few words (the one you want to change), it will inform you that is located on language files... por example ./Themes/default/languages/Modifications.english.php , you will have to change all the language files of languages your forum is using
Download that file, edit it, upload it... allways do a backup first
Title: Re: nCode Image Resizer
Post by: H0MiCiDE on May 14, 2017, 07:27:48 AM
Quote from: luuuciano on May 13, 2017, 04:59:09 PM
Quote from: xH0MiCiDEx on May 12, 2017, 11:13:19 PM
How do you changed the "This image has been resized. Click this bar to view the full image. The original image is sized XXXXX." text?
I want it to say "Click to Enlarge" or get rid of the function entirely.


Go here http://custom.simplemachines.org/mods/index.php?mod=1197 then click on PARSE, then search  a few words (the one you want to change), it will inform you that is located on language files... por example ./Themes/default/languages/Modifications.english.php , you will have to change all the language files of languages your forum is using
Download that file, edit it, upload it... allways do a backup first

thanks will try this and post an update of my results
Title: Re: nCode Image Resizer
Post by: Seyit replikacep.com on May 16, 2017, 03:53:07 PM
You need to make it compatible
SSL certificate compatible not
You do this harmoniously

SSL certificate problem
smf 2.1   /smf 2.0.14   Must be harmonious
I need it now :)

Subs.php  Change it Enough

Images must be https: // for SSL certificate
Title: Re: nCode Image Resizer
Post by: Kindred on May 16, 2017, 03:54:53 PM
Ummmm... what?

2.0.14 and 2.1 both handle images through proxy
Title: Re: nCode Image Resizer
Post by: Seyit replikacep.com on May 16, 2017, 03:56:50 PM
This mode is canceling the proxy
Title: Re: nCode Image Resizer
Post by: Seyit replikacep.com on May 16, 2017, 03:57:59 PM
Mode updated incorrectly
Title: Re: nCode Image Resizer
Post by: Seyit replikacep.com on May 16, 2017, 04:00:50 PM
Example: unsafe link
https://www.replikacep.com/lg-g2-toplama-yurt-disi-rom-yukleme-sonrasi-dokunmatik-sorunu-cozumu-t19858.0.html

Unsafe due to mod

Hppts images: due to lack of link

Title: Re: nCode Image Resizer
Post by: Kindred on May 16, 2017, 04:12:21 PM
Then you should be posting in the mod specific support thread....
Title: Re: nCode Image Resizer
Post by: Seyit replikacep.com on May 16, 2017, 04:17:42 PM
I think You did not understand me  Mod incorrectly updated 

Ssl compatibility disappears because of this mode !!!!

Mode must be updated again
Title: Re: nCode Image Resizer
Post by: vbgamer45 on May 16, 2017, 04:30:19 PM
It has to be redone. I checked the code. I am going to have make some patches in order to get to work correctly.
Title: Re: nCode Image Resizer
Post by: Seyit replikacep.com on May 16, 2017, 04:34:29 PM
Quote from: vbgamer45 on May 16, 2017, 04:30:19 PM
It has to be redone. I checked the code. I am going to have make some patches in order to get to work correctly.

Finally the output that understands  :laugh:   O:)

I need this mode     I hope you update now  :)
Title: Re: nCode Image Resizer
Post by: Illori on May 16, 2017, 05:07:05 PM
next time when you have a question about a mod, post in the mods support topic.
Title: Re: nCode Image Resizer
Post by: Kindred on May 16, 2017, 08:26:56 PM
I understood you quite fine, the second time.... (your initial post was unclear)

And, as I said, and Illori repeated - issues with specific mods should be brought up in the thread dedicated to supporting that specific mod.
Title: Re: nCode Image Resizer
Post by: Steve on May 17, 2017, 09:35:42 AM
Topics merged. Replikacep notified.
Title: Re: nCode Image Resizer
Post by: Seyit replikacep.com on May 17, 2017, 09:47:06 AM
Quote from: Steve on May 17, 2017, 09:35:42 AM
Topics merged. Replikacep notified.

Thanks for the notification
Title: Re: nCode Image Resizer
Post by: Steve on May 17, 2017, 09:52:36 AM
No worries. :)
Title: Re: nCode Image Resizer
Post by: Lord991 on May 24, 2017, 09:32:14 PM
Is this updated for 2.0.14?
Title: Re: nCode Image Resizer
Post by: vbgamer45 on May 24, 2017, 09:48:36 PM
No it is not requires changes.
Title: Re: nCode Image Resizer
Post by: Lord991 on May 25, 2017, 02:47:00 PM
It requires changes or doesn't ?

When I try to download it says > The mod you have requested has not been approved yet for downloads.
Title: Re: nCode Image Resizer
Post by: vbgamer45 on May 25, 2017, 02:48:20 PM
it requires many changes
Title: Re: nCode Image Resizer
Post by: Cola-Coca on June 01, 2017, 05:33:00 PM
Hi,

I have a forum in the version '2.0.13' and i want to make the update to '2.0.14' but there is error in 'Subs.php'.
To be more precise, this is an error:

Find:

'content' => '<img src="$1" alt="" class="bbc_img" />',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),


Replace with:

'content' => '<img src="$1" alt="" class="bbc_img" />',
'validate' => function (&$tag, &$data, $disabled)
{
global $image_proxy_enabled, $image_proxy_secret, $boardurl;

$data = strtr($data, array('<br>' => ''));
if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
$data = 'http://' . $data;

if (substr($data, 0, 8) != 'https://' && $image_proxy_enabled)
$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
},



The problem is that I have installed the mod 'NcodeImageResizer' and I need it. That's why I have that part different and that's why I get an error when I want to do it update to '2.0.14'

I'm here because I do not know how to change that part, this part of my 'Subs.php' looks like this:

array(
'tag' => 'img',
'type' => 'unparsed_content',
'parameters' => array(
'alt' => array('optional' => true),
'width' => array('optional' => true, 'value' => ' width="$1"', 'match' => '(\d+)'),
'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
),
'content' => '<img src="$1" alt="{alt}"{width}{height} border="0" onload="NcodeImageResizer.createOn(this);" class="bbc_img" />',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
'disabled_content' => '($1)',
),
array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" onload="NcodeImageResizer.createOn(this);" class="bbc_img" />',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
'disabled_content' => '($1)',
),


I leave you my 'Subs.php' in attachments if anyone wants to help me.
Title: Re: nCode Image Resizer
Post by: vbgamer45 on June 01, 2017, 05:46:55 PM
NcodeImageResizer try to uninstall then upgrade 2.0.14
Title: Re: nCode Image Resizer
Post by: Cola-Coca on June 01, 2017, 06:26:33 PM
Quote from: vbgamer45 on June 01, 2017, 05:46:55 PM
NcodeImageResizer try to uninstall then upgrade 2.0.14


When I do this I get error when i want to install 'nCode Image Resizer' mod.
The question is how to solve this problem with 'Subs.php'.  :-\
Title: Re: nCode Image Resizer
Post by: Cola-Coca on June 02, 2017, 05:12:54 PM
Bump !  :-\
Title: Re: nCode Image Resizer
Post by: vbgamer45 on June 02, 2017, 05:15:16 PM
The mod has to be redone for 2.0.14
Title: Re: nCode Image Resizer
Post by: Cola-Coca on June 02, 2017, 10:21:39 PM
Quote from: vbgamer45 on June 02, 2017, 05:15:16 PM
The mod has to be redone for 2.0.14

Do you know the date when it will be?

(I'm still in the version 2.0.13 because of this.)
Title: Re: nCode Image Resizer
Post by: vbgamer45 on June 02, 2017, 10:25:32 PM
Not sure when I have have time.
Title: Re: nCode Image Resizer
Post by: Steve on June 03, 2017, 09:05:52 AM
In other words, stay on 2.0.13 or leave this mod uninstalled. You could turn on notify for this thread so you'll know when vb does get a chance to update it (you'll also get notifications of anyone else's responses however).
Title: Re: nCode Image Resizer
Post by: Bombay on June 05, 2017, 11:28:38 PM
I have an identical problem as user Cola-Coca. There is hope for this mod nCode Image Resizer or has it come to the end?

Regards,
Bombay
Title: Re: nCode Image Resizer
Post by: belfa on June 06, 2017, 05:47:23 AM
Waiting for the mod this is the fastest and most secure way to apply to the .CSS of the theme you are using. (I've put 640x720) you can put the measurements you like:


/* Auto resizing of images in posts and personal messages. */
/* Change sizing to suit your own preferences. */
/* width=xxx height=xxx extension in the img BBC can still be used to minimize the size manual  */
.bbc_img{
/* This is just to keep images to a handy size, even on large screens. */
   max-height: 640px;
/* This prevents images breaking out of the post on small screens. */
   max-width: 720px;
}


/* Auto resizing of images in signatures. */
/* Change sizing to suit your own preferences. */
/* width=xxx height=xxx extension in the img BBC can still be used to minimize the size manual  */
.signature .bbc_img {
   max-height: 150px;
   max-width: 95%;
}


https://www.simplemachines.org/community/index.php?topic=505050.40
Title: Re: nCode Image Resizer
Post by: Harvester on June 11, 2017, 03:19:56 PM
I wish I could download this. This sounds like exactly what I need.

There is no link in the mod section here.
Title: Re: nCode Image Resizer
Post by: Steve on June 11, 2017, 04:40:22 PM
Sure there is. https://custom.simplemachines.org/mods/index.php?mod=1197
Title: Re: nCode Image Resizer
Post by: Bombay on June 20, 2017, 05:28:50 PM
nCode Image Resizer  R.I.P

Unfortunately this SMF Mod has come to the end!  :'(

Regards,
Bombay
Title: Re: nCode Image Resizer
Post by: Steve on June 21, 2017, 09:23:01 AM
Disregard Bombay's last post. It ends when the mod author says it does.
Title: Re: nCode Image Resizer
Post by: FragaCampos on June 21, 2017, 02:44:52 PM
Just my two cents...
This is an important mod and I'm sure many SMF admins have it installed in their forums.

I'm one of those waiting for this mod to update to 2.0.14, so, since I don't know how to code, I can only wish that the mod's creator can do this for the community.
Title: Re: nCode Image Resizer
Post by: Steve on June 21, 2017, 03:15:26 PM
Keep in mind that vb has quite a number of higher priority SMF related projects he's working on. Some projects, such as this one, will have to wait until he has time to update it.
Title: Re: nCode Image Resizer
Post by: vbgamer45 on June 21, 2017, 11:45:19 PM
Update!

Version 2.0
+Added support for SMF 2.0.14
+Added support for SMF 1.1.x
Taken over by vbgamer45
Title: Re: nCode Image Resizer
Post by: Steve on June 22, 2017, 09:34:43 AM
I guess he had time yesterday. :P
Title: Re: nCode Image Resizer
Post by: Seyit replikacep.com on June 22, 2017, 12:29:17 PM
(Turkish) Thank you for the language
Title: Re: nCode Image Resizer
Post by: FragaCampos on June 22, 2017, 08:18:30 PM
Thank you very much for your time and effort, vbgamer45!
Title: Re: nCode Image Resizer
Post by: newbieforumaster on July 15, 2017, 12:45:12 AM
sorry to bump but how do I set an image size? I want 500x500

Thanks :)
Title: Re: nCode Image Resizer
Post by: Steve on July 15, 2017, 09:55:51 AM
Go to Features and Options in the Admin panel and set your max size there.
Title: Re: nCode Image Resizer
Post by: newbieforumaster on July 15, 2017, 11:03:07 PM
Where is the image risize I see the "one all" mod in the "features and options" section but I cannot find the ncode.

How do I adjust the attachments size?

Thanks  :)
Title: Re: nCode Image Resizer
Post by: Steve on July 16, 2017, 08:10:20 AM
Scroll down. It should be below 'Server Timezone'. There should be 3 options:

1. Resize mode
2. Maximum width
3. Maximum height
Title: Re: nCode Image Resizer
Post by: [email protected] on July 18, 2017, 10:03:13 AM
Hello.
We used older version of plugin but I uninstalled it to update SMF to 2.0.14. I downloaded new one installed but it doesn't resize pictures now. Any suggestions?

Best regards,
Presian
Title: Re: nCode Image Resizer
Post by: vbgamer45 on July 18, 2017, 10:30:29 AM
Did it install without issues? Check your settings for the mod  in the "features and options
Title: Re: nCode Image Resizer
Post by: newbieforumaster on July 27, 2017, 01:32:47 PM
Quote from: Steve on July 16, 2017, 08:10:20 AM
Scroll down. It should be below 'Server Timezone'. There should be 3 options:

1. Resize mode
2. Maximum width
3. Maximum height

I'm very sorry but where do I find "Server Timezone" I looked in server settings but am having trouble finding it. :)
Title: Re: nCode Image Resizer
Post by: vbgamer45 on July 27, 2017, 02:04:47 PM
Admin -> Features and Options
Title: Re: nCode Image Resizer
Post by: qubbah on August 18, 2017, 07:17:40 PM
i want the default setting is
   Click this bar to view the full image

not    Click this bar to view the small image.
tq.
Title: Re: nCode Image Resizer
Post by: the_shadow on December 04, 2017, 10:01:13 AM
i have an error on my ibdex template, someone can help please? i cant find

// Output any remaining HTML headers. (from mods, maybe?)


ThNkX
Title: Re: nCode Image Resizer
Post by: jamesbond007 on January 29, 2018, 04:50:55 PM
Hi, I installed the newest version (2.0) of this mod in smf 2.0.15. Then I went to "Features & Options" and set the three options to:

1. Resize mode: Open in new window
2. Maximum width: 600
3. Maximum height: 600

Unfortunately, even when I create a new post with an image attachment, nothing has changed compared to the time before I installed "nCode Image Resizer": it does absolutely nothing. When I click on the preview image of the saved post, it is still 2.800 pixels wide and it does not open in a new window.

Maybe I am missing something obvious here, but I really have no idea what it could be. Any help would be greatly appreciated.
Title: Re: nCode Image Resizer
Post by: Steve on January 30, 2018, 12:22:23 AM
This isn't for attachments. It's for posted images.
Title: Re: nCode Image Resizer
Post by: jamesbond007 on January 30, 2018, 01:59:53 AM
By posted images you mean images that are included in a post using

[img]...[/img]

tags?
Title: Re: nCode Image Resizer
Post by: Steve on January 30, 2018, 09:04:21 AM
Correct. You said attachments and I just wanted to be sure we're clear on what you want and what this mod does. :)
Title: Re: nCode Image Resizer
Post by: jamesbond007 on January 30, 2018, 03:16:59 PM
Thanks for the clarification. Then this mod is of no use to me. My users typically upload photos from mobile devices directly to forum posts. Linking images already existing on the web is not a common use case for them.
Title: Re: nCode Image Resizer
Post by: luuuciano on January 30, 2018, 09:47:51 PM
In our forum we use this http://custom.simplemachines.org/mods/index.php?mod=3770 but no idea how it works on mobile...
You have to select where to show the image, if you want to... etc...

We use Resize Attached Images too...
Title: Re: nCode Image Resizer
Post by: jamesbond007 on February 01, 2018, 03:51:19 PM
Quote from: luuuciano on January 30, 2018, 09:47:51 PMWe use Resize Attached Images too...

Are you talking about this mod (http://custom.simplemachines.org/mods/index.php?mod=2206)?

According to the information on its own page, this mod has been last updated in April 2013 and compatibility with SMF is listed until version 2.0.4. That does not sound too attractive to me...

Is there no solution to this common problem that is still up to date, actively maintained and under development?
Title: Re: nCode Image Resizer
Post by: Kindred on February 01, 2018, 05:41:13 PM
Almost all mods for 2.0.x will work with any other 2.0.x version
Title: Re: nCode Image Resizer
Post by: Sir Osis of Liver on February 01, 2018, 05:46:52 PM
Just started using that mod on 2.0.15 forum, works fine.
Title: Re: nCode Image Resizer
Post by: Dr.lecter on April 10, 2018, 12:11:14 AM
Quote from: Sir Osis of Liver on February 01, 2018, 05:46:52 PM
Just started using that mod on 2.0.15 forum, works fine.

hello,

i can't find this " ?> " in  " ./Themes/default/css/index.css " to edit.

Title: Re: nCode Image Resizer
Post by: vbgamer45 on April 10, 2018, 12:12:04 AM
Don't look for that.

Just add it to tend of the file.
Title: Re: nCode Image Resizer
Post by: Dr.lecter on April 10, 2018, 01:51:24 AM
Quote from: vbgamer45 on April 10, 2018, 12:12:04 AM
Don't look for that.

Just add it to tend of the file.

hello,

it's still have error:   :'(
Title: Re: nCode Image Resizer
Post by: maglix04 on January 04, 2020, 06:41:07 PM
Hi, the mod isn't compatible with the current version of smf 2.0.17. Possible upgrade?
Thanks.
Title: Re: nCode Image Resizer
Post by: vbgamer45 on January 04, 2020, 06:47:28 PM
Try to install and see if you get errors. If no errors then it would work.
Title: Re: nCode Image Resizer
Post by: maglix04 on January 05, 2020, 04:12:20 AM
When I try to install it, it gives me this error in the file sources/subs.php:

Code (find) Select

array(
'tag' => 'img',
'type' => 'unparsed_content',
'parameters' => array(
'alt' => array('optional' => true),
'width' => array('optional' => true, 'value' => ' width="$1"', 'match' => '(\d+)'),
'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
),
'content' => '<img src="$1" alt="{alt}"{width}{height} class="bbc_img resized" />',
'validate' => function (&$tag, &$data, $disabled)
{
global $image_proxy_enabled, $image_proxy_secret, $boardurl;

$data = strtr($data, array('<br>' => ''));
if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
$data = 'http://' . $data;

if (substr($data, 0, 8) != 'https://' && $image_proxy_enabled)
$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
},
'disabled_content' => '($1)',
),
array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" class="bbc_img" />',
'validate' => function (&$tag, &$data, $disabled)
{
global $image_proxy_enabled, $image_proxy_secret, $boardurl;

$data = strtr($data, array('<br>' => ''));
if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
$data = 'http://' . $data;

if (substr($data, 0, 8) != 'https://' && $image_proxy_enabled)
$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
},
'disabled_content' => '($1)',
),




Code (replace) Select

array(
'tag' => 'img',
'type' => 'unparsed_content',
'parameters' => array(
'alt' => array('optional' => true),
'width' => array('optional' => true, 'value' => ' width="$1"', 'match' => '(\d+)'),
'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
),
'content' => '<img src="$1" alt="{alt}"{width}{height} border="0" onload="NcodeImageResizer.createOn(this);" class="bbc_img" />',
'validate' => function (&$tag, &$data, $disabled)
{
global $image_proxy_enabled, $image_proxy_secret, $boardurl;

$data = strtr($data, array('<br>' => ''));
if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
$data = 'http://' . $data;

if (substr($data, 0, 8) != 'https://' && $image_proxy_enabled)
$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
},
'disabled_content' => '($1)',
),
array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" onload="NcodeImageResizer.createOn(this);" class="bbc_img" />',
'validate' => function (&$tag, &$data, $disabled)
{
global $image_proxy_enabled, $image_proxy_secret, $boardurl;

$data = strtr($data, array('<br>' => ''));
if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
$data = 'http://' . $data;

if (substr($data, 0, 8) != 'https://' && $image_proxy_enabled)
$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
},
'disabled_content' => '($1)',
),







When I try to replace the code manually, I realized that the original code to be replaced is different:
Code (orginal code) Select



  'tag' => 'img',
'type' => 'unparsed_content',
'parameters' => array(
'alt' => array('optional' => true),
'width' => array('optional' => true, 'value' => ' width="$1"', 'match' => '(\d+)'),
'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
),
'content' => '<img src="$1" alt="{alt}"{width}{height} class="bbc_img resized" />',
'validate' => function (&$tag, &$data, $disabled)
{
$data = strtr($data, array('<br>' => ''));
if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
$data = 'http://' . $data;

$data = get_proxied_url($data);
},
'disabled_content' => '($1)',
),
array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" class="bbc_img" />',
'validate' => function (&$tag, &$data, $disabled)
{
$data = strtr($data, array('<br>' => ''));
if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
$data = 'http://' . $data;

$data = get_proxied_url($data);
},





In the original code there aren't these lines:

'validate' => function (&$tag, &$data, $disabled)
{
global $image_proxy_enabled, $image_proxy_secret, $boardurl;



But this:
'validate' => function (&$tag, &$data, $disabled)
{
$data = strtr($data, array('<br>' => ''));
if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
$data = 'http://' . $data;

$data = get_proxied_url($data);




So I stopped myself from editing manually because I'm afraid of making a mistake. I have smf 2.0.17.
Title: Re: nCode Image Resizer
Post by: vbgamer45 on January 05, 2020, 11:01:05 AM
Looks like it has to be updated.
Title: Re: nCode Image Resizer
Post by: maglix04 on January 24, 2020, 05:11:03 AM
Quote from: vbgamer45 on January 05, 2020, 11:01:05 AM
Looks like it has to be updated.
So, I hope for an upgrade as soon as possible.
Thank you.
Title: Re: nCode Image Resizer
Post by: davidhs on March 07, 2020, 06:39:45 AM
Your last version (2.0) added support for SMF 1.1.x but this not work.

It install only on SMF 2.0 to 2.0.15.
Title: Re: nCode Image Resizer
Post by: vbgamer45 on March 07, 2020, 01:24:45 PM
It installed on my test for 1.1.x the package-info.xml has the following in it


<install for="2.0 - 2.0.13">
<modification>install-smf2.xml</modification>
<require-file name="ncode_imageresizer.js" destination="$themedir" />
</install>

<uninstall for="2.0 - 2.0.13">
<modification reverse="true">install-smf2.xml</modification>
<remove-file name="$themedir/ncode_imageresizer.js" />
</uninstall>

<install for="2.0.14-2.0.99">
<modification>install-smf2.0.14.xml</modification>
<require-file name="ncode_imageresizer.js" destination="$themedir" />
</install>

<uninstall for="2.0.14-2.0.99">
<modification reverse="true">install-smf2.0.14.xml</modification>
<remove-file name="$themedir/ncode_imageresizer.js" />
</uninstall>

<install for="1.1-1.1.99">
<readme>readme.txt</readme>
<modification>install-smf1.xml</modification>
<require-file name="ncode_imageresizer.js" destination="$themedir" />
</install>
<uninstall for="1.1-1.1.99">
<modification reverse="true">install-smf1.xml</modification>
<remove-file name="$themedir/ncode_imageresizer.js" />
</uninstall>
Title: Re: nCode Image Resizer
Post by: davidhs on March 13, 2020, 07:14:30 PM
Quote from: vbgamer45 on March 07, 2020, 01:24:45 PM
It installed on my test for 1.1.x the package-info.xml has the following in it


<install for="2.0 - 2.0.13">
<modification>install-smf2.xml</modification>
<require-file name="ncode_imageresizer.js" destination="$themedir" />
</install>

<uninstall for="2.0 - 2.0.13">
<modification reverse="true">install-smf2.xml</modification>
<remove-file name="$themedir/ncode_imageresizer.js" />
</uninstall>

<install for="2.0.14-2.0.99">
<modification>install-smf2.0.14.xml</modification>
<require-file name="ncode_imageresizer.js" destination="$themedir" />
</install>

<uninstall for="2.0.14-2.0.99">
<modification reverse="true">install-smf2.0.14.xml</modification>
<remove-file name="$themedir/ncode_imageresizer.js" />
</uninstall>

<install for="1.1-1.1.99">
<readme>readme.txt</readme>
<modification>install-smf1.xml</modification>
<require-file name="ncode_imageresizer.js" destination="$themedir" />
</install>
<uninstall for="1.1-1.1.99">
<modification reverse="true">install-smf1.xml</modification>
<remove-file name="$themedir/ncode_imageresizer.js" />
</uninstall>

You have only one install-smf1.xml for all SMF 1.1-1.1.99 and code of /Sources/Subs.php is changed in different versions:

Code (SMF 1.1-1.1.10) Select
<?php

array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" />',
'validate' => create_function('&$tag, &$data, $disabled''$data = strtr($data, array(\'<br />\' => \'\'));'),
'disabled_content' => '($1)',
),

?>

Code (SMF 1.1.11-1.1.21) Select
<?php

array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" />',
'validate' => create_function('&$tag, &$data, $disabled''
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'
),
'disabled_content' => '($1)',
),

?>


By other hand you search this (with || instead of &&):
Code (install-smf1.xml) Select

<file name="$sourcedir/Subs.php">
<operation>
<search position="replace"><![CDATA[array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 || strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disabled_content' => '($1)',
),]]></search>


Are you sure can install?

I tested with your last update: nCode_Image_Resizer2.0.zip
Title: Re: nCode Image Resizer
Post by: vbgamer45 on March 15, 2020, 10:02:45 PM
Fixed for SMF 1.1.21
Title: Re: nCode Image Resizer
Post by: maglix04 on March 19, 2020, 05:13:00 AM
Quote from: vbgamer45 on March 15, 2020, 10:02:45 PM
Fixed for SMF 1.1.21
Sorry, the fix also concern the problem I reported?




Quote from: maglix04 on January 05, 2020, 04:12:20 AM
When I try to install it, it gives me this error in the file sources/subs.php:

Code (find) Select

array(
'tag' => 'img',
'type' => 'unparsed_content',
'parameters' => array(
'alt' => array('optional' => true),
'width' => array('optional' => true, 'value' => ' width="$1"', 'match' => '(\d+)'),
'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
),
'content' => '<img src="$1" alt="{alt}"{width}{height} class="bbc_img resized" />',
'validate' => function (&$tag, &$data, $disabled)
{
global $image_proxy_enabled, $image_proxy_secret, $boardurl;

$data = strtr($data, array('<br>' => ''));
if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
$data = 'http://' . $data;

if (substr($data, 0, 8) != 'https://' && $image_proxy_enabled)
$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
},
'disabled_content' => '($1)',
),
array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" class="bbc_img" />',
'validate' => function (&$tag, &$data, $disabled)
{
global $image_proxy_enabled, $image_proxy_secret, $boardurl;

$data = strtr($data, array('<br>' => ''));
if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
$data = 'http://' . $data;

if (substr($data, 0, 8) != 'https://' && $image_proxy_enabled)
$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
},
'disabled_content' => '($1)',
),




Code (replace) Select

array(
'tag' => 'img',
'type' => 'unparsed_content',
'parameters' => array(
'alt' => array('optional' => true),
'width' => array('optional' => true, 'value' => ' width="$1"', 'match' => '(\d+)'),
'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
),
'content' => '<img src="$1" alt="{alt}"{width}{height} border="0" onload="NcodeImageResizer.createOn(this);" class="bbc_img" />',
'validate' => function (&$tag, &$data, $disabled)
{
global $image_proxy_enabled, $image_proxy_secret, $boardurl;

$data = strtr($data, array('<br>' => ''));
if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
$data = 'http://' . $data;

if (substr($data, 0, 8) != 'https://' && $image_proxy_enabled)
$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
},
'disabled_content' => '($1)',
),
array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" onload="NcodeImageResizer.createOn(this);" class="bbc_img" />',
'validate' => function (&$tag, &$data, $disabled)
{
global $image_proxy_enabled, $image_proxy_secret, $boardurl;

$data = strtr($data, array('<br>' => ''));
if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
$data = 'http://' . $data;

if (substr($data, 0, 8) != 'https://' && $image_proxy_enabled)
$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
},
'disabled_content' => '($1)',
),







When I try to replace the code manually, I realized that the original code to be replaced is different:
Code (orginal code) Select



  'tag' => 'img',
'type' => 'unparsed_content',
'parameters' => array(
'alt' => array('optional' => true),
'width' => array('optional' => true, 'value' => ' width="$1"', 'match' => '(\d+)'),
'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
),
'content' => '<img src="$1" alt="{alt}"{width}{height} class="bbc_img resized" />',
'validate' => function (&$tag, &$data, $disabled)
{
$data = strtr($data, array('<br>' => ''));
if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
$data = 'http://' . $data;

$data = get_proxied_url($data);
},
'disabled_content' => '($1)',
),
array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" class="bbc_img" />',
'validate' => function (&$tag, &$data, $disabled)
{
$data = strtr($data, array('<br>' => ''));
if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
$data = 'http://' . $data;

$data = get_proxied_url($data);
},





In the original code there aren't these lines:

'validate' => function (&$tag, &$data, $disabled)
{
global $image_proxy_enabled, $image_proxy_secret, $boardurl;



But this:
'validate' => function (&$tag, &$data, $disabled)
{
$data = strtr($data, array('<br>' => ''));
if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
$data = 'http://' . $data;

$data = get_proxied_url($data);




So I stopped myself from editing manually because I'm afraid of making a mistake. I have smf 2.0.17.
Title: Re: nCode Image Resizer
Post by: vbgamer45 on March 19, 2020, 08:12:29 AM
Will have to check if I added a fix for that. But i dot' believe so
Title: Re: nCode Image Resizer
Post by: davidhs on May 06, 2020, 12:53:09 PM
Quote from: vbgamer45 on March 15, 2020, 10:02:45 PM
Fixed for SMF 1.1.21
Sorry but this not works. I test in SMF 1.1.21 (I do not know in previous versions) and there are two errors in install-smf1.xml
Quote
Code (Search (line 59)) Select
),]></search>
Code (Replace by) Select
),]]></search>

Code (Search (line 66)) Select
if (strpos($data, \'http://\') !== 0 || strpos($data, \'https://\') !== 0)
Code (Replace by) Select
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)

Code (Search (line 79)) Select
<add><![CDATA[echo '<!-- nCode Image Resizer -->
Code (Replace by) Select
<add><![CDATA[<!-- nCode Image Resizer -->

I applied these, and install but... do not work. I do not know what is the problem.
Title: Re: nCode Image Resizer
Post by: vbgamer45 on May 24, 2020, 08:39:17 PM
3.0 Update!
Added support to SMF 2.0.17 thanks to Deaks
Works better on all themes for SMF 2.0.x!
Title: Re: nCode Image Resizer
Post by: cornflakes on May 26, 2020, 11:24:03 PM
Quote from: vbgamer45 on May 24, 2020, 08:39:17 PM
3.0 Update!
Added support to SMF 2.0.17 thanks to Deaks
Works better on all themes for SMF 2.0.x!

Thanks.  So just to confirm, this only works if you use the "insert image" feature ?
I installed the simple image uploader mod where  you upload the photo to a 3rd party server (imgbb) and when
I do that, it just acts normally as that mod.

Also, I noticed when I did the "add image" option and pasted the url link between the code, I set the width in my settings to 600 width so the picture will load in that size, but I don't see the little message on top of the photo that says click here to see full size / original size.   I am able to click the photo and it reloads in the post as the full size and if I click it again it will switch back to the resized size.

Title: Re: nCode Image Resizer
Post by: vbgamer45 on May 26, 2020, 11:36:29 PM
Yes only tested with the insert image feature. Only applies to the img bbc code.
If text is missing make sure it is in your themes Modifications.*.php file where * is the language of the forum.
Title: Re: nCode Image Resizer
Post by: cornflakes on May 27, 2020, 12:14:57 AM
Quote from: vbgamer45 on May 26, 2020, 11:36:29 PM
If text is missing make sure it is in your themes Modifications.*.php file where * is the language of the forum.

Sorry, I don't understand.   Is the file called "modifications.english.php" ?
Am I looking the right place? I couldn't find this file.

I am using RDD 2.0.14 theme
Title: Re: nCode Image Resizer
Post by: vbgamer45 on May 27, 2020, 12:30:31 AM
In the languages folder.
If it does not exist that is good!
Then you just have to check your themes/default languages folder.
And make sure this text is in the file

// --- Begin added code - nCode Image Resizer ---
$txt['ncode_imageresizer_warning_small'] = 'Click this bar to view the full image.';
$txt['ncode_imageresizer_warning_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s and weighs %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Click this bar to view the small image.';
$txt['ncode_imageresizer_mode'] = 'Resize Mode';
$txt['ncode_imageresizer_original'] = 'Keep original size';
$txt['ncode_imageresizer_enlarge_same'] = 'Enlarge in same document';
$txt['ncode_imageresizer_open_same'] = 'Open in same window';
$txt['ncode_imageresizer_open_new'] = 'Open in new window';
$txt['ncode_imageresizer_max_width'] = 'Maximum width';
$txt['ncode_imageresizer_max_height'] = 'Maximum height<br /><span class="smalltext">Leave blank for no max height.</span>';
// --- End added code ---
Title: Re: nCode Image Resizer
Post by: cornflakes on May 27, 2020, 12:46:28 AM
thank you, I will see if I can find that.
It's my first time here, just got SMF forum and trying to learn the the basics! ^^
Title: Re: nCode Image Resizer
Post by: cornflakes on May 27, 2020, 02:27:06 AM
sorry I tried copy and pasting that text you gave in the php, also tried it in the index.css file and I didn't figure it out still.

I'm really confused and not sure what exactly to do.

Here are some screen shots:

(the last two, you can see the picture shows up in the smaller size, but no text that says "click here to make image larger",
but I can click it still and the picture is bigger).



Title: Re: nCode Image Resizer
Post by: FragaCampos on June 05, 2020, 11:01:31 PM
I installed the latest update and I can confirm that the bar over the resized image appears, but without text.
My Modifications.language.php was correctly edited and I don't have a clue why this happens. Any thoughts?
Title: Re: nCode Image Resizer
Post by: Roub1k on February 21, 2021, 05:58:50 PM
Anyone who can advise me how to fix this ?

The old " Click here to enlarge " is gone.

I am using SMF 2.0.18.

Title: Re: nCode Image Resizer
Post by: FragaCampos on February 23, 2021, 11:34:57 AM
In install-smf2.0.16.xml search:
<file name="$sourcedir/Load.php">
<operation>
<search position="replace"><![CDATA[// ...and attempt to load their associated language files.
$required_files = implode('+', array_merge($templates, array('Modifications')));
loadLanguage($required_files, '', false);]]></search>
<add><![CDATA[// ...and attempt to load their associated language files.
$required_files = implode('+', array_merge($templates, array('Modifications')));
loadLanguage($required_files, '', false);


Replace with:
<file name="$sourcedir/Load.php">
<operation>
<search position="replace"><![CDATA[// Some basic information...
if (!isset($context['html_headers']))
$context['html_headers'] = '';]]></search>
<add><![CDATA[// Some basic information...
if (!isset($context['html_headers']))
$context['html_headers'] = '';


Credits goes to live627.




Quote from: Roub1k on February 21, 2021, 05:58:50 PM
Anyone who can advise me how to fix this ?

The old " Click here to enlarge " is gone.

I am using SMF 2.0.18.


Title: Re: nCode Image Resizer
Post by: vbgamer45 on February 23, 2021, 11:57:44 AM
Might have to re look it over. I am looking at the edits mentioned above and looks neither the original or the changed one or any different???
Title: Re: nCode Image Resizer
Post by: Roub1k on February 24, 2021, 09:01:06 AM
Quote from: FragaCampos on February 23, 2021, 11:34:57 AM
In install-smf2.0.16.xml search:
<file name="$sourcedir/Load.php">
<operation>
<search position="replace"><![CDATA[// ...and attempt to load their associated language files.
$required_files = implode('+', array_merge($templates, array('Modifications')));
loadLanguage($required_files, '', false);]]></search>
<add><![CDATA[// ...and attempt to load their associated language files.
$required_files = implode('+', array_merge($templates, array('Modifications')));
loadLanguage($required_files, '', false);


Replace with:
<file name="$sourcedir/Load.php">
<operation>
<search position="replace"><![CDATA[// Some basic information...
if (!isset($context['html_headers']))
$context['html_headers'] = '';]]></search>
<add><![CDATA[// Some basic information...
if (!isset($context['html_headers']))
$context['html_headers'] = '';


Credits goes to live627.




Quote from: Roub1k on February 21, 2021, 05:58:50 PM
Anyone who can advise me how to fix this ?

The old " Click here to enlarge " is gone.

I am using SMF 2.0.18.



Good day lad and thank you for your reply. My .xml is already with the replacement text. I tryed to reinstall the plugin but same.
My resize options also are:

1. Enlarge in same document
2. width: 600
3. height: 400
Title: Re: nCode Image Resizer
Post by: FragaCampos on February 24, 2021, 02:19:32 PM
Well, I'm no coder. This was the change live627 gave me (it was a paid change, because this mod has no help anymore) and it worked for me...


Quote from: vbgamer45 on February 23, 2021, 11:57:44 AM
Might have to re look it over. I am looking at the edits mentioned above and looks neither the original or the changed one or any different???
Title: Re: nCode Image Resizer
Post by: vbgamer45 on February 24, 2021, 02:49:21 PM
It doesn't make any sense though the edits are not changing or replacing anything from what I can tell.... I don't know why the operations are being done.
Title: Re: nCode Image Resizer
Post by: -Rock Lee- on July 26, 2021, 08:57:15 PM
I am doing some tests locally but I have an error (attached image) and in the error log it marks me:

8: Trying to access array offset on value of type null
Apply filter: Only show errors in this file
File: C: /www/Nuevo/Sources/Load.php
Line: 1767


the 3 lines mark me repeatedly are:

vbphrase[\'ncode_imageresizer_warning_small\'] = \'' . $txt['ncode_imageresizer_warning_small'] . '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \'' . $txt['ncode_imageresizer_warning_filesize'] . '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \'' . $txt['ncode_imageresizer_warning_no_filesize'] . '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \'' . $txt['ncode_imageresizer_warning_fullsize'] . '\';


I've been trying some things but I can't find the solution, the server data I'm using is:

Version information:
Forum version: SMF 2.0.18 (more verbose)
Current SMF version: SMF 2.0.18
GD version: bundled (2.1.0 compatible)
Server where the database is located :: MariaDB
MySQL version: 10.4.10-MariaDB
PHP: 7.4.0


Regards!
Title: Re: nCode Image Resizer
Post by: vbgamer45 on July 26, 2021, 09:09:47 PM
Check that $txt['ncode_imageresizer_warning_small'] and the others are in your language file
Title: Re: nCode Image Resizer
Post by: -Rock Lee- on July 26, 2021, 09:20:00 PM
If they are correctly even copy those of the English language to verify and it continues with the same failure, the curious thing works correctly all for that reason it is rare that I mark that error.


Regards!
Title: Re: nCode Image Resizer
Post by: vbgamer45 on July 26, 2021, 11:41:44 PM
Hmm some reason i guess the language file isn't loaded yet.

Are you adding these to the modifications.*.php file.
Title: Re: nCode Image Resizer
Post by: -Rock Lee- on July 27, 2021, 06:14:32 AM
Yes, I went back down and installed smf and the mod to be sure. When installing, everything was correct...

Regards!
Title: Re: nCode Image Resizer
Post by: -Rock Lee- on July 31, 2021, 01:10:29 PM
Update: After trying all the options and shapes, you can solve the problem by moving the code itself.  I suppose the order in which the file was loaded gave problems, I went from line 1674 to 1873 in the load.php file.


Regards!
Title: Re: nCode Image Resizer
Post by: Steve on December 13, 2022, 05:10:53 PM
Any chance of an update for 2.1.3?
Title: Re: nCode Image Resizer
Post by: Steve on December 15, 2022, 09:38:32 AM
Sorry for the double post. Just wanted to use the mention so @vbgamer45 sees my question.

And I'm in no hurry my friend. Am just curious.
Title: Re: nCode Image Resizer
Post by: jsx on December 25, 2022, 07:50:47 AM
Hello @vbgamer45 please consider updating this mod to 2.1 :)