2010-01-28 16:39:01 +01:00
|
|
|
/*
|
2010-02-28 01:08:10 +01:00
|
|
|
* This file is a part of Winix
|
2010-01-28 16:39:01 +01:00
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
|
|
|
* Copyright (c) 2010, Tomasz Sowa
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef headerfilecmslutemplatesmisc
|
|
|
|
#define headerfilecmslutemplatesmisc
|
|
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
#include "localefilter.h"
|
|
|
|
#include "ezc.h"
|
2010-10-19 02:31:20 +02:00
|
|
|
#include "core/user.h"
|
2010-11-21 01:19:17 +01:00
|
|
|
#include "core/textstream.h"
|
2010-01-28 16:39:01 +01:00
|
|
|
|
|
|
|
|
2010-07-04 22:27:14 +02:00
|
|
|
namespace TemplatesFunctions
|
2010-01-28 16:39:01 +01:00
|
|
|
{
|
2010-11-21 01:19:17 +01:00
|
|
|
typedef Ezc::FunInfo<TextStream<std::wstring> > Info;
|
|
|
|
|
|
|
|
|
|
|
|
void HtmlEscape(TextStream<std::wstring> & out, const std::wstring & in);
|
|
|
|
void HtmlEscapeFormTxt(TextStream<std::wstring> & out, const std::wstring & in);
|
|
|
|
std::wstring HtmlEscape(const std::wstring & in);
|
|
|
|
std::wstring HtmlEscapeFormTxt(const std::wstring & in);
|
|
|
|
|
|
|
|
|
2010-02-15 01:31:14 +01:00
|
|
|
// table: [language][file]
|
2010-01-28 16:39:01 +01:00
|
|
|
typedef std::vector<std::vector<Ezc::Pattern> > Patterns;
|
|
|
|
|
2010-11-21 01:19:17 +01:00
|
|
|
void print_date_nice(Info & i, const tm & rtm);
|
|
|
|
void print_user_name(Info & i, const User * puser, const std::wstring & guest_name);
|
2010-10-19 02:31:20 +02:00
|
|
|
|
2010-07-05 17:21:06 +02:00
|
|
|
int ParseCKeditorFun();
|
2010-02-15 01:31:14 +01:00
|
|
|
|
2010-01-28 16:39:01 +01:00
|
|
|
|
|
|
|
// those functions from here are used in the second thread too
|
|
|
|
|
2010-11-21 01:19:17 +01:00
|
|
|
void Read(Patterns & patterns, size_t pat, Locale & locale, LocaleFilter & locale_filter, const wchar_t * file, bool delete_white = false);
|
2010-01-28 16:39:01 +01:00
|
|
|
void ClearPatterns(Patterns & patterns, size_t len);
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-04 22:27:14 +02:00
|
|
|
} // namespace TemplatesFunctions
|
2010-01-28 16:39:01 +01:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|