Application form

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
User avatar
JimA
Community Team Leader
Community Team Leader
Posts: 7827
Joined: Thu Jul 31, 2008 5:54 am
Location: The Netherlands
Name: Jim Mossing Holsteyn
Contact:

Re: Application form

Post by JimA »

It should be. The problem is that you edited the language file incorrectly, so it got corrupt. ;)

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++.
Jim Mossing Holsteyn - Community Team Leader
Knowledge Base | Documentation | Board rules

If you're having any questions about the rules/customs of this website, feel free to drop me a PM.
Tenaciouspete
Registered User
Posts: 12
Joined: Mon Mar 08, 2010 11:06 am

Re: Application form

Post by Tenaciouspete »

Ah okay, cheers, I was using the ordinary notepad.

Can I still use the files that got corrupt? or do I have to use my backed up copies?
User avatar
JimA
Community Team Leader
Community Team Leader
Posts: 7827
Joined: Thu Jul 31, 2008 5:54 am
Location: The Netherlands
Name: Jim Mossing Holsteyn
Contact:

Re: Application form

Post by JimA »

Yeah, you can still use them. But you need to edit them and change the encoding to UTF-8 without BOM. :)
Jim Mossing Holsteyn - Community Team Leader
Knowledge Base | Documentation | Board rules

If you're having any questions about the rules/customs of this website, feel free to drop me a PM.
Tenaciouspete
Registered User
Posts: 12
Joined: Mon Mar 08, 2010 11:06 am

Re: Application form

Post by Tenaciouspete »

Cheers, thanks for the help mate, I'll try fix the mod and if I have trouble will post again.
Tenaciouspete
Registered User
Posts: 12
Joined: Mon Mar 08, 2010 11:06 am

Re: Application form

Post by Tenaciouspete »

Edit: Fixed everything up, works awesome :)
Tenaciouspete
Registered User
Posts: 12
Joined: Mon Mar 08, 2010 11:06 am

Re: Application form

Post by Tenaciouspete »

Sorry for bumps

Is it possible to have more than 3 teams? I've tried adding more in the language/en/mods/application.php but they don't seem to show up.

I really need 5 teams.

Cheers.
User avatar
JimA
Community Team Leader
Community Team Leader
Posts: 7827
Joined: Thu Jul 31, 2008 5:54 am
Location: The Netherlands
Name: Jim Mossing Holsteyn
Contact:

Re: Application form

Post by JimA »

That's possible with some edits to the files. :)

Open: styles/prosilver/template/appform_body.html
Find:

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>
Replace with:

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>
Open: language/en/mods/application.php
Find:

Code: Select all

'APPLICATION_WHY'                => 'Why should we choose you for this position?', 
Before (at a new line), add:

Code: Select all

'APPLICATION_TEAM4'                => 'Teamname 4',
'APPLICATION_TEAM5'                => 'Teamname 5', 
Make sure to refresh the templates of the prosilver style under the Styles tab in the ACP afterwards.
Jim Mossing Holsteyn - Community Team Leader
Knowledge Base | Documentation | Board rules

If you're having any questions about the rules/customs of this website, feel free to drop me a PM.
CherryJimbo
Registered User
Posts: 105
Joined: Mon Mar 01, 2010 10:01 pm

Re: Application form

Post by CherryJimbo »

If I had a "Specific Moderator" Team, how could I, if someone selected this team, then display another textbox, allowing them to pick a specific forum?
Tenaciouspete
Registered User
Posts: 12
Joined: Mon Mar 08, 2010 11:06 am

Re: Application form

Post by Tenaciouspete »

Cheers mate, worked perfectly, I forgot to edit the app_form_body file.

I edited application.php and was wondering why it wouldn't add them.

Nice app :)
Dragoth
Registered User
Posts: 52
Joined: Mon May 04, 2009 3:30 pm

Re: Application form

Post by Dragoth »

when ever some one submits a Application all the shows up is a 0 in the post it makes plz help

/language/en/mods/application.php

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'				=> '',
	
));

?>
/styles/prosilver/template/appform_body.html


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 --> 

application.php

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();

?>
Dragoth
Registered User
Posts: 52
Joined: Mon May 04, 2009 3:30 pm

Re: Application form

Post by Dragoth »

never mind i fixed it btw great mod
User avatar
mfrankena
Registered User
Posts: 128
Joined: Sun Apr 17, 2005 3:11 pm

Re: Application form

Post by mfrankena »

skargon wrote:
crazyace2007 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?
Hey, I know I'm not JimA, but I was working on the same issue. Here's what I found :D

In your /language/en/mods/application.php (or what you name it) make a bunch of subject lines:

Code: Select all

'SUBJECT_LINE'			=> 'Subject of Topic?',
'SUBJECT_LINE1'				=> 'Subject Topic 1',
'SUBJECT_LINE2'				=> 'Subject Topic 2,
'SUBJECT_LINE3'				=> 'Subject Topic 3,
In your appform_body.html, add it like you would a standard dropdown

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>
In your /root/application.php, change the $apply_subject to have the new information.

Code: Select all

$apply_subject  = sprintf($user->lang['APPLICATION_SUBJECT'], request_var('subject', '', true));
Then go back to your /language/en/mods/application.php and change your APPLICATION_SUBJECT

Code: Select all

	'APPLICATION_SUBJECT'			=> '%1$s',
When the post is submitted, %1$s' will become the subject chosen
Subject: Subject Topic 1
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.

Hope this helps
Very nice one, but it turns a blank form for me. I double checked all edits....
Regards,
Martin

Sites: BF2CC Admin // 2142CC Admin // M.B.T. Admin // Homepage
User avatar
mfrankena
Registered User
Posts: 128
Joined: Sun Apr 17, 2005 3:11 pm

Re: Application form

Post by mfrankena »

:oops: oh never mind...found it. missed an ' inside the lang file. :oops: :oops:
thnx for a nice addition ;-)
Regards,
Martin

Sites: BF2CC Admin // 2142CC Admin // M.B.T. Admin // Homepage
Bin Power
Registered User
Posts: 1
Joined: Sun Mar 14, 2010 7:43 pm

Re: Application form

Post by Bin Power »

Hi
Brilliant MOD :D

How would I go about this following idea..

select "position a-z"
if option "is possition C"
then show "form C"
else "do nothing"

I hope that makes sense :D

Bin Power
Dripster
Registered User
Posts: 7
Joined: Tue Sep 25, 2007 10:08 pm

Re: Application form

Post by Dripster »

VickiFletcher wrote:
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
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.
THANKS for a wonderful and much needed MOD JimA!

Vicki
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 lol
Locked

Return to “[3.0.x] MOD Database Releases”