Author Topic: [REQ] (admin at homepage.com) to Send email to member!  (Read 9053 times)

0 Members and 1 Guest are viewing this topic.

Offline The Sailor

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
[REQ] (admin at homepage.com) to Send email to member!
« on: July 28, 2007, 07:13:55 PM »
hi all dear friends,

many members don't wont to view there email in frofile
and when they show it eto allow anyone to send an email
thats shows the email like:

admin  at homepage.com

how can i change it to hide the email and
show just [Send email to member]

can anyone help plzzzz
(^_^)

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [REQ] (admin at homepage.com) to Send email to member!
« Reply #1 on: July 28, 2007, 09:12:26 PM »
I like. :)

- Step 1.

In member.php file,

find:

Code: [Select]
$user_email_save = str_replace("@", " at ", $user_row['user_email']);

replace with:

Code: [Select]
$user_email_save = (isset($user_row['user_email_appearance']) && $user_row['user_email_appearance'] == 0) ? $lang['user_email_show_profile_appearance'] : str_replace("@", " at ", $user_row['user_email']);     

- Step 2.

In lang/english/main.php file,

find:

Code: [Select]
$lang['lost_password_msg'] = "In case you forgot your password, enter the email address you have used for registration.";
$lang['user_name'] = "Username:";
$lang['password'] = "Password:";

add below:

Code: [Select]
$lang['user_email_show_profile_appearance'] = "Send an email message";
$lang['user_email_appearance'] = "Allow other users to see my source email address";

- Step 3.

In includes/db_field_definitions.php file,

add above the ?> tag:

Code: [Select]
$additional_user_fields['user_email_appearance'] = array($lang['user_email_appearance'], "radio", 1);

- Step 4.

In templates/your_template/member_editprofile.html file,

find:

Code: [Select]
          <tr>
            <td class="row1"><b>{lang_show_email}</b></td>
            <td class="row1">
              <input type="radio" name="user_showemail" value="1"{user_showemail_yes} />
              {lang_yes}&nbsp;&nbsp;&nbsp;
              <input type="radio" name="user_showemail" value="0"{user_showemail_no} />
              {lang_no}</td>
          </tr>

add:

Code: [Select]
           <tr>
            <td class="row2"><b>{lang_user_email_appearance}</b></td>
            <td class="row2">
              <input type="radio" name="user_email_appearance" value="1"{user_email_appearance_yes} />
              {lang_yes}&nbsp;&nbsp;&nbsp;
              <input type="radio" name="user_email_appearance" value="0"{user_email_appearance_no} />
              {lang_no}
</td>
          </tr>

Then, create new SQL field called: user_email_appearance, int(1), default(0) in your USERS_TABLE.

Go to your user control panel, choose the option you like for the email. Then, visit your profile page. Should work. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline The Sailor

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: [REQ] (admin at homepage.com) to Send email to member!
« Reply #2 on: July 31, 2007, 02:53:17 PM »
 Thnks Mr. thunderstrike,

its a great mod :D

it work well!

if you want more ideas i will give u soon just wait i want to shake my head ;-)
(^_^)

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [REQ] (admin at homepage.com) to Send email to member!
« Reply #3 on: July 31, 2007, 04:06:57 PM »
Looked forward for this reply. Thanks for note.

For ideas, always welcome.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Mr_LovaLove

  • Full Member
  • ***
  • Posts: 233
  • Unkown
    • View Profile
Re: [REQ] (admin at homepage.com) to Send email to member!
« Reply #4 on: August 19, 2007, 12:57:05 AM »
well, thanks for this idea !!

in fact, its not working !!

i got white page for edit profile page and also for forgot password page !!?

also in my case , i need the user of say ok show my email ! his/her email wont be showen and only the link show

so admin at 4homeimage not  need it anymore and need send email to {user_name} as example

if say dont show my email ! so its wont be appear !

waiting
English Please :@

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [REQ] (admin at homepage.com) to Send email to member!
« Reply #5 on: August 19, 2007, 02:18:30 AM »
Quote
if say dont show my email ! so its wont be appear !

In 4images ... user can hide or show email for contact (user_allowemails field) in USERS_TABLE ... can edit option in member edit profile page ...
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Mr_LovaLove

  • Full Member
  • ***
  • Posts: 233
  • Unkown
    • View Profile
Re: [REQ] (admin at homepage.com) to Send email to member!
« Reply #6 on: August 19, 2007, 12:31:27 PM »
cool ^_^

but still

the code above is not working !!


i think the problem from here

Code: [Select]
$user_email_save = (isset($user_row['user_email_appearance']) && $user_row['user_email_appearance'] == 0) ? $lang['user_email_show_profile_appearance'] : str_replace("@", " at ", $user_row['user_email']);     

maybe bcoz im using 1.7.4 !!

:S

English Please :@

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [REQ] (admin at homepage.com) to Send email to member!
« Reply #7 on: August 19, 2007, 03:30:12 PM »
I use v.1.7.4 and work 100%.

Quote
the code above is not working !!

Is say ?  :roll:
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Mr_LovaLove

  • Full Member
  • ***
  • Posts: 233
  • Unkown
    • View Profile
Re: [REQ] (admin at homepage.com) to Send email to member!
« Reply #8 on: August 19, 2007, 03:37:13 PM »
solve it ^_^

now im trying to take the comment

ex:

when user write a comment for any pix

email icon appears with the comment

if u set the mouse on the email icon

this msg appear ( admin at 4imagehome ) << i dont need to appear

why ?

coz i found some user have thier number in the email example :

USA_3023334445 at  hotmail.com

what i have done ( i just add this mod ) and hide it from user profile so the value already go to the database and set as dont show the source

i will try to solve it by myself  ,,,, if i did it i will post that i have solve it
English Please :@

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [REQ] (admin at homepage.com) to Send email to member!
« Reply #9 on: August 19, 2007, 03:51:34 PM »
Quote
this msg appear ( admin at 4imagehome ) << i dont need to appear

If want to remove ALT message,

in details.php file,

find:

Quote
$comment_user_email_button = "<a href=\"".$comment_user_mailform_link."\"><img src=\"".get_gallery_image("email.gif")."\" border=\"0\" alt=\"".$comment_user_email_save."\" /></a>";

replace:

Quote
$comment_user_email_button = "<a href=\"".$comment_user_mailform_link."\"><img src=\"".get_gallery_image("email.gif")."\" border=\"0\" /></a>";

Should work. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Mr_LovaLove

  • Full Member
  • ***
  • Posts: 233
  • Unkown
    • View Profile
Re: [REQ] (admin at homepage.com) to Send email to member!
« Reply #10 on: August 21, 2007, 03:17:11 PM »
yes it works and perfectly :Pp

thaaaaaaaankSs alot :)

i did it but seems it was wrong :P i  just comment a diff line :P

but urs work smooth :D

thanks and thanks and thanks :)
English Please :@