nCode Image Resizer

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

Previous topic - Next topic

ishaan


Downfall

This doesn't work on RC3, any advice?

luuuciano

I have it installed on rc3, it works
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

GaLaTaMaN

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

Joker™

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 .
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

tycms

Sid2varun,

Does this mod completely pass W3C validation now?

Joker™

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
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

tycms

So, it was this simple. :) Thank you sid2varun.

luuuciano

that was reported before in this thread
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Joker™

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 :)
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

DaRKeN_58

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?
... :-X Dime de que presumes y te diré de que careces ;)...

schmooot

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

schmooot

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

minos

its not compatible with 2.0 rc3   any updates soon?
https://freerockdownloads.xyz

luuuciano

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?
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

distante

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

luuuciano

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"
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

★ѕραη∂αυєя★

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);" />

kkattfish

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

Advertisement: