lightgallery smf 2.1 için uydurma yardım

replikacep

Tam Üye
Katılım
15 Ara 2018
Mesajlar
186
Tepkime puanı
24
Puanları
18
Yaş
1019
Web sitesi
www.replikacep.com
merhaba orhan bey  https://codepen.io/sachinchoolur/pen/QjLNMM  bunu smf ye uydurmaya çalışıyorum


ve uydurmama az kaldı  ama js  çalıştıramadım  yardımınızı bekliyorum  bunu sizin  yapabileceginizden eminim :)


http://smf.sahibinibulal.tk/index.php?topic=23.msg280;topicseen#msg280


js yide calıştırabilirsem sorun çözülecek galiba  gerekli düzenlemelere geçecegim  çok güzel resim görüntüleme  olacak  bundan eminim  :)

subs.php  ekledigim yer 

Kod:
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' => '  
				
				
				
				<div class="demo-gallery">
    <ul id="lightgallery">
      <li data-responsive="https://sachinchoolur.github.io/lightGallery/static/img/1-375.jpg 375, https://sachinchoolur.github.io/lightGallery/static/img/1-480.jpg 480, https://sachinchoolur.github.io/lightGallery/static/img/1.jpg 800" data-src="https://sachinchoolur.github.io/lightGallery/static/img/1-1600.jpg"
      data-sub-html="<h4>Fading Light</h4><p>Classic view from Rigwood Jetty on Coniston Water an old archive shot similar to an old post but a little later on.</p>" data-pinterest-text="Pin it" data-tweet-text="share on twitter ">
        <a><img class="img-responsive" src="$1"><div class="demo-gallery-poster"><img src="https://sachinchoolur.github.io/lightGallery/static/img/zoom.png">	
		</div>
		</a>
      </li>
    </ul>
  </div>
</div>



',
				'validate' => function(&$tag, &$data, $disabled)
				{
					global $image_proxy_enabled, $user_info;

					$data = strtr($data, array('
' => ''));
					$scheme = parse_url($data, PHP_URL_SCHEME);
					if ($image_proxy_enabled)
					{
						if (!empty($user_info['possibly_robot']))
							return;

						if (empty($scheme))
							$data = 'http://' . ltrim($data, ':/');

						if ($scheme != 'https')
							$data = get_proxied_url($data);
					}
					elseif (empty($scheme))
						$data = '//' . ltrim($data, ':/');
				},
				'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, $user_info;

					$data = strtr($data, array('
' => ''));
					$scheme = parse_url($data, PHP_URL_SCHEME);
					if ($image_proxy_enabled)
					{
						if (!empty($user_info['possibly_robot']))
							return;

						if (empty($scheme))
							$data = 'http://' . ltrim($data, ':/');

						if ($scheme != 'https')
							$data = get_proxied_url($data);
					}
					elseif (empty($scheme))
						$data = '//' . ltrim($data, ':/');
				},
				'disabled_content' => '($1)',
			),
 
hocam  ilk resim çalışıyor 2 ci resimde js çekmiyor  bunu nasıl çözeriz
demo  : http://smf.sahibinibulal.tk/index.php/topic,23.0.html


hocam ilk resim çalışıyor sıkıntı yok  sonraki resimler çalışmıyor js  kodunu çekmiyor sonraki resimlerde  bunu nasıl çözeriz


subs.php 

Kod:
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' => '<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.6.11/css/lightgallery.css">
 <div class="demo-gallery">
    <ul id="lightgallery">
      <li data-responsive=" src="$1" 375, src="$1" 480, src="$1" 800" data-src="$1""
      data-sub-html="<h4>Fading Light</h4><p>Classic view from Rigwood Jetty on Coniston Water an old archive shot similar to an old post but a little later on.</p>" data-pinterest-text="Pin it" data-tweet-text="share on twitter ">
        <a><img class="img-responsive" src="$1"><div class="demo-gallery-poster"><img src="https://sachinchoolur.github.io/lightGallery/static/img/zoom.png"> 
 </div>
 </a>
      </li>
    </ul>
  </div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.6.11/js/lightgallery-all.min.js"></script> 
 ',
 'validate' => function(&$tag, &$data, $disabled)
 {
 global $image_proxy_enabled, $user_info;

 $data = strtr($data, array('
' => ''));
 $scheme = parse_url($data, PHP_URL_SCHEME);
 if ($image_proxy_enabled)
 {
 if (!empty($user_info['possibly_robot']))
 return;

 if (empty($scheme))
 $data = 'http://' . ltrim($data, ':/');

 if ($scheme != 'https')
 $data = get_proxied_url($data);
 }
 elseif (empty($scheme))
 $data = '//' . ltrim($data, ':/');
 },
 'disabled_content' => '($1)',
 ),
 
Bu js yi nereye eklediniz

Kod:
$(document).ready(function() {
  $('#lightgallery').lightGallery({
    pager: true
  });
});

birde js dosyalarini index.templete,in en altina ekleyin.
 
Kod:
			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' => '<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.6.11/css/lightgallery.css">
			<div class="demo-gallery">
    <ul id="lightgallery">
      <li data-responsive=" src="$1" 375, src="$1" 480, src="$1" 800" data-src="$1""
      data-sub-html="<h4>Fading Light</h4><p>Classic view from Rigwood Jetty on Coniston Water an old archive shot similar to an old post but a little later on.</p>" data-pinterest-text="Pin it" data-tweet-text="share on twitter ">
        <a><img class="img-responsive" src="$1"><div class="demo-gallery-poster"><img src="https://sachinchoolur.github.io/lightGallery/static/img/zoom.png">	
		</div>
		</a>
      </li>
    </ul>
  </div>
 <script type="text/javascript">
        $(document).ready(function (){
            $(\'#lightgallery\').lightGallery();
        });
        </script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.6.11/js/lightgallery-all.min.js"></script>				
				',
				'validate' => function(&$tag, &$data, $disabled)
				{
					global $image_proxy_enabled, $user_info;

					$data = strtr($data, array('
' => ''));
					$scheme = parse_url($data, PHP_URL_SCHEME);
					if ($image_proxy_enabled)
					{
						if (!empty($user_info['possibly_robot']))
							return;

						if (empty($scheme))
							$data = 'http://' . ltrim($data, ':/');

						if ($scheme != 'https')
							$data = get_proxied_url($data);
					}
					elseif (empty($scheme))
						$data = '//' . ltrim($data, ':/');
				},
				'disabled_content' => '($1)',
			),


aynen bu şekil ekledim hocam
 
her  resmin id  nosu farklı hocam  js nin içine id nosu çek gibi bişey eklemek lazım

Kod:
      <script type="text/javascript">
        $(document).ready(function(){
            $(\'#lightgallery\').lightGallery();
        });
        </script>
 
sorun id nosu değil js calişmiyor ilk resim de dahil ben biraz kurcalayayim.
 
Geri
Üst Alt