Hi
I made the following changes to add an email button to my site::
Open /includes/function.php file.
Find:
Code:
$user_name_link = "<a href=\"".$site_sess->url($user_profile_link)."\">".$user_name."</a>";
Add after:
Code:
$user_row = get_user_info($image_row['user_id']);
if (!empty($user_row['user_email']) && (!isset($user_row['user_showemail']) || (isset($user_row['user_showemail']) && $user_row['user_showemail'] == 1))) {
$user_email = $user_row['user_email'];
$user_email_save = str_replace("@", " at ", $user_row['user_email']);
if (!empty($url_mailform)) {
$user_mailform_link = $site_sess->url(preg_replace("/{user_id}/", $user_row['user_id'], $url_mailform));
}
else {
$user_mailform_link = $site_sess->url(ROOT_PATH."member.php?action=mailform&".URL_USER_ID."=".$user_row['user_id']);
}
$user_email_button = "<a href=\"".$user_mailform_link."\"><img src=\"".get_gallery_image("email.gif")."\" border=\"0\" alt=\"".$user_email_save."\" /></a>";
}
Find:
Code:
"user_name_link" => $user_name_link,
Add after:
Code:
"user_email_button" => $user_email_button,
When I use the search on the site I get the following error:
Undefined variable: user_email_button in /home/filipina/public_html/online-dating-gallery/includes/functions.php on line 413
I'm a little lost and can't find a fix or what I did wrong. Any help would be appreciated.
Thanks