mirror of
https://github.com/mashirozx/sakura.git
synced 2024-11-22 23:08:14 +08:00
fix image gallery
This commit is contained in:
parent
ae7f444584
commit
db7bb49397
@ -1519,8 +1519,8 @@ function html_tag_parser($content) {
|
|||||||
//With Thumbnail: !{alt}(url)[th_url]
|
//With Thumbnail: !{alt}(url)[th_url]
|
||||||
if (preg_match_all('/\!\{.*?\)\[.*?\]/i', $content,$matches)){
|
if (preg_match_all('/\!\{.*?\)\[.*?\]/i', $content,$matches)){
|
||||||
$i=0;
|
$i=0;
|
||||||
foreach ($matches as $val) {
|
if ($i<sizeof($matches)) {
|
||||||
$content=str_replace($val[$i],preg_replace(
|
$content=str_replace($matches[$i],preg_replace(
|
||||||
'/!\{([^\{\}]+)*\}\('.$url_regex.'\)\['.$url_regex.'\]/i',
|
'/!\{([^\{\}]+)*\}\('.$url_regex.'\)\['.$url_regex.'\]/i',
|
||||||
'<a data-fancybox="gallery"
|
'<a data-fancybox="gallery"
|
||||||
data-caption="$1"
|
data-caption="$1"
|
||||||
@ -1528,7 +1528,7 @@ function html_tag_parser($content) {
|
|||||||
href="$2"
|
href="$2"
|
||||||
alt="$1"
|
alt="$1"
|
||||||
title="$1"><img src="$7" target="_blank" rel="nofollow" class="fancybox"></a>',
|
title="$1"><img src="$7" target="_blank" rel="nofollow" class="fancybox"></a>',
|
||||||
$val[$i]),
|
$matches[$i]),
|
||||||
$content);
|
$content);
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user