Jump to content

Recommended Posts

Do you have a way to determine if the certain group is online, such as a login? 

This below is what's being used to pull that information. 

$special_group = $account_info['account']['screeningGroup'];
$scrn_grp_no_spaces = preg_replace('/[\s]+/', '', ucwords(strtolower($special_group)));

 

 

Have you tried using the if construct? Basically, you would enclose the extra verbiage with the if construct.

<?php
if($special_group == 'group name goes here') {
    //extra verbiage goes here
}
?>

If multiple groups need to see the extra verbiage, you could use the in_array() function. More information can be found here:

http://php.net/manual/en/function.in-array.php

Have you tried using the if construct? Basically, you would enclose the extra verbiage with the if construct.

<?php
if($special_group == 'group name goes here') {
    //extra verbiage goes here
}
?>

If multiple groups need to see the extra verbiage, you could use the in_array() function. More information can be found here:

http://php.net/manual/en/function.in-array.php

 

There will be a list of six groups that need to see this. The file is .html but has php and is config to run. Would it be something like this? If I need it to display above the Heading info

 

$special_group = $client_info['account']['screeningGroup'];

$spc_grp_no_spaces = preg_replace('/[\s]+/', '', ucwords(strtolower($special_group)));
 
$special_group = array('Student', 'Medical', 'Testers', 'Contractor', 'Volunteers');
if (in_array(($special_group)){
          //veribage text
 
}
 
  array(
        'text' => <<<APHtml
        <div>
            <p>
                <b><u>Heading</u></b>
            </p>
            <p>
                Display text here.
            </p>
        </div>
APHtml

The $special_group variable contains the visitor's group information, so you don't want to overwrite that. You could try something like this

<?php
$special_group = $client_info['account']['screeningGroup'];
$spc_grp_no_spaces = preg_replace('/[\s]+/', '', ucwords(strtolower($special_group)));
 
$groups_with_access = array('Student', 'Medical', 'Testers', 'Contractor', 'Volunteers');
if (in_array($special_group, $groups_with_access)){
    //veribage text
}
?>
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.