Facebook to email

Facebook to email Commit Details

Date:2014-05-19 18:23:45 (5 years 5 months ago)
Author:Grégory Soutadé
Branch:master
Commit:b53d49e71542f0b3777d0abe364e9b879d0819b0
Parents: fa36b570b2eb25bd85bc844778bfc2ebe0ce66aa
Message:Fix bad message-ID generation in email module Displays facebook objects with module in blue

Changes:
Mindex.php (1 diff)
Mmodules/email.php (2 diffs)
Mressources/f2email.css (1 diff)
Mressources/f2email.js (1 diff)

File differences

index.php
3131
3232
3333
34
34
35
36
37
38
39
3540
3641
3742
for($i=0; $i<count($likes); $i++)
{
echo '<div class="fb_object">';
if (array_key_exists("".$likes[$i]["id"]."", $assoc))
$fb_class = "fb_object_with_module";
else
$fb_class = "fb_object";
echo '<div class="' . $fb_class . '" id="div_'. $likes[$i]["id"] . '">';
echo '<div class="fb_name">';
echo "<a href='https://www.facebook.com/" . $likes[$i]["id"] . "'><img src='https://graph.facebook.com/" . $likes[$i]["id"] . "/picture'>". $likes[$i]["name"] . "</a>\n";
echo '<select id="select_' . $likes[$i]["id"] . '" onchange="link_fb_object(' . $likes[$i]["id"] . ', this.options[this.selectedIndex].value);">\n';
modules/email.php
8787
8888
8989
90
90
9191
92
92
9393
9494
9595
......
101101
102102
103103
104
104
105105
106106
107107
$message .= $notification["caption"] . "<br/>";
if (array_key_exists("message", $notification))
$message .= "<br/>" . $notification["message"] . "<br/>";
$message .= "<br/>" . str_replace("\n", "<br/>", $notification["message"]) . "<br/>";
else if (array_key_exists("story", $notification))
$message .= "<br/>" . $notification["story"] . "<br/>";
$message .= "<br/>" . str_replace("\n", "<br/>", $notification["story"]) . "<br/>";
if (array_key_exists("link", $notification))
if (startsWith($notification["link"], "http"))
echo "</html></body>";
$headers = "Message-ID: " . $notification['id'];
$headers = "Message-ID: <" . $notification['id'] . "@f2email>";
send_email($to, $subject, $message, $headers);
}
ressources/f2email.css
1818
1919
2020
21
22
23
24
25
26
27
28
29
30
2131
2232
2333
border-color:lightgrey;
}
.fb_object_with_module {
display: inline-block;
margin:15px;
margin-left:20px;
border-style:solid;
border-width:1px;
border-color:lightgrey;
background-color:#99ccff;
}
.fb_name {
display:block;
margin:5px;
ressources/f2email.js
4040
4141
4242
43
44
45
46
47
4348
4449
4550
input.value = local_prefs[key];
else
input.value = "";
div = document.getElementById("div_" + fb_object_id.toString());
if (value != -1)
div.className = "fb_object_with_module";
else
div.className = "fb_object";
}
function set_global_pref(module_id)

Archive Download the corresponding diff file

Branches