4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: steveeyes on April 10, 2007, 07:43:43 PM
-
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
-
the complete code please...
-
Thanks for the quick reply
When you say complete code, I guess you mean all of functions.php. Here it is:
Sorry....
I edited the post and the file is attached
-
edit your post! :evil:
and attach the file!!!
-
sorry....I just did....I'm not a fast typer. see post above...i edited and attached the file.
thanks
-
hmmmm
No help.......you just wanted to tell me to attach the file???
-
solution found --- got help at another forum. :roll:
-
stop pushing your thread!!! :evil:
i also have a real live... )o:
I edit this post when i get a solution for you...
-
who is pushing -- I made a post, you asked me to edit and attach a file. I did. I found a solution elsewhere -- I posted so you wouldn't have to spend time on a solution (which I doubt you would of spent time with your shitty attitude).
You were rude from the get go with your :evil:
It is becoming obvious why 4images is going down hill since the regulars left. Go back to your life. You are an ass.