إنضمامك إلي منتديات استراحات زايد يحقق لك معرفة كل ماهو جديد في عالم الانترنت ...

انضم الينا
استراحات زايد الصفحة الرئيسية

         :: المحامية رباب المعبي : حكم لصالح موكلنا بأحقيتة للمبالغ محل الدعوى (آخر رد :حوااااء)       :: برامج الرشاقة السعيدة (آخر رد :دارين الدوسري)       :: تفسير الحلم بمعدات الصيد (آخر رد :نوران نور)       :: تفسير حلم انجاب ولد للمتزوجه (آخر رد :نوران نور)       :: تفسير حلم رؤية المطر (آخر رد :نوران نور)       :: تفسير حلم حادث دهس (آخر رد :نوران نور)       :: رؤيا اكل الحلوى في المنام (آخر رد :نوران نور)       :: تفسير حلم الخنفساء السوداء في المنزل (آخر رد :نوران نور)       :: شنط قماش هاند ميد| تحف فنية تعكس الإبداع والأناقة الشخصية (آخر رد :konouz2017)       :: افضل فني نجار بالرياض 20% خصم (آخر رد :layansherief)      

إضافة رد
 
LinkBack أدوات الموضوع انواع عرض الموضوع
  #1  
قديم 10-25-2009, 03:10 AM
عضو ماسي
بيانات محروم.كوم
 رقم العضوية : 503
 تاريخ التسجيل : Dec 2007
الجنس : female
علم الدوله :
 المشاركات : 2,100,612
عدد الـنقاط :3341
 تقييم المستوى : 2139

I have listed some really useful conditionals that are widely used throughout vB. Will keep adding more.

If Viewer is a Member
--------------------------------------------------
If you want to show a link only to registered members you would use this conditional.



كود PHP:



If Viewer is in the Following Usergroups Array. Enter the Usergroup Number(s) Seperated by a Comma
--------------------------------------------------
If you want to show an advertisement to viewers that are unregistered* registered members and awaiting email confirmation you would use the usergroup ids 1*2*3 within the array.



كود PHP:



If This Script Is or Is Not XXX
--------------------------------------------------
If this script is index (as used in the example below) then it will show the code within the conditional. You can use it to show a piece of code only on Forumhome if you have to put it in a template that is global such as the header. To find out what the script is per page open up the php file that loads the page like for instance showthread.php and look for


كود PHP:
define('THIS_SCRIPT'* 'showthread');



and the showthread part is what you would use.



كود PHP:



and here you can show information on every page but the index page by using this conditional



كود PHP:



For checking multiple scripts:



كود PHP:



OR we can use this way as well



كود PHP:



If this user equals or does not equal xxx
--------------------------------------------------
What this conditional will do is only show certain information if the person viewing the page has the same userid as defined within the conditional. So if you put userid 667 inside the conditional below and put a link inside the conditional tags only the user that has the userid 667 will see that link.



كود PHP:



and it works the opposite way as well if you do not want information to show for 667 but you want it to show for everyone else you would use



كود PHP:



OR we can also use this way



كود PHP:



Display Information To Guests Only
--------------------------------------------------
The following conditional will display information only to guests and no one else. This is helpful in displaying a welcome message that you only wish for guests to see.



كود PHP:



Display Information On a Per Forum Basis
--------------------------------------------------
This conditional allows you to display information on a per forum basis. This can be helpful if you wish to display different advertisements depending on what forum that the user is in. You would simply replace X with the forum id that you wish the information to appear in.




كود PHP:



OR this



كود PHP:



OR this



كود PHP:



and on the other hand you can use the ! to do the opposite and display the information in every forum but the id you list



كود PHP:



or if you have multiple forums you wish to include something with you can use an array such as this



كود PHP:



OR this



كود PHP:



If Usergroup Is or Is Not X
--------------------------------------------------
If the user is a member of the x usergroup then show the code



كود PHP:



and then you can use the ! to tell it to not show it to the x usergroup but show it to everyone else.



كود PHP:



If Users Birthday is Less Than or Greater Than XXXX-XX-XX Do Something
--------------------------------------------------
Just to show the power of vBulletin here is a cool conditional that will show information based on the birthday of the user. The one below will show "Too Young" if they were born after 01-01-1980.



كود PHP:
Too Young


and this one will show you "Too Young" if the user was born before 01-01-1980



كود PHP:
Too Young


If Thread is or is not in X Forum Execute Code
--------------------------------------------------
For instance if you want a piece of code to appear within thread in a particular forum you can do so with this conditional.


كود PHP:



If you want to show the piece of code on every new reply on every thread but 1 forum you can use this which says if thread is in forum x do not show the code but show it for all the other threads out side of forum x.


كود PHP:



and of course you can define multiple forum ids with the array


كود PHP:



Is user moderator of any forum?
--------------------------------------------------
If the user is a moderator execute code.


كود PHP:



Is user moderator of current forum?
--------------------------------------------------
If the user is a moderator of the current forum execute code


كود PHP:



Is user moderator of x Forum?
--------------------------------------------------
If the user is a moderator of x forum execute code.


كود PHP:



Note: can_moderate() may add queries to your page.

Is user the thread starter?
--------------------------------------------------
Is the user the thread creator? If so execute code.


كود PHP:



Is user the thread starter?
--------------------------------------------------
If the thread is closed execute code.


كود PHP:



Place Information After First Post
--------------------------------------------------
Useful for adding a advertisement or other information after the first post on every page.


كود PHP:



Place Information After x Post On Every Page
--------------------------------------------------
This will add your code directly after the post number you define on each page. If you put 2 in place of x the code will appear on every page after the second post.


كود PHP:



Using If Else in Templates
--------------------------------------------------
You can also use If Else conditionals within your templates. The below shows you how to correctly do this.

كود PHP:

Show Guest This Message

Show Everyone but guests this message



__DEFINE_LIKE_SHARE__
رد مع اقتباس
إضافة رد

مواقع النشر (المفضلة)


تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة
Trackbacks are متاحة
Pingbacks are متاحة
Refbacks are متاحة


المواضيع المتشابهه
الموضوع كاتب الموضوع المنتدى مشاركات آخر مشاركة
[ عرض دعم فني ] : [ تعديل بالقوالب , لتجميل المنتدى ] دش وشوف محروم.كوم منتدى أخبار المواقع والمنتديات العربية والأجنبية 0 09-06-2009 04:20 AM
مششششششششكلة بالقوالب محروم.كوم منتدى أخبار المواقع والمنتديات العربية والأجنبية 0 07-25-2009 08:20 AM
||العرض الجبار|| 5 ايام وينتهي العرض ....لاتفوت الفرصة وأنضم للنخبة محروم.كوم منتدى أخبار المواقع والمنتديات العربية والأجنبية 0 05-21-2009 08:50 PM
Image Line EzGenerator 3.0.58.1 انشيء موقعك في ثواني واستمتع بالقوالب الجاهزة والكثير محروم.كوم منتدى أخبار المواقع والمنتديات العربية والأجنبية 0 05-12-2009 01:20 AM
افزعوا لي .. ماعادني داخل بالقوالب مره ثانيه محروم.كوم منتدى أخبار المواقع والمنتديات العربية والأجنبية 0 05-04-2009 06:30 PM


الساعة الآن 04:09 AM


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By Almuhajir

RSS RSS 2.0 XML MAP HTML