
All phpBB language files should be encoded as UTF-8 (without BOM). You can easily do this with text editors such as PSPad or Notepad++.
Code: Select all
<select name="postion">
<option value="{L_APPLICATION_TEAM1}">{L_APPLICATION_TEAM1}</option>
<option value="{L_APPLICATION_TEAM2}">{L_APPLICATION_TEAM2}</option>
<option value="{L_APPLICATION_TEAM3}">{L_APPLICATION_TEAM3}</option>
</select>
Code: Select all
<select name="postion">
<option value="{L_APPLICATION_TEAM1}">{L_APPLICATION_TEAM1}</option>
<option value="{L_APPLICATION_TEAM2}">{L_APPLICATION_TEAM2}</option>
<option value="{L_APPLICATION_TEAM3}">{L_APPLICATION_TEAM3}</option>
<option value="{L_APPLICATION_TEAM4}">{L_APPLICATION_TEAM4}</option>
<option value="{L_APPLICATION_TEAM5}">{L_APPLICATION_TEAM5}</option>
</select>
Code: Select all
'APPLICATION_WHY' => 'Why should we choose you for this position?',
Code: Select all
'APPLICATION_TEAM4' => 'Teamname 4',
'APPLICATION_TEAM5' => 'Teamname 5',
Code: Select all
<?php
/**
*
* application [English]
*
* @package language
* @copyright (c) Jim http://beta-garden.com 2009
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
exit;
}
if (empty($lang) || !is_array($lang))
{
$lang = array();
}
// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array(
'LOGIN_APPLICATION_FORM' => 'You need to login before you can send out an application.',
'APPLICATION_SUBJECT' => 'Application from %s',
'APPLICATION_MESSAGE' => 'A new user has signed up by the application form, called [b] %1$s[/b].<br /><br />[b]Real name[/b]: %2$s<br />[b]E-mail address[/b]: %3$s<br />[b]Appling for[/b]: %4$s<br /><br />[b]Why would we choose him/her?[/b]<br /> %5$s <br />[b]Staffed at[/b]<br /> %6$s <br />%7$s <br /> %8$s <br /> %9$s <br /> %10$s [b]Are staff at [/b]<br /> %11$s <br /> %12$s <br /> %13$s <br /> %14$s <br /> %15$s',
'APPLICATION_SEND' => 'Your application has been sent to the administrators of this board. They’ll decide whether your application is good enough and get back to you in the coming days.',
'APPLICATION_PAGETITLE' => 'Application form',
'APPLICATION_WELCOME_MESSAGE' => 'Welcome at this application form. Since we are a still growing community, we wanted to apply new members to a team position, if you feel that you’re the right person, then please fill out the form below and we might get back to you and ask you for conversion regarding this. Good luck!',
'APPLICATION_REALNAME' => 'Real name',
'APPLICATION_EMAIL' => 'E-mail address',
'APPLICATION_POSITION' => 'Position you would like to have',
'APPLICATION_TEAM1' => 'Administrator',
'APPLICATION_TEAM2' => 'Global moderator',
'APPLICATION_TEAM3' => 'Moderator',
'APPLICATION_TEAM4' => 'Support',
'APPLICATION_TEAM5' => 'Promotion',
'APPLICATION_WHY' => 'Why should we choose you for this position?',
'APPLICATION_STAFFED1' => '',
'APPLICATION_STAFFED2' => '',
'APPLICATION_STAFFED3' => '',
'APPLICATION_STAFFED4' => '',
'APPLICATION_STAFFED5' => '',
'APPLICATION_STAFFING1' => '',
'APPLICATION_STAFFING2' => '',
'APPLICATION_STAFFING3' => '',
'APPLICATION_STAFFING4' => '',
'APPLICATION_STAFFING5' => '',
));
?>
Code: Select all
<!-- INCLUDE overall_header.html -->
<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="content">
<h2>{L_APPLICATION_PAGETITLE}</h2>
<span style="font-size: 1.3em;">{L_APPLICATION_WELCOME_MESSAGE}<br /><br /><br />
<form method="post" action="{PROCESS_APPFORM}" id="appform">
{L_APPLICATION_REALNAME} <input type="text" name="name" /><br />
{L_APPLICATION_POSITION}
<select name="postion">
<option value="{L_APPLICATION_TEAM1}">{L_APPLICATION_TEAM1}</option>
<option value="{L_APPLICATION_TEAM2}">{L_APPLICATION_TEAM2}</option>
<option value="{L_APPLICATION_TEAM3}">{L_APPLICATION_TEAM3}</option>
<option value="{L_APPLICATION_TEAM4}">{L_APPLICATION_TEAM4}</option>
<option value="{L_APPLICATION_TEAM5}">{L_APPLICATION_TEAM5}</option>
</select>
<br /><br />
{L_APPLICATION_WHY}<br />
<textarea rows="5" cols="50" name="why"></textarea>
<br/><br/>
Sites you have Staffed at<br />
1{L_APPLICATION_STAFFED1} <input type="text" name="staffed" /><br /><br />
2{L_APPLICATION_STAFFED2} <input type="text" name="staffed" /><br /><br />
3{L_APPLICATION_STAFFED3} <input type="text" name="staffed" /><br /><br />
4{L_APPLICATION_STAFFED4} <input type="text" name="staffed" /><br /><br />
5{L_APPLICATION_STAFFED5} <input type="text" name="staffed" /><br /><br />
Sites you are staff <br />
1{L_APPLICATION_STAFFING1} <input type="text" name="staffing" /><br /><br />
2{L_APPLICATION_STAFFING2} <input type="text" name="staffing" /><br /><br />
3{L_APPLICATION_STAFFING3} <input type="text" name="staffing" /><br /><br />
4{L_APPLICATION_STAFFING4} <input type="text" name="staffing" /><br /><br />
5{L_APPLICATION_STAFFING5} <input type="text" name="staffing" /><br /><br />
<input type="submit" name="submit" id ="submit" value="{L_SUBMIT}" class="button1" />
</span>
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- INCLUDE overall_footer.html -->
Code: Select all
<?php
/**
* @package application.php
* @copyright (c) JimA http://beta-garden.com 2009
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('mods/application');
// You need to login before being able to send out an application
if ($user->data['user_id'] == ANONYMOUS)
{
login_box('', $user->lang['LOGIN_APPLICATION_FORM']);
}
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
// Let's set the configuration, this is the ID of the forum where the post goes to
$forumid_send = 2;
$submit = (isset($_POST['submit'])) ? true : false;
if ($submit)
{
// Setting the variables we need to submit the post to the forum where all the applications come in
$apply_subject = sprintf($user->lang['APPLICATION_SUBJECT'], $user->data['username']);
$apply_post = sprintf($user->lang['APPLICATION_MESSAGE'], $user->data['username'], utf8_normalize_nfc(request_var('name', '', true)), $user->data['user_email'], request_var('postion', '', true), utf8_normalize_nfc(request_var('why', '', true)), request_var('staffed', '', true), request_var('staffing', '', true) );
// variables to hold the parameters for submit_post
$poll = $uid = $bitfield = $options = '';
generate_text_for_storage($apply_post, $uid, $bitfield, $options, true, true, true);
$data = array(
'forum_id' => $forumid_send,
'icon_id' => false,
'enable_bbcode' => true,
'enable_smilies' => true,
'enable_urls' => true,
'enable_sig' => true,
'message' => $apply_post,
'message_md5' => md5($apply_post),
'bbcode_bitfield' => $bitfield,
'bbcode_uid' => $uid,
'post_edit_locked' => 0,
'topic_title' => $apply_subject,
'notify_set' => false,
'notify' => false,
'post_time' => 0,
'forum_name' => '',
'enable_indexing' => true,
);
// Sending the post to the forum set in configuration above
submit_post('post', $apply_subject, '', POST_NORMAL, $poll, $data);
$message = $user->lang['APPLICATION_SEND'];
$message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
trigger_error($message);
}
page_header($user->lang['APPLICATION_PAGETITLE']);
$template->assign_vars(array(
'PROCESS_APPFORM' => append_sid("{$phpbb_root_path}application.$phpEx"),
));
$template->set_filenames(array(
'body' => 'appform_body.html',
));
page_footer();
?>
Very nice one, but it turns a blank form for me. I double checked all edits....skargon wrote:Hey, I know I'm not JimA, but I was working on the same issue. Here's what I foundcrazyace2007 wrote:Hello Jim,
Any way to allow users to add a subject title? Or could I have drop downs that they could pick from to create the subject?
In your /language/en/mods/application.php (or what you name it) make a bunch of subject lines:In your appform_body.html, add it like you would a standard dropdownCode: Select all
'SUBJECT_LINE' => 'Subject of Topic?', 'SUBJECT_LINE1' => 'Subject Topic 1', 'SUBJECT_LINE2' => 'Subject Topic 2, 'SUBJECT_LINE3' => 'Subject Topic 3,
In your /root/application.php, change the $apply_subject to have the new information.Code: Select all
{L_SUBJECT_LINE} <select name="subject"> <option value="{L_SUBJECT_LINE1}">{L_SUBJECT_LINE1}</option> <option value="{L_SUBJECT_LINE2}">{L_SUBJECT_LINE2}</option> <option value="{L_SUBJECT_LINE3}">{L_SUBJECT_LINE3}</option> </select>
Then go back to your /language/en/mods/application.php and change your APPLICATION_SUBJECTCode: Select all
$apply_subject = sprintf($user->lang['APPLICATION_SUBJECT'], request_var('subject', '', true));
When the post is submitted, %1$s' will become the subject chosenCode: Select all
'APPLICATION_SUBJECT' => '%1$s',
If you want them to be able to input their own... just trade out the "Drop-down" code with the standard "Input text code", and voila! You're good.Subject: Subject Topic 1
Hope this helps
i found this problem as well....but before i altered the template for my own preferences i could fill in the form as myself and it would show up as a new post... and now i cant lolVickiFletcher wrote:Sometimes I must be blonde. I was using my own account for the testing, and of course, it wasn't showing up as a new message. It works perfectly when someone other than me submits the form.VickiFletcher wrote:When the Application gets sent to the designated Forum, it isn't showing up as a NEW Post.
What do I need to change to make that happen so I know a new post has arrived?
THANKS!
Vicki
THANKS for a wonderful and much needed MOD JimA!
Vicki