From c8a57f20460ad2c77be7d408f337a15edaf174e4 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Tue, 15 Feb 2011 23:20:12 +0000 Subject: [PATCH] added: to gallery plugin: gallery_theme() mount option git-svn-id: svn://ttmath.org/publicrep/winix/trunk@718 e52654a7-88a9-db11-a3e9-0013d4bc506e --- core/getparser.h | 1 + core/plugin.h | 4 ++-- core/pluginmsg.h | 6 +++--- core/postparser.h | 2 ++ html/fun_gallery.html | 29 +++++++++++++++++++++-------- html/index_head_functions_add.html | 8 ++++++-- plugins/gallery/galleryinfo.h | 1 + plugins/gallery/init.cpp | 9 +++++---- plugins/gallery/templates.cpp | 10 +++++++++- static/layout1/winix.css | 9 +++------ txt/notify_email_cms.txt | 1 + txt/notify_email_thread.txt | 1 + txt/notify_email_ticket.txt | 1 + 13 files changed, 56 insertions(+), 26 deletions(-) diff --git a/core/getparser.h b/core/getparser.h index 708f416..ff2f4cd 100755 --- a/core/getparser.h +++ b/core/getparser.h @@ -14,6 +14,7 @@ #include "requesttypes.h" #include "misc.h" #include "utf8.h" +#include "log.h" class GetParser : public HttpSimpleParser diff --git a/core/plugin.h b/core/plugin.h index ed687d0..f5b5b49 100755 --- a/core/plugin.h +++ b/core/plugin.h @@ -8,8 +8,8 @@ */ -#ifndef headerfilecmsluplugin -#define headerfilecmsluplugin +#ifndef headerfile_winix_core_plugin +#define headerfile_winix_core_plugin #include #include diff --git a/core/pluginmsg.h b/core/pluginmsg.h index f78c071..abf8e47 100755 --- a/core/pluginmsg.h +++ b/core/pluginmsg.h @@ -2,14 +2,14 @@ * This file is a part of Winix * and is not publicly distributed * - * Copyright (c) 2008-2010, Tomasz Sowa + * Copyright (c) 2008-2011, Tomasz Sowa * All rights reserved. * */ -#ifndef headerfilecmslupluginmsg -#define headerfilecmslupluginmsg +#ifndef headerfile_winix_core_pluginmsg +#define headerfile_winix_core_pluginmsg // here you can add your own EZC functions ([function]) // PluginInfo.p1 is a pointer to Ezc::Functions object diff --git a/core/postparser.h b/core/postparser.h index 683217a..ec26ffa 100755 --- a/core/postparser.h +++ b/core/postparser.h @@ -15,6 +15,8 @@ #include "httpsimpleparser.h" #include "requesttypes.h" #include "misc.h" +#include "utf8.h" +#include "log.h" diff --git a/html/fun_gallery.html b/html/fun_gallery.html index 2011b06..8567411 100755 --- a/html/fun_gallery.html +++ b/html/fun_gallery.html @@ -5,7 +5,7 @@ [if-one gallery_has_not_mount_type gallery_mount_type_arg_is "lightbox"] [if gallery_tab] -
    +
      [for gallery_tab]
    • [gallery_tab_subject]
    • [end] @@ -18,16 +18,22 @@ [if gallery_mount_type_arg_is "galleria"] [if gallery_tab] -
        +
          [for gallery_tab]
        • [gallery_tab_subject]
        • [end]
        - [if-no winix_function_param_is "image"] - + [if gallery_mount_theme_arg_is "white"] + [else] - + + [end] + + [if-no winix_function_param_is "image"] + + [else] + [end] [end] @@ -39,7 +45,7 @@ [if-no winix_function_param_is "image"] [if gallery_tab] -
          +
            [for gallery_tab]
          • [gallery_tab_subject]
          • [end] @@ -47,13 +53,20 @@ [end] [else] [if gallery_tab] -
              +
                [for gallery_tab]
              • [gallery_tab_subject]
              • [end]
              - + [if gallery_mount_theme_arg_is "white"] + + [else] + + [end] + + + [end] [end] diff --git a/html/index_head_functions_add.html b/html/index_head_functions_add.html index 13e61fe..92ceb11 100755 --- a/html/index_head_functions_add.html +++ b/html/index_head_functions_add.html @@ -20,7 +20,7 @@ - + [end] @@ -52,7 +52,11 @@ [if-one gallery_mount_type_arg_is "galleria" gallery_mount_type_arg_is "galleriathumb"] - [end] + [if gallery_mount_type_arg_is "galleriathumbwhite"] + + + [end] + [end] diff --git a/plugins/gallery/galleryinfo.h b/plugins/gallery/galleryinfo.h index e6f444d..c79f166 100755 --- a/plugins/gallery/galleryinfo.h +++ b/plugins/gallery/galleryinfo.h @@ -31,6 +31,7 @@ public: int mount_par_gallery_size; + int mount_par_gallery_theme; // "lightbox" (default) diff --git a/plugins/gallery/init.cpp b/plugins/gallery/init.cpp index a42956c..7cdda49 100755 --- a/plugins/gallery/init.cpp +++ b/plugins/gallery/init.cpp @@ -46,11 +46,12 @@ void AddMounts(PluginInfo & info) { Mounts & m = info.system->mounts; - gallery_info.mount_type_gallery = m.AddMountType(L"gallery"); + gallery_info.mount_type_gallery = m.AddMountType(L"gallery"); - gallery_info.mount_par_gallery = m.AddMountPar(L"gallery"); - gallery_info.mount_par_gallery_size = m.AddMountPar(L"gallery_size"); - gallery_info.mount_par_gallery_type = m.AddMountPar(L"gallery_type"); + gallery_info.mount_par_gallery = m.AddMountPar(L"gallery"); + gallery_info.mount_par_gallery_size = m.AddMountPar(L"gallery_size"); + gallery_info.mount_par_gallery_type = m.AddMountPar(L"gallery_type"); + gallery_info.mount_par_gallery_theme = m.AddMountPar(L"gallery_theme"); } diff --git a/plugins/gallery/templates.cpp b/plugins/gallery/templates.cpp index ed08832..32e095d 100755 --- a/plugins/gallery/templates.cpp +++ b/plugins/gallery/templates.cpp @@ -133,6 +133,13 @@ void gallery_mount_type_arg_is(Info & i) } +void gallery_mount_theme_arg_is(Info & i) +{ + i.res = system->mounts.pmount->IsArg(gallery_info.mount_par_gallery_theme, i.par); +} + + + void AddEzcFunctions(PluginInfo & info) { @@ -148,7 +155,8 @@ void AddEzcFunctions(PluginInfo & info) fun->Insert("gallery_width", gallery_width); fun->Insert("gallery_height", gallery_height); fun->Insert("gallery_has_not_mount_type", gallery_has_not_mount_type); - fun->Insert("gallery_mount_type_arg_is", gallery_mount_type_arg_is); + fun->Insert("gallery_mount_type_arg_is", gallery_mount_type_arg_is); + fun->Insert("gallery_mount_theme_arg_is", gallery_mount_theme_arg_is); } diff --git a/static/layout1/winix.css b/static/layout1/winix.css index 67e2e3d..985ad21 100755 --- a/static/layout1/winix.css +++ b/static/layout1/winix.css @@ -803,21 +803,18 @@ color: black; } -ul.gallerylightbox { -} -ul.gallerylightbox li { +ul.galleryimages li { display: block; float: left; margin: 0 0 6px 10px; } -ul.gallerylightbox a, ul.gallerylightbox a:hover, ul.gallerylightbox a:focus, ul.gallerylightbox a:active { +ul.galleryimages a, ul.galleryimages a:hover, ul.galleryimages a:focus, ul.galleryimages a:active { background: none; } -ul.gallerylightbox img { -display: inline; +ul.galleryimages img { background: none; } diff --git a/txt/notify_email_cms.txt b/txt/notify_email_cms.txt index fa58ed3..802d89a 100755 --- a/txt/notify_email_cms.txt +++ b/txt/notify_email_cms.txt @@ -1,6 +1,7 @@ Subject: [filter fil_qencode][if notify_add]{notify_new}[else]{notify_change}[end][end]\n From: [filter fil_qencode]{notify_from_name}[end] <{notify_from_email}>\n To: [filter fil_qencode][notify_to_name][end] <[notify_to_email]>\n +Content-Transfer-Encoding: 8bit Content-Type: {notify_content_type} \n\n diff --git a/txt/notify_email_thread.txt b/txt/notify_email_thread.txt index 21a6b02..b356504 100755 --- a/txt/notify_email_thread.txt +++ b/txt/notify_email_thread.txt @@ -1,6 +1,7 @@ Subject: [filter fil_qencode][if notify_add]{notify_new}[else]{notify_reply}[end][end]\n From: [filter fil_qencode]{notify_from_name}[end] <{notify_from_email}>\n To: [filter fil_qencode][notify_to_name][end] <[notify_to_email]>\n +Content-Transfer-Encoding: 8bit Content-Type: {notify_content_type} \n\n diff --git a/txt/notify_email_ticket.txt b/txt/notify_email_ticket.txt index 9e60392..04ba7ba 100755 --- a/txt/notify_email_ticket.txt +++ b/txt/notify_email_ticket.txt @@ -1,6 +1,7 @@ Subject: [filter fil_qencode][if notify_add]{notify_new}[else]{notify_change}[end][end]\n From: [filter fil_qencode]{notify_from_name}[end] <{notify_from_email}>\n To: [filter fil_qencode][notify_to_name][end] <[notify_to_email]>\n +Content-Transfer-Encoding: 8bit Content-Type: {notify_content_type} \n\n