Vbulletin 4 If Condition Kodları - vB 4 Sürüm

-oZKan-

Admin
Vbulletin 4 If Conditionals
Vbulletin 4 If Koşulları
Vbulletin 4.0.x ile artık kodlama yapısı da değişti. Bu yüzden bildiğimiz kod mantığının biraz dışına çıkmamız gerekiyor.
Bu kodlama sistemi değişmesiyle özellikle çok sık kullanılan if döngüleri de değişti. Vbulletin 4 kullanıyorsanız aşağıdaki döngüleri kullanarak sisteminizde değişiklikler yapabilirsiniz.
Sadece Üyelere Göster:

HTML-Kodu:
<vb:if condition="$show['member']">Sadece üyelere göster</vb:if>
Sadece Ziyaretçilere Göster:
HTML-Kodu:
<vb:if condition="$show['guest']">Sadece Ziyaretçilere göster</vb:if>
Bazı üye gruplarına göster :
PHP- Kodu:
<vb:if condition="is_member_of($bbuserinfo, 1,2,3)">Üye grup IDsi 1,2 ve 3 olan kişilere göster</vb:if>


Sadece bir üyeye göster:
HTML-Kodu:
<vb:if condition="$bbuserinfo['userid'] == 318713">Kullanıcı ID'si 318713 olan kişiye göster</vb:if>
Bir kullanıcı hariç tümüne göster:

HTML-Kodu:
<vb:if condition="$bbuserinfo['userid'] != 318713">Kullanıcı ID'si 318713 hariç tüm herkese göster</vb:if>

Sadece moderatörlere göster:

HTML-Kodu:
<vb:if condition="can_moderate()">Tüm moderatörlere göster</vb:if>
Bir forumun moderatörüne göster: (x forumunda şunu yapmayı unutma gibi)


HTML-Kodu:
<vb:if condition="can_moderate($forum['x])">x ID'li forumun moderatörü ise göster</vb:if>

Görüntülenen Forumun moderatörüne göster:

HTML-Kodu:
<vb:if condition="can_moderate($forum['forumid'])">O an görüntülenen forumun moderatörüne göster</vb:if>
Bir forumda göster: (x’i değiştirmeyi unutma gibi)
HTML-Kodu:
<vb:if condition="$forum[forumid] == x">Forum ID x ise bunu göster</vb:if>


Bir forum hariç hepsinde göster: (x’i değiştirmeyi unutma gibi)

PHP- Kodu:
<vb:if condition="$forum[forumid] != x">Forum ID x değil ise bunu göster</vb:if>



Birkaç forumda göster:


PHP- Kodu:
<vb:if condition="in_array($forum['forumid'], array(1,2,3))">Forum IDsi 1,2 ve 3 olan forumlarda göster</vb:if>




Sadece bir dosya içinde göster: Look for define(‘THIS_SCRIPT’
smiliv.gif
‘calendar’); in the top of the php file you want it to show in.


PHP- Kodu:
<vb:if condition="THIS_SCRIPT == 'calendar'">Bunu calendar.php (Takvim)de göster</vb:if>



Show in every file but one: Look for define(‘THIS_SCRIPT’
smiliv.gif
‘calendar’); in the top of the php file you do not want it to show in.

PHP- Kodu:
<vb:if condition="THIS_SCRIPT != 'calendar'">Show this only on calendar.php</vb:if>



If $customvar is set:

HTML-Kodu:
<vb:if condition="$customvar">Show this if $customvar is set</vb:if>


If $customvar equals:

PHP- Kodu:
<vb:if condition="$customvar == blah">Show this if $customvar equals blah</vb:if>


If $customvar does not equal:

PHP- Kodu:
<vb:if condition="$customvar != blah">Show this if $customvar does not equal blah</vb:if>


vBulletin else statement:
PHP- Kodu:
<vb:if condition="$show['guest']">Bunu sadece ziyaretçilere göster //www.duslerforum.org<vb:else />Bunu üye olmayanlara göster //www.duslerforum.org</vb:if>





vBulletin else if statement:

PHP- Kodu:
<vb:if condition="$show['guest']">Bunu sadece ziyaretçilere göster //www.duslerforum.org <vb:elseif condition="is_member_of($bbuserinfo, 5,6)" />Bunu kullanıcı grubu 5 v 6 olan üyelere göster. Bunlar moderatör ve adminlerdir //www.duslerforum.org<vb:else />Tüm kayıtlı üyelere göster. //www.duslerforum.org</vb:if>
 
takipçi satın al
Uwell Elektronik Sigara
instagram takipçi hilesi
takipçi satın al
tiktok takipçi hilesi
Geri
Üst