25-Dec-2024, 09:25 PM
|
|
|
|
|
| |
|
♛
عضويتي
»
5
|
|
♛
جيت فيذا
»
May 2021
|
|
♛
آخر حضور
»
15-Dec-2025 (12:33 AM)
|
|
♛
آبدآعاتي
»
1,719
|
|
♛
تقييمآتي
»
13775
|
|
♛
الاعجابات المتلقاة
»
4426
|
|
♛
الاعجابات المُرسلة
»
1342
|
♛
حاليآ في
»
|
♛
دولتي الحبيبه
»
|
♛
جنسي
»
|
|
♛
آلقسم آلمفضل
»
|
|
♛
آلعمر
»
|
|
♛
الحآلة آلآجتمآعية
»
|
♛
التقييم
»
         
|
♛
مشروبك
»
|
♛
قناتك
»
|
|
♛
أس ام أس ~
|
ام ام اس ~
|
|
| |
|
استعمال الشرط في قوالب vb
بسم الله الرحمن الرحيم
السلام عليكم ورحمة الله وبركاته
قبل كل شيء، تذكر انه لا يمكن استعمال {vb:raw var} في الشروط
-- اعرض عبارة للاعضاء فقط :
PHP:
[PHP]<vb:if condition="$show['member']">Show this to members only</vb:if>[/PHP]
-- اعرض عبارة للزوار فقط :
PHP:
[PHP]<vb:if condition="$show['guest']">Show this to guest only</vb:if>[/PHP]
-- اعرض عبارة لمجموعة معينة :
PHP:
[PHP]<vb:if condition="is_member_of($bbuserinfo, 1,2,3)">Show this to user group 1, 2, and 3</vb:if>[/PHP]
-- اعرض عبارة لعضو معين :
PHP:
[PHP]<vb:if condition="$bbuserinfo['userid'] == 73418">Show this only to the member with the user id of 73418</vb:if>[/PHP]
-- اعرض عبارة للجميع ماعدا عضو معين:
PHP:
[PHP]<vb:if condition="$bbuserinfo['userid'] != 73418">Show this to every one but the member with the user id of 73418</vb:if>[/PHP]
-- اعرض عبارة للمشرفين على المنتدى:
PHP:
[PHP]<vb:if condition="can_moderate()">Show this to all moderators</vb:if>[/PHP]
-- اعرض عبارة للمشرفين على القسم X:
PHP:
[PHP]<vb:if condition="can_moderate($forum['x])">Show this if moderator is moderator of the forum with the id of x</vb:if>[/PHP]
-- اعرض عبارة للمشرفين على القسم الحالي:
PHP:
[PHP]<vb:if condition="can_moderate($forum['forumid'])">Show this to the moderator of the current forum</vb:if>[/PHP]
-- اعرض عبارة في القسم X فقط :
PHP:
[PHP]<vb:if condition="$forum[forumid] == x">Show this if forum id is x</vb:if>[/PHP]
-- اعرض عبارة في كل الاقسام ماعدا القسم X :
PHP:
[PHP]<vb:if condition="$forum[forumid] != x">Show this if forum id is not x</vb:if>[/PHP]
-- اعرض عبارة في الاقسام Y Z X :
PHP:
[PHP]<vb:if condition="in_array($forum['forumid'], array(x,y,z))">Show this to forum x, y and z</vb:if>[/PHP]
-- اعرض عبارة في الملف التالي فقط : نستعمل المعرف THIS_SCRIPT
[PHP] مثل : ('THIS_SCRIPT', 'register') ، ('THIS_SCRIPT', 'calendar')[/PHP]
PHP:
[PHP]<vb:if condition="THIS_SCRIPT == 'calendar'">Show this only on calendar.php</vb:if>[/PHP]
-- اعرض عبارة في كل الملفات ماعدا الملف التالي :
PHP:
[PHP]<vb:if condition="THIS_SCRIPT != 'calendar'">Show this only on calendar.php</vb:if>[/PHP]
-- استعمــال else :
PHP:
[PHP]<vb:if condition="$show['guest']"> Show this to only guest. <vb:else /> Show this to all registered users </vb:if> [/PHP]
-- استعمال elseif :
PHP:
[PHP]<vb:if condition="$show['guest']"> Show this to only guest. <vb:elseif condition="is_member_of($bbuserinfo, 5,6)" /> Show this to user group 5 and 6 which is mods and admins <vb:else /> Show this to all registered users </vb:if> [/PHP]
وشكرا [ لكم ]
و... [ لكم ] تحياتــي
hsjulhg hgav' td r,hgf vb
|
تعليمات المشاركة
|
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك
كود HTML معطلة
|
|
|
الساعة الآن 04:22 PM
|