Recent Topics

1 Sep 23, 2008 08:07    

My b2evolution Version: 2.x

Hi all,

I'm wondering, is there any way to add in a bit of text to the msgform.php, that only shows up if the person is viewing user 1's profile/msgform. For instance, I'm the only blogger and I want text appearing that has more contact information for me; but if someone is trying to contact a different member (like a blogrum member) the text isn't shown.

I'm thinking it's an 'if' thing, but I'm not good at php at all, so I'd appreciate a little hint or two ;)

Thanks,

Na3

2 Sep 26, 2008 21:28

Okay so I think I understand. If a visitor clicks on "contact me" (or whatever) and the me is good old admin (ID #1) then they should see extra stuff. Like, maybe cheap porn ... or maybe extra text ... or whatever. Assuming this is the goal then crack open /skins/_msgform.disp.php and around line 177 or so try something like this:

	<?php
	if( $recipient_id == 1 ) { // the stuff for contacting the admin
		echo '<p>Learn how to enlarge your ink cartridge - FREE!</p>';
		}
// Note: we use funky field name in order to defeat the most basic guestbook spam bots:
	$Form->text( 'd', $email_author, 40, T_('From'),  T_('Your name.'), 50, 'bComment' );

Untested, but it should work. The code I mean. Not the ink cartridge enlargement stuff ;)

3 Sep 27, 2008 16:02

Thanks EdB, works like a charm!!

4 Sep 27, 2008 17:21

You managed to enlarge yer ink cartridge with that? :O ... damn ... *clicks*

¥

5 Jan 19, 2009 00:00

Hi there,

I was wondering, is there a way to add recipients to the mail message? I'd like my contact form to send to my admin address plus another.

Any pointers, as always, are much appreciated.

GSO


Form is loading...