Advertisement:

Author Topic: nCode Image Resizer  (Read 207935 times)

Offline Violat3r

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

Offline ruckstande

  • Jr. Member
  • **
  • Posts: 116
  • SMF 1.1.7
    • PestBoxLive
Re: nCode Image Resizer
« Reply #21 on: May 20, 2008, 03:12:39 PM »
I installed this nCode, but dont work..
i have this image in my forum, but dont show bar above the image and no resize... :(



im using smf 1.1.5

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

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

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

Offline IsraelSKA

  • Semi-Newbie
  • *
  • Posts: 33
Re: nCode Image Resizer
« Reply #22 on: May 20, 2008, 04:35:45 PM »
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...

Offline IsraelSKA

  • Semi-Newbie
  • *
  • Posts: 33
Re: nCode Image Resizer
« Reply #23 on: May 20, 2008, 05:45:55 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 ;)

Offline Violat3r

  • Semi-Newbie
  • *
  • Posts: 34
  • Gender: Male
  • Insanity IS Sanity!
    • Shadows Elite Website
Re: nCode Image Resizer
« Reply #24 on: May 20, 2008, 06:07:09 PM »
lol awesome and no problem!

Offline edi67

  • SMF Hero
  • ******
  • Posts: 1,532
  • Gender: Male
  • Italian Supporter
    • CrazyZone
Re: nCode Image Resizer
« Reply #25 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
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Offline ruckstande

  • Jr. Member
  • **
  • Posts: 116
  • SMF 1.1.7
    • PestBoxLive
Re: nCode Image Resizer
« Reply #26 on: May 21, 2008, 12:51:06 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.

Offline Succubus Evaligan

  • Jr. Member
  • **
  • Posts: 274
  • Gender: Female
    • Yurilandia
Re: nCode Image Resizer
« Reply #27 on: May 21, 2008, 03:41:59 PM »
works great, thanks
Yuri Goddess

Offline Violat3r

  • Semi-Newbie
  • *
  • Posts: 34
  • Gender: Male
  • Insanity IS Sanity!
    • Shadows Elite Website
Re: nCode Image Resizer
« Reply #28 on: May 21, 2008, 08:01:22 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.

Offline neotan

  • Semi-Newbie
  • *
  • Posts: 50
    • Gooooo... GoShopjapan.com
Re: nCode Image Resizer
« Reply #29 on: May 24, 2008, 11:27:22 AM »
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

Offline trenchteam

  • Sr. Member
  • ****
  • Posts: 901
  • Gender: Male
    • NO WALLS STANDING
Re: nCode Image Resizer
« Reply #30 on: May 29, 2008, 06:11:26 AM »
Great Mod Core! ;D

Offline mycorollas

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
    • Import Performance
Re: nCode Image Resizer
« Reply #31 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

Code: [Select]
$maxWidth = $modSettings['max_image_width'];
$maxHeight = $modSettings['max_image_height'];

and replace it with

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

Offline DistantJ

  • Semi-Newbie
  • *
  • Posts: 94
Re: nCode Image Resizer
« Reply #32 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!

Offline Violat3r

  • Semi-Newbie
  • *
  • Posts: 34
  • Gender: Male
  • Insanity IS Sanity!
    • Shadows Elite Website
Re: nCode Image Resizer
« Reply #33 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:
Code: [Select]
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:

Code: [Select]
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:
« Last Edit: June 18, 2008, 02:22:15 AM by Violat3r »

Offline DistantJ

  • Semi-Newbie
  • *
  • Posts: 94
Re: nCode Image Resizer
« Reply #34 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! :)

Offline Violat3r

  • Semi-Newbie
  • *
  • Posts: 34
  • Gender: Male
  • Insanity IS Sanity!
    • Shadows Elite Website
Re: nCode Image Resizer
« Reply #35 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

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: nCode Image Resizer
« Reply #36 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?
« Last Edit: June 20, 2008, 01:34:57 PM by sam_milla »

Offline Violat3r

  • Semi-Newbie
  • *
  • Posts: 34
  • Gender: Male
  • Insanity IS Sanity!
    • Shadows Elite Website
Re: nCode Image Resizer
« Reply #37 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?

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: nCode Image Resizer
« Reply #38 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.

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: nCode Image Resizer
« Reply #39 on: June 21, 2008, 03:10:51 PM »
ok, i have fixed it now,..thanks to ye all.