added: bbcode
files: core/bbcodeparser.h core/bbcodeparser.cpp git-svn-id: svn://ttmath.org/publicrep/winix/trunk@615 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -55,7 +55,7 @@ item.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
||||
item.o: ../core/plugindata.h ../core/thread.h ../core/compress.h
|
||||
item.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||
item.o: ../core/htmlfilter.h ../core/postmultiparser.h ../core/ticket.h
|
||||
item.o: ../core/misc.h
|
||||
item.o: ../core/misc.h ../core/bbcodeparser.h
|
||||
last.o: templates.h patterncacher.h ../core/item.h misc.h localefilter.h
|
||||
last.o: ../core/locale.h ../confparser/confparser.h ckeditorgetparser.h
|
||||
last.o: ../core/httpsimpleparser.h ../core/log.h indexpatterns.h
|
||||
|
@@ -12,12 +12,15 @@
|
||||
#include "../core/data.h"
|
||||
#include "../core/request.h"
|
||||
#include "../core/misc.h"
|
||||
#include "../core/bbcodeparser.h"
|
||||
|
||||
|
||||
|
||||
|
||||
namespace TemplatesFunctions
|
||||
{
|
||||
static BBCODEParser bbcode_parser;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -114,20 +117,19 @@ void item_print_content(std::ostringstream & out, const std::string & content, I
|
||||
HtmlEscapeFormTxt(out, content);
|
||||
}
|
||||
else
|
||||
if( content_type == Item::ct_html )
|
||||
if( content_type == Item::ct_html || content_type == Item::ct_raw )
|
||||
{
|
||||
out << content;
|
||||
}
|
||||
else
|
||||
if( content_type == Item::ct_bbcode )
|
||||
{
|
||||
//out << content; // !! tutaj bedzie parsowanie bbcodu i tworzenie odpowiadajacego mu html-a
|
||||
out << "bbcode is not implemented yet";
|
||||
}
|
||||
else
|
||||
if( content_type == Item::ct_raw )
|
||||
{
|
||||
out << content;
|
||||
static std::string out_temp;
|
||||
out_temp.clear();
|
||||
out_temp.reserve(content.size()*2);
|
||||
|
||||
bbcode_parser.Filter(content.c_str(), out_temp);
|
||||
out << out_temp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -523,8 +525,6 @@ void item_tab_date_creation_nice(Info & i)
|
||||
{
|
||||
tm * ptm = &request.item_table[item_index].date_creation;
|
||||
TemplatesMisc::print_date_nice(i, ptm);
|
||||
|
||||
i.out << "<!-- creation hour: " << ptm->tm_hour << " -->";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -536,8 +536,6 @@ void item_tab_date_modification_nice(Info & i)
|
||||
{
|
||||
tm * ptm = &request.item_table[item_index].date_modification;
|
||||
TemplatesMisc::print_date_nice(i, ptm);
|
||||
|
||||
i.out << "<!-- modification hour: " << ptm->tm_hour << " -->";
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -28,6 +28,7 @@ Locale locale;
|
||||
LocaleFilter locale_filter;
|
||||
CKEditorGetParser ckeditor_getparser;
|
||||
|
||||
|
||||
const std::string empty; // used by GenerateRunRaw()
|
||||
|
||||
|
||||
|
@@ -21,6 +21,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
namespace TemplatesFunctions
|
||||
{
|
||||
using Ezc::Info;
|
||||
@@ -74,7 +75,7 @@ namespace TemplatesFunctions
|
||||
extern Locale locale;
|
||||
extern Ezc::Functions functions;
|
||||
extern CKEditorGetParser ckeditor_getparser;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
sys
|
||||
|
Reference in New Issue
Block a user