nCode Image Resizer ssl uyumlu yapma

Başlatan tekyürek, 16 Mayıs 2017, 20:08

« önceki - sonraki »

0 Üyeler ve 4 Ziyaretçiler konuyu incelemekte.

tekyürek

subs.php orjinal kodları



array(
 'tag' => 'img',
 'type' => 'unparsed_content',
 'parameters' => array(
 'alt' => array('optional' => true),
 'title' => array('optional' => true),
 'width' => array('optional' => true, 'value' => ' width="$1"', 'match' => '(\d+)'),
 'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
 ),
 'content' => '<img src="$1" alt="{alt}" title="{title}"{width}{height} class="bbc_img resized">',
 'validate' => function (&$tag, &$data, $disabled)
 {
 global $image_proxy_enabled, $image_proxy_secret, $boardurl;

 $data = strtr($data, array('<br>' => ''));
 if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
 $data = 'http://' . $data;

 if (substr($data, 0, 8) != 'https://' && $image_proxy_enabled)
 $data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
 },
 'disabled_content' => '($1)',
 ),
 array(
 'tag' => 'img',
 'type' => 'unparsed_content',
 'content' => '<img src="$1" alt="" class="bbc_img">',
 'validate' => function (&$tag, &$data, $disabled)
 {
 global $image_proxy_enabled, $image_proxy_secret, $boardurl;

 $data = strtr($data, array('<br>' => ''));
 if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
 $data = 'http://' . $data;

 if (substr($data, 0, 8) != 'https://' && $image_proxy_enabled)
 $data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
 },
 'disabled_content' => '($1)',
 ),


nCode Image Resizer  degişikligine ugrattıgı kodlar

array(
 'tag' => 'img',
 'type' => 'unparsed_content',
 'parameters' => array(
 'alt' => array('optional' => true),
 'width' => array('optional' => true, 'value' => ' width="$1"', 'match' => '(\d+)'),
 'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
 ),
 'content' => '<img src="$1" alt="{alt}"{width}{height} border="0" onload="NcodeImageResizer.createOn(this);" class="bbc_img" />',
 'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
 'disabled_content' => '($1)',
 ),
 array(
 'tag' => 'img',
 'type' => 'unparsed_content',
 'content' => '<img src="$1" alt="" border="0" onload="NcodeImageResizer.createOn(this);" class="bbc_img" />',
 'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
 'disabled_content' => '($1)',
 ),
http://www.smfhacks.com/index.php/topic,9397.0.html

tekyürek

#1
burayı uydurmak lazım  nCode Image Resizer   e göre

'content' => '<img src="$1" alt="{alt}"{width}{height} border="0" onload="NcodeImageResizer.createOn(this);" class="bbc_img" />',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),