Contact Board Administration

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
Ephemeraboy
Registered User
Posts: 331
Joined: Tue Dec 29, 2009 4:25 pm
Location: Bandung Kota Hujan
Name: Bernando Bona Tius Sianipar
Contact:

Re: Contact Board Administration

Post by Ephemeraboy »

wau..
so fast to be validated..
thx to the author..
i will tyr for it
My diary, my notepad, and my life on
http://www.bonatius.com
My online shop at
http://www.nefara.com
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17375
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Contact Board Administration

Post by DavidIQ »

MOD Updated to version 1.0.10
See first post for Download Link
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
User avatar
Stitch625
Registered User
Posts: 683
Joined: Wed Jun 20, 2007 3:38 pm
Location: Michigan
Contact:

Re: Contact Board Administration

Post by Stitch625 »

Hi RMcGirr83,

I am hoping you can help me out. Hopefully it's not too much work.
I still have Evils Contact mod installed. I installed it last year and did some modifications to it so it would have a few extra fields but since I updated to 3.0.6 the captcha doesn't work anymore so I have tried your mod but cannot for the life of me figure out how to add extra fields that will display in a post. Can you perhaps show me how I can do this?

Here is a screen shot of what I have now. I want to do the same with your mod. Thanks ;)
Attachments
contact.jpg
contact.jpg (70.02 KiB) Viewed 1488 times
User avatar
RMcGirr83
Former Team Member
Posts: 21684
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Contact Board Administration

Post by RMcGirr83 »

I have tried your mod but cannot for the life of me figure out how to add extra fields that will display in a post.
The fields are defined in the lang file, eg

Code: Select all

	'CONTACT_TEMPLATE'			=> '<strong>Name:</strong> %1$s' . "\n" . '<strong>Email Address:</strong> %2$s' . "\n" . '<strong>IP:</strong> %3$s' . "\n" . '<strong>Date:</strong> %4$s' . "\n" . '<strong>Reason:</strong> %5$s' . "\n" . '<strong>Subject:</strong> %6$s' . "\n\n" . '<strong>Has entered the following message into the contact form:</strong>' . "\n" . '%7$s',
	'CONTACT_TEMPLATE_NO_REASON'	=> '<strong>Name:</strong> %1$s' . "\n" . '<strong>Email Address:</strong> %2$s' . "\n" . '<strong>IP:</strong> %3$s' . "\n" . '<strong>Date:</strong> %4$s' . "\n" . '<strong>Subject:</strong> %5$s' . "\n\n" . '<strong>Has entered the following message into the contact form:</strong>' . "\n" . '%6$s',
which is populated via contact.php from this code

Code: Select all

		// there may not be a reason entered in the ACP...so change the template to reflect this
		if(!empty($config_contact['contact_reasons']))
		{
			$contact_message = sprintf($user->lang['CONTACT_TEMPLATE'], $user_name, $contact_data['email'], $user->ip, $date, $contact_data['contact_reason'], $contact_data['contact_subject'], $contact_message);
		}
		else
		{
			$contact_message = sprintf($user->lang['CONTACT_TEMPLATE_NO_REASON'], $user_name, $contact_data['email'], $user->ip, $date, $contact_data['contact_subject'], $contact_message);
		}
So assuming you already have the variable set, eg for "species" it would be something like this

Code: Select all

		// there may not be a reason entered in the ACP...so change the template to reflect this
		if(!empty($config_contact['contact_reasons']))
		{
			$contact_message = sprintf($user->lang['CONTACT_TEMPLATE'], $user_name, $contact_data['email'], $user->ip, $date, $contact_data['contact_reason'], $contact_data['contact_subject'], $contact_message, $contact_data['contact_species']);
		}
		else
		{
			$contact_message = sprintf($user->lang['CONTACT_TEMPLATE_NO_REASON'], $user_name, $contact_data['email'], $user->ip, $date, $contact_data['contact_subject'], $contact_message, $contact_data['contact_species']);
}
with an accompanying change to the contact.php language file

Code: Select all

	'CONTACT_TEMPLATE'			=> '<strong>Name:</strong> %1$s' . "\n" . '<strong>Email Address:</strong> %2$s' . "\n" . '<strong>IP:</strong> %3$s' . "\n" . '<strong>Date:</strong> %4$s' . "\n" . '<strong>Reason:</strong> %5$s' . "\n" . '<strong>Subject:</strong> %6$s' . "\n" . '<strong>Species:</strong> %8$s' . "\n\n" . '<strong>Has entered the following message into the contact form:</strong>' . "\n" . '%7$s',
	'CONTACT_TEMPLATE_NO_REASON'	=> '<strong>Name:</strong> %1$s' . "\n" . '<strong>Email Address:</strong> %2$s' . "\n" . '<strong>IP:</strong> %3$s' . "\n" . '<strong>Date:</strong> %4$s' . "\n" . '<strong>Subject:</strong> %5$s' . "\n" . '<strong>Species:</strong> %7$s' . "\n\n" . '<strong>Has entered the following message into the contact form:</strong>' . "\n" . '%6$s',
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beerImage
User avatar
Stitch625
Registered User
Posts: 683
Joined: Wed Jun 20, 2007 3:38 pm
Location: Michigan
Contact:

Re: Contact Board Administration

Post by Stitch625 »

Hey thank you very much RMcGirr83 for breaking this all down for me. Very well explained. ;)

I am feeling a bit dangerous now. :lol:
User avatar
Stitch625
Registered User
Posts: 683
Joined: Wed Jun 20, 2007 3:38 pm
Location: Michigan
Contact:

Re: Contact Board Administration

Post by Stitch625 »

Hi RMcGirr83,

I have modded in my custom changes and the form seems to be submitting and displaying the output correctly but I am having a problem with the lang vars. Not sure what I am doing wrong. I was wondering if you could please help me out by telling me where I have gone wrong.

Here is what I have for contact.php:

Code: Select all

// our data array
	$contact_data = array(
		'username'			=> ($user->data['user_id'] != ANONYMOUS) ?  $user->data['username'] : utf8_normalize_nfc(request_var('username', '', true)),
		'email'				=> ($user->data['user_id'] != ANONYMOUS) ? $user->data['user_email'] : strtolower(request_var('email', '')),
		'email_confirm'		=> ($user->data['user_id'] != ANONYMOUS) ? $user->data['user_email'] : strtolower(request_var('email_confirm', '')),
		'contact_reason'	=> utf8_normalize_nfc(request_var('contact_reason', '', true)),	
		'contact_location'	=> utf8_normalize_nfc(request_var('contact_location', '', true)),
		'contact_message'	=> utf8_normalize_nfc(request_var('message', '', true)),
        'contact_date_found'	=> utf8_normalize_nfc(request_var('contact_date_found', '', true)),
        'contact_species'	=> utf8_normalize_nfc(request_var('contact_species', '', true)),		
	);

Code: Select all

$messenger->assign_vars(array(
							'ADM_USERNAME'	=> htmlspecialchars_decode($contact_users[$i]['username']),
							'SITENAME'		=> htmlspecialchars_decode($config['sitename']),
							'USER_IP'		=> $user->ip,
							'USERNAME'		=> $user_name,
							'USER_EMAIL'	=> htmlspecialchars_decode($contact_data['email']),
							'DATE'			=> $date,
							'DATE_FOUND'	=> htmlspecialchars_decode($contact_data['contact_date_found']),
							'REASON'		=> htmlspecialchars_decode($contact_data['contact_reason']),
							'SPECIES'		=> htmlspecialchars_decode($contact_data['contact_species']),
							
							'LOCATION'		=> htmlspecialchars_decode($location),
							'MESSAGE'		=> $message,
						));

Code: Select all

// output the display
$template->assign_vars(array(
	'USERNAME'			=> isset($contact_data['username']) ? $contact_data['username'] : '',
	'EMAIL'				=> isset($contact_data['email']) ? $contact_data['email'] : '',
	'EMAIL_CONFIRM' 	=> isset($contact_data['email_confirm']) ? $contact_data['email_confirm'] : '',
	'CONTACT_REASONS'	=> (!empty($config_contact['contact_reasons'])) ? contact_make_select(explode("\n", $config_contact['contact_reasons']), $contact_data['contact_reason']) : '',
	'CONTACT_LOCATION'	=> isset($contact_data['contact_subject']) ? $contact_data['contact_location'] : '',
	'CONTACT_MESSAGE'	=> isset($contact_data['contact_message']) ? $contact_data['contact_message'] : '',
	'CONTACT_DATE_FOUND'	=> isset($contact_data['contact_date_found']) ? $contact_data['contact_date_found'] : '',
	'CONTACT_SPECIES'	=> isset($contact_data['contact_species']) ? $contact_data['contact_species'] : '',
Here is what I have for the template file:

Code: Select all

<tr>
			<td class="row1" width="25%"><b class="genmed">{L_DATE_FOUND}: </b></td>
			<td class="row2" valign="middle"><input type="text" style="width: 300px" class="post" name="contact_date_found" id="contact_date_found" value="{CONTACT_DATE_FOUND}" size="30" maxlength="60" tabindex="5" /></td>
		</tr>
		
		<tr>
			<td class="row1" width="25%"><b class="genmed">{L_LOCATION}: </b></td>
			<td class="row2" valign="middle"><input type="text" style="width: 300px" class="post" name="contact_location" id="contact_location" value="{CONTACT_LOCATION}" size="30" maxlength="60" tabindex="5" /></td>
		</tr>
		
		<tr>
			<td class="row1" width="25%"><b class="genmed">{L_SPECIES}: </b></td>
			<td class="row2" valign="middle"><input type="text" style="width: 300px" class="post" name="contact_species" id="contact_species" value="{CONTACT_SPECIES}" size="30" maxlength="60" tabindex="5" /></td>
		</tr>
Please have a look at my screenshot . This will explain what I am getting at.

Thanks ;)
Attachments
contact.jpg
contact.jpg (65.69 KiB) Viewed 1436 times
User avatar
RMcGirr83
Former Team Member
Posts: 21684
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Contact Board Administration

Post by RMcGirr83 »

Add the species and date found language vars to language/en/mods/contact.php...and your "Date found" could probably be changed into a drop down of year month day, eg...otherwise they could put in "none of your business" and it would take.

Your location language is being pulled from language/en/ucp.php which is included within the mod so that's why you don't have to add that definition.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beerImage
oscarv77
Registered User
Posts: 1
Joined: Sat Jan 30, 2010 2:35 am

Re: Contact Board Administration

Post by oscarv77 »

Hi RMcGirr83!

First I want to thank you for a great mod; it is exactly what I had been looking for. I just installed it on a new/clean phpBB 3.0.6 installation and it is working great. This board will eventually be used for a gaming clan, and I want for possible recruits to fill out a form (yours) and have the form post to the recruit forum (like I said, your mod really is exactly what I was looking for).

My only problem is that I need to add several fields to the existing ones. The form will be posting to a forum (not email or PM) if that helps any. The fields are pretty generic (soldier name, game preference, etc...)

If you would be so kind as to point me in the right direction (or modify Stitch625's directions), I sure would appreciate it.

Thanks in advance!
User avatar
Stitch625
Registered User
Posts: 683
Joined: Wed Jun 20, 2007 3:38 pm
Location: Michigan
Contact:

Re: Contact Board Administration

Post by Stitch625 »

Ahh ha!!!

I didn't know that about the definitions. Works and looks awesome! Thanks for a great improvement on this mod since the very first version and thanks for your help.

Check it out!

I may consider that dropdown. ;)
Attachments
contact.jpg
contact.jpg (86.03 KiB) Viewed 1425 times
asmalik12
Registered User
Posts: 91
Joined: Fri Mar 27, 2009 3:26 pm
Location: Lahore, Pakistan
Contact:

Re: Contact Board Administration

Post by asmalik12 »

preview button in my forum not working properly

Cricpak - Contact
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam

Image
User avatar
RMcGirr83
Former Team Member
Posts: 21684
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Contact Board Administration

Post by RMcGirr83 »

asmalik12 wrote:preview button in my forum not working properly

Cricpak - Contact
Ensure you have uploaded all files from the download of this mod onto your forum. I can not reproduce this error.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beerImage
vonhazey
Registered User
Posts: 89
Joined: Wed Dec 02, 2009 2:43 pm

Re: Contact Board Administration

Post by vonhazey »

Installed and working fine. Really sweet mod, edited the language file so it says contact us instead. ;)
Image
ls24
Registered User
Posts: 1
Joined: Thu Feb 04, 2010 11:24 pm

Re: Contact Board Administration

Post by ls24 »

I installed this on my forum and works fine. Thanks RMcGirr83 for the great mod!
User avatar
archivar
Registered User
Posts: 229
Joined: Sun Sep 13, 2009 1:00 pm
Location: Deutschland

Re: Contact Board Administration

Post by archivar »

Thanks for the update.
A German translation of Chalong here.
Best regards, Archivar
Sorry for my English Google Translation.
Anyasha
Registered User
Posts: 704
Joined: Mon Aug 07, 2006 4:02 am
Name: Anyasha

Re: Contact Board Administration

Post by Anyasha »

I have the strangest problem...the "Can manage contact board admin settings" is showing up under the "Misc" tab of USER permissions rather than admin permissions. I installed via AutoMOD on 3.0.6. Any ideas?
Kiss me, I'm Polish!
Locked

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