| 1 |
<?php
|
| 2 |
// $Id: node.inc,v 1.2 2009/01/07 00:55:00 dww Exp $
|
| 3 |
|
| 4 |
|
| 5 |
/**
|
| 6 |
* @file
|
| 7 |
* Theme functions when viewing a signup-enabled node.
|
| 8 |
*/
|
| 9 |
|
| 10 |
/**
|
| 11 |
* Controls the output displayed if this node is closed for signups.
|
| 12 |
*
|
| 13 |
* @param $node
|
| 14 |
* The fully loaded node object.
|
| 15 |
* @param $current_signup
|
| 16 |
* If the user already signed up, an HTML representation of their current
|
| 17 |
* signup information, otherwise an empty string.
|
| 18 |
*
|
| 19 |
* @return
|
| 20 |
* Themed output to display for a node with closed signups.
|
| 21 |
*
|
| 22 |
* @see _signup_node_output()
|
| 23 |
* @see _signup_print_current_signup()
|
| 24 |
*/
|
| 25 |
function theme_signup_signups_closed($node, $current_signup = '') {
|
| 26 |
$output = '<h3>'. t('Signups closed for this %node_type', array('%node_type' => node_get_types('name', $node->type))) .'</h3>';
|
| 27 |
$output .= $current_signup;
|
| 28 |
return $output;
|
| 29 |
}
|
| 30 |
|
| 31 |
/**
|
| 32 |
* Controls the output for anonymous users who can't signup.
|
| 33 |
*
|
| 34 |
* @param $anon_login_text
|
| 35 |
* The translated HTML help text telling users to login (and if allowed on
|
| 36 |
* this site, register) so they can signup, including login/register links.
|
| 37 |
*
|
| 38 |
* @return
|
| 39 |
* The themed HTML to display the login (and maybe register) help text.
|
| 40 |
*/
|
| 41 |
function theme_signup_anonymous_user_login_text($anon_login_text) {
|
| 42 |
if (!empty($anon_login_text)) {
|
| 43 |
return '<div class="signup_anonymous_login">'. $anon_login_text .'</div>';
|
| 44 |
}
|
| 45 |
}
|
| 46 |
|
| 47 |
/**
|
| 48 |
* Return HTML desired at the top of the signup output for a node.
|
| 49 |
*
|
| 50 |
* @param $node
|
| 51 |
* The fully loaded node object to generate a header for.
|
| 52 |
*
|
| 53 |
* @return
|
| 54 |
* HTML to display at the top of the signup output.
|
| 55 |
*
|
| 56 |
* @see _signup_node_output()
|
| 57 |
*/
|
| 58 |
function theme_signup_node_output_header($node) {
|
| 59 |
return '<a name="signup"></a>';
|
| 60 |
}
|