Page 1 of 1

PHPMyEdit: Display Email fields as mailto: links

Posted: Thu Jul 31, 2008 2:23 pm
by jim2point0
Hi. I want to edit PHPMyEdit a little bit. We're using it on our site to configure address books. Every address book requires an email address field. Where we display the form, I would like to change it from being static text to a mailto: link.

Basically, the email address will look the same (displays "person@someplace.com") but can be clicked on. The URL would be "mailto:person@someplace.com"

This doesn't seem like it would be hard, but I looked at the code and got a little scared. Is this easy to do? Can anyone help?

Thanks,
~James

Re: PHPMyEdit: Display Email fields as mailto: links

Posted: Thu Jul 31, 2008 2:54 pm
by jaoudestudios
Yes it is easy, just add some basic html.

Code: Select all

 
<?php
// plain text
name@domain.com
 
// mailto
<a href="mailto:name@domain.com">name@domain.com</a>
 

Re: PHPMyEdit: Display Email fields as mailto: links

Posted: Thu Jul 31, 2008 2:59 pm
by jim2point0
I understand that. But I'm talking about PHPMyEdit. If someone knows that well enough to be able to tell me where at in the code I need to do this, that would be great.

For example, PHPMyEdit displays fields like this:
[field name] [field name] [field name]
[record] [record] [record]

Right now, someone might have an address book like this:
[Email] [phone] [address]
[guy@place.com] 2323241124 Such and such

I need each email to render as a clickable link in the PHPMyEdit table. I dont want the data to be stored as a link, but I want PHPMyEdit to render them as links. So it will link to "mailto:guy@place.com" but will display as an underlined link, with the text "guy@place.com"

Re: PHPMyEdit: Display Email fields as mailto: links

Posted: Fri Aug 01, 2008 9:02 am
by jim2point0
Anyone?

Re: PHPMyEdit: Display Email fields as mailto: links

Posted: Mon Aug 04, 2008 11:23 pm
by coder500
Can you post the code that will display the email address?
Before that code you have to add <a href=mailto>
Thanks

Re: PHPMyEdit: Display Email fields as mailto: links

Posted: Tue Aug 05, 2008 2:29 am
by RobertGonzalez
Where is their manual? What do their templates look like?

Re: PHPMyEdit: Display Email fields as mailto: links

Posted: Fri Aug 29, 2008 4:24 pm
by Pupster
As an example... The PME class supports what you are asking for already. It's in the manual. =)

Code: Select all

<?php
$opts['fdd']['userEmail'] = array(
  'name'     => 'User Email',
  'URL'      => 'mailto:$value', // <-- right here
  'select'   => 'T',
  'maxlen'   => 255,
  'sort'     => true
);
?>