nCode Image Resizer

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

Previous topic - Next topic

Tibian

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

Hoochie Coochie Man

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...
İnadına SMF 1.1.X

FragaCampos

Thanks a lot! Working on 1.1.7!

Nibogo

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

xmusic

hai its work fine for me,but it working in default themes only,aim using dreakbreak theme need to work for the theme also


xmusic

working great thank u some much


aED

Thanks Nibogo for the updated version!

Rehash D Internet

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.

aED

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.

Rehash D Internet


X3mE

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 ---
Kids, you tried your best and you failed miserably. The lesson is - never try.

My mods:
OS & Browser Detection (1.5 is out!) | Skype Profile Field | GTalk Profile Field | AllCaps Blocker | SMF Syntax Highlighter (Beta) + 2 in development!

Personal websites:
Mobilize.rs (and forum) | Lolmao.info



timned88

just installed into 2.0RC1... went right in.  can't wait to try it out.

timned88

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

nikku

#95
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 ?


nikku

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

timned88

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

timned88

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!

Advertisement: