• Welcome to Simple Machines Community Forum. Please login or sign up.
October 17, 2021, 06:02:35 PM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


nCode Image Resizer

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

Previous topic - Next topic

Roub1k

Anyone who can advise me how to fix this ?

The old " Click here to enlarge " is gone.

I am using SMF 2.0.18.


FragaCampos

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.



vbgamer45

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???
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Roub1k

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

FragaCampos

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

vbgamer45

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.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

RockLee

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!
¡Regresando como cual Fenix! ~ Bomber Code © 2020
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

vbgamer45

Check that $txt['ncode_imageresizer_warning_small'] and the others are in your language file
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

RockLee

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!
¡Regresando como cual Fenix! ~ Bomber Code © 2020
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

vbgamer45

Hmm some reason i guess the language file isn't loaded yet.

Are you adding these to the modifications.*.php file.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

RockLee

Yes, I went back down and installed smf and the mod to be sure. When installing, everything was correct...

Regards!
¡Regresando como cual Fenix! ~ Bomber Code © 2020
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

RockLee

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!
¡Regresando como cual Fenix! ~ Bomber Code © 2020
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Advertisement: