News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

nCode Image Resizer

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

Previous topic - Next topic

Dr3amstor

#281
I can't get it to work anyhow. >:(

What a shame.

XxDrAg0nxX

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?

XxDrAg0nxX

#283
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'

tbk22

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?
=)

LiBen

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?

LiBen

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.

صلاح الدين

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 ---

drav

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  :)

luuuciano

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!
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).

XxDrAg0nxX

#290
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

shadowcrews

i just cant get the image to  fit the exact screen, it show up so small and when click it resize too big

idrees

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

Membre


distante

@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

luuuciano

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[
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

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.

luuuciano

#297
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"

?
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).

Storek

Thanks for this mod but can anyone tell me how to fix this problem:

To its not colored where picture is on custom theme

Nibogo

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;
}

Advertisement: