• Sitemiz Bir Webmaster forumu ve tartışma platformu dur webmaster forumu dışındaki konular yasaktır direkt silinecektir.
  • Our site is a Webmaster forum and discussion platform. Topics outside the webmaster forum are prohibited and will be deleted immediately.

lightgallery smf 2.1 için uydurma yardım

replikacep

Tam Üye
Joined
Dec 15, 2018
Messages
237
Reaction score
30
Points
28
Age
1021
Website
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 

Code:
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 

Code:
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

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

birde js dosyalarini index.templete,in en altina ekleyin.
 
Code:
			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

Code:
      <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.
 

Yasal Uyarı

İçerik sağlayıcı paylaşım sitesi olarak hizmet veren webtiryakin.com 5651 sayılı kanunun 8. maddesine ve T.C.Knın 125. maddesine göre tüm üyelerimiz yaptıkları paylaşımlardan kendileri sorumludur. Hukuka ve mevzuata aykırı olduğunu düşündüğünüz içeriği BURADAN bildirebilirsiniz. Kısa sürede dönüş yapmaya çalışacağız.
Back
Top Bottom