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
Valace
Registered User
Posts: 177
Joined: Sat Sep 20, 2008 9:40 pm

Re: Application form

Post by Valace »

OK I worked out how to allow guest to use the forum now

Access application.php and find

Code: Select all

if ($user->data['user_id'] == ANONYMOUS)
{
    login_box('', $user->lang['LOGIN']);
} 
and remove

Code: Select all

{
    login_box('', $user->lang['LOGIN']);
} 
This worked fine with me
Image - Help look after the Earth and get green hosting
Free Domain: http://www.co.cc
antagonia
Registered User
Posts: 12
Joined: Thu Dec 25, 2008 8:43 am

Re: Application form

Post by antagonia »

I tried that-- it is not working for me. Are yours really posting? Mine are not posting at all. It says they are posting, but they don't post.

How do you have your permissions set?
User avatar
Valace
Registered User
Posts: 177
Joined: Sat Sep 20, 2008 9:40 pm

Re: Application form

Post by Valace »

antagonia wrote:I tried that-- it is not working for me. Are yours really posting? Mine are not posting at all. It says they are posting, but they don't post.

How do you have your permissions set?
After I clear the cache mine as appear to stopping working only with that code change I suggested. I have other look when I get back home tonight. I think the first aim is to make sure your mod works normaly when it does make the changes you want.
Image - Help look after the Earth and get green hosting
Free Domain: http://www.co.cc
NateTheGreatt
Registered User
Posts: 5
Joined: Sun Aug 16, 2009 10:07 pm

Re: Application form

Post by NateTheGreatt »

Awesome Mod, Jim. Its exactly what I needed! I'm having a bit of trouble, though. If anyone can help me with this, please do.

I want to be able to add my own messages to the form. I tried going into language/en/mods/application.php and adding a few custom lines to the array and then putting them into the appform_body.html. It didn't work. Is there anywhere else I need to modify in order for me to do this?

Thanks in advanced!
04wayne
Registered User
Posts: 50
Joined: Wed Jul 29, 2009 7:34 pm

Re: Application form

Post by 04wayne »

My forum's style is called "sliced" - will this Mod work for me?
User avatar
JimA
Community Team Leader
Community Team Leader
Posts: 7816
Joined: Thu Jul 31, 2008 5:54 am
Location: The Netherlands
Name: Jim Mossing Holsteyn
Contact:

Re: Application form

Post by JimA »

04wayne wrote:My forum's style is called "sliced" - will this Mod work for me?
That style is based on subsilver2, which I officially not support.

You can though, try to apply the prosilver edits on this style, the only thing you need to figure out is adding a link to the header, the appform_body.html will work, but can look a little strange. ;)
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.
NateTheGreatt
Registered User
Posts: 5
Joined: Sun Aug 16, 2009 10:07 pm

Re: Application form

Post by NateTheGreatt »

I figured out my previous problem, but now I'm having trouble changing the output message. It seems like this is the message that is output when the post is sent and the thread is created:

Code: Select all

'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',
How do I know which variables are which? And how do I set new ones? For example I would like %6s to be the text that they input into a new field which I created.
User avatar
JimA
Community Team Leader
Community Team Leader
Posts: 7816
Joined: Thu Jul 31, 2008 5:54 am
Location: The Netherlands
Name: Jim Mossing Holsteyn
Contact:

Re: Application form

Post by JimA »

They are set by the sprintf function in the application.php file.
This is the code that handles that part.

Code: Select all

$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)));
Replace it with the following:

Code: Select all

$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('namefield', '', true));
Change the name in the last request_var from 'namefield' to the name of the field you've set in the appform_body.html, then you can call that field by using %6$s in the language files.
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.
User avatar
RMcGirr83
Former Team Member
Posts: 21491
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Application form

Post by RMcGirr83 »

JimA wrote:
04wayne wrote:My forum's style is called "sliced" - will this Mod work for me?
That style is based on subsilver2, which I officially not support.
Can try this as subsilver2 html file

Code: Select all

<!-- INCLUDE overall_header.html -->

<div id="id="appform"">

	<form method="post" action="{PROCESS_APPFORM}" id="appform">
	
	<table class="tablebg" width="100%" cellspacing="1">
	<tr>
		<th colspan="2">{L_APPLICATION_PAGETITLE}</th>
	</tr>
	<tr>
		<td class="row2" colspan="2"><span class="gen">{L_APPLICATION_WELCOME_MESSAGE}</span></td>
	</tr>	
	<tr>
		<td class="row1" width="25%"><b class="genmed">{L_APPLICATION_REALNAME}</b></td>
		<td class="row2" valign="middle"><input type="text" style="width: 300px" class="post" name="name" size="30" tabindex="1" /></td>
	</tr>
	<tr>
		<td class="row1"><b class="genmed">{L_APPLICATION_POSITION}</b></td>
		<td class="row2" valign="middle"><select name="postion" tabindex="2">
        <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></td>
	</tr>
	<tr>
		<td class="row1"><b class="genmed">{L_APPLICATION_WHY}</b></td>
		<td class="row2" valign="middle"><textarea rows="5" cols="50" name="why" tabindex="3"></textarea></td>
	</tr>	
	<tr>
		<td class="cat" colspan="2" align="center">
			<input class="btnmain" type="submit" accesskey="s" tabindex="4" name="submit" value="{L_SUBMIT}" />
		</td>
	</tr>
	</table>
	
	</form>

	<br clear="all" />

</div>

<!-- INCLUDE overall_footer.html -->
Haven't tested it though.
Appreciate the extensions/mods/support then buy me a beerImage
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
NateTheGreatt
Registered User
Posts: 5
Joined: Sun Aug 16, 2009 10:07 pm

Re: Application form

Post by NateTheGreatt »

JimA wrote:They are set by the sprintf function in the application.php file.
This is the code that handles that part.

Code: Select all

$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)));
Replace it with the following:

Code: Select all

$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('namefield', '', true));
Change the name in the last request_var from 'namefield' to the name of the field you've set in the appform_body.html, then you can call that field by using %6$s in the language files.
Aaahh I see how it works now. Thanks a bunch! :D
User avatar
Valace
Registered User
Posts: 177
Joined: Sat Sep 20, 2008 9:40 pm

Re: Application form

Post by Valace »

antagonia wrote:I am looking for the same functionality as Valace-- I would like guest users to be able to send in an application.

Someone in the other threat from before this mod was officlally approved recommended commenting out these lines:

Code: Select all

if ($user->data['user_id'] == ANONYMOUS)
{
    login_box('', $user->lang['LOGIN_APPLICATION_FORM']);
}
Which gets rid of the warning but does not actually post the posts to the correct forum.
Appears I could not get this to work for public viewing, Any Ideas please JimA?

Also how do we had more fields so we can ask more questions or diff please?

Thanks in advance
Image - Help look after the Earth and get green hosting
Free Domain: http://www.co.cc
User avatar
JimA
Community Team Leader
Community Team Leader
Posts: 7816
Joined: Thu Jul 31, 2008 5:54 am
Location: The Netherlands
Name: Jim Mossing Holsteyn
Contact:

Re: Application form

Post by JimA »

Valace wrote:Also how do we had more fields so we can ask more questions or diff please?
Funny, I just got my documentation finished on this one today, it's in my first post of this topic. :)

Also, the code you quoted should be removing the login box. This MOD is however not designed to be working with not logged in users, because it relies on the users' e-mail and username at some points, so this is certainly going to cause trouble if you open this up to guests.
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.
User avatar
Valace
Registered User
Posts: 177
Joined: Sat Sep 20, 2008 9:40 pm

Re: Application form

Post by Valace »

JimA wrote:
Valace wrote:Also how do we had more fields so we can ask more questions or diff please?
Funny, I just got my documentation finished on this one today, it's in my first post of this topic. :)
Ahh my timing good as always then. Let me know when we can read please :)
JimA wrote:Also, the code you quoted should be removing the login box. This MOD is however not designed to be working with not logged in users, because it relies on the users' e-mail and username at some points, so this is certainly going to cause trouble if you open this up to guests.
Well it worked nicely to start with and posted as guest by it self apart from the email field was blank. Then I cleared cache and it stopped sadly. I have a feeling alot of other people will use it for the same reason and me. May be this would be a phase two at a later date when you have some time :)
Image - Help look after the Earth and get green hosting
Free Domain: http://www.co.cc
User avatar
JimA
Community Team Leader
Community Team Leader
Posts: 7816
Joined: Thu Jul 31, 2008 5:54 am
Location: The Netherlands
Name: Jim Mossing Holsteyn
Contact:

Re: Application form

Post by JimA »

Valace wrote:
JimA wrote:
Valace wrote:Also how do we had more fields so we can ask more questions or diff please?
Funny, I just got my documentation finished on this one today, it's in my first post of this topic. :)
Ahh my timing good as always then. Let me know when we can read please :)
Feel free to read it, it's already there.
As I said, it's in my first post of this topic.
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.
User avatar
ChriZathens
Registered User
Posts: 1477
Joined: Tue Apr 18, 2006 9:11 pm
Location: Athens, Greece
Name: Chris

Re: Application form

Post by ChriZathens »

Hi there, Jim...
Congratulations for the validation of your mod ;)
I am already using it :D
I've made a few changes in the appform_body.html:

Code: Select all

<!-- INCLUDE overall_header.html -->
<div id="pagecontent">
	<div class="panel">
	<div class="inner"><span class="corners-top"><span></span></span>
        <h2>{L_APPLICATION_PAGETITLE}</h2>
        <span style="font-size: 1.3em;">{L_APPLICATION_WELCOME_MESSAGE}<br /><br />
 		<fieldset class="fields2">  
        <form method="post" action="{PROCESS_APPFORM}" id="appform"> 
        <dl> 
		<dt>{L_APPLICATION_REALNAME}</dt><dd><input type="text" name="name" /></dd>
		</dl> 

        <dl> 
		<dt>{L_APPLICATION_POSITION}</dt>
        <dd>
		<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>
		</dd>
		</dl>
      
        <dl> 
		<dt>{L_APPLICATION_WHY}</dt>
        <dd><textarea rows="5" cols="50" name="why"></textarea></dd>
		</dl> 
		</fieldset>
  		<span class="corners-bottom"><span></span></span>
		</span>
	</div>
	</div>      

	<div class="panel bg2">
		<div class="inner"><span class="corners-top"><span></span></span>
		
		<fieldset class="submit-buttons">
			{S_HIDDEN_FIELDS}
			<input class="button1" name="submit" type="submit" value="{L_SUBMIT}" accesskey="s" tabindex="7" />&nbsp;
			<input class="button2" type="reset" value="{L_RESET}" accesskey="r" />&nbsp;
		</fieldset>
	
		<span class="corners-bottom"><span></span></span>
		</div>
	</div>
 		</form>      
</div>
<!-- INCLUDE overall_footer.html --> 
If you like the layout, feel free to use it in a future version...

Design :courtesy of Rich's contact form
EDIT: A screenie:
Untitled-1.png
Untitled-1.png (21.54 KiB) Viewed 1001 times
My mods in MODDB:
Add Homepage link in header - Change user activity post limit - Post number in viewtopic
If you need support click on the support tab there and post your question.
Do not PM me - chances of viewing my PMs are way thinner than viewing the support question in the customization DB...
Locked

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