Author Topic: User Email Save / User Mail Form Link  (Read 3957 times)

0 Members and 1 Guest are viewing this topic.

Offline alganar

  • Pre-Newbie
  • Posts: 9
    • View Profile
User Email Save / User Mail Form Link
« on: December 20, 2002, 05:37:48 PM »
Hello

Quick Question

Under the member profile settings there is this link

{lang_email}

{if user_email}{user_email_save}{endif user_email}

which shows up like this

Email:                             Whoever at What ever.com

When clicked it takes you to that users mailform link

How do you get this to show up in other places on the program like under the images Instead of the

{user_name_link}

Which shows up like this

Whoever

I have tried cutting and pasting the same code as above but for some reason it doesnt show up.  You would think it would show up because the user_name and User_name_link will show up under any image but the user_email_save wont.

I basically want it to where a user click on the link it takes them straight to the user  email form instead of going to the user profile page first and then having to click on the User_email_save link to goto to the mail form

Appericate any help on this Thanks
iS tHeRe lIgHt aT tHe eNd oF tHe tUnNeL-?-?-?->oNeSoUrCe

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
User Email Save / User Mail Form Link
« Reply #1 on: December 20, 2002, 08:36:50 PM »
It's not possible to show the email instead of the user_name. But you can change the link.
Open includes/functions.php and replace
Code: [Select]
$user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $image_row['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&".URL_USER_ID."=".$image_row['user_id'];
with
Code: [Select]
$user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $image_row['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=mailform&".URL_USER_ID."=".$image_row['user_id'];
Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline alganar

  • Pre-Newbie
  • Posts: 9
    • View Profile
Thanks
« Reply #2 on: December 20, 2002, 10:06:37 PM »
Thanks Jan I appericate it.   Btw Your program is Awsome has alot of features and is the best gallery program that I have seen. and I have tried just about every gallery program out there. Thanks again
iS tHeRe lIgHt aT tHe eNd oF tHe tUnNeL-?-?-?->oNeSoUrCe

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: User Email Save / User Mail Form Link
« Reply #3 on: December 25, 2005, 10:37:51 PM »
A weakness has been discovered with $user_profile_link string. This topic seems to be pretty old but let's do the corrections anyway.

Find :

Quote

$user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $image_row['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=mailform&".URL_USER_ID."=".$image_row['user_id'];


replace with :

Code: [Select]

$user_profile_link = (!empty($url_show_profile)) ? str_replace("{user_id}", $image_row['user_id'], $url_show_profile) : $site_sess->url(ROOT_PATH."member.php?action=mailform&".URL_USER_ID."=".$image_row['user_id']);


Merry Christmas.