• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest Multiple values for notice page criteria conditions?

RobParker

Well-known member
#1
The conditional page for notices (as well as various addons like Robbo's ad manager) has various options as below

Screen Shot 2013-01-23 at 20.41.16.png

What I'd like to do is have some of these fields contain multiple values (e.g. if there are several view class or content templates I'd like the notice to appear with).

Is there a way to pass multiple variables into these fields?
 

Jake Bunce

XenForo moderator
Staff member
#2
Nope. You would have to modify this code to check multiple values:

library/XenForo/Helper/Criteria.php

Code:
				// browsing within the specified view
				case 'view':
				{
					if (!isset($params['viewName']) || strtolower($params['viewName']) != strtolower($data['name']))
					{
						return false;
					}
				}
				break;

				// viewing the specified content template
				case 'template':
				{
					if (!isset($params['contentTemplate']) || strtolower($params['contentTemplate']) != strtolower($data['name']))
					{
						return false;
					}
				}
				break;
 

RobParker

Well-known member
#5
Can this be moved to Suggestions please?

Was hoping Mike might notice while he's on a mission ;-)

Edit: A "not" conditional, I.e. not using content template Xxxx would be another very useful addition.
 

Brogan

XenForo moderator
Staff member
#6
Multiple values in the fields has already been suggested, but a "not" condition hasn't so I have moved it to Suggestions.