Datalife Engine Türkçe Yama İndir

Datalife Engine 14.0

  • Temalara yeni taglar eklendi ve geliştirildi
  • Yeni AirPlay medya oynatıcısı eklendi
  • 1500 adet yeni ifade (emoji) eklendi

Github'dayız

Kendi yapımımız olan modüllerin neredeyse tamamını ücretsiz olarak Github üzerinden yayımladık. Sadece bu modüller için "destek" verilecektir.

We are on Github

Almost all of our own modules have been released free of charge via Github. We support only these modules

» » User / Not-User tagları ile kullanıcıya özel bölümler

User / Not-User tagları ile kullanıcıya özel bölümler

Tagların kullanım amacı, tüm tpl dosyalarında istediğiniz kullanıcı veya kullanıcıların görebileceği ve tam tersi bir kullanım ile özel alanlar oluşturabilmektir.

Dosya: engine/classes/templates.class.php
Bul:
if( strpos( $this->template, "{include file=" ) !== false ) {

Üstüne Ekle:
		// User / Not-User - start
		if (strpos ( $this->template, "[user=" ) !== false) {
			$this->template = preg_replace_callback ( "#\\[(user)=(.+?)\\](.*?)\\[/user\\]#is", array( &$this, 'check_user'), $this->template );
		}
		if (strpos ( $this->template, "[not-user=" ) !== false) {
			$this->template = preg_replace_callback ( "#\\[(not-user)=(.+?)\\](.*?)\\[/not-user\\]#is", array( &$this, 'check_user'), $this->template );
		}
		// User / Not-User - end



Bul:
function load_file( $matches=array() ) {

Üstüne Ekle:
	// User / Not-User - start
	function check_user( $matches = array() ) {
		global $config, $member_id;
		$ids = explode( ",", trim( $matches[2] ) );
		if ( ( $matches[1] == "user" && in_array( $member_id['user_id'], $ids ) ) || ( $matches[1] == "not-user" && ! in_array( $member_id['user_id'], $ids ) ) ) {
			return $matches[3];
		}
		return "";
	}
	// User / Not-User - start


Düzenlemelerden sonra temanızdaki her tpl dosyasında aşağıdaki kodları kullanabilirsiniz. ( Kullanıcı ID bilgisi girmek gerekmektedir )

[user=1,2,3,106]
Kullanıcı ID'si 1, 2, 3 veya 4 olan kullanıcılar görebilir
[/user]

[not-user=1,2,3,106]
Kullanıcı ID'si 1, 2, 3 veya 4 olan kullanıcılar göremez
[/not-user]


Yapımcı: Mehmet Hanoğlu
Kaynak: https://dle.net.tr
Bilgilendirme
Yorum Ekleyebilmeniz için Sitemize Kayıt Olmanız Gerekmektedir.
3 779
MaRZoCHi 23 Şubat 2018 17:31
Sorry, templates.class.php file.

--------------------
0
xDaMoNx 23 Şubat 2018 17:25
thanks for sharing!

in engine/classes/parse.class.php i can not find 

if( strpos( $this->template, "{include file=" ) !== false ) {
deneme bonusu veren siteler