[Beta] Contact Board Administration 0.1.4

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Ideas Centre
Locked
User avatar
cwcollector
Registered User
Posts: 353
Joined: Tue Nov 27, 2001 1:25 pm
Contact:

Re: [Beta] Contact Board Administration 0.1.4

Post by cwcollector »

I have search the original phpbb 3 files and they do not contain this line in common.php in the folder acp.

Code: Select all

'NOTIFY_ADMIN_EMAIL'      => 'Please notify the board administrator or webmaster: <a href="mailto:%1$s">%1$s</a>',  
Ashok
Registered User
Posts: 38
Joined: Wed Jan 02, 2008 9:07 pm

Re: [Beta] Contact Board Administration 0.1.4

Post by Ashok »

cwcollector wrote:I have search the original phpbb 3 files and they do not contain this line in common.php in the folder acp.

Code: Select all

'NOTIFY_ADMIN_EMAIL'      => 'Please notify the board administrator or webmaster: <a href="mailto:%1$s">%1$s</a>',  
You will find the line in ./language/en/common.php.
User avatar
cwcollector
Registered User
Posts: 353
Joined: Tue Nov 27, 2001 1:25 pm
Contact:

Re: [Beta] Contact Board Administration 0.1.4

Post by cwcollector »

Thank you. I will tyr it out tonight.
Frold
Registered User
Posts: 447
Joined: Sat Nov 02, 2002 8:19 am

Re: [Beta] Contact Board Administration 0.1.4

Post by Frold »

Hey,

ATM it sendt out email to all with administrator status, how to limit it to:

user_id = "2"; // the board creator
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [Beta] Contact Board Administration 0.1.4

Post by saaiberke »

It would be great if additionally it would be possible to have all mailto: contact links (errors, registration problems etc) in the board point to /contact.php or another URL (ticketsystem) so that all contacts pas one single point.

Anyone knows how I can change this?

Grtz,

Nic
Ashok
Registered User
Posts: 38
Joined: Wed Jan 02, 2008 9:07 pm

Re: [Beta] Contact Board Administration 0.1.4

Post by Ashok »

saaiberke wrote:It would be great if additionally it would be possible to have all mailto: contact links (errors, registration problems etc) in the board point to /contact.php or another URL (ticketsystem) so that all contacts pas one single point.

Anyone knows how I can change this?

Grtz,

Nic
You will have to change a few php files, 6 to be exact. Please see this post I made some days ago:
http://www.phpbb.com/community/viewtopi ... 4#p4124015.
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [Beta] Contact Board Administration 0.1.4

Post by saaiberke »

ooops, I missed that post. Just figured it out that you already gave a solution. :oops:

Grtz,

Nic
fpbaum
Registered User
Posts: 52
Joined: Mon Aug 20, 2007 10:53 pm

Re: [Beta] Contact Board Administration 0.1.4

Post by fpbaum »

fyi, if anyone cares to explore further, there are definitely other places where adding this contact link would be useful. For instance my board went down yesterday when my SQL password expired :roll:. everyone gets an error message but no useful contact info...but also not my email address which is good.

This is a great and simple mod..it got instant use on my board and provides piece of mind (spammers). I hope the phpBB team notices!
Bloodcrave
Registered User
Posts: 2
Joined: Mon Jul 23, 2007 1:04 am

Re: [Beta] Contact Board Administration 0.1.4

Post by Bloodcrave »

hey
when i enable the module i get a error:

Code: Select all

[phpBB Debug] PHP Notice: in file /adm/index.php on line 344: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'acp_board::contact_method_select' was given
[phpBB Debug] PHP Notice: in file /adm/index.php on line 344: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'acp_board::contact_bot_forum_select' was given
[phpBB Debug] PHP Notice: in file /adm/index.php on line 149: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 151: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
please can anyone help me out ?
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: [Beta] Contact Board Administration 0.1.4

Post by igorw »

You missed an edit in acp_board.php.
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
Bloodcrave
Registered User
Posts: 2
Joined: Mon Jul 23, 2007 1:04 am

Re: [Beta] Contact Board Administration 0.1.4

Post by Bloodcrave »

hey thnx!
i didnt forget to edit the acp-board but i put

Code: Select all

	//-- mod : Contact board administration ------------------------------------------------------------
//-- add
	/**
	 * Create the selection for the contact method
	 */
	function contact_method_select($value, $key)
	{
		$radio_ary = array(
			CONTACT_METHOD_EMAIL	=> 'CONTACT_METHOD_EMAIL',
			CONTACT_METHOD_POST		=> 'CONTACT_METHOD_POST',
			CONTACT_METHOD_PM		=> 'CONTACT_METHOD_PM',
		);
		
		return h_radio('config[contact_method]', $radio_ary, $value, $key);
	}
	
	/**
	 * Create the selection for the bot forum
	 */
	function contact_bot_forum_select($value, $key)
	{
		return '<select id="' . $key . '" name="config[contact_bot_forum]">' . make_forum_select($value, false, true) . '</select>';
	}
//-- fin mod : Contact board administration --------------------------------------------------------
after the

Code: Select all

}
it must before
now it works fine! thnx.
User avatar
BizimPencere
Registered User
Posts: 396
Joined: Sat Aug 25, 2007 8:31 pm

Re: [Beta] Contact Board Administration 0.1.4

Post by BizimPencere »

It's this mod compatible with phpbb3 gold?
www.phpbbturkiye.net | Turkish phpBB3 support and development
Frold
Registered User
Posts: 447
Joined: Sat Nov 02, 2002 8:19 am

Re: [Beta] Contact Board Administration 0.1.4

Post by Frold »

BizimPencere wrote:It's this mod compatible with phpbb3 gold?
yep
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [Beta] Contact Board Administration 0.1.4

Post by saaiberke »

I already mentioned it earlier in this thread, I would like to have the mailfunction doing this:

Send the message a user wrote to a (hardcoded) predefined emailaddress using the mailaddress from the user's profile info (or if guest the address that was entered in the contactform) as the from address.

Would it be hard to change this existing mod to accomplish what I want?

Grtz,

Nic
Ashok
Registered User
Posts: 38
Joined: Wed Jan 02, 2008 9:07 pm

Re: [Beta] Contact Board Administration 0.1.4

Post by Ashok »

saaiberke wrote: Send the message a user wrote to a (hardcoded) predefined emailaddress using the mailaddress from the user's profile info (or if guest the address that was entered in the contactform) as the from address.
Here is what I did. Find the following lines in contact.php:

Code: Select all

				// Email headers
				$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
				$messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
				$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
				$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
				
				// Loop through our list of users
				for ($i = 0, $size = sizeof($contact_users); $i < $size; $i++)
				{
					$messenger->template('admin_contact', $contact_users[$i]['user_lang']);
					$messenger->to($contact_users[$i]['user_email'], $contact_users[$i]['username']);
					$messenger->im($contact_users[$i]['user_jabber'], $contact_users[$i]['username']);
Add the following on a new line after the last of the above lines:

Code: Select all

                    $messenger->from($contact_email);
                    $messenger->replyto($contact_email);
This will set both the FROM and REPLYTO email address to be the email address of the person trying to contact you via the form. If a registered user, their email address from their profile will be used. If it is a guest, then, it will be whatever email address they entered on the contact form.

Hope this is what you are looking for.
Locked

Return to “[3.0.x] MODs in Development”