if($b['parent'] != $b['id'])
return;
- // dreamwidth post in the LJ user's timezone.
+ // dreamwidth post in the DW user's timezone.
// Hopefully the person's Friendica account
// will be set to the same thing.
* Description: Post to insanejournal
* Version: 1.0
* Author: Tony Baldwin <https://free-haven.org/profile/tony>
+ * Author: Michael Johnston
+ * Author: Cat Gray <https://free-haven.org/profile/catness>
*/
function ijpost_install() {
$title = $b['title'];
$post = bbcode($b['body']);
$post = xmlify($post);
+ $tags = ijpost_get_tags($b['tag']);
$date = datetime_convert('UTC',$tz,$b['created'],'Y-m-d H:i:s');
$year = intval(substr($date,0,4));
<member><name>props</name>
<value><struct>
<member><name>useragent</name><value><string>Friendica</string></value></member>
-<member><name>taglist</name><value><string>friendica</string></value></member>
+<member><name>taglist</name><value><string>$tags</string></value></member>
</struct></value></member>
</struct></value>
</param></params>
}
}
+function ijpost_get_tags($post)
+{
+ preg_match_all("/\]([^\[#]+)\[/",$post,$matches);
+ $tags = implode(', ',$matches[1]);
+ return $tags;
+}