changed: GroupItem plugin has been renamed to Group
it's nearly finished now we are using three levels from Space (ConfParser) - group set - group - values git-svn-id: svn://ttmath.org/publicrep/winix/trunk@773 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -345,33 +345,54 @@ return false;
|
||||
|
||||
|
||||
|
||||
void Space::Print(std::wostream & out)
|
||||
void Space::PrintLevel(std::wostream & out, int level)
|
||||
{
|
||||
for(int i=0 ; i<level ; ++i)
|
||||
out << ' ';
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Space::Print(std::wostream & out, int level)
|
||||
{
|
||||
PrintLevel(out, level);
|
||||
out << "Space name: " << name << std::endl;
|
||||
|
||||
out << "table_single: " << std::endl;
|
||||
TableSingle::iterator i1;
|
||||
|
||||
for(i1 = table_single.begin() ; i1 != table_single.end() ; ++i1)
|
||||
out << i1->first << '=' << i1->second << std::endl;
|
||||
|
||||
out << "table: " << std::endl;
|
||||
|
||||
Table::iterator i2;
|
||||
Value::iterator i3;
|
||||
|
||||
for(i2 = table.begin() ; i2 != table.end() ; ++i2)
|
||||
if( !table_single.empty() )
|
||||
{
|
||||
out << i2->first << '=';
|
||||
PrintLevel(out, level);
|
||||
out << "table_single: " << std::endl;
|
||||
TableSingle::iterator i1;
|
||||
|
||||
for(i3 = i2->second.begin() ; i3 != i2->second.end() ; ++i3)
|
||||
out << *i3 << ',';
|
||||
for(i1 = table_single.begin() ; i1 != table_single.end() ; ++i1)
|
||||
{
|
||||
PrintLevel(out, level);
|
||||
out << i1->first << '=' << i1->second << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
out << std::endl;
|
||||
if( !table.empty() )
|
||||
{
|
||||
PrintLevel(out, level);
|
||||
out << "table: " << std::endl;
|
||||
|
||||
Table::iterator i2;
|
||||
Value::iterator i3;
|
||||
|
||||
for(i2 = table.begin() ; i2 != table.end() ; ++i2)
|
||||
{
|
||||
PrintLevel(out, level);
|
||||
out << i2->first << '=';
|
||||
|
||||
for(i3 = i2->second.begin() ; i3 != i2->second.end() ; ++i3)
|
||||
out << *i3 << ',';
|
||||
|
||||
out << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
for(size_t i=0 ; i<spaces.size() ; ++i)
|
||||
spaces[i]->Print(out);
|
||||
spaces[i]->Print(out, level+1);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -236,7 +236,7 @@ public:
|
||||
printing the content
|
||||
(for debug purposes)
|
||||
*/
|
||||
void Print(std::wostream & out);
|
||||
void Print(std::wostream & out, int level = 0);
|
||||
|
||||
private:
|
||||
std::wstring tmp_name;
|
||||
@@ -248,6 +248,7 @@ private:
|
||||
bool ToBool(const std::wstring & value);
|
||||
wchar_t ToSmall(wchar_t c);
|
||||
bool EqualNoCase(const wchar_t * str1, const wchar_t * str2);
|
||||
void PrintLevel(std::wostream & out, int level);
|
||||
};
|
||||
|
||||
|
||||
|
@@ -63,6 +63,7 @@ void Mounts::CreateMountPar()
|
||||
mount_par_change_template = AddMountPar(L"change_template");
|
||||
mount_par_static = AddMountPar(L"static");
|
||||
mount_par_css = AddMountPar(L"css");
|
||||
mount_par_lang = AddMountPar(L"lang");
|
||||
}
|
||||
|
||||
|
||||
|
@@ -83,6 +83,7 @@ public:
|
||||
int MountParChangeTemplate() { return mount_par_change_template; }
|
||||
int MountParStatic() { return mount_par_static; }
|
||||
int MountParCss() { return mount_par_css; }
|
||||
int MountParLang() { return mount_par_lang; }
|
||||
|
||||
void SetDirs(Dirs * pdirs);
|
||||
void SetDb(Db * pdb);
|
||||
@@ -157,6 +158,7 @@ private:
|
||||
int mount_par_change_template;
|
||||
int mount_par_static;
|
||||
int mount_par_css;
|
||||
int mount_par_lang;
|
||||
|
||||
|
||||
MountTab mount_tab;
|
||||
|
@@ -43,7 +43,7 @@
|
||||
#define WINIX_CONTENT_MAKE 2002
|
||||
|
||||
// here you can attach your own session data (based on PluginDataBase class)
|
||||
// call request.session->plugin_data.Assign(pointer)
|
||||
// call cur->session->plugin_data.Assign(pointer)
|
||||
#define WINIX_SESSION_CREATED 3000
|
||||
|
||||
// here you should remove your session data
|
||||
@@ -94,7 +94,7 @@
|
||||
#define WINIX_NOTIFY_ADD_TEMPLATE 3013
|
||||
|
||||
// the request is being ended
|
||||
// you can clear some of your object here
|
||||
// you can clear some of your objects here
|
||||
#define WINIX_END_REQUEST 3014
|
||||
|
||||
// a new file (page) has been added
|
||||
@@ -132,13 +132,18 @@
|
||||
// in p1 you have a pointer to the Item struct
|
||||
#define WINIX_IMAGE_RESIZED 3052
|
||||
|
||||
|
||||
// content of a directory was sorted
|
||||
// (winix 'sort' function was used)
|
||||
// in p1 you have a pointer to the Item struct (of the directory)
|
||||
// this is from system->dirs so you should not change the item
|
||||
#define WINIX_DIR_CONTENT_SORTED 3050
|
||||
|
||||
// a user has been logged
|
||||
// send from 'login' winix function
|
||||
// this message is also called when winix starts and reads sessions
|
||||
// from the session file
|
||||
#define WINIX_USER_LOGGED 3060
|
||||
|
||||
|
||||
// here you add your own html templates
|
||||
// call TemplatesFunctions::patterns.Add(L"file_name.html")
|
||||
|
@@ -268,6 +268,9 @@ SessionContainer::Iterator i;
|
||||
i->plugin_data.Resize(plugin.Size());
|
||||
cur->session = &(*i);
|
||||
plugin.Call(WINIX_SESSION_CREATED);
|
||||
|
||||
if( cur->session->puser )
|
||||
plugin.Call(WINIX_USER_LOGGED);
|
||||
}
|
||||
|
||||
cur->session = &temporary_session;
|
||||
|
Reference in New Issue
Block a user