-
-
Save Apina/65d8ed21addf4c067e41 to your computer and use it in GitHub Desktop.
EE available spaces modification - a quick and dirty mod to change what is shown for available spaces in the event_list_display.php and the registration_page_display.php files. The existing references to the available spaces will need to be commented out/removed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$new_available_spaces = get_number_of_attendees_reg_limit($event_id, 'available_spaces'); //Gets a count of the available spaces | |
$display_spaces_text = ''; | |
if ($new_available_spaces == '0') { $display_spaces_text = 'No places'; } | |
elseif ($new_available_spaces <= '10') { $display_spaces_text = 'Final few'; } | |
elseif ($new_available_spaces > '10' && $new_available_spaces <= '49') { $display_spaces_text = 'Some places'; } | |
elseif ($new_available_spaces > '49') { $display_spaces_text = $new_available_spaces; } | |
elseif ($new_available_spaces === 'Unlimited') { $display_spaces_text = 'Unlimited'; } | |
echo "<strong>Remaining Spaces: </strong>" . $display_spaces_text; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment