Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Useful & unique template conditionals
Dr.CustUmz
Join Date: Aug 2013
Posts: 485

USA
by Dr.CustUmz Dr.CustUmz is offline 19 Apr 2016

For some of the basic conditionals visit THIS THREAD

This list is meant for developers and are conditionals I have collected and made over the years.

If you have a unique / useful conditional to add please share and I will add it to the list.

if browser using google chrome
Chrome returns both safari, and chrome. trying to detect it with only chrome, does not work.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


New posts

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


If hot thread
if reply count is greater than or equal to number of posts to be considered a hot thread option and that option is greater than 0
OR
if view count is greater than or equal to number of views to be considered a hot thread option and that option is greater than 0

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


If thread open

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Show to guest if registration is on

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


No replies

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


if user posts less than 1

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


if these forum ids

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


if these scripts (page name)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


if thread has prefix

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


if this page of this script

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


if last post over a year ago

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


If thread starter

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


if unread message

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


if user option show avatars

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


if notification

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


This one is just as an example (something to build from) but the jist of what it says is:
If can register OR option is on and is an admin

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


This is more of a Reference / backup for my snippets, but again feel free to add yours and I will add it to the list.

Last edited by Dr.CustUmz; 24 May 2020 at 08:57.. Reason: added snippets
Views: 64178
Reply With Quote
Comments
  #2  
Old 24 May 2020, 08:16
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Real name: Ryan
New conditional just had to figure out, thought I'd share, and make a backup of it =)

if browser using google chrome
Chrome returns both safari, and chrome. trying to detect it with only chrome, does not work.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
This needs to be updated
But I don't know what to put
Check Out Dirt RIF CustUmz

Last edited by Dr.CustUmz; 24 May 2020 at 08:58.
Reply With Quote
Reply


Tags
conditional, template


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 06:08.

Layout Options | Width: Wide Color: