| 231 |
$form['tid'] = array( |
$form['tid'] = array( |
| 232 |
'#type' => 'select', |
'#type' => 'select', |
| 233 |
'#title' => t('Select a !category', array('!category' => $category)), |
'#title' => t('Select a !category', array('!category' => $category)), |
| 234 |
'#size' => 10, |
'#size' => 10, |
| 235 |
'#options' => $options, |
'#options' => $options, |
| 236 |
'#attributes' => array('onchange' => "load_node_select(this.value, '". base_path() ."');"), |
'#attributes' => array('onchange' => "load_node_select(this.value, '". base_path() ."');"), |
| 237 |
); |
); |
| 238 |
|
|
| 239 |
/** |
/** |
| 240 |
* Save the settings array as hidden input fields in the uBrowser form. |
* Save the settings array as hidden input fields in the uBrowser form. |
| 297 |
} |
} |
| 298 |
else { |
else { |
| 299 |
$result = _ubrowser_select_nodes(array($tid), $filter); |
$result = _ubrowser_select_nodes(array($tid), $filter); |
| 300 |
$options = array(0 => t('!Category contains !count !nodes!punctuation', |
$options = array(0 => t('!Category contains !count !nodes!punctuation', |
| 301 |
array('!Category' => ucfirst($category), |
array('!Category' => ucfirst($category), |
| 302 |
'!count' => db_num_rows($result), |
'!count' => db_num_rows($result), |
| 303 |
'!nodes' => ((db_num_rows($result) == 1) ? $nodesg : $nodepl), |
'!nodes' => ((db_num_rows($result) == 1) ? $nodesg : $nodepl), |
| 395 |
$options[$node->nid] = '('. $node->nid .') '. $node->title; |
$options[$node->nid] = '('. $node->nid .') '. $node->title; |
| 396 |
} |
} |
| 397 |
} |
} |
| 398 |
} |
} |
| 399 |
else { |
else { |
| 400 |
$options = array(0 => t('Search yielded !count results:', array('!count' => $j))); |
$options = array(0 => t('Search yielded !count results:', array('!count' => $j))); |
| 401 |
foreach($results as $result) { |
foreach($results as $result) { |
| 921 |
$form['ubb-build'] = array( |
$form['ubb-build'] = array( |
| 922 |
'#type' => 'submit', |
'#type' => 'submit', |
| 923 |
'#value' => isset($settings['display']) ? $settings['display'] : t('Display uBrowser'), |
'#value' => isset($settings['display']) ? $settings['display'] : t('Display uBrowser'), |
| 924 |
'#attributes' => array('onclick' => "return build_ubrowser('". base_path() |
'#attributes' => array('onclick' => "return build_ubrowser('". base_path() |
| 925 |
."', '$code_id');"), |
."', '$code_id');"), |
| 926 |
); |
); |
| 927 |
|
|
| 948 |
* Rewrite of taxonomy_select_nodes() to return every matching node, not just |
* Rewrite of taxonomy_select_nodes() to return every matching node, not just |
| 949 |
* a subset for paged display. Includes ability to filter by node type. |
* a subset for paged display. Includes ability to filter by node type. |
| 950 |
*/ |
*/ |
| 951 |
function _ubrowser_select_nodes($tids = array(), $filter = NULL, $operator = 'or', $depth = 0, $pager = TRUE, $order = 'n.sticky DESC, n.created DESC') { |
function _ubrowser_select_nodes($tids = array(), $filter = NULL, $operator = 'or', $depth = 0, $pager = TRUE, $order = 'n.sticky DESC, n.title ASC') { |
| 952 |
if (count($tids) > 0) { |
if (count($tids) > 0) { |
| 953 |
if ($filter != NULL) { |
if ($filter != NULL) { |
| 954 |
if (strpos($filter, ',') > 0) { |
if (strpos($filter, ',') > 0) { |
| 992 |
$result = db_query($sql); |
$result = db_query($sql); |
| 993 |
} |
} |
| 994 |
|
|
| 995 |
return $result; |
return $result; |
| 996 |
} |
} |
| 997 |
|
|
| 998 |
/** |
/** |