2009-04-20 00:13:21 +02:00
|
|
|
/*
|
2010-02-28 01:08:10 +01:00
|
|
|
* This file is a part of Winix
|
2009-04-20 00:13:21 +02:00
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
2010-02-28 22:33:06 +01:00
|
|
|
* Copyright (c) 2008-2010, Tomasz Sowa
|
2009-04-20 00:13:21 +02:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "templates.h"
|
2010-02-15 01:31:14 +01:00
|
|
|
#include "misc.h"
|
2010-08-10 22:43:38 +02:00
|
|
|
#include "core/request.h"
|
|
|
|
#include "core/misc.h"
|
|
|
|
#include "functions/functions.h"
|
2009-04-21 22:50:55 +02:00
|
|
|
|
2009-04-20 00:13:21 +02:00
|
|
|
|
|
|
|
|
2011-01-05 22:44:19 +01:00
|
|
|
namespace Thread
|
2009-04-20 00:13:21 +02:00
|
|
|
{
|
2011-01-05 22:44:19 +01:00
|
|
|
using namespace TemplatesFunctions;
|
|
|
|
using TemplatesFunctions::system;
|
|
|
|
|
|
|
|
|
|
|
|
extern ThreadInfo thread_info;
|
|
|
|
extern FunThread fun_thread;
|
|
|
|
extern CreateThread fun_create_thread;
|
|
|
|
extern ShowThreads fun_show_threads;
|
|
|
|
|
|
|
|
|
2009-04-20 00:13:21 +02:00
|
|
|
|
2009-06-05 22:29:06 +02:00
|
|
|
void thread_is(Info & i)
|
|
|
|
{
|
2010-08-10 22:43:38 +02:00
|
|
|
i.res = functions->fun_thread.is_thread;
|
2009-06-05 22:29:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-10 22:43:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-05 22:29:06 +02:00
|
|
|
static size_t thread_tab_index;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void thread_tab(Info & i)
|
|
|
|
{
|
|
|
|
thread_tab_index = i.iter;
|
|
|
|
|
2010-08-10 22:43:38 +02:00
|
|
|
i.res = thread_tab_index < functions->fun_thread.thread_tab.size();
|
2009-06-05 22:29:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void thread_tab_url(Info & i)
|
|
|
|
{
|
2010-08-10 22:43:38 +02:00
|
|
|
if( thread_tab_index < functions->fun_thread.thread_tab.size() )
|
2009-06-05 22:29:06 +02:00
|
|
|
{
|
2010-08-10 22:43:38 +02:00
|
|
|
Item * dir = system->dirs.GetDir( functions->fun_thread.thread_tab[thread_tab_index].dir_id );
|
2009-06-05 22:29:06 +02:00
|
|
|
|
|
|
|
if( dir )
|
|
|
|
{
|
added: uptime winix function prints how many sessions there are
changed: functions for text/numbers conversions
int Toi(const std::string & str, int base = 10);
int Toi(const std::wstring & str, int base = 10);
int Toi(const char * str, int base = 10);
int Toi(const wchar_t * str, int base = 10);
long Tol(const std::string & str, int base = 10);
long Tol(const std::wstring & str, int base = 10);
long Tol(const char * str, int base = 10);
long Tol(const wchar_t * str, int base = 10);
template<class CharType>
bool Toa(unsigned long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(unsigned int value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(int value, CharType * buffer, size_t buf_len, int base = 10);
const wchar_t * Toa(unsigned int value, int base = 10);
const wchar_t * Toa(unsigned long value, int base = 10);
const wchar_t * Toa(int value, int base = 10);
const wchar_t * Toa(long value, int base = 10);
void Toa(int value, std::string & res, int base = 10, bool clear = true);
void Toa(long value, std::string & res, int base = 10, bool clear = true);
void Toa(int value, std::wstring & res, int base = 10, bool clear = true);
void Toa(long value, std::wstring & res, int base = 10, bool clear = true);
added: HtmlTextStream class (files htmltextstream.cpp htmltextstream.h in templates)
this is a special stream for automatically escaping html tags
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@682 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-11-25 02:34:46 +01:00
|
|
|
i.out << dir->url;
|
2009-06-05 22:29:06 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
added: uptime winix function prints how many sessions there are
changed: functions for text/numbers conversions
int Toi(const std::string & str, int base = 10);
int Toi(const std::wstring & str, int base = 10);
int Toi(const char * str, int base = 10);
int Toi(const wchar_t * str, int base = 10);
long Tol(const std::string & str, int base = 10);
long Tol(const std::wstring & str, int base = 10);
long Tol(const char * str, int base = 10);
long Tol(const wchar_t * str, int base = 10);
template<class CharType>
bool Toa(unsigned long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(unsigned int value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(int value, CharType * buffer, size_t buf_len, int base = 10);
const wchar_t * Toa(unsigned int value, int base = 10);
const wchar_t * Toa(unsigned long value, int base = 10);
const wchar_t * Toa(int value, int base = 10);
const wchar_t * Toa(long value, int base = 10);
void Toa(int value, std::string & res, int base = 10, bool clear = true);
void Toa(long value, std::string & res, int base = 10, bool clear = true);
void Toa(int value, std::wstring & res, int base = 10, bool clear = true);
void Toa(long value, std::wstring & res, int base = 10, bool clear = true);
added: HtmlTextStream class (files htmltextstream.cpp htmltextstream.h in templates)
this is a special stream for automatically escaping html tags
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@682 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-11-25 02:34:46 +01:00
|
|
|
i.out << "<!-- unknown directory -->"; // !! do konfiga
|
2009-06-05 22:29:06 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void thread_tab_subject(Info & i)
|
|
|
|
{
|
2010-08-10 22:43:38 +02:00
|
|
|
if( thread_tab_index < functions->fun_thread.thread_tab.size() )
|
2009-06-05 22:29:06 +02:00
|
|
|
{
|
2010-08-10 22:43:38 +02:00
|
|
|
Item * dir = system->dirs.GetDir( functions->fun_thread.thread_tab[thread_tab_index].dir_id );
|
2009-06-05 22:29:06 +02:00
|
|
|
|
|
|
|
if( dir )
|
|
|
|
{
|
2009-11-17 00:36:38 +01:00
|
|
|
if( !dir->subject.empty() )
|
added: uptime winix function prints how many sessions there are
changed: functions for text/numbers conversions
int Toi(const std::string & str, int base = 10);
int Toi(const std::wstring & str, int base = 10);
int Toi(const char * str, int base = 10);
int Toi(const wchar_t * str, int base = 10);
long Tol(const std::string & str, int base = 10);
long Tol(const std::wstring & str, int base = 10);
long Tol(const char * str, int base = 10);
long Tol(const wchar_t * str, int base = 10);
template<class CharType>
bool Toa(unsigned long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(unsigned int value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(int value, CharType * buffer, size_t buf_len, int base = 10);
const wchar_t * Toa(unsigned int value, int base = 10);
const wchar_t * Toa(unsigned long value, int base = 10);
const wchar_t * Toa(int value, int base = 10);
const wchar_t * Toa(long value, int base = 10);
void Toa(int value, std::string & res, int base = 10, bool clear = true);
void Toa(long value, std::string & res, int base = 10, bool clear = true);
void Toa(int value, std::wstring & res, int base = 10, bool clear = true);
void Toa(long value, std::wstring & res, int base = 10, bool clear = true);
added: HtmlTextStream class (files htmltextstream.cpp htmltextstream.h in templates)
this is a special stream for automatically escaping html tags
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@682 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-11-25 02:34:46 +01:00
|
|
|
i.out << dir->subject;
|
2009-11-17 00:36:38 +01:00
|
|
|
else
|
added: uptime winix function prints how many sessions there are
changed: functions for text/numbers conversions
int Toi(const std::string & str, int base = 10);
int Toi(const std::wstring & str, int base = 10);
int Toi(const char * str, int base = 10);
int Toi(const wchar_t * str, int base = 10);
long Tol(const std::string & str, int base = 10);
long Tol(const std::wstring & str, int base = 10);
long Tol(const char * str, int base = 10);
long Tol(const wchar_t * str, int base = 10);
template<class CharType>
bool Toa(unsigned long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(unsigned int value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(int value, CharType * buffer, size_t buf_len, int base = 10);
const wchar_t * Toa(unsigned int value, int base = 10);
const wchar_t * Toa(unsigned long value, int base = 10);
const wchar_t * Toa(int value, int base = 10);
const wchar_t * Toa(long value, int base = 10);
void Toa(int value, std::string & res, int base = 10, bool clear = true);
void Toa(long value, std::string & res, int base = 10, bool clear = true);
void Toa(int value, std::wstring & res, int base = 10, bool clear = true);
void Toa(long value, std::wstring & res, int base = 10, bool clear = true);
added: HtmlTextStream class (files htmltextstream.cpp htmltextstream.h in templates)
this is a special stream for automatically escaping html tags
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@682 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-11-25 02:34:46 +01:00
|
|
|
i.out << dir->url;
|
2009-06-05 22:29:06 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
added: uptime winix function prints how many sessions there are
changed: functions for text/numbers conversions
int Toi(const std::string & str, int base = 10);
int Toi(const std::wstring & str, int base = 10);
int Toi(const char * str, int base = 10);
int Toi(const wchar_t * str, int base = 10);
long Tol(const std::string & str, int base = 10);
long Tol(const std::wstring & str, int base = 10);
long Tol(const char * str, int base = 10);
long Tol(const wchar_t * str, int base = 10);
template<class CharType>
bool Toa(unsigned long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(unsigned int value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(int value, CharType * buffer, size_t buf_len, int base = 10);
const wchar_t * Toa(unsigned int value, int base = 10);
const wchar_t * Toa(unsigned long value, int base = 10);
const wchar_t * Toa(int value, int base = 10);
const wchar_t * Toa(long value, int base = 10);
void Toa(int value, std::string & res, int base = 10, bool clear = true);
void Toa(long value, std::string & res, int base = 10, bool clear = true);
void Toa(int value, std::wstring & res, int base = 10, bool clear = true);
void Toa(long value, std::wstring & res, int base = 10, bool clear = true);
added: HtmlTextStream class (files htmltextstream.cpp htmltextstream.h in templates)
this is a special stream for automatically escaping html tags
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@682 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-11-25 02:34:46 +01:00
|
|
|
i.out << "<!-- unknown subject -->"; // !! do konfiga
|
2009-06-05 22:29:06 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void thread_tab_answers(Info & i)
|
|
|
|
{
|
2010-08-10 22:43:38 +02:00
|
|
|
if( thread_tab_index < functions->fun_thread.thread_tab.size() )
|
2009-06-05 22:29:06 +02:00
|
|
|
{
|
2010-08-10 22:43:38 +02:00
|
|
|
long a = functions->fun_thread.thread_tab[thread_tab_index].items;
|
2009-06-05 22:29:06 +02:00
|
|
|
|
|
|
|
// the first is created by the author
|
|
|
|
// we count only the rest
|
|
|
|
if( a > 0 )
|
|
|
|
--a;
|
|
|
|
|
|
|
|
i.out << a;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void thread_tab_author(Info & i)
|
|
|
|
{
|
|
|
|
bool unknown = true;
|
|
|
|
|
|
|
|
|
2010-08-10 22:43:38 +02:00
|
|
|
if( thread_tab_index < functions->fun_thread.thread_tab.size() )
|
2009-06-05 22:29:06 +02:00
|
|
|
{
|
2010-08-10 22:43:38 +02:00
|
|
|
Item * dir = system->dirs.GetDir( functions->fun_thread.thread_tab[thread_tab_index].dir_id );
|
2009-06-05 22:29:06 +02:00
|
|
|
|
|
|
|
if( dir )
|
|
|
|
{
|
2010-08-10 18:12:50 +02:00
|
|
|
User * puser = system->users.GetUser(dir->user_id);
|
2009-06-05 22:29:06 +02:00
|
|
|
unknown = false;
|
|
|
|
|
|
|
|
if( puser )
|
added: uptime winix function prints how many sessions there are
changed: functions for text/numbers conversions
int Toi(const std::string & str, int base = 10);
int Toi(const std::wstring & str, int base = 10);
int Toi(const char * str, int base = 10);
int Toi(const wchar_t * str, int base = 10);
long Tol(const std::string & str, int base = 10);
long Tol(const std::wstring & str, int base = 10);
long Tol(const char * str, int base = 10);
long Tol(const wchar_t * str, int base = 10);
template<class CharType>
bool Toa(unsigned long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(unsigned int value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(int value, CharType * buffer, size_t buf_len, int base = 10);
const wchar_t * Toa(unsigned int value, int base = 10);
const wchar_t * Toa(unsigned long value, int base = 10);
const wchar_t * Toa(int value, int base = 10);
const wchar_t * Toa(long value, int base = 10);
void Toa(int value, std::string & res, int base = 10, bool clear = true);
void Toa(long value, std::string & res, int base = 10, bool clear = true);
void Toa(int value, std::wstring & res, int base = 10, bool clear = true);
void Toa(long value, std::wstring & res, int base = 10, bool clear = true);
added: HtmlTextStream class (files htmltextstream.cpp htmltextstream.h in templates)
this is a special stream for automatically escaping html tags
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@682 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-11-25 02:34:46 +01:00
|
|
|
i.out << puser->name;
|
2009-06-05 22:29:06 +02:00
|
|
|
else
|
2009-06-07 04:40:27 +02:00
|
|
|
{
|
|
|
|
i.out << "~";
|
|
|
|
|
|
|
|
if( !dir->guest_name.empty() )
|
added: uptime winix function prints how many sessions there are
changed: functions for text/numbers conversions
int Toi(const std::string & str, int base = 10);
int Toi(const std::wstring & str, int base = 10);
int Toi(const char * str, int base = 10);
int Toi(const wchar_t * str, int base = 10);
long Tol(const std::string & str, int base = 10);
long Tol(const std::wstring & str, int base = 10);
long Tol(const char * str, int base = 10);
long Tol(const wchar_t * str, int base = 10);
template<class CharType>
bool Toa(unsigned long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(unsigned int value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(int value, CharType * buffer, size_t buf_len, int base = 10);
const wchar_t * Toa(unsigned int value, int base = 10);
const wchar_t * Toa(unsigned long value, int base = 10);
const wchar_t * Toa(int value, int base = 10);
const wchar_t * Toa(long value, int base = 10);
void Toa(int value, std::string & res, int base = 10, bool clear = true);
void Toa(long value, std::string & res, int base = 10, bool clear = true);
void Toa(int value, std::wstring & res, int base = 10, bool clear = true);
void Toa(long value, std::wstring & res, int base = 10, bool clear = true);
added: HtmlTextStream class (files htmltextstream.cpp htmltextstream.h in templates)
this is a special stream for automatically escaping html tags
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@682 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-11-25 02:34:46 +01:00
|
|
|
i.out << dir->guest_name;
|
2009-06-07 04:40:27 +02:00
|
|
|
else
|
|
|
|
i.out << "guest"; // !! dodac do konfiga
|
|
|
|
}
|
2009-06-05 22:29:06 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if( unknown )
|
|
|
|
{
|
|
|
|
i.out << "<!-- unknown user -->";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void thread_tab_last_item_date_modification(Info & i)
|
|
|
|
{
|
2010-08-10 22:43:38 +02:00
|
|
|
if( thread_tab_index < functions->fun_thread.thread_tab.size() )
|
|
|
|
if( functions->fun_thread.thread_tab[thread_tab_index].last_item.id != -1 )
|
|
|
|
i.out << DateToStr( &functions->fun_thread.thread_tab[thread_tab_index].last_item.date_modification );
|
2009-06-05 22:29:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-02-15 01:31:14 +01:00
|
|
|
void thread_tab_last_item_date_modification_nice(Info & i)
|
|
|
|
{
|
2010-08-10 22:43:38 +02:00
|
|
|
if( thread_tab_index < functions->fun_thread.thread_tab.size() )
|
|
|
|
if( functions->fun_thread.thread_tab[thread_tab_index].last_item.id != -1 )
|
2010-10-24 01:12:47 +02:00
|
|
|
print_date_nice(i, functions->fun_thread.thread_tab[thread_tab_index].last_item.date_modification);
|
2010-02-15 01:31:14 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-06-05 22:29:06 +02:00
|
|
|
void thread_tab_last_item_user(Info & i)
|
|
|
|
{
|
2010-08-10 22:43:38 +02:00
|
|
|
if( thread_tab_index < functions->fun_thread.thread_tab.size() )
|
2009-06-05 22:29:06 +02:00
|
|
|
{
|
2010-08-10 22:43:38 +02:00
|
|
|
if( functions->fun_thread.thread_tab[thread_tab_index].last_item.id != -1 )
|
2009-06-05 22:29:06 +02:00
|
|
|
{
|
2010-08-10 22:43:38 +02:00
|
|
|
User * puser = system->users.GetUser( functions->fun_thread.thread_tab[thread_tab_index].last_item.user_id );
|
2009-06-05 22:29:06 +02:00
|
|
|
|
|
|
|
if( puser )
|
added: uptime winix function prints how many sessions there are
changed: functions for text/numbers conversions
int Toi(const std::string & str, int base = 10);
int Toi(const std::wstring & str, int base = 10);
int Toi(const char * str, int base = 10);
int Toi(const wchar_t * str, int base = 10);
long Tol(const std::string & str, int base = 10);
long Tol(const std::wstring & str, int base = 10);
long Tol(const char * str, int base = 10);
long Tol(const wchar_t * str, int base = 10);
template<class CharType>
bool Toa(unsigned long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(unsigned int value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(int value, CharType * buffer, size_t buf_len, int base = 10);
const wchar_t * Toa(unsigned int value, int base = 10);
const wchar_t * Toa(unsigned long value, int base = 10);
const wchar_t * Toa(int value, int base = 10);
const wchar_t * Toa(long value, int base = 10);
void Toa(int value, std::string & res, int base = 10, bool clear = true);
void Toa(long value, std::string & res, int base = 10, bool clear = true);
void Toa(int value, std::wstring & res, int base = 10, bool clear = true);
void Toa(long value, std::wstring & res, int base = 10, bool clear = true);
added: HtmlTextStream class (files htmltextstream.cpp htmltextstream.h in templates)
this is a special stream for automatically escaping html tags
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@682 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-11-25 02:34:46 +01:00
|
|
|
i.out << puser->name;
|
2009-06-05 22:29:06 +02:00
|
|
|
else
|
2009-06-07 04:40:27 +02:00
|
|
|
{
|
|
|
|
i.out << "~";
|
|
|
|
|
2010-08-10 22:43:38 +02:00
|
|
|
if( !functions->fun_thread.thread_tab[thread_tab_index].last_item.guest_name.empty() )
|
added: uptime winix function prints how many sessions there are
changed: functions for text/numbers conversions
int Toi(const std::string & str, int base = 10);
int Toi(const std::wstring & str, int base = 10);
int Toi(const char * str, int base = 10);
int Toi(const wchar_t * str, int base = 10);
long Tol(const std::string & str, int base = 10);
long Tol(const std::wstring & str, int base = 10);
long Tol(const char * str, int base = 10);
long Tol(const wchar_t * str, int base = 10);
template<class CharType>
bool Toa(unsigned long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(unsigned int value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(int value, CharType * buffer, size_t buf_len, int base = 10);
const wchar_t * Toa(unsigned int value, int base = 10);
const wchar_t * Toa(unsigned long value, int base = 10);
const wchar_t * Toa(int value, int base = 10);
const wchar_t * Toa(long value, int base = 10);
void Toa(int value, std::string & res, int base = 10, bool clear = true);
void Toa(long value, std::string & res, int base = 10, bool clear = true);
void Toa(int value, std::wstring & res, int base = 10, bool clear = true);
void Toa(long value, std::wstring & res, int base = 10, bool clear = true);
added: HtmlTextStream class (files htmltextstream.cpp htmltextstream.h in templates)
this is a special stream for automatically escaping html tags
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@682 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-11-25 02:34:46 +01:00
|
|
|
i.out << functions->fun_thread.thread_tab[thread_tab_index].last_item.guest_name;
|
2009-06-07 04:40:27 +02:00
|
|
|
else
|
|
|
|
i.out << "guest"; // !! dodac do konfiga
|
|
|
|
}
|
2009-06-05 22:29:06 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void thread_can_create(Info & i)
|
|
|
|
{
|
2010-08-18 00:32:47 +02:00
|
|
|
i.res = functions->fun_createthread.HasAccess(true);
|
2009-04-20 00:13:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-05 22:44:19 +01:00
|
|
|
void AddEzcFunctions(PluginInfo & info)
|
|
|
|
{
|
|
|
|
using TemplatesFunctions::EzcFun;
|
|
|
|
EzcFun * fun = reinterpret_cast<EzcFun*>(info.p1);
|
|
|
|
|
|
|
|
fun->Insert("thread_is", thread_is);
|
|
|
|
fun->Insert("thread_tab", thread_tab);
|
|
|
|
fun->Insert("thread_tab_url", thread_tab_url);
|
|
|
|
fun->Insert("thread_tab_subject", thread_tab_subject);
|
|
|
|
fun->Insert("thread_tab_author", thread_tab_author);
|
|
|
|
fun->Insert("thread_tab_answers", thread_tab_answers);
|
|
|
|
fun->Insert("thread_tab_last_item_date_modification", thread_tab_last_item_date_modification);
|
|
|
|
fun->Insert("thread_tab_last_item_date_modification_nice", thread_tab_last_item_date_modification_nice);
|
|
|
|
fun->Insert("thread_tab_last_item_user", thread_tab_last_item_user);
|
|
|
|
fun->Insert("thread_can_create", thread_can_create);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace
|
2009-04-20 00:13:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|