function getlocations_box in Get Locations 7
Same name and namespace in other branches
- 6.2 getlocations.module \getlocations_box()
- 6 getlocations.module \getlocations_box()
- 7.2 getlocations.module \getlocations_box()
Function for colorbox and suchlike
Return value
Returns themed content
2 string references to 'getlocations_box'
- getlocations_menu in ./
getlocations.module - Implements hook_menu().
- getlocations_theme in ./
getlocations.module - Implements hook_theme().
File
- ./
getlocations.module, line 2344 - getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_box() {
$a1 = FALSE;
$a2 = FALSE;
$a3 = FALSE;
$a4 = FALSE;
if (arg(1)) {
$a1 = arg(1);
}
if (arg(2)) {
$a2 = arg(2);
}
if (arg(3)) {
$a3 = arg(3);
}
if (arg(4)) {
$a4 = arg(4);
}
$content = '';
// $a1 can be node, user, users, type, lids, nids
if ($a1 == 'node' && $a2) {
$content .= getlocations_nodemap($a2);
}
elseif ($a1 == 'user' && $a2) {
$content .= getlocations_usermap($a2);
}
elseif ($a1 == 'term' && $a2) {
$content .= getlocations_termmap($a2);
}
elseif ($a1 == 'comment' && $a2) {
$content .= getlocations_commentmap($a2);
}
elseif ($a1 == 'users') {
$content .= getlocations_usersmap();
}
elseif ($a1 == 'type' && $a2) {
$content .= getlocations_typemap($a2, $a3, $a4);
}
elseif ($a1 == 'lids' && $a2) {
$content .= getlocations_lids($a2);
}
elseif ($a1 == 'nids' && $a2) {
$content .= getlocations_nids($a2);
}
$output = theme('getlocations_box', array(
'content' => $content,
));
print $output;
exit;
}