4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: cm1 on April 12, 2006, 11:28:11 PM
-
I want to send my friends, which I have made registered users, an ecard.
In the message text I want to invite them to go to my site.
Therefore, in the message field of the ecard, I want to put in my site URL (e.g. www.xyz.nl/4images).
This is what I literally have typed:
ga naar: www.xyz.nl/4images
When I do that, the text on the actual ecard only shows the text up to "ga naar:"
After that only my name and email address are shown, the rest of the text, starting with my site URL is completely gone.
Can someone explain what I am doing wrong?
Using 4images 1.7.2
Thanks
-
Looks like a bug...:?
in postcards.php find: "message" => format_text(stripslashes($message)),
Insert BELOW: "headline_hidden" => format_text(stripslashes($headline), 2),
"message_hidden" => format_text(stripslashes($message), 2),
Then in templates/<your template>/postcard_preview.html template replace <input type="hidden" name="headline" value="{headline}" />
<input type="hidden" name="message" value="{message}" />
with this <input type="hidden" name="headline" value="{headline_hidden}" />
<input type="hidden" name="message" value="{message_hidden}" />
-
Hey, V@no, thanks for the fast reply & help.
When I do what you suggest, at least something changes:
Now the message on the ecard is completely empty..... except for my name and email
Important extra info: The described problem happens only AFTER I press the "send card" button. So, in preview mode, the ecard looks OK.
When I press send, the next screen shows the actual ecard and then the message text is missing.
Seems to have something to do with the "striptags" or "un_htmlspecialchars(trim(" commands? Does that mean I have to look at the "if ($action == "sendcard")" part of postcard.php?
As you may have noticed, I'm not the best PHP or HTML specilaist (i used to speak assembler, cobol and pascal) but I'm learning again!
Should I buy a book again? :lol:
-
1) the problem is not in " : " but in quotes that 4images adds when creates the url you entered in the message as a link, which messes up the hidden field value. (you can try add one quote in the message or headline and see what happens)
2) in my tests, the preview did not look correct, atleast the part of the page just right above "edit/send" buttons had extra text that was not supposed to be there.
3) where I can see in action?
-
V@no, I sent you a PM
-
Ok, my first guess is you either didnt add the new lines in postcards.php or you added in the wrong place...make sure it looks like this:[qcode] if (!$error) {
$main_template = "postcard_preview";
$image = get_media_code($image_row['image_media_file'], $image_id, $cat_id, $image_row['image_name'], $mode, 1);
$thumbnail = get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_id, $cat_id, $image_row['image_name'], $mode);
$site_template->register_vars(array(
"image" => $image,
"thumbnail" => $thumbnail,
"image_name" => format_text($image_row['image_name']),
"url_postcard" => $site_sess->url(ROOT_PATH."postcards.php?".URL_IMAGE_ID."=".$image_id),
"bg_color" => format_text(stripslashes($bg_color), 2),
"border_color" => format_text(stripslashes($border_color), 2),
"font_color" => format_text(stripslashes($font_color), 2),
"font_face" => format_text(stripslashes($font_face), 2),
"sender_name" => format_text(stripslashes($sender_name), 2),
"sender_email" => format_text(stripslashes($sender_email), 2),
"recipient_name" => format_text(stripslashes($recipient_name), 2),
"recipient_email" => format_text(stripslashes($recipient_email), 2),
"headline" => format_text(stripslashes($headline)),
"message" => format_text(stripslashes($message)),
"headline_hidden" => format_text(stripslashes($headline), 2),
"message_hidden" => format_text(stripslashes($message), 2),
"image_id" => $image_id,
"lang_sender" => $lang['sender'],
"lang_recipient" => $lang['recipient'],
"lang_edit_postcard" => $lang['edit_postcard'],
"lang_send_postcard" => $lang['send_postcard'],
"back_url" => format_text($back_url)
));
}
[/qcode]
-
Thanks V@no!
Everything works fine now. I also exploited your mods and used a few. Never too old to learn & never grow up!