|
@@ 1414-1430 (lines=17) @@
|
| 1411 |
|
'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'), |
| 1412 |
|
), |
| 1413 |
|
'content' => '<img src="$1" alt="{alt}" title="{title}"{width}{height} class="bbc_img resized">', |
| 1414 |
|
'validate' => function (&$tag, &$data, $disabled) |
| 1415 |
|
{ |
| 1416 |
|
global $image_proxy_enabled, $image_proxy_secret, $boardurl; |
| 1417 |
|
|
| 1418 |
|
$data = strtr($data, array('<br>' => '')); |
| 1419 |
|
$scheme = parse_url($data, PHP_URL_SCHEME); |
| 1420 |
|
if ($image_proxy_enabled) |
| 1421 |
|
{ |
| 1422 |
|
if (empty($scheme)) |
| 1423 |
|
$data = 'http://' . ltrim($data, ':/'); |
| 1424 |
|
|
| 1425 |
|
if ($scheme != 'https') |
| 1426 |
|
$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret); |
| 1427 |
|
} |
| 1428 |
|
elseif (empty($scheme)) |
| 1429 |
|
$data = '//' . ltrim($data, ':/'); |
| 1430 |
|
}, |
| 1431 |
|
'disabled_content' => '($1)', |
| 1432 |
|
), |
| 1433 |
|
array( |
|
@@ 1437-1453 (lines=17) @@
|
| 1434 |
|
'tag' => 'img', |
| 1435 |
|
'type' => 'unparsed_content', |
| 1436 |
|
'content' => '<img src="$1" alt="" class="bbc_img">', |
| 1437 |
|
'validate' => function (&$tag, &$data, $disabled) |
| 1438 |
|
{ |
| 1439 |
|
global $image_proxy_enabled, $image_proxy_secret, $boardurl; |
| 1440 |
|
|
| 1441 |
|
$data = strtr($data, array('<br>' => '')); |
| 1442 |
|
$scheme = parse_url($data, PHP_URL_SCHEME); |
| 1443 |
|
if ($image_proxy_enabled) |
| 1444 |
|
{ |
| 1445 |
|
if (empty($scheme)) |
| 1446 |
|
$data = 'http://' . ltrim($data, ':/'); |
| 1447 |
|
|
| 1448 |
|
if ($scheme != 'https') |
| 1449 |
|
$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret); |
| 1450 |
|
} |
| 1451 |
|
elseif (empty($scheme)) |
| 1452 |
|
$data = '//' . ltrim($data, ':/'); |
| 1453 |
|
}, |
| 1454 |
|
'disabled_content' => '($1)', |
| 1455 |
|
), |
| 1456 |
|
array( |