HTML and CSS Reference
In-Depth Information
The ask-form view outputs the form that allows an attendee to ask a new question.
The room-closed view uses the presenter's e-mail address to allow anyone landing on a closed room to follow up
with additional questions if they have any.
Adding the Ask a Question View
Create a new file called ask-form.inc.php in system/views/ and insert the following markup:
<form id="ask-a-question" method="post"
action=" <?php echo $form_action; ?> ">
<label>
If you have a question and you don't see it below, ask it here.
<input type="text" name="new-question" tabindex="1" />
</label>
<input type="submit" value="Ask" tabindex="2" />
<input type="hidden" name="room_id"
value=" <?php echo $room_id; ?> " />
<input type="hidden" name="nonce"
value=" <?php echo $nonce; ?> " />
</form><!--/#ask-a-question-->
This markup creates the form for asking new questions.
Adding the Room Closed View
In system/views/ , add a new file called room-closed.inc.php with the following markup:
<h3>This session has ended.</h3>
<p>
If you have a question that wasn't answered, please
<a href="mailto: <?php echo $email; ?> ">email the presenter</a>.
</p>
This markup lets the attendee know that the room is closed, but offers him an e-mail address to get in touch with
the presenter so he's not totally out of luck.
Building the Question Model
To store data about questions and their votes, you now need to create a model class that will house all the
question-related database manipulation methods.
Start by creating a new file in system/models/ called class.question_model.inc.php with the following class
definition:
<?php
/**
* Creates database interaction methods for questions
*
* @author Jason Lengstorf < jason@lengstorf.com >
 
Search WWH ::




Custom Search