Recent Topics

1 Nov 29, 2007 23:54    

My b2evolution Version: 2.x

I remember reading something about being able to create a Static "Contact Us" form that visitors could fill out and send.

Does anybody have an example?

2 Nov 30, 2007 00:08

Do you mean a Contact Form other than the built in msgform?
The .msgform is in _body_footer.inc.php...

<?php
// Display a link to contact the owner of this blog (if owner accepts messages):
$Blog->contact_link( array(
		'before'      => '',
		'after'       => ' &bull; ',
		'text'   => T_('Contact'),
		'title'  => T_('Send a message to the owner of this blog...'),
	) );
?>

I have also included a stand alone form by generating a specific ?disp=yourform if that's what you mean ??

4 Nov 30, 2007 02:13

Hi guys, thanks for responding.

Yes - I do mean the Contact Form.

¥åßßå, I sent you a message via your contact form.

I actually have a custom contactus.php but I thought b2evo had a built-in one. It doesn't sound like it does.

Thanks.

5 Nov 30, 2007 02:13

buggered if I can remember how I did it though

Don't forget to let us know, if you happen to have a "revelation" anytime soon :)

6 Nov 30, 2007 04:19

The following piece of code would be cool if you could customize the "recipient" information such as "To:email and name". This would be useful for multi-blog hosting.

<?php
// Display a link to contact the owner of this blog (if owner accepts messages):
$Blog->contact_link( array(
'before' => '',
'after' => ' &bull; ',
'text' => T_('Contact'),
'title' => T_('Send a message to the owner of this blog...'),
) );
?>

7 Nov 30, 2007 04:30

This template tag displays a link leading to the contact form for the owner of the current Blog.

But it'd be a Feature request to be able to send it to any one the Blog Owner nominates. A nice idea.

Good luck

8 Nov 30, 2007 11:35

Yay, I remembered how I did it :roll:

htaccess :

RewriteCond %{REQUEST_URI} ^/contact/
RewriteRule .*$ /index.php [QSA,L]

index.php :

if( $ReqPath == '/contact/' )
{
	$blog = 1;
	$disp = 'msgform';
	$ReqPath = '';
	$recipient_id = 1;
}
// That's it, now let b2evolution do the rest! :)
require $inc_path.'_blog_main.inc.php';

¥

9 Nov 30, 2007 11:53

I think I'll stick with a simpler method, but thanks for sharing your magic ¥åßßå :)


Form is loading...