Skip to content

Commit

Permalink
Started work on compose page
Browse files Browse the repository at this point in the history
  • Loading branch information
euantorano committed Nov 20, 2012
1 parent c912315 commit f3ad4f8
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 11 deletions.
14 changes: 12 additions & 2 deletions conversations.php
Expand Up @@ -15,6 +15,8 @@
define('IN_MYBB', 1);
define('THIS_SCRIPT', 'conversations.php');

$templatelist = 'mybbconversations_list,mybbconversations_row_empty,mybbconversations_row';

require __DIR__.'/global.php';

if (!isset($lang->mybbconversations)) {
Expand All @@ -27,8 +29,16 @@
error_no_permission();
}

if (!isset($mybb->input['action']) AND $mybb->input['action'] == 'create_conversation') {
// Create conversation page
if (isset($mybb->input['action']) AND $mybb->input['action'] == 'create_conversation') {
add_breadcrumb($lang->mybbconversations_nav_create, 'conversations.php?action=create_conversation');

if (strtolower($mybb->request_method) == 'post') {

} else {
$codebuttons = build_mycode_inserter();
eval("\$page = \"".$templates->get('mybbconversations_create_conversation')."\";");
output_page($page);
}
} else {
$conversations = '';
$altbg = '';
Expand Down
7 changes: 7 additions & 0 deletions inc/languages/english/mybbconversations.lang.php
Expand Up @@ -15,8 +15,15 @@
$l['mybbconversations'] = 'MyBB Conversation System';

$l['mybbconversations_nav'] = 'Conversations';
$l['mybbconversations_nav_create'] = 'Start a conversation';

$l['mybbconversations_conversation_title'] = 'Subject';
$l['mybbconversations_conversation_created_at'] = 'Started';

$l['mybbconversations_no_conversations'] = 'No conversations to display.';

$l['mybbconversations_input_title'] = 'Subject:';
$l['mybbconversations_input_message'] = 'Message:';
$l['mybbconversations_input_add_participant'] = 'Add:';

$l['mybbconversations_participants'] = 'Participants';
78 changes: 69 additions & 9 deletions inc/plugins/mybbconversations.php
Expand Up @@ -254,19 +254,79 @@ function mybbconversations_activate()

'create_conversation' => '<html>
<head>
<title>Start a conversation - {$mybb->settings[\'boardname\']}</title>
<title>Start a conversation - {$mybb->settings[\'bbname\']}</title>
{$headerinclude}
<script type="text/javascript" src="jscripts/usercp.js"></script>
</head>
<body>
{$header}
<form action="conversations.php?action=create_conversation" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<label for="input_title">
Title:
</label>
<input type="text" id="input_title" name="title" />
<textarea name="message" id="input_message"></textarea>
</form>
<table border=0 cellspacing="{$theme[\'borderwidth\']}" cellpadding="{$theme[\'tablespace\']}" width="100%">
<tr>
<td width="20%" valign="top">
<table border="0" cellspacing="{$theme[\'borderwidth\']}" cellpadding="{$theme[\'tablespace\']}" class="tborder">
<thead>
<tr>
<td class="thead" colspan="2">
<strong>{$lang->mybbconversations_participants}</strong>
</td>
</tr>
</thead>
<tbody>
{$conversationParticipants}
<tr>
<td class="trow1">
<strong>
<label for="to">
{$lang->mybbconversations_input_add_participant}
</label>
</strong>
</td>
<td class="trow1">
<textarea name="to" id="to" rows="2" cols="38" tabindex="1">{$to}</textarea>
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top">
<form action="conversations.php?action=create_conversation" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<table border="0" cellspacing="{$theme[\'borderwidth\']}" cellpadding="{$theme[\'tablespace\']}" class="tborder">
<thead>
<tr>
<th class="thead" colspan="2">
<strong>{$lang->mybbconversations_nav_create}</strong>
</th>
</tr>
</thead>
<tbody>
<tr>
<td class="trow1" width="20%">
<label for="input_title">
<strong>{$lang->mybbconversations_input_title}</strong>
</label>
</td>
<td class="trow1">
<input type="text" id="input_title" name="title" value="{$title}" />
</td>
</tr>
<tr>
<td class="trow2" width="20%">
<label for="message">
<strong>{$lang->mybbconversations_input_message}</strong>
</label>
</td>
<td class="trow1">
<textarea name="message" id="message" rows="20" cols="70" tabindex="2">{$message}</textarea>
{$codebuttons}
</td>
</tr>
</tbody>
</table>
</form>
</td>
</tr>
</table>
{$footer}
</body>
</html>',
Expand Down

0 comments on commit f3ad4f8

Please sign in to comment.