based on the mod from uksoreeyes I modified the code a little bit. I think it is not of interest to see what message was sent. Therefore it just shows: date, who sent it and who received the card and the id of the picture with a link to open and make the used picture visible.
This is my first trial at all...My basic skills are Turbo-C and Pascal, times have changed, please forgive some possible strange lines...
Installation:
1.) create a folder "plugins" in "admin" -> ...admin/plugins
2.) create a new file called "postcard_view.php" (e.g. use notepad) with following code:
<?php // PLUGIN_TITLE: modified Postcard Viewer
$nozip = 1;
define('IN_CP', 1);
$root_path = "./../../";
define('ROOT_PATH', $root_path);
require(ROOT_PATH.'admin/admin_global.php');
show_admin_header();
function display_results() {
global $site_db;
$sql = "SELECT *
FROM ".POSTCARDS_TABLE." p, ".IMAGES_TABLE." i
WHERE p.image_id = i.image_id
ORDER BY postcard_id DESC";
$result = $site_db->query($sql);
while($row = $site_db->fetch_array($result)){
$postcard_id = $row["postcard_id"];
$postcard_date = date("D d M, Y g:i a", $row["postcard_date"]);
$image_id = $row["image_id"];
$postcard_sender_name = $row["postcard_sender_name"];
$postcard_sender_email = $row["postcard_sender_email"];
$postcard_recipient_name = $row["postcard_recipient_name"];
$postcard_recipient_email = $row["postcard_recipient_email"];
$cat_id = $row['cat_id'];
$pict_id = get_media_code($row['image_media_file'], $image_id, $cat_id, $row['image_name']);
$image_media_file = get_media_code($row['image_media_file'], $image_id, $cat_id, $row['image_name']);
$template = TEMPLATE_PATH;
echo <<<END
<font color="#000000" size="1" >$postcard_date: <br>sent to: $postcard_recipient_name -
<a href="mailto:$postcard_recipient_email"><font color="#000000" size="1">$postcard_recipient_email</a></td>
<td valign="top" width="200" height="250">
sent by: $postcard_sender_name - <font color="#555555" size="1" ><a href="mailto:$postcard_sender_email">$postcard_sender_email</a>, picture: $image_id,
<a href="../../details.php?image_id=$image_id" target="_blank">click to show picture</a>
</font></a>
<br><br><br></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table><br>
END;
}
}
display_results();
show_admin_footer();
?>
3.) save this file "postcard_view.php" in the new folder "plugins", enter admin panel and click postcard_view...
have fun...