2) ? mt_rand(0,count($r) - 2) : 0); for ($x = $index; $x <= ($index+1); $x ++) { $rr = $r[$x]; if (! $rr['xchan_url']) break; $connlnk = z_root() . '/follow/?url=' . $rr['xchan_addr']; $arr[] = [ 'url' => chanlink_url($rr['xchan_url']), 'profile' => $rr['xchan_url'], 'name' => $rr['xchan_name'], 'photo' => $rr['xchan_photo_m'], 'ignlnk' => z_root() . '/directory?return=' . base64_encode(App::$query_string) . '&ignore=' . $rr['xchan_hash'], 'conntxt' => t('Connect'), 'connlnk' => $connlnk, 'ignore' => t('Ignore/Hide') ]; } $o = replace_macros(get_markup_template('suggest_widget.tpl'), [ '$title' => t('Suggestions'), '$more' => t('See more...'), '$entries' => $arr ] ); return $o; } }