2 * Support for blog rooms
4 * Copyright (c) 1999-2010 by the citadel.org team
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30 #include <sys/types.h>
32 #if TIME_WITH_SYS_TIME
33 # include <sys/time.h>
37 # include <sys/time.h>
46 #include <libcitadel.h>
49 #include "citserver.h"
56 #include "internet_addressing.h"
57 #include "serv_vcard.h"
58 #include "citadel_ldap.h"
59 #include "ctdl_module.h"
62 * sd sdhfksdjhkjsdfhk jsdhfkjsdfhkjsd hkfjhsdkjfhsdkjfhksdjfhsd
64 int blog_upload_beforesave(struct CtdlMessage *msg) {
67 /* Only run this hook for blog rooms */
68 if (CC->room.QRdefaultview != VIEW_BLOG) {
73 * If the message doesn't have an EUID, give it one.
75 if (msg->cm_fields['E'] != NULL)
78 msg->cm_fields['E'] = strdup(buf);
81 /* Now allow the save to complete. */
86 CTDL_MODULE_INIT(blog)
90 CtdlRegisterMessageHook(blog_upload_beforesave, EVT_BEFORESAVE);
93 /* return our module id for the Log */