walid
10-30-2013, بتوقيت غرينيتش 10:37 PM
http://www.dzbatna.com/images/icons/iconrote.gif ط§ظ„ط¬ظ…ظ„ ط§ظ„ط´ط±ط·ظٹط© ظپظ‰ ط§ظ„ظ†ط³ط®ط© vBulletin 4 (http://www.dzbatna.com/t1457122/)
السلام عليكم ورحمة الله وبركاته
الاخوة رواد المعهدالكرام
نتناول هذا الدرس مفصل لتوضيح كيفية بناء الجمل الشرطية فى النسخة vBulletin 4
وحتى لا تواجهنا مشاكل فى بناء الجملة joomla الشرطية
نبدأ بسم الله الرحمن الرحيم
اولا يجب التذكير لنقطة هامة جدا انه لا لا يمكن استخدام {vb:raw var} فى الجمل الشرطية
------------------------------------
لظهور الاعضاء فقط
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$show['member']">Show this to members only</vb:if>
</code> </code>
لظهور الزوار فقط
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$show['guest']">Show this to guest only</vb:if>
</code> </code>
ظهور مجموعة اعضاء معينة
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="is_member_of($bbuserinfo, 1,2,3)">Show this to user group 1, 2, and 3</vb:if>
</code> </code>
ظهور عضو واحد
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$bbuserinfo['userid'] == 318713">Show this only to the member with the user id of 318713</vb:if>
</code> </code>
مشاهدة اى عضو ولكن عضو معين
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$bbuserinfo['userid'] != 318713">Show this to every one but the member with the user id of 318713</vb:if>
</code> </code>
ظهور المشرفين فقط وفى اى قسم
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="can_moderate()">Show this to all moderators</vb:if>
</code> </code>
ظهور المشرفين فى قسم واحد ( تذكر يجب تغيير x )
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="can_moderate($forum['x])">Show this if moderator is moderator of the forum with the id of x</vb:if>
</code> </code>
ظهور المشرفين فى القسم الحالى
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="can_moderate($forum['forumid'])">Show this to the moderator of the current forum</vb:if>
</code> </code>
الظهور فى قسم واحد ( تذكر يجب تغيير x )
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$forum[forumid] == x">Show this if forum id is x</vb:if>
</code> </code>
الظهور لاىقسم ولكن قسم واحد ( تذكر يجب تغيير x )
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$forum[forumid] != x">Show this if forum id is not x</vb:if>
</code> </code>
الظهور فى اقسام متعددة
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="in_array($forum['forumid'], array(1,2,3))">Show this to forum 1, 2 and 3</vb:if>
</code> </code>
الظهور فى ملف واحد ( انظر للتعريف ('THIS_SCRIPT', 'calendar');
فى اعلى ملف ال php ( الملف الذى تريد الظهور فيه )
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="THIS_SCRIPT == 'calendar'">Show this only on calendar.php</vb:if>
</code> </code>
الظهور فى اى ملف ولكن ملف واحد ( انظر للتعريف ('THIS_SCRIPT', 'calendar');
فى اعلى ملف ال php ( الملف الذى تريد الظهور فيه )
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="THIS_SCRIPT != 'calendar'">Show this only on calendar.php</vb:if>
</code> </code>
اذا تم تعيين المتغير $customvar
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$customvar">Show this if $customvar is set</vb:if>
</code> </code>
اذا تم مساواة المتغير $customvar
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$customvar == blah">Show this if $customvar equals blah</vb:if>
</code> </code>
اذا تم عدم مساواة المتغير $customvar
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$customvar != blah">Show this if $customvar does not equal blah</vb:if>
</code> </code>
شرط اخر ( اذا ) .... فيبويلتن في بي vBulletin else statement:
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$show['guest']">
Show this to only guest.
<vb:else />
Show this to all registered users
</vb:if>
</code> </code>
شرط اخر ( الا اذا ) ...... فيبويلتن في بي vBulletin else if statement:
رمز PHP:
<code style="white-space:nowrap"> <code> <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
</code> </code>
</vb:if>
هذا كل ما فى جعبتى وارجو اضافة ما لم يكون قد تمت اضافته
اتمنى ان اكون وفقت فى طرح هذا الدرس مفصل
المصدر : موقع الشركة : http://www.vbulletin.org/forum/showthread.php?t=231525
ألعاب الأندرويد مجانا و حصريا (http://www.apotox.info/forum)
https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-ash4/482113_236967293114455_1193518507_n.png (http://www.dzbatna.com)
©المشاركات المنشورة تعبر عن وجهة نظر صاحبها فقط، ولا تُعبّر بأي شكل من الأشكال عن وجهة نظر إدارة المنتدى (http://www.dzbatna.com)©
السلام عليكم ورحمة الله وبركاته
الاخوة رواد المعهدالكرام
نتناول هذا الدرس مفصل لتوضيح كيفية بناء الجمل الشرطية فى النسخة vBulletin 4
وحتى لا تواجهنا مشاكل فى بناء الجملة joomla الشرطية
نبدأ بسم الله الرحمن الرحيم
اولا يجب التذكير لنقطة هامة جدا انه لا لا يمكن استخدام {vb:raw var} فى الجمل الشرطية
------------------------------------
لظهور الاعضاء فقط
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$show['member']">Show this to members only</vb:if>
</code> </code>
لظهور الزوار فقط
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$show['guest']">Show this to guest only</vb:if>
</code> </code>
ظهور مجموعة اعضاء معينة
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="is_member_of($bbuserinfo, 1,2,3)">Show this to user group 1, 2, and 3</vb:if>
</code> </code>
ظهور عضو واحد
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$bbuserinfo['userid'] == 318713">Show this only to the member with the user id of 318713</vb:if>
</code> </code>
مشاهدة اى عضو ولكن عضو معين
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$bbuserinfo['userid'] != 318713">Show this to every one but the member with the user id of 318713</vb:if>
</code> </code>
ظهور المشرفين فقط وفى اى قسم
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="can_moderate()">Show this to all moderators</vb:if>
</code> </code>
ظهور المشرفين فى قسم واحد ( تذكر يجب تغيير x )
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="can_moderate($forum['x])">Show this if moderator is moderator of the forum with the id of x</vb:if>
</code> </code>
ظهور المشرفين فى القسم الحالى
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="can_moderate($forum['forumid'])">Show this to the moderator of the current forum</vb:if>
</code> </code>
الظهور فى قسم واحد ( تذكر يجب تغيير x )
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$forum[forumid] == x">Show this if forum id is x</vb:if>
</code> </code>
الظهور لاىقسم ولكن قسم واحد ( تذكر يجب تغيير x )
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$forum[forumid] != x">Show this if forum id is not x</vb:if>
</code> </code>
الظهور فى اقسام متعددة
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="in_array($forum['forumid'], array(1,2,3))">Show this to forum 1, 2 and 3</vb:if>
</code> </code>
الظهور فى ملف واحد ( انظر للتعريف ('THIS_SCRIPT', 'calendar');
فى اعلى ملف ال php ( الملف الذى تريد الظهور فيه )
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="THIS_SCRIPT == 'calendar'">Show this only on calendar.php</vb:if>
</code> </code>
الظهور فى اى ملف ولكن ملف واحد ( انظر للتعريف ('THIS_SCRIPT', 'calendar');
فى اعلى ملف ال php ( الملف الذى تريد الظهور فيه )
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="THIS_SCRIPT != 'calendar'">Show this only on calendar.php</vb:if>
</code> </code>
اذا تم تعيين المتغير $customvar
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$customvar">Show this if $customvar is set</vb:if>
</code> </code>
اذا تم مساواة المتغير $customvar
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$customvar == blah">Show this if $customvar equals blah</vb:if>
</code> </code>
اذا تم عدم مساواة المتغير $customvar
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$customvar != blah">Show this if $customvar does not equal blah</vb:if>
</code> </code>
شرط اخر ( اذا ) .... فيبويلتن في بي vBulletin else statement:
رمز PHP:
<code style="white-space:nowrap"> <code> <vb:if condition="$show['guest']">
Show this to only guest.
<vb:else />
Show this to all registered users
</vb:if>
</code> </code>
شرط اخر ( الا اذا ) ...... فيبويلتن في بي vBulletin else if statement:
رمز PHP:
<code style="white-space:nowrap"> <code> <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
</code> </code>
</vb:if>
هذا كل ما فى جعبتى وارجو اضافة ما لم يكون قد تمت اضافته
اتمنى ان اكون وفقت فى طرح هذا الدرس مفصل
المصدر : موقع الشركة : http://www.vbulletin.org/forum/showthread.php?t=231525
ألعاب الأندرويد مجانا و حصريا (http://www.apotox.info/forum)
https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-ash4/482113_236967293114455_1193518507_n.png (http://www.dzbatna.com)
©المشاركات المنشورة تعبر عن وجهة نظر صاحبها فقط، ولا تُعبّر بأي شكل من الأشكال عن وجهة نظر إدارة المنتدى (http://www.dzbatna.com)©