From f92f61f98ba626d1b687e6f4021ed7b515ba9cf3 Mon Sep 17 00:00:00 2001 From: voltan Date: Mon, 22 Aug 2016 16:43:01 +0430 Subject: [PATCH 01/10] Add submodule --- .gitmodules | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitmodules b/.gitmodules index 34bbe55de1..065285d500 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,9 @@ [submodule "usr/module/sitemap"] path = usr/module/sitemap url = https://github.com/pi-module/sitemap +[submodule "usr/module/message"] + path = usr/module/message + url = https://github.com/pi-module/message +[submodule "usr/module/comment"] + path = usr/module/comment + url = https://github.com/pi-module/comment From 2f0291236051b5f52a3a64b696d2f6273440f470 Mon Sep 17 00:00:00 2001 From: voltan Date: Tue, 23 Aug 2016 11:23:28 +0430 Subject: [PATCH 02/10] Move comment and message to pi-module repo --- usr/module/comment/asset/css/admin.css | 62 - usr/module/comment/asset/css/block.css | 102 -- usr/module/comment/asset/css/front.css | 234 --- usr/module/comment/config/block.php | 113 -- usr/module/comment/config/comment.php | 36 - usr/module/comment/config/config.php | 91 - usr/module/comment/config/event.php | 68 - usr/module/comment/config/module.php | 51 - usr/module/comment/config/nav.php | 147 -- usr/module/comment/config/route.php | 29 - usr/module/comment/config/user.php | 32 - usr/module/comment/doc/Changelog.txt | 6 - usr/module/comment/doc/README.md | 1 - usr/module/comment/locale/en/admin.mo | Bin 465 -> 0 bytes usr/module/comment/locale/en/admin.po | 461 ----- usr/module/comment/locale/en/block.mo | Bin 462 -> 0 bytes usr/module/comment/locale/en/block.po | 37 - usr/module/comment/locale/en/default.mo | Bin 465 -> 0 bytes usr/module/comment/locale/en/default.po | 459 ----- usr/module/comment/locale/fa/admin.mo | Bin 7972 -> 0 bytes usr/module/comment/locale/fa/admin.po | 550 ------ usr/module/comment/locale/fa/block.mo | Bin 751 -> 0 bytes usr/module/comment/locale/fa/block.po | 370 ---- usr/module/comment/locale/fa/default.mo | Bin 7237 -> 0 bytes usr/module/comment/locale/fa/default.po | 489 ------ usr/module/comment/locale/fr/admin.mo | Bin 7259 -> 0 bytes usr/module/comment/locale/fr/admin.po | 531 ------ usr/module/comment/locale/fr/block.mo | Bin 738 -> 0 bytes usr/module/comment/locale/fr/block.po | 60 - usr/module/comment/locale/fr/default.mo | Bin 6508 -> 0 bytes usr/module/comment/locale/fr/default.po | 476 ------ usr/module/comment/locale/zh-cn/admin.mo | Bin 3718 -> 0 bytes usr/module/comment/locale/zh-cn/admin.po | 613 ------- usr/module/comment/locale/zh-cn/block.mo | Bin 470 -> 0 bytes usr/module/comment/locale/zh-cn/block.po | 38 - usr/module/comment/locale/zh-cn/default.mo | Bin 3365 -> 0 bytes usr/module/comment/locale/zh-cn/default.po | 454 ----- usr/module/comment/sql/mysql.sql | 64 - usr/module/comment/src/Api/Api.php | 1486 ----------------- usr/module/comment/src/Api/Article.php | 61 - usr/module/comment/src/Api/Custom.php | 89 - usr/module/comment/src/Api/Event.php | 108 -- usr/module/comment/src/Api/Markup.php | 81 - usr/module/comment/src/Api/Search.php | 84 - usr/module/comment/src/Block/Block.php | 113 -- .../src/Controller/Admin/IndexController.php | 290 ---- .../src/Controller/Admin/ListController.php | 576 ------- .../src/Controller/Admin/PostController.php | 360 ---- .../src/Controller/Admin/TypeController.php | 127 -- .../src/Controller/Api/CommentController.php | 104 -- .../src/Controller/Feed/IndexController.php | 45 - .../src/Controller/Front/CustomController.php | 42 - .../src/Controller/Front/DemoController.php | 42 - .../src/Controller/Front/IndexController.php | 129 -- .../src/Controller/Front/ListController.php | 633 ------- .../src/Controller/Front/PostController.php | 511 ------ .../src/Controller/Front/TestController.php | 31 - usr/module/comment/src/Form/PostFilter.php | 64 - usr/module/comment/src/Form/PostForm.php | 128 -- .../comment/src/Installer/Action/Install.php | 75 - .../comment/src/Installer/Action/Update.php | 49 - .../src/Installer/Schema/Updator110.php | 80 - usr/module/comment/src/Model/Type.php | 29 - usr/module/comment/src/Registry/Type.php | 137 -- usr/module/comment/src/Route/Comment.php | 154 -- .../template/admin/comment-index.phtml | 114 -- .../comment/template/admin/comment-list.phtml | 249 --- .../admin/comment-module-select.phtml | 26 - .../template/admin/comment-module.phtml | 255 --- .../comment/template/admin/comment-type.phtml | 32 - .../template/admin/comment-user-select.phtml | 7 - .../comment/template/admin/comment-user.phtml | 256 --- .../comment/template/block/article-list.phtml | 23 - .../comment/template/block/post-list.phtml | 38 - .../comment/template/block/user-list.phtml | 23 - .../comment/template/front/_post-form.phtml | 82 - .../comment/template/front/comment-404.phtml | 15 - .../template/front/comment-article.phtml | 61 - .../comment/template/front/comment-edit.phtml | 65 - .../template/front/comment-index.phtml | 16 - .../comment/template/front/comment-lead.phtml | 57 - .../comment/template/front/comment-list.phtml | 67 - .../template/front/comment-module.phtml | 70 - .../template/front/comment-my-post.phtml | 77 - .../template/front/comment-my-received.phtml | 80 - .../template/front/comment-reply.phtml | 94 -- .../comment/template/front/comment-root.phtml | 82 - .../front/comment-user-received.phtml | 68 - .../comment/template/front/comment-user.phtml | 65 - .../comment/template/front/comment-view.phtml | 62 - usr/module/comment/template/front/demo.phtml | 3 - usr/module/message/README.md | 7 - usr/module/message/asset/script/admin.css | 4 - usr/module/message/asset/script/front.css | 283 ---- .../message/asset/script/index-detail.js | 50 - .../message/asset/script/index-index.js | 85 - usr/module/message/asset/script/index-send.js | 121 -- .../message/asset/script/notify-index.js | 85 - usr/module/message/config/module.php | 57 - usr/module/message/config/navigation.php | 36 - usr/module/message/config/page.php | 27 - usr/module/message/config/permission.php | 25 - usr/module/message/config/user.php | 28 - usr/module/message/doc/changelog.txt | 9 - usr/module/message/doc/manifest.md | 15 - usr/module/message/doc/releasenotes.md | 17 - usr/module/message/locale/en/admin.mo | Bin 454 -> 0 bytes usr/module/message/locale/en/admin.po | 38 - usr/module/message/locale/en/block.mo | Bin 451 -> 0 bytes usr/module/message/locale/en/block.po | 18 - usr/module/message/locale/en/default.mo | Bin 505 -> 0 bytes usr/module/message/locale/en/default.po | 264 --- .../message/locale/en/mail/notification.txt | 17 - usr/module/message/locale/fa/admin.mo | Bin 657 -> 0 bytes usr/module/message/locale/fa/admin.po | 50 - usr/module/message/locale/fa/block.mo | Bin 462 -> 0 bytes usr/module/message/locale/fa/block.po | 19 - usr/module/message/locale/fa/default.mo | Bin 5400 -> 0 bytes usr/module/message/locale/fa/default.po | 315 ---- .../message/locale/fa/mail/notification.txt | 17 - usr/module/message/locale/fr/admin.mo | Bin 719 -> 0 bytes usr/module/message/locale/fr/admin.po | 42 - usr/module/message/locale/fr/block.mo | Bin 473 -> 0 bytes usr/module/message/locale/fr/block.po | 19 - usr/module/message/locale/fr/default.mo | Bin 4674 -> 0 bytes usr/module/message/locale/fr/default.po | 315 ---- .../message/locale/fr/mail/notification.txt | 17 - usr/module/message/locale/zh-cn/admin.mo | Bin 609 -> 0 bytes usr/module/message/locale/zh-cn/admin.po | 38 - usr/module/message/locale/zh-cn/block.mo | Bin 470 -> 0 bytes usr/module/message/locale/zh-cn/block.po | 17 - usr/module/message/locale/zh-cn/default.mo | Bin 2687 -> 0 bytes usr/module/message/locale/zh-cn/default.po | 186 --- usr/module/message/sql/mysql.sql | 33 - usr/module/message/src/Api/Api.php | 458 ----- usr/module/message/src/Api/Breadcrumbs.php | 66 - .../src/Controller/Admin/IndexController.php | 27 - .../src/Controller/Admin/ListController.php | 81 - .../src/Controller/Admin/PruneController.php | 51 - .../src/Controller/Front/IndexController.php | 581 ------- .../src/Controller/Front/NotifyController.php | 257 --- usr/module/message/src/Form/PruneForm.php | 78 - usr/module/message/src/Form/ReplyFilter.php | 36 - usr/module/message/src/Form/ReplyForm.php | 92 - usr/module/message/src/Form/SendFilter.php | 46 - usr/module/message/src/Form/SendForm.php | 97 -- .../message/src/Installer/Action/Update.php | 154 -- .../message/template/admin/list-index.phtml | 91 - .../message/template/admin/prune-index.phtml | 8 - .../template/front/_confirm-modal.phtml | 18 - .../message/template/front/index-detail.phtml | 70 - .../message/template/front/index-index.phtml | 118 -- .../message/template/front/index-send.phtml | 15 - .../template/front/notify-detail.phtml | 72 - .../message/template/front/notify-index.phtml | 68 - 155 files changed, 17927 deletions(-) delete mode 100644 usr/module/comment/asset/css/admin.css delete mode 100644 usr/module/comment/asset/css/block.css delete mode 100644 usr/module/comment/asset/css/front.css delete mode 100644 usr/module/comment/config/block.php delete mode 100644 usr/module/comment/config/comment.php delete mode 100644 usr/module/comment/config/config.php delete mode 100644 usr/module/comment/config/event.php delete mode 100644 usr/module/comment/config/module.php delete mode 100644 usr/module/comment/config/nav.php delete mode 100644 usr/module/comment/config/route.php delete mode 100644 usr/module/comment/config/user.php delete mode 100644 usr/module/comment/doc/Changelog.txt delete mode 100644 usr/module/comment/doc/README.md delete mode 100644 usr/module/comment/locale/en/admin.mo delete mode 100644 usr/module/comment/locale/en/admin.po delete mode 100644 usr/module/comment/locale/en/block.mo delete mode 100644 usr/module/comment/locale/en/block.po delete mode 100644 usr/module/comment/locale/en/default.mo delete mode 100644 usr/module/comment/locale/en/default.po delete mode 100644 usr/module/comment/locale/fa/admin.mo delete mode 100644 usr/module/comment/locale/fa/admin.po delete mode 100644 usr/module/comment/locale/fa/block.mo delete mode 100644 usr/module/comment/locale/fa/block.po delete mode 100644 usr/module/comment/locale/fa/default.mo delete mode 100644 usr/module/comment/locale/fa/default.po delete mode 100644 usr/module/comment/locale/fr/admin.mo delete mode 100644 usr/module/comment/locale/fr/admin.po delete mode 100644 usr/module/comment/locale/fr/block.mo delete mode 100644 usr/module/comment/locale/fr/block.po delete mode 100644 usr/module/comment/locale/fr/default.mo delete mode 100644 usr/module/comment/locale/fr/default.po delete mode 100644 usr/module/comment/locale/zh-cn/admin.mo delete mode 100644 usr/module/comment/locale/zh-cn/admin.po delete mode 100644 usr/module/comment/locale/zh-cn/block.mo delete mode 100644 usr/module/comment/locale/zh-cn/block.po delete mode 100644 usr/module/comment/locale/zh-cn/default.mo delete mode 100644 usr/module/comment/locale/zh-cn/default.po delete mode 100644 usr/module/comment/sql/mysql.sql delete mode 100644 usr/module/comment/src/Api/Api.php delete mode 100644 usr/module/comment/src/Api/Article.php delete mode 100644 usr/module/comment/src/Api/Custom.php delete mode 100644 usr/module/comment/src/Api/Event.php delete mode 100644 usr/module/comment/src/Api/Markup.php delete mode 100644 usr/module/comment/src/Api/Search.php delete mode 100644 usr/module/comment/src/Block/Block.php delete mode 100644 usr/module/comment/src/Controller/Admin/IndexController.php delete mode 100644 usr/module/comment/src/Controller/Admin/ListController.php delete mode 100644 usr/module/comment/src/Controller/Admin/PostController.php delete mode 100644 usr/module/comment/src/Controller/Admin/TypeController.php delete mode 100644 usr/module/comment/src/Controller/Api/CommentController.php delete mode 100644 usr/module/comment/src/Controller/Feed/IndexController.php delete mode 100644 usr/module/comment/src/Controller/Front/CustomController.php delete mode 100644 usr/module/comment/src/Controller/Front/DemoController.php delete mode 100644 usr/module/comment/src/Controller/Front/IndexController.php delete mode 100644 usr/module/comment/src/Controller/Front/ListController.php delete mode 100644 usr/module/comment/src/Controller/Front/PostController.php delete mode 100644 usr/module/comment/src/Controller/Front/TestController.php delete mode 100644 usr/module/comment/src/Form/PostFilter.php delete mode 100644 usr/module/comment/src/Form/PostForm.php delete mode 100644 usr/module/comment/src/Installer/Action/Install.php delete mode 100644 usr/module/comment/src/Installer/Action/Update.php delete mode 100644 usr/module/comment/src/Installer/Schema/Updator110.php delete mode 100644 usr/module/comment/src/Model/Type.php delete mode 100644 usr/module/comment/src/Registry/Type.php delete mode 100644 usr/module/comment/src/Route/Comment.php delete mode 100644 usr/module/comment/template/admin/comment-index.phtml delete mode 100644 usr/module/comment/template/admin/comment-list.phtml delete mode 100644 usr/module/comment/template/admin/comment-module-select.phtml delete mode 100644 usr/module/comment/template/admin/comment-module.phtml delete mode 100644 usr/module/comment/template/admin/comment-type.phtml delete mode 100644 usr/module/comment/template/admin/comment-user-select.phtml delete mode 100644 usr/module/comment/template/admin/comment-user.phtml delete mode 100644 usr/module/comment/template/block/article-list.phtml delete mode 100644 usr/module/comment/template/block/post-list.phtml delete mode 100644 usr/module/comment/template/block/user-list.phtml delete mode 100644 usr/module/comment/template/front/_post-form.phtml delete mode 100644 usr/module/comment/template/front/comment-404.phtml delete mode 100644 usr/module/comment/template/front/comment-article.phtml delete mode 100644 usr/module/comment/template/front/comment-edit.phtml delete mode 100644 usr/module/comment/template/front/comment-index.phtml delete mode 100644 usr/module/comment/template/front/comment-lead.phtml delete mode 100644 usr/module/comment/template/front/comment-list.phtml delete mode 100644 usr/module/comment/template/front/comment-module.phtml delete mode 100644 usr/module/comment/template/front/comment-my-post.phtml delete mode 100644 usr/module/comment/template/front/comment-my-received.phtml delete mode 100644 usr/module/comment/template/front/comment-reply.phtml delete mode 100644 usr/module/comment/template/front/comment-root.phtml delete mode 100644 usr/module/comment/template/front/comment-user-received.phtml delete mode 100644 usr/module/comment/template/front/comment-user.phtml delete mode 100644 usr/module/comment/template/front/comment-view.phtml delete mode 100644 usr/module/comment/template/front/demo.phtml delete mode 100644 usr/module/message/README.md delete mode 100644 usr/module/message/asset/script/admin.css delete mode 100644 usr/module/message/asset/script/front.css delete mode 100644 usr/module/message/asset/script/index-detail.js delete mode 100644 usr/module/message/asset/script/index-index.js delete mode 100644 usr/module/message/asset/script/index-send.js delete mode 100644 usr/module/message/asset/script/notify-index.js delete mode 100644 usr/module/message/config/module.php delete mode 100755 usr/module/message/config/navigation.php delete mode 100755 usr/module/message/config/page.php delete mode 100755 usr/module/message/config/permission.php delete mode 100644 usr/module/message/config/user.php delete mode 100644 usr/module/message/doc/changelog.txt delete mode 100644 usr/module/message/doc/manifest.md delete mode 100644 usr/module/message/doc/releasenotes.md delete mode 100644 usr/module/message/locale/en/admin.mo delete mode 100644 usr/module/message/locale/en/admin.po delete mode 100644 usr/module/message/locale/en/block.mo delete mode 100644 usr/module/message/locale/en/block.po delete mode 100644 usr/module/message/locale/en/default.mo delete mode 100644 usr/module/message/locale/en/default.po delete mode 100644 usr/module/message/locale/en/mail/notification.txt delete mode 100644 usr/module/message/locale/fa/admin.mo delete mode 100644 usr/module/message/locale/fa/admin.po delete mode 100644 usr/module/message/locale/fa/block.mo delete mode 100644 usr/module/message/locale/fa/block.po delete mode 100644 usr/module/message/locale/fa/default.mo delete mode 100644 usr/module/message/locale/fa/default.po delete mode 100644 usr/module/message/locale/fa/mail/notification.txt delete mode 100644 usr/module/message/locale/fr/admin.mo delete mode 100644 usr/module/message/locale/fr/admin.po delete mode 100644 usr/module/message/locale/fr/block.mo delete mode 100644 usr/module/message/locale/fr/block.po delete mode 100644 usr/module/message/locale/fr/default.mo delete mode 100644 usr/module/message/locale/fr/default.po delete mode 100644 usr/module/message/locale/fr/mail/notification.txt delete mode 100644 usr/module/message/locale/zh-cn/admin.mo delete mode 100644 usr/module/message/locale/zh-cn/admin.po delete mode 100644 usr/module/message/locale/zh-cn/block.mo delete mode 100644 usr/module/message/locale/zh-cn/block.po delete mode 100644 usr/module/message/locale/zh-cn/default.mo delete mode 100644 usr/module/message/locale/zh-cn/default.po delete mode 100644 usr/module/message/sql/mysql.sql delete mode 100644 usr/module/message/src/Api/Api.php delete mode 100644 usr/module/message/src/Api/Breadcrumbs.php delete mode 100644 usr/module/message/src/Controller/Admin/IndexController.php delete mode 100644 usr/module/message/src/Controller/Admin/ListController.php delete mode 100644 usr/module/message/src/Controller/Admin/PruneController.php delete mode 100755 usr/module/message/src/Controller/Front/IndexController.php delete mode 100644 usr/module/message/src/Controller/Front/NotifyController.php delete mode 100644 usr/module/message/src/Form/PruneForm.php delete mode 100644 usr/module/message/src/Form/ReplyFilter.php delete mode 100644 usr/module/message/src/Form/ReplyForm.php delete mode 100755 usr/module/message/src/Form/SendFilter.php delete mode 100755 usr/module/message/src/Form/SendForm.php delete mode 100644 usr/module/message/src/Installer/Action/Update.php delete mode 100644 usr/module/message/template/admin/list-index.phtml delete mode 100644 usr/module/message/template/admin/prune-index.phtml delete mode 100644 usr/module/message/template/front/_confirm-modal.phtml delete mode 100755 usr/module/message/template/front/index-detail.phtml delete mode 100755 usr/module/message/template/front/index-index.phtml delete mode 100755 usr/module/message/template/front/index-send.phtml delete mode 100755 usr/module/message/template/front/notify-detail.phtml delete mode 100755 usr/module/message/template/front/notify-index.phtml diff --git a/usr/module/comment/asset/css/admin.css b/usr/module/comment/asset/css/admin.css deleted file mode 100644 index 60a453b412..0000000000 --- a/usr/module/comment/asset/css/admin.css +++ /dev/null @@ -1,62 +0,0 @@ -.pi-comment-batch-operation { - margin-left: 10px; -} -input.check-all { - margin-right: 10px; -} -.pi-comment-list { - margin-top: 20px; -} -.pi-comment-list td { - padding: 10px; -} -.pi-comment-list .comment-important { - background-color: #eeeeee; -} -.pi-comment-list td { - vertical-align: top; -} -.pi-comment-list img { - border-radius: 4px; -} -.pi-comment-content { - margin-top: 10px; - color: #333333; -} -.pi-comment-none { - height: 140px; - line-height: 140px; - vertical-align: middle; - text-align: center; - font-weight: bold; - color: #999999; -} -.one-action { - margin-top: 10px; -} -.one-action .operation { - margin-right: 10px; -} -.operation i { - margin-right: 2px; -} -.pi-comment-portal { - margin: 20px 0 0 0; -} -.pi-comment-portal .portal-header { - font-size: 14px; - font-weight: bold; - margin-bottom: 5px; -} -.pi-comment-portal table { - margin-top: 5px; - border: 1px solid #dddddd; -} -.pi-comment-portal .table-striped tbody > tr:nth-child(2n+1) > th { - background: #eeeeee; -} -.pi-comment-portal ul { - list-style: none; - padding: 10px; - margin: 0; -} diff --git a/usr/module/comment/asset/css/block.css b/usr/module/comment/asset/css/block.css deleted file mode 100644 index 057e8d5fab..0000000000 --- a/usr/module/comment/asset/css/block.css +++ /dev/null @@ -1,102 +0,0 @@ -.pi-comment { - padding: 10px 15px; - margin-bottom: 20px; -} -.pi-comment-header { - font-size: 16px; - font-weight: bold; - padding-bottom: 10px; - border-bottom: 1px solid #dddddd; -} -.pi-comment a.highlight { - color: #0088cc; -} -.pi-comment div.media > .pull-left { - margin-right: 5px; - margin-left: 5px; -} -.pi-comment img { - border-radius: 3px; -} -.pi-comment-list .media { - margin-top: 5px; - border-bottom: 1px solid #dddddd; -} -.pi-comment-user { - font-weight: bold; - margin-right: 5px; - margin-left: 5px; - font-size: 14px; -} -.pi-comment-time { - font-size: 13px; - font-family: 'Arial'; - margin-left: 5px; - margin-right: 5px; -} -.pi-comment-content { - margin-top: 10px; - color: #333333; - font-size: 14px; - display: inline-block; - width: 100%; -} -.pi-comment-operation { - margin-top: 10px; - font-size: 13px; -} -.pi-comment-operation .operation { - margin-right: 10px; -} -.operation i { - margin-right: 2px; -} -.operation a { - color: #999999; -} -a.muted:hover, -.operation a:hover { - color: #0088cc; -} -.pi-comment-view-all { - margin-top: 20px; - margin-bottom: 10px; -} -.pi-comment-view-all a { - width: 100%; - color: #808080; - padding-left: 0; - padding-right: 0; -} - -.pi-comment-none { - height: 140px; - line-height: 140px; - vertical-align: middle; - text-align: center; - font-weight: bold; - color: #999999; -} - -.pi-comment-desc { - margin: 10px 0 0 0; - font-size: 13px; -} - -.nav-tabs a { - font-size: 13px; - font-weight: bold; - color: #0088cc; - font-family: helvetica; -} - -.comment-title-hidden { - display: inline-block; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - width: auto; - max-width: 90%; - word-break: keep-all; - margin: 0 5px 0 5px; -} \ No newline at end of file diff --git a/usr/module/comment/asset/css/front.css b/usr/module/comment/asset/css/front.css deleted file mode 100644 index 1148852942..0000000000 --- a/usr/module/comment/asset/css/front.css +++ /dev/null @@ -1,234 +0,0 @@ -.pi-comment { - border: 1px solid #dddddd; - border-radius: 4px; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); - padding: 10px 15px; - margin-bottom: 20px; -} -.pi-comment-header { - font-size: 16px; - font-weight: bold; - padding-bottom: 10px; - border-bottom: 1px solid #dddddd; -} -a.highlight { - color: #0088cc; -} -.pi-comment-form { - margin-top: 15px; -} -div.media > .pull-left { - margin-right: 5px; - margin-left: 5px; -} -img { - border-radius: 3px; -} -/*textarea { - border: 0; - padding: 0; - margin: 0; - box-shadow: none; - width: 100%; - min-width: 100%; - max-width: 100%; - height: 38px; - max-height: 38px; - min-height: 38px; -} -textarea:focus { - border: 0px; - box-shadow: none; -}*/ -.media-body .form-textarea { - border: 1px solid #dddddd; - padding: 4px 6px; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset; - border-radius: 4px; - height: 38px; -} -.form-unsign { - border: 1px solid #dddddd; - border-radius: 4px; - background-color: #eeeeee; - color: #808080; - height: 44px; - line-height: 44px; - vertical-align: middle; - padding-left: 20px; -} -.form-submit { - margin-top: 10px; -} -.pi-comment-list .media { - margin-top: 20px; -} -.pi-comment-user { - font-weight: bold; - margin-right: 5px; - margin-left: 5px; - font-size: 14px; -} -.pi-comment-time { - font-size: 13px; - font-family: 'Arial'; - margin-left: 5px; - margin-right: 5px; -} -.pi-comment-content { - margin-top: 10px; - color: #333333; - font-size: 14px; - display: inline-block; - width: 100%; -} -.pi-comment-operation { - margin-top: 10px; - font-size: 13px; -} -.pi-comment-operation .operation { - margin-right: 10px; -} -.operation i { - margin-right: 2px; -} -.operation a { - color: #999999; -} -a.muted:hover, -.operation a:hover { - color: #0088cc; -} -.pi-comment-view-all { - margin-top: 20px; - margin-bottom: 10px; -} -.pi-comment-view-all a { - width: 100%; - color: #808080; - padding-left: 0; - padding-right: 0; -} - -.pi-comment-none { - height: 140px; - line-height: 140px; - vertical-align: middle; - text-align: center; - font-weight: bold; - color: #999999; -} - -.pi-comment-article-title { - font-size: 14px; - font-weight: bold; - margin: 10px 0 20px 0; -} - -.pi-comment-desc { - margin: 10px 0 0 0; - font-size: 13px; -} -.form-cancel { - font-size: 14px; - display: inline-block; - vertical-align: bottom; - margin-right: 10px; -} - -.nav-tabs a { - font-size: 13px; - font-weight: bold; - color: #0088cc; - font-family: helvetica; -} - -.comment-title-hidden { - display: inline-block; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - width: auto; - max-width: 40%; - word-break: keep-all; - margin: 0 20px 0 5px; -} - -.pi-comment-count { - width: 40px; - border-radius: 4px; - background: rgb(204, 204, 204); - text-align: center; - height: 30px; - line-height: 30px; - vertical-align: middle; - font-weight: bold; - color: #fff; - font-size: 14px; - box-shadow: 0 5px 1px #eeeeee; -} -a.pi-comment-count:hover { - background: #0088cc; - box-shadow: 0 5px 1px rgb(217, 236, 238); - text-decoration: none; - color: #fff; -} -.common-article-title { - color: #333333; - font-size: 13px; -} -.pi-comment-article { - margin-bottom: 20px; -} -.pi-comment-article .media { - border-bottom: 1px solid #eee; -} -.pi-comment-article .media-body { - margin-bottom: 20px; -} -.pi-comment-article .media:last-child { - border: 0; -} -.pi-comment-tab { - margin-top: 10px; - font-size: 13px; -} -.pi-comment-tab a { - color: #0088cc; -} -.pi-comment-portal ul { - margin: 10px; - font-size: 13px; -} -.pi-comment-portal li { - padding: 2px 0 3px 5px; -} - - -/* Liaowei */ - -/* Comments list */ -.comments-panel { - border: 1px solid #ddd; - border-radius: 4px; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); - padding: 0 15px 20px; - margin-bottom: 20px; -} - -.comments-header { - border-bottom: 1px solid #ddd; - margin-bottom: 15px; -} - -.comment-item { - margin-top: 20px; -} - -.comment-operation a { - margin-right: 5px; -} - -.comment-btn-all { - margin-top: 20px; -} \ No newline at end of file diff --git a/usr/module/comment/config/block.php b/usr/module/comment/config/block.php deleted file mode 100644 index c21d2bf228..0000000000 --- a/usr/module/comment/config/block.php +++ /dev/null @@ -1,113 +0,0 @@ - array( - 'title' => _a('Recent comments'), - 'description' => _a('Recent active comment posts.'), - 'render' => array('block', 'post'), - 'template' => 'post-list', - 'config' => array( - // Display limit - 'limit' => array( - 'title' => _a('Post count'), - 'description' => _a('Number of posts to display.'), - 'edit' => 'text', - 'filter' => 'int', - 'value' => 10, - ), - // Module - /* 'module' => array( - 'title' => _a('Module'), - 'description' => _a('Select module for articles.'), - 'edit' => 'module_select', - 'value' => '' - ), */ - ), - ), - - // Commented articles - 'article' => array( - 'title' => _a('Commented articles'), - 'description' => _a('Articles being commented.'), - 'render' => array('block', 'article'), - 'template' => 'article-list', - 'config' => array( - // Display limit - 'limit' => array( - 'title' => _a('Article count'), - 'description' => _a('Number of articles to display.'), - 'edit' => 'text', - 'filter' => 'int', - 'value' => 10, - ), - // Module - /* 'module' => array( - 'title' => _a('Module'), - 'description' => _a('Select module for articles.'), - 'edit' => 'module_select', - 'value' => '' - ), */ - // Order - /* 'order' => array( - 'title' => _a('Sort order'), - 'description' => _a('Criteria to select articles.'), - 'edit' => array( - 'type' => 'select', - 'options' => array( - 'options' => array( - 'host' => _a('Most commented'), - 'recent' => _a('Last commented'), - 'publish_time' => _a('Last published'), - ), - ), - ), - 'value' => 'recent' - ), */ - ), - ), - - // Top posters - 'user' => array( - 'title' => _a('Top posters'), - 'description' => _a('Users with most posts'), - 'render' => array('block', 'user'), - 'template' => 'user-list', - 'config' => array( - // Display limit - 'limit' => array( - 'title' => _a('User count'), - 'description' => _a('Number of users to display.'), - 'edit' => 'text', - 'filter' => 'int', - 'value' => 10, - ), - // Uid exception - /* 'uid_exception' => array( - 'title' => _a('Excluded user ids'), - 'description' => _a('Users to exclude, separated by ",".'), - 'edit' => 'text', - 'value' => '1,2', - ), */ - // Role exception - /* 'role_exception' => array( - 'title' => _a('Excluded roles'), - 'description' => _a('Roles to exclude.'), - 'edit' => array( - 'type' => 'role_select', - 'options' => array( - 'is_multi' => true, - ), - ), - 'value' => array('webmaster') - ), */ - ), - ), -); diff --git a/usr/module/comment/config/comment.php b/usr/module/comment/config/comment.php deleted file mode 100644 index c780b3583b..0000000000 --- a/usr/module/comment/config/comment.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -return array( - 'article' => array( - 'title' => _a('Article comments'), - 'icon' => 'icon-post', - 'callback' => 'Module\Comment\Api\Article', - 'locator' => array( - 'controller' => 'demo', - 'action' => 'index', - 'identifier' => 'id', - 'params' => array( - 'enable' => 'yes', - ), - ), - ), - 'custom' => array( - 'title' => _a('Custom comments'), - 'icon' => 'icon-post', - 'callback' => 'Module\Comment\Api\Custom', - 'locator' => 'Module\Comment\Api\Custom', - ), -); diff --git a/usr/module/comment/config/config.php b/usr/module/comment/config/config.php deleted file mode 100644 index bc5584ce75..0000000000 --- a/usr/module/comment/config/config.php +++ /dev/null @@ -1,91 +0,0 @@ - array( - 'title' => _t('Leading page comment limit'), - 'description' => _t('Number of comments on leading page.'), - 'value' => 5, - 'filter' => 'int', - ), - - 'list_limit' => array( - 'title' => _t('List page comment limit'), - 'description' => _t('Number of comments on list page.'), - 'value' => 20, - 'filter' => 'int', - ), - - 'display_operation' => array( - 'title' => _t('Display operation'), - 'description' => _t('Level of operations on post list pages.'), - 'value' => 'author', - 'edit' => array( - 'type' => 'select', - 'options' => array( - 'value_options' => array( - '' => _t('Disable'), - 'member' => _t('For members'), - 'author' => _t('For authors'), - 'admin' => _t('For administrators'), - ), - ), - ), - ), - - 'auto_approve' => array( - 'title' => _t('Auto approve submission'), - 'edit' => 'checkbox', - 'value' => 1, - 'filter' => 'int', - ), - - 'markup_format' => array( - 'title' => _t('Content format'), - 'edit' => array( - 'type' => 'select', - 'options' => array( - 'value_options' => array( - 'text' => _t('Plain text'), - 'markdown' => _t('Markdown'), - 'html' => _t('HTML'), - //'js' => _t('JavaScript/HTML'), - //'custom' => _t('Custom (must be defined in `Custom\Comment\Api\Markup\`)') - ), - ), - ), - 'value' => 'text', - ), - - 'markup_filters' => array( - 'title' => _t('Options for text format'), - 'edit' => array( - 'type' => 'multi_checkbox', - 'options' => array( - 'value_options' => array( - 'tag' => _t('Enable tag link'), - 'user' => _t('Enable username link'), - 'linkify' => _t('Enable URL link'), - ), - ), - ), - 'filter' => 'array', - ), - - /* - 'user_domain' => array( - 'title' => _t('User domain'), - 'description' => _t('URL that add the timeline to user system'), - 'value' => '', - 'filter' => 'string', - ), - */ -); - -return $config; \ No newline at end of file diff --git a/usr/module/comment/config/event.php b/usr/module/comment/config/event.php deleted file mode 100644 index 0da40cdedc..0000000000 --- a/usr/module/comment/config/event.php +++ /dev/null @@ -1,68 +0,0 @@ - - */ -return array( - // Event list - 'event' => array( - // event name (unique) - 'post_submit' => array( - // title - 'title' => __('Post submitted'), - ), - 'post_publish' => array( - 'title' => __('Post published'), - ), - 'post_update' => array( - 'title' => __('Post updated'), - ), - 'post_enable' => array( - 'title' => __('Post enabled'), - ), - 'post_disable' => array( - 'title' => __('Post disabled'), - ), - 'post_delete' => array( - 'title' => __('Post deleted'), - ), - ), - // Listener list - 'listener' => array( - array( - // event info: module, event name - 'event' => array('comment', 'post_submit'), - // listener callback: class, method - 'callback' => array('event', 'postsubmit'), - ), - array( - 'event' => array('comment', 'post_publish'), - 'callback' => array('event', 'postpublish'), - ), - array( - 'event' => array('comment', 'post_enable'), - 'callback' => array('event', 'postenable'), - ), - array( - 'event' => array('comment', 'post_update'), - 'callback' => array('event', 'postupdate'), - ), - array( - 'event' => array('comment', 'post_disable'), - 'callback' => array('event', 'postdisable'), - ), - array( - 'event' => array('comment', 'post_delete'), - 'callback' => array('event', 'postdelete'), - ), - ), -); diff --git a/usr/module/comment/config/module.php b/usr/module/comment/config/module.php deleted file mode 100644 index 90579ca55f..0000000000 --- a/usr/module/comment/config/module.php +++ /dev/null @@ -1,51 +0,0 @@ - - */ -return array( - 'meta' => array( - 'title' => _a('Comment'), - 'description' => _a('Comment management and services.'), - 'version' => '1.2.0', - 'license' => 'New BSD', - 'demo' => 'http://demo.pialog.org', - 'icon' => 'fa-comment-o' - ), - // Author information - 'author' => array( - // Author full name, required - 'Dev' => 'Taiwen Jiang; Zongshu Lin', - 'UI/UE' => '@zhangsimon, @loidco', - 'QA' => '@lavenderli', - // Email address, optional - 'Email' => 'taiwenjiang@tsinghua.org.cn', - // Website link, optional - 'Website' => 'http://pialog.org', - ), - - // Resource - 'resource' => array( - // Database meta - 'database' => array( - // SQL schema/data file - 'sqlfile' => 'sql/mysql.sql', - ), - 'config' => 'config.php', - 'user' => 'user.php', - 'block' => 'block.php', - 'navigation' => 'nav.php', - 'route' => 'route.php', - 'comment' => 'comment.php', - 'event' => 'event.php', - ), -); diff --git a/usr/module/comment/config/nav.php b/usr/module/comment/config/nav.php deleted file mode 100644 index e7efb766cb..0000000000 --- a/usr/module/comment/config/nav.php +++ /dev/null @@ -1,147 +0,0 @@ - array( - 'list' => array( - 'route' => 'comment', - 'label' => _a('All comments'), - 'controller' => 'list', - 'action' => 'index', - ), - 'article' => array( - 'route' => 'comment', - 'label' => _a('Commented articles'), - 'controller' => 'list', - 'action' => 'article', - ), - 'my-post' => array( - 'route' => 'comment', - 'label' => _a('My comments'), - 'controller' => 'list', - 'action' => 'user', - 'params' => array( - 'my' => 1, - ), - ), - 'my-received' => array( - 'route' => 'comment', - 'label' => _a('My received'), - 'controller' => 'list', - 'action' => 'received', - 'params' => array( - 'my' => 1, - ), - ), - 'my-article' => array( - 'route' => 'comment', - 'label' => _a('My articles'), - 'controller' => 'list', - 'action' => 'article', - 'params' => array( - 'my' => 1, - ), - ), - ), - 'admin' => array( - 'portal' => array( - 'route' => 'admin', - 'label' => _t('Portal'), - 'controller' => 'index', - 'action' => 'index', - ), - 'list' => array( - 'route' => 'admin', - 'label' => _t('All comments'), - 'controller' => 'list', - 'action' => 'index', - 'params' => array( - 'active' => -1, - ), - - 'pages' => array( - 'all' => array( - 'route' => 'admin', - 'label' => _t('Active posts'), - 'controller' => 'list', - 'action' => 'index', - 'params' => array( - 'active' => -1, - ), - ), - 'active' => array( - 'route' => 'admin', - 'label' => _t('Active posts'), - 'controller' => 'list', - 'action' => 'index', - 'params' => array( - 'active' => 1, - ), - ), - 'inactive' => array( - 'route' => 'admin', - 'label' => _t('Inactive posts'), - 'controller' => 'list', - 'action' => 'index', - 'params' => array( - 'active' => 0, - ), - ), - ), - ), - 'type' => array( - 'route' => 'admin', - 'label' => _t('Types'), - 'controller' => 'type', - 'action' => 'index', - ), - 'module' => array( - 'route' => 'admin', - 'label' => _t('By module'), - 'controller' => 'list', - 'action' => 'module', - ), - 'user' => array( - 'route' => 'admin', - 'label' => _t('By user'), - 'controller' => 'list', - 'action' => 'user', - ), - 'article' => array( - 'route' => 'admin', - 'label' => _t('By article'), - 'controller' => 'list', - 'action' => 'article', - 'params' => array( - 'active' => -1, - ), - - 'pages' => array( - 'all' => array( - 'route' => 'admin', - 'label' => _t('Article with comments'), - 'controller' => 'list', - 'action' => 'article', - 'params' => array( - 'active' => -1, - ), - ), - 'active' => array( - 'route' => 'admin', - 'label' => _t('Article with active comments'), - 'controller' => 'list', - 'action' => 'article', - 'params' => array( - 'active' => 1, - ), - ), - ), - ), - ), -); diff --git a/usr/module/comment/config/route.php b/usr/module/comment/config/route.php deleted file mode 100644 index be7b0b77b1..0000000000 --- a/usr/module/comment/config/route.php +++ /dev/null @@ -1,29 +0,0 @@ - array( - 'name' => 'comment', - 'type' => 'Module\Comment\Route\Comment', - 'options' => array( - 'prefix' => '/comment', - 'defaults' => array( - 'module' => 'comment', - 'controller' => 'index', - 'action' => 'index' - ) - ), - ) -); - diff --git a/usr/module/comment/config/user.php b/usr/module/comment/config/user.php deleted file mode 100644 index d4fd34ceee..0000000000 --- a/usr/module/comment/config/user.php +++ /dev/null @@ -1,32 +0,0 @@ - - */ -return array( - // Activity - 'activity' => array( - 'post' => array( - 'title' => _a('Comment posts by me'), - //'link' => Pi::service('url')->assemble('default', array('module' => 'comment')), - 'icon' => 'fa-comment', - 'callback' => 'Module\Comment\Comment\Post', - ), - 'article' => array( - 'title' => _a('Comment posts on my articles'), - //'link' => Pi::service('url')->assemble('default', array('module' => 'comment')), - 'icon' => 'fa-comment', - 'callback' => 'Module\Comment\Comment\Post', - ), - ), -); diff --git a/usr/module/comment/doc/Changelog.txt b/usr/module/comment/doc/Changelog.txt deleted file mode 100644 index b9b911ac9f..0000000000 --- a/usr/module/comment/doc/Changelog.txt +++ /dev/null @@ -1,6 +0,0 @@ -Change log for `comment` module - -1.1.0 -Dec 28th, 2013 ---------------- -1. Changed `category` to `type` diff --git a/usr/module/comment/doc/README.md b/usr/module/comment/doc/README.md deleted file mode 100644 index 0c306ad543..0000000000 --- a/usr/module/comment/doc/README.md +++ /dev/null @@ -1 +0,0 @@ -See `doc/README-comment.md` diff --git a/usr/module/comment/locale/en/admin.mo b/usr/module/comment/locale/en/admin.mo deleted file mode 100644 index 3fc4b17742676a22aafa82249d70e7541b219817..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 465 zcmaJ-u};G<5G{f!BQt{sHn=!xsg$~6p%hfniU){2eZj+ybBhGQ7|&vQ!>alOA6!h>g?l^(LZl-8j?f5@&N+4R diff --git a/usr/module/comment/locale/en/admin.po b/usr/module/comment/locale/en/admin.po deleted file mode 100644 index 7ae96b9f8a..0000000000 --- a/usr/module/comment/locale/en/admin.po +++ /dev/null @@ -1,461 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-comment\n" -"POT-Creation-Date: 2014-09-19 18:05+0330\n" -"PO-Revision-Date: 2014-09-19 18:05+0330\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.4\n" -"X-Poedit-KeywordsList: _a;_t\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: /var/www/html/local/pi/pi-release-2.5.0/usr/module/" -"comment\n" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/IndexController.php:23 -#, php-format -msgid "Comment portal for %s" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/IndexController.php:26 -msgid "Build comment data for demo articles" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/IndexController.php:33 -msgid "Demo article with comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/IndexController.php:39 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:85 -msgid "All comment posts" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/IndexController.php:46 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:89 -msgid "All active comment posts" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/IndexController.php:54 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:87 -msgid "All inactive comment posts" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/IndexController.php:62 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/block.php:38 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/nav.php:20 -msgid "Commented articles" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/IndexController.php:69 -msgid "Comment posts by user" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/IndexController.php:76 -msgid "Comment posts by module" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/IndexController.php:87 -msgid "Total posts" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/IndexController.php:95 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/nav.php:71 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/nav.php:80 -msgid "Active posts" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/IndexController.php:104 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:217 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:396 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/nav.php:89 -msgid "Inactive posts" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/IndexController.php:277 -#, php-format -msgid "Demo comment %d." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/TypeController.php:22 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:239 -msgid "Comment types" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/TypeController.php:34 -msgid "Active" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/TypeController.php:34 -msgid "Disabled" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/TypeController.php:42 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:58 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/config.php:33 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-module.phtml:34 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-list.phtml:28 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-user.phtml:35 -msgid "Disable" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/TypeController.php:42 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:58 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-module.phtml:29 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-list.phtml:23 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-user.phtml:30 -msgid "Enable" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/TypeController.php:92 -msgid "Type was not found." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/TypeController.php:96 -msgid "Invalid operation." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/TypeController.php:102 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:561 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:224 -msgid "Operation succeeded." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/TypeController.php:105 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:224 -msgid "Operation failed." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:128 -msgid "Comments by username or id" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:167 -msgid "Comment posts of user" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:200 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:377 -msgid "All Posts" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:208 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:386 -msgid "Active Posts" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:334 -#, php-format -msgid "Comment posts of Module %s with type %s" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:340 -#, php-format -msgid "Comment posts of Module %s" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:448 -msgid "Guest" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:487 -msgid "All commented articles" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/ListController.php:489 -msgid "All active commented articles" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:44 -msgid "Edit" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:51 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-module.phtml:38 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-list.phtml:32 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-user.phtml:39 -msgid "Delete" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:67 -msgid "Comment post" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:91 -msgid "Comment post edit" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:175 -msgid "Comment post saved successfully." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:178 -msgid "Comment post not saved." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:182 -msgid "Invalid data, please check and re-submit." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:186 -msgid "Invalid submission." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/user.php:20 -msgid "Comment posts by me" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/user.php:26 -msgid "Comment posts on my articles" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/block.php:13 -msgid "Recent comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/block.php:14 -msgid "Recent active comment posts." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/block.php:20 -msgid "Post count" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/block.php:21 -msgid "Number of posts to display." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/block.php:39 -msgid "Articles being commented." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/block.php:45 -msgid "Article count" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/block.php:46 -msgid "Number of articles to display." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/block.php:79 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-index.phtml:26 -msgid "Top posters" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/block.php:80 -msgid "Users with most posts" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/block.php:86 -msgid "User count" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/block.php:87 -msgid "Number of users to display." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/module.php:17 -msgid "Comment" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/module.php:18 -msgid "Comment management and services." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/comment.php:18 -msgid "Article comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/comment.php:31 -msgid "Custom comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/nav.php:14 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/nav.php:61 -msgid "All comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/nav.php:26 -msgid "My comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/nav.php:35 -msgid "My received" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/nav.php:44 -msgid "My articles" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/nav.php:55 -msgid "Portal" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/nav.php:100 -msgid "Types" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/nav.php:106 -msgid "By module" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/nav.php:112 -msgid "By user" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/nav.php:118 -msgid "By article" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/nav.php:128 -msgid "Article with comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/nav.php:137 -msgid "Article with active comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/config.php:12 -msgid "Leading page comment limit" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/config.php:13 -msgid "Number of comments on leading page." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/config.php:19 -msgid "List page comment limit" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/config.php:20 -msgid "Number of comments on list page." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/config.php:26 -msgid "Display operation" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/config.php:27 -msgid "Level of operations on post list pages." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/config.php:34 -msgid "For members" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/config.php:35 -msgid "For authors" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/config.php:36 -msgid "For administrators" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/config.php:43 -msgid "Auto approve submission" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-index.phtml:5 -msgid "Comment stats" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-index.phtml:10 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-index.phtml:53 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-module-select.phtml:3 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-type.phtml:6 -msgid "Title" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-index.phtml:11 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-index.phtml:54 -msgid "Amounts" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-index.phtml:30 -msgid "Submitters" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-index.phtml:31 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-index.phtml:95 -msgid "Comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-index.phtml:50 -msgid "Active comment posts by module" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-index.phtml:77 -msgid "Links" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-index.phtml:90 -msgid "Most commented" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-index.phtml:94 -msgid "Article title" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-module-select.phtml:4 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-type.phtml:8 -msgid "Action" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-module-select.phtml:11 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-module-select.phtml:20 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-type.phtml:14 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-type.phtml:30 -msgid "View comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-module.phtml:99 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-list.phtml:93 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-user.phtml:100 -msgid "Pending" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-module.phtml:113 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-list.phtml:107 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-user.phtml:114 -msgid "No comments available yet." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-module.phtml:193 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-list.phtml:187 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-user.phtml:194 -msgid "Are you sure delete these comments?" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-module.phtml:239 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-list.phtml:233 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-user.phtml:240 -msgid "Are you sure delete this article?" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-user-select.phtml:2 -msgid "Filter comments by a specific user." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-user-select.phtml:5 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-user.phtml:18 -msgid "Type user id or identity" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-user-select.phtml:6 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-user.phtml:19 -msgid "Submit" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-type.phtml:7 -msgid "Enable type" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-type.phtml:23 -msgid "No" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-type.phtml:26 -msgid "Yes" -msgstr "" diff --git a/usr/module/comment/locale/en/block.mo b/usr/module/comment/locale/en/block.mo deleted file mode 100644 index 7e3d04e433f7f0c56c5b8f051b7fe01c094651b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 462 zcmaJ-u};G<5G{f!BQt{sHn`YnsgxSAPztJOMFat{AvZZ1qr|Qpx1s+5zsI+5Q3YY* z$xqhZd*^%d*WtlukFZBPA|4a>iKoOCG4X@M5#6ol7m2fPn0c7y@Pw|`)<~9U$ZS=i z@j-Hz!q}nmB*2yOC|O@bXCOupjaU>*F+352fgmH?<3_g+{Og;k+C%D;sY~UplPs7i zvs|ksLW-*TQ%i;>m`~@EE?5+bU~G-2WRPxG6vpGb=c`g_bI!6txf=b&V|op7=WBPp zqJxRaY_82xvUs6=@C-L-(CtDb7IW=c6b{2PQg$WW;WD94+o;f1eCUfN8Re5L7t!xCv8`m{~(b?ta%^L2^*=hJ)N9*2ds diff --git a/usr/module/comment/locale/en/block.po b/usr/module/comment/locale/en/block.po deleted file mode 100644 index 7e4b888fd7..0000000000 --- a/usr/module/comment/locale/en/block.po +++ /dev/null @@ -1,37 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-comment\n" -"POT-Creation-Date: 2014-09-19 18:05+0330\n" -"PO-Revision-Date: 2014-09-19 18:05+0330\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.4\n" -"X-Poedit-KeywordsList: _b\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: /var/www/html/local/pi/pi-release-2.5.0/usr/module/" -"comment\n" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/block/post-list.phtml:20 -msgid "On " -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/block/post-list.phtml:33 -msgid "No comments available yet." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/block/article-list.phtml:5 -msgid "Article title" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/block/article-list.phtml:6 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/block/user-list.phtml:6 -msgid "Comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/block/user-list.phtml:5 -msgid "Submitters" -msgstr "" diff --git a/usr/module/comment/locale/en/default.mo b/usr/module/comment/locale/en/default.mo deleted file mode 100644 index 121a723aaceb0e59c645509bce7827fc7abf7ecb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 465 zcmaJ-%TB{E5G;aIj+{C8zzsG|`as1M7fL}Dt%x8XZk0)v#wf8X+imEFApVYTVWSGd ziIGRv?#y~e{yIGP=n(dZN5o^|KJk>;U`YHV@tp3)^NYlqH_SXtb9h4Ql+l7E3Nlkw zsC|&!r7*TAJqd6nJqp&1;y%O?L@|rc#2`M2dcBB@aE}|+Jn*k?CY^`WO6^MNjTJ1I zNxfXlB|?g_`cn&rI+#!AlQvi!M#0!g+LRyFZ;xWC3Ve4yl zy`qJQ&P=ZKQn2BR^1(CQphmk3kr>RCXK^?P`=snjxW#R4Z0=^tdBGNo(E?lXQaW5o zUkDbq%?Fe=D-vo$BpBaF%j>%4g|A9pnoO2_rRadg5@{Z~v@qgpXL)7vb&34v-#g!h CT!xSU diff --git a/usr/module/comment/locale/en/default.po b/usr/module/comment/locale/en/default.po deleted file mode 100644 index 1647bdff74..0000000000 --- a/usr/module/comment/locale/en/default.po +++ /dev/null @@ -1,459 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-comment\n" -"POT-Creation-Date: 2014-10-01 16:51+0330\n" -"PO-Revision-Date: 2014-10-01 16:51+0330\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.4\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: /var/www/html/local/pi/pi-release-2.5.0/usr/module/" -"comment\n" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Article.php:40 -#, php-format -msgid "Demo article %d" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Search.php:66 -#, php-format -msgid "Comment by %s" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Api.php:503 -msgid "View profile" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Api.php:528 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:398 -msgid "Guest" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Api.php:570 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:518 -msgid "Edit" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Api.php:571 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Api.php:627 -msgid "Enable" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Api.php:572 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:525 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-root.phtml:65 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-lead.phtml:36 -msgid "Delete" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Api.php:573 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:532 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-reply.phtml:80 -msgid "Reply" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Api.php:624 -msgid "Disable" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Custom.php:41 -#, php-format -msgid "Custom article %d" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Form/PostForm.php:82 -msgid "Comment" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Form/PostForm.php:88 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/_post-form.phtml:24 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/_post-form.phtml:28 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-reply.phtml:78 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-edit.phtml:46 -msgid "Type your content" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Form/PostForm.php:98 -msgid "Submit" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/IndexController.php:23 -#, php-format -msgid "Comment portal for %s" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/IndexController.php:35 -msgid "Demo article with comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/IndexController.php:49 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:71 -msgid "All active comment posts" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/IndexController.php:63 -msgid "Commented articles" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/IndexController.php:70 -msgid "Comment posts for module \"Comment\"" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/IndexController.php:76 -msgid "Comment posts for module \"Comment\" with type \"Article\"" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/IndexController.php:84 -#, php-format -msgid "Comment posts by %s" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/IndexController.php:94 -msgid "Comment posts by me" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/IndexController.php:100 -msgid "Commented articles by me" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/CustomController.php:36 -#, php-format -msgid "Demo custom article #%d" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:67 -msgid "All comment posts" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:69 -msgid "All inactive comment posts" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:128 -msgid "Comment posts of article" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:193 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:200 -msgid "My comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:208 -msgid "My active comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:217 -msgid "My pending comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:233 -msgid "Comment posts of user" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:304 -msgid "All" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:329 -msgid "Comment posts of module" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:445 -msgid "All commented articles" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:447 -msgid "Articles with comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:461 -msgid "My articles" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:469 -msgid "My articles with active comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:550 -msgid "Received comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:557 -msgid "All Posts" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:565 -msgid "Active Posts" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:574 -msgid "Inactive Posts" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:590 -msgid "Comment posts on user" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:50 -msgid "Permanent link" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:109 -msgid "Comment post not found." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:112 -msgid "Comment post" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:139 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:192 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:331 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:301 -msgid "Invalid post parameter." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:145 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:196 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:290 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:336 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:395 -msgid "Operation denied." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:157 -msgid "Comment post edit" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:209 -msgid "Comment post reply" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:293 -msgid "Invalid submission." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:310 -msgid "Root not found." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:313 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/_post-form.phtml:3 -msgid "Comment is disabled." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:345 -msgid "Comment post saved successfully." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:348 -msgid "Comment post not saved." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:353 -msgid "Invalid data, please check and re-submit." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:403 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:462 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:305 -msgid "Operation succeeded." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:403 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:462 -msgid "Operation failed" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:453 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:508 -msgid "Invalid parameters." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:458 -msgid "Forbidden." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:514 -msgid "Login" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:539 -msgid "Enable/Disable" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/DemoController.php:36 -#, php-format -msgid "Demo article #%d" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:305 -msgid "Operation failed." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/event.php:21 -msgid "Post submitted" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/event.php:24 -msgid "Post published" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/event.php:27 -msgid "Post updated" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/event.php:30 -msgid "Post enabled" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/event.php:33 -msgid "Post disabled" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/event.php:36 -msgid "Post deleted" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-my-received.phtml:47 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-module.phtml:39 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-user-received.phtml:37 -msgid "commented on " -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-my-received.phtml:53 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-my-post.phtml:50 -msgid "Pending" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-my-received.phtml:64 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-module.phtml:53 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-view.phtml:55 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-list.phtml:50 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-user.phtml:46 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-root.phtml:64 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-my-post.phtml:61 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-user-received.phtml:51 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-lead.phtml:35 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-module.phtml:85 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-list.phtml:79 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-user.phtml:86 -msgid "Are you sure to delete this comment?" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-my-received.phtml:82 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-module.phtml:71 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-list.phtml:68 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-user.phtml:64 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-my-post.phtml:79 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-user-received.phtml:69 -msgid "No comments available yet." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/_post-form.phtml:37 -msgid "Post comment" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/_post-form.phtml:43 -#, php-format -msgid "Please login to leave comments." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-module.phtml:19 -#, php-format -msgid "Comments for %s module" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-view.phtml:17 -msgid "Comment detail" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-view.phtml:33 -msgid "In reply to:" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-view.phtml:34 -msgid "Click to open" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-view.phtml:35 -#, php-format -msgid "Comment #%d" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-view.phtml:42 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-reply.phtml:68 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-edit.phtml:39 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-list.phtml:37 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-user.phtml:32 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-my-post.phtml:44 -msgid "Commented on " -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-view.phtml:66 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-reply.phtml:92 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-edit.phtml:63 -msgid "No content." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-reply.phtml:50 -#, php-format -msgid "Comment reply to %s" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-edit.phtml:21 -msgid "Comment edit" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-edit.phtml:49 -msgid "Cancel" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-edit.phtml:50 -msgid "Save" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-article.phtml:34 -#, php-format -msgid "%s comments" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-article.phtml:49 -msgid "Last commented: " -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-article.phtml:54 -#, php-format -msgid " at %s" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-article.phtml:69 -msgid "No data available yet." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-list.phtml:19 -msgid "All active comments " -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-root.phtml:20 -msgid "Item not found." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-root.phtml:34 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-lead.phtml:3 -msgid "All comments " -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-root.phtml:75 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-lead.phtml:49 -msgid "No one has commented yet." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-lead.phtml:45 -msgid "View all comments" -msgstr "" diff --git a/usr/module/comment/locale/fa/admin.mo b/usr/module/comment/locale/fa/admin.mo deleted file mode 100644 index 238c5fd589aa03f2deae307d114fb2b03a9b34a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7972 zcmbuCdyE}b9mkJ?Vyhw+#J3(m5U_W5+ltmj9xZKYrH`d-(TZ57_s(`Ndmrnaxw~Bx zqlLbRjX@HFkr<;W+cuV^v{0%^F=#^KBccgm?lx$m{-ZHQgZv>e!O!>1nYnX!+xmx- zJ@+%`{d=9?nf?8u^S^0$#whQj#OE2KhF`srA0E5F7`7*$Z9;FM?~~Tj5sE9Z+(%;XB}i z@ZInrd?$PsehAJ&{>*Fqu(VnD=5(J+Jl_W`?H__#XEl^ucR|TJ3bo#spoI^@i{UZf z{v6c2KS1g63j8p%IUb-z>Za{sn5@#Wcz;S3&792xW&YQ1ibGWykxVW~jOQ=m>uG-x zYQ0&gIC}+3-b+x*!sYP2aI0q<$`0Rv((e(deV>N1*Yi;EkU-hzPrm+FC_lXd`7?_! zvidKF8h;Ix9v_90chGYURGe>y(tiwU+*hFH?SYDe2Oy?0k3x=?ISwCs9dbcjX@)SO z>~c5MIwNo~{1TM@(@^K;SzqtKtEm4AO5gV~Np>kg)o+KF!7_Amz-`nYfOo@xK>o}| zj3oKCL)CXeo!0|U_BibM9K4+RpW*fJ0w!tRE&Ry7TRp!BWw-m`mGA*5xt@ZOYu2~_ z4PHxq5lRih8=&etq4a&k^Azl--hns51#C6|*TQ9R3ToXWp3gwZ{aYx#{|=YJe?#fF z7-vbIo1x^aKt-loZ!8K6w zwjrvT<527W!t;+%^1TXmuHJys^4CJR6)uKaf3N2cq1OF5)VeQ2#nV!P|KspxD7kh* z?Y9d`{)arLA)=ZSP0+c-GVJyjcx#ucKml=W5 z=RPPqeH|jAc^GQmQ;@C93sB?!2~pkr$JZ}qkmC6=sCjGQCtw-kdh;EqdB>sVJp(0I z2TI=yaDw!DKjc`M&rvv9=2prmC3|k?nV~`GAcedP(DRjK^df!DfdwHj8S$_uBOOmdak9&pIa!aDcPe~ zQC^Ub?x1{{qDL{fm2w?Lc~fUZk8HM%BHss;>`^T0Sx=Gw^~ipor+k#6v%86+=d&qX zKDE4m!PjN?3T22Q-!7;0Q%FhXCW;=#g5pz;@}eH)&*Fm%%_`p@-+$7->pW$TVouLm z$}-9olo1Ny@ z&N8MNW#VaslQR=h%VrJilGoyDEX(-5$!a`0#}?g*uG8z6w_@M0+Srk86IS}nigw(z z!T5NqiAAIK_Ifpn`1ePhINK#R$V!jy&GP=<9KUFVawc-IyR%N z2aRAy=zJYCDwZJ=)p8j1tvIN;ZLW+8tx?=lv0fQrd=A zW%h|i+O^tL?|?Mk!k$UR7%VR4+KY<$h;5G84K8Bs9HApy?6S@w@zi*D#&Ks_xMAzL zeY^IE;()NrB-4U#JsevPFljrAoAu1+ky+)U8FXEq zYEe!-s}Xehn!OV1uc}7Dc0$y%qL=YnFlC$LVJmQ{V70ury5WYUuv<2-x3y|x%s1OO z*wI@@$*fO?aw@n9YpS(4Y-J)i9RnMUhvn)>wd}&M &pi-|ks!@y#%~q5)wd2w3 zy&l%LhqT|?4hgok!yDF{b=k2`6VSTGL{O_%+(B4u$7^Ar6FwT2$EzGWH;(+vCIP(SyhNx%rO6Y`hsWaca(VE%arbnd;^arPSDiSdGlEOX9=L zapzIj(p26{18rCtLV9sP(__kB)p*Ldj>#ahN_Hb$KIo>l$ZXN*vaTcd8l{J{E`ifE z@2rNCxi`&LrVO>3_k`uRw60RR6A7@zpdG4~ywnSaHVv0h3K2?>Z@t|`|KY69vxSm58w4yM+VaxEE((>*&?KKj%N~;^? zrd&E`mv67e3qMo3HEbvqNr<7Qt`fVX@8f;T=t--k+rp{IW~&nEU=7-B!S&lT&3CTk z+>ZzG=%DTEHr^2it@7v)&82}s+dmPs`X?tR`$yw?t-sbR2etn3Du1OG36=S!rG3}+ z4fMC8R)2bB_GflC$;r;1&hFVm$_jdrlu<^XblB zn|9JOV`mScth$oNI{WF|=UQbF#&u=2GPg~RB#(D?Y0h2^OTPR6u8-!a!OpyTVSk+G zhMMFsK_KO3Lgna(~h zhzyZUPdjY#c=DJQQ2gyx+c}21^Mr9ayE^wW2fKDB7p6KJyPdEfs$@GIM!jRn2|}Z@ z*YA=JP1nuSLf0fxeVRabi*@aJwhdExP`<)t4TEJLNo zh=mlAhgyCvdq#G}nxk-TZoebxAWgaRKMKyeMsBp?mRMJQ$-V^BXd_`1GDmTEZ_uB4 zbTRlaqPw(Yv4dEU*wn?6HKT>T5$OC8zk6JUGqW?wb{L#6^R7rgMqH-k9GcWPns%5Z zjRuw%gl4&!;=gL0!o6P9Vvf>$#gPh%0mA?Vt^eFcI3JSp2AS?sg;#e_k!}W6TrSDK z&ZNFRG}6twljqJLll(|V;vy;x>gd4a7f5=au+7|rn0~A>S-y3jxbAb+xEMa^rloAmS7{(10gbuO51Y+=xd>@IbR)-iM6jYJYhz7)loQsVEh7eV@m#efR6y(kFtr1a5&UxB}jQBKE;m zZ~!iY6L1rJ2N%E;IN&$29aCS!We3xPibPa3exm@`GjOmsrWCK`9JYZu{l34%?59cWBh+IuqvZv-(4}y6_ceZ41rT(nvLB+6w7vLmKA=dn8h!=a;A{(UgV;?uuK6 zGB4RMojFg6pVVL!0>_^?F=;{eItTn^%%l*R1~BT2==0hsXKIXfC)o8o{Wn_$X|`x@LT`@ diff --git a/usr/module/comment/locale/fa/block.po b/usr/module/comment/locale/fa/block.po deleted file mode 100644 index c4bacd2d41..0000000000 --- a/usr/module/comment/locale/fa/block.po +++ /dev/null @@ -1,370 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-comment\n" -"POT-Creation-Date: 2015-02-20 12:17+0330\n" -"PO-Revision-Date: 2015-02-20 12:17+0330\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: fa\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.7.3\n" -"X-Poedit-KeywordsList: _b\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: /var/www/html/local/pi/pi-release-2.5.0/usr/module/" -"comment\n" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/block/article-list.phtml:5 -msgid "Article title" -msgstr "عنوان مطلب" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/block/article-list.phtml:6 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/block/user-list.phtml:6 -msgid "Comments" -msgstr "نظرات" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/block/post-list.phtml:20 -msgid "On " -msgstr "در" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/block/post-list.phtml:33 -msgid "No comments available yet." -msgstr "هنوز هیچ نظری در دسترس نیست" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/block/user-list.phtml:5 -msgid "Submitters" -msgstr "ارسال کنندگان" - -#~ msgid "Commented on " -#~ msgstr "ارسال شده در" - -#~ msgid "Comment portal for %s" -#~ msgstr "پورتال نظرات برای %s" - -#~ msgid "Build comment data for demo articles" -#~ msgstr "ساخت اطلاعات نظر برای مقالات دمو" - -#~ msgid "Demo article with comments" -#~ msgstr "مقاله دمو با نظر" - -#~ msgid "All comment posts" -#~ msgstr "همه نظرات" - -#~ msgid "All active comment posts" -#~ msgstr "همه نظرات فعال" - -#~ msgid "All inactive comment posts" -#~ msgstr "همه نظرات غیر فعال" - -#~ msgid "Commented articles" -#~ msgstr "مطالب دارای نظر" - -#~ msgid "Comment posts by user" -#~ msgstr "نظرات با کاربر" - -#~ msgid "Comment posts by module" -#~ msgstr "نظرات با ماژول" - -#~ msgid "Total posts" -#~ msgstr "مجموع ارسال ها" - -#~ msgid "Active posts" -#~ msgstr "ارسال های فعال" - -#~ msgid "Inactive posts" -#~ msgstr "ارسال های غیر فعال" - -#~ msgid "Demo comment %d." -#~ msgstr "نظر نمایشی %d" - -#~ msgid "Comments by username or id" -#~ msgstr "نظرات با نام کاربری یا آی دی" - -#~ msgid "Comment posts of user" -#~ msgstr "نظرات ارسال شده توسط کاربر" - -#~ msgid "All Posts" -#~ msgstr "همه ارسال ها" - -#~ msgid "Active Posts" -#~ msgstr "نظرات فعال" - -#~ msgid "Comment types" -#~ msgstr "انواع نظر" - -#~ msgid "Comment posts of Module %s with type %s" -#~ msgstr "نظرات ارسال شده در ماژول %s با نوع %s" - -#~ msgid "Comment posts of Module %s" -#~ msgstr "نظرات اراسل شده در ماژول %s" - -#~ msgid "Guest" -#~ msgstr "مهمان" - -#~ msgid "All commented articles" -#~ msgstr "همه مطالب دارای نظر" - -#~ msgid "All active commented articles" -#~ msgstr "همه مطالب با نظر فعال" - -#~ msgid "Operation succeeded." -#~ msgstr "با موفقیت انجام شد" - -#~ msgid "Active" -#~ msgstr "فعال" - -#~ msgid "Disabled" -#~ msgstr "غیر فعال" - -#~ msgid "Disable" -#~ msgstr "غیرفعال" - -#~ msgid "Enable" -#~ msgstr "فعال" - -#~ msgid "Type was not found." -#~ msgstr "نوع یافت نشد" - -#~ msgid "Invalid operation." -#~ msgstr "عملکرد غیر معتبر" - -#~ msgid "Operation failed." -#~ msgstr "عملکرد موفق نبود" - -#~ msgid "Edit" -#~ msgstr "ویرایش" - -#~ msgid "Delete" -#~ msgstr "حذف" - -#~ msgid "Comment post edit" -#~ msgstr "ویرایش نظر ارسال شده" - -#~ msgid "Comment post saved successfully." -#~ msgstr "نظر ارسال شده با موفقیت ذخیره شد" - -#~ msgid "Comment post not saved." -#~ msgstr "نظر ارسال شده ذخیره نشد" - -#~ msgid "Invalid data, please check and re-submit." -#~ msgstr "اطلاعات اشتباه، لطفا بررسی کنید و دوباره بفرستید" - -#~ msgid "Invalid submission." -#~ msgstr "ارسال های اشتباه" - -#~ msgid "Recent comments" -#~ msgstr "جدیدترین نظرات" - -#~ msgid "Recent active comment posts." -#~ msgstr "آخرین نظرات فعال" - -#~ msgid "Post count" -#~ msgstr "تعداد ارسال ها" - -#~ msgid "Number of posts to display." -#~ msgstr "تعداد ارسال ها برای نمایش" - -#~ msgid "Module" -#~ msgstr "ماژول" - -#~ msgid "Select module for articles." -#~ msgstr "انتخاب ماژول برای مطالب" - -#~ msgid "Articles being commented." -#~ msgstr "مقالات شامل نظر" - -#~ msgid "Article count" -#~ msgstr "تعداد مطالب" - -#~ msgid "Number of articles to display." -#~ msgstr "تعداد مطالب برای نمایش" - -#~ msgid "Sort order" -#~ msgstr "مرتب سازی بر اساس" - -#~ msgid "Criteria to select articles." -#~ msgstr "معیار برای انتخاب نظرات" - -#~ msgid "Most commented" -#~ msgstr "بیشترین نظر" - -#~ msgid "Last commented" -#~ msgstr "آخرین نظر" - -#~ msgid "Last published" -#~ msgstr "آخرین نظرات منتشر شده" - -#~ msgid "Top posters" -#~ msgstr "برترین ارسال کنندگان" - -#~ msgid "Users with most posts" -#~ msgstr "کاربران با بیشترین ارسال" - -#~ msgid "User count" -#~ msgstr "تعداد کاربران" - -#~ msgid "Number of users to display." -#~ msgstr "تعداد کاربران برای نمایش" - -#~ msgid "Excluded user ids" -#~ msgstr "رد کردن بر اساس شناسه کاربر" - -#~ msgid "Users to exclude, separated by \",\"." -#~ msgstr "کاربرانی که نظراتشان رد می شود. با استفاده از \",\". جدا کنید" - -#~ msgid "Excluded roles" -#~ msgstr "رد کردن بر اساس نقش" - -#~ msgid "Roles to exclude." -#~ msgstr "نقش های که نظراتشان رد می شود" - -#~ msgid "Comment" -#~ msgstr "نظر" - -#~ msgid "Comment management and services." -#~ msgstr "مدیریت و سرویس نظرات" - -#~ msgid "Leading page comment limit" -#~ msgstr "تعداد نظرات در صفحه پیشرو" - -#~ msgid "Number of comments on leading page." -#~ msgstr "تعداد نظرات در صفحه پیشرو در زیر مطلب" - -#~ msgid "List page comment limit" -#~ msgstr "محدیدت نظرات در صفحه فهرست نظر" - -#~ msgid "Number of comments on list page." -#~ msgstr "تعداد نظرات در صفحه فهرست" - -#~ msgid "Display operation" -#~ msgstr "عملکرد غیر فعال" - -#~ msgid "Level of operations on post list pages." -#~ msgstr "سطح عملکرد در صفحات فهرست ارسال ها" - -#~ msgid "For members" -#~ msgstr "برای کاربران" - -#~ msgid "For authors" -#~ msgstr "برای فرستنده" - -#~ msgid "For administrators" -#~ msgstr "برای مدیران" - -#~ msgid "Auto approve submission" -#~ msgstr "تایید خودکار نظرات" - -#~ msgid "All comments" -#~ msgstr "همه نظرات" - -#~ msgid "My comments" -#~ msgstr "نظرات من" - -#~ msgid "My received" -#~ msgstr "دریافت های من" - -#~ msgid "My articles" -#~ msgstr "مطالب من" - -#~ msgid "Portal" -#~ msgstr "پورتال" - -#~ msgid "Types" -#~ msgstr "انواع" - -#~ msgid "By module" -#~ msgstr "براساس ماژول" - -#~ msgid "By user" -#~ msgstr "براساس کاربر" - -#~ msgid "By article" -#~ msgstr "براساس مطلب" - -#~ msgid "Article with comments" -#~ msgstr "مطلب شامل نظرات" - -#~ msgid "Article with active comments" -#~ msgstr "مطلب با نظر فعال" - -#~ msgid "Article comments" -#~ msgstr "نظرات مطلب" - -#~ msgid "Custom comments" -#~ msgstr "نظرات شخصی سازی شده" - -#~ msgid "Comment posts by me" -#~ msgstr "نظرات اراسل شده توسط من" - -#~ msgid "Comment posts on my articles" -#~ msgstr "نظرات ارسال شده برای مطلب من" - -#~ msgid "Title" -#~ msgstr "عنوان" - -#~ msgid "Enable type" -#~ msgstr "انواع فعال" - -#~ msgid "Action" -#~ msgstr "عملکرد" - -#~ msgid "View comments" -#~ msgstr "نمایش نظرات" - -#~ msgid "No" -#~ msgstr "خیر" - -#~ msgid "Yes" -#~ msgstr "بله" - -#~ msgid "Filter comments by a specific user." -#~ msgstr "فیلتر کردن نظرات بر اساس کاربر خاص" - -#~ msgid "Type user id or identity" -#~ msgstr "آی دی یا نام کاربری را وارد کنید" - -#~ msgid "Submit" -#~ msgstr "ارسال" - -#~ msgid "Pending" -#~ msgstr "در انتظار تایید" - -#~ msgid "Are you sure delete these comments?" -#~ msgstr "آیا اطمینان دارید که میخواهید این نظرات را حذف کنید؟" - -#~ msgid "Are you sure delete this article?" -#~ msgstr "آیا اطمینان دارید که میخواهید این مطلب را حذف کنید؟" - -#~ msgid "Comment stats" -#~ msgstr "وضعیت نظر" - -#~ msgid "Amounts" -#~ msgstr "مقدار" - -#~ msgid "Active comment posts by module" -#~ msgstr "نظرات فعال بر اساس ماژول" - -#~ msgid "Links" -#~ msgstr "لینک ها" - -#~ msgid "Inactive Posts" -#~ msgstr "نظرات غیر فعال" - -#~ msgid "Operation failed" -#~ msgstr "عملکرد موفق نبود" - -#~ msgid "Select module for articles" -#~ msgstr "انتخاب ماژول برای مطالب" - -#, fuzzy -#~ msgid "Categories" -#~ msgstr "All Categories" - -#, fuzzy -#~ msgid "Comment categories" -#~ msgstr "All Categories" - -#, fuzzy -#~ msgid "All" -#~ msgstr "All Categories" diff --git a/usr/module/comment/locale/fa/default.mo b/usr/module/comment/locale/fa/default.mo deleted file mode 100644 index b4b35d76f30d5d84f8d6b251ecf57f4b3f71a736..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7237 zcmbW4ZH!!18OJXI0?Ui#O%bXbS_=hs_NApzr@WPIfkF#Q*;Yicxt+P&9hsfk%-rd^ zAC$CdcNg6dzKGJ8pctKYtz8N=1rtd4Kw_dH@F&bn1{m(u3&dlzX zsy99RyXWC)LGw^EoE%+&T(#^l?=HG|sF@6?@O5O!<8N3o||Ml<^ zcng#s1CE1Ga-V=#!WxwPY4|aC2wnzXh6cU`FNg0r{u8dCe@U0;-3t4m?lS_le;?Gj z&pXaR?SBh?0>)71{~c;y7s^ZDl~DKZhtlVMD0@B*buS-&1lFMB?1#GlA$Sga5o&!C z>fXm7BD~k(x$q}Yc6i&(&%+z({}D>RE11-|tD*XLL&+P0l3#ReK%F-Ub&nay5#9^X zz#q8&&!EnUp#1nJH+~+M)jcnVABQ(V-FFj|oSm+}2g*+qQ1^TW>R!*mKKMPzk=`#L z|GeM1{$HWi{oC#7e{slh|ujX*sYaFhF zhoI#BoIkS9?;%(9&PTZRFNc`kTLUF$6I2}Rf~(=En|}`W&_4`y?_Wacdm+ItJ6;1d z{t%Qs_CuCxC#E&jo*OMXVFg|?Ma_JFIp?ReU5e)Z3|70 zYJ~i*SW})oMpOLVNz)_U@1X6VJxbG~ID3#LJ=15id&$9m+81c&((a`hnry51(X)&8 zuzgEx{aN=e$oG2grYT+@pjrFE`)PXC)3(|-&-)N0)ol)Jb7R62H08}_Xd7v`%RU4A zy@#gQ(WBa+cu@=}KJ?s7laIP-_tBJZifLSCV@+|XNB&lgQCz0a243Vx`RX<|_z=WR zHXg2n`tACRq30IbIrc4yTfKgorr1$k@{AvvRdsJw-4v>$ zqd_ICdm9U3X>VW#t95nCWwln%_{p?eZpPAO3nuEu?pwUfjRZyG*TPbv99SWl_+(qD zvb305U?!>!Q*ZDRR!uP|2O)1GrA+_3yp8TyGhPZuvU9zGa;fm7HdV)hiZ_tlHlntyn+%GjFzXBlLF*ipDwgX0?s8D<$ySV2YoT8@!_`{* znX;nkILVGws-da-dpq~DvKEY$C)$o=$S%V$g+frT4>!u?iFTQ|a=|UE-!wKFbR1N- zs*P5QjdEaCI18-!FP0?c4kyOg=3KCFTXi_~`GWJ9NF**EZ`6a@!qJN97`4`rXIn1o zE>*Dbs2`T9m2O?NyM0G{?717Z4RsoY34$TjAh8YslB(ONht<*aR)!$jWJ3~+Ryn7^HY=<)R}?)Cy_?+Bz17<8Qn46Rdc6A@K|S=gRFa6m26;Lzbp~x_ zZmI0`%cY_z`k~)##>#|tZFa?G#!qoh@>-ZrNA%qCjn zc5l6ol^F|zQKN_*t~M$}{8pbmg(S~{V%{(iqHQ|F>07INN)>P0#KO{HhtlGp>5h!< ztPFK6c2ev+*=^ z*&Y-Ez6Qli3L~mL+p9Rb&DoEli8nNoX=A?&h6>oWW=OSx@?GOFYjkgCDHu0CpO^Fw z$;eo(I*k3i_L*+CW?i-p)~a6&3Sn+bF}IUACOq?Iu#|I)x&|K}$_>;4>%811 z?wL1h`uf-9`qt#u^qKy(`E_e=?pwRIkA=DI!QPS%_`r1v_1sX+uhh$aSgqwv*H*u> zr{V7jazlYX+SbpTVZUqJmTj9`iuL#Obqyp2$;m`{69!)jd&kOtsj`7o^=tJYykp1E zy}9+Rb&@q4)N-3Eg{s0mZ`SWFg@f*=A(X5H5qUQXJ ziT6dXMa}qt7f;0p<0%IdHKXG!W5O;>hm#|g-s;Y`>lYvFX5H4dTI#@bQdZG{iQP;zi$@42L)6UuUyv`qqlk ziF7QvXLKBGl2z!~OchyRJ}XBta~wIda*f+#vU?&qUMxihPeUm6u~ljDgo$2?j!8|f zg+c^`1U9+WF{C7eMDF5^na&GENjaQyFrJS0#rrvWwp~Ulp*;dCq!#3FmNEGU1U`Xn7RL)r^FX30rvp}zwv6QH(p_N?6 zq94h>)LJEPn%1j|UQ%*cYpY>AsUwKw6D-oN*6fUqnWZOMat$s#eKEae z;fAz-kb;BOQjy9`ZJ6|Iwd!;dKSMiHC*7WYc{oF1*VKndiQ2>}vr6E2D&hlmfZ2Uy zv#mE&6z-qaP!mrZ1Rq5ziQArG>58O~Q2$sqtDwztF_R(n_iKN2oTG8M3J1DK1!|5B z_2iSOCCNu|e#UEcIy7cH`EF2qSUqRrH*lJ?<78E~=tW$Pq}I13zj#b);ukAp4)0kP zrJoEgV)w2dh>E_avc$#PaaHFUvV7p3Xw;+mz~%duGFRcXWbM#6O^CuxeWTKbuk zR#U{|bo8=}l9vDE<}u$a)$~~pedZ{3=`Jr$&S17Z4ziQD-*j}8hDd!nb%fhOm3YOp z7TTJO5*@NxgCF84FM5rW4kXcPZ-; zn8W}^upuIwCL!o`#yjJkx6w~H94cc{GT1e1I{vqUnPm7@(CB|I&dse~G1ZLdPC$=|(v2>Sj$_V5{pgqdO^#-K}Fze|J{BX$4) diff --git a/usr/module/comment/locale/fa/default.po b/usr/module/comment/locale/fa/default.po deleted file mode 100644 index 8b279e8839..0000000000 --- a/usr/module/comment/locale/fa/default.po +++ /dev/null @@ -1,489 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-comment\n" -"POT-Creation-Date: 2015-02-20 13:53+0330\n" -"PO-Revision-Date: 2015-02-20 13:53+0330\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: fa\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.7.3\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: /var/www/html/local/pi/pi-release-2.5.0/usr/module/" -"comment\n" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/event.php:21 -msgid "Post submitted" -msgstr "نظر ارسال شد" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/event.php:24 -msgid "Post published" -msgstr "نظر منتظر شد" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/event.php:27 -msgid "Post updated" -msgstr "پست به روز شد" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/event.php:30 -msgid "Post enabled" -msgstr "نظر فعال شد" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/event.php:33 -msgid "Post disabled" -msgstr "نظر غیر فعال شد" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/config/event.php:36 -msgid "Post deleted" -msgstr "نظر حذف شد" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Api.php:538 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:419 -msgid "Guest" -msgstr "مهمان" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Api.php:580 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:461 -msgid "Edit" -msgstr "ویرایش" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Api.php:581 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Api.php:637 -msgid "Enable" -msgstr "فعال" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Api.php:582 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:468 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-lead.phtml:34 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-root.phtml:59 -msgid "Delete" -msgstr "حذف" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Api.php:583 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:475 -msgid "Reply" -msgstr "پاسخ" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Api.php:634 -msgid "Disable" -msgstr "غیر فعال" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Article.php:40 -#, php-format -msgid "Demo article %d" -msgstr "مطلب نمایشی %d" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Custom.php:41 -#, php-format -msgid "Custom article %d" -msgstr "مطلب شخصی سازی شده %d" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Api/Search.php:66 -#, php-format -msgid "Comment by %s" -msgstr "نظر داده شده توسط %s" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Block/Block.php:39 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:52 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:115 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:299 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:552 -msgid "View profile" -msgstr "نمایش حساب کاربری" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:301 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:84 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:136 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:276 -msgid "Invalid post parameter." -msgstr "مقداری نا معتبر در پست ارسالی" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:305 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:347 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:405 -msgid "Operation succeeded." -msgstr "با موفقیت انجام شد" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Admin/PostController.php:305 -msgid "Operation failed." -msgstr "خطا در عملکرد" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Feed/IndexController.php:20 -msgid "Comment feed" -msgstr "خوارک نظرها" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Feed/IndexController.php:21 -msgid "Latest comments." -msgstr "آخرین نظرها" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/CustomController.php:36 -#, php-format -msgid "Demo custom article #%d" -msgstr "مطلب نمایش شخصی #%d" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/DemoController.php:36 -#, php-format -msgid "Demo article #%d" -msgstr "ملب نمایشی #%d" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/IndexController.php:23 -#, php-format -msgid "Comment portal for %s" -msgstr "پروتال نظر برای %s" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/IndexController.php:49 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:74 -msgid "All active comment posts" -msgstr "همه نظرهای فعال" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/IndexController.php:63 -msgid "Commented articles" -msgstr "مطالب دارای نظر" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/IndexController.php:70 -msgid "Comment posts for module \"Comment\"" -msgstr "نظرهای ارسال شده برای ماژول \"Comment\"" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/IndexController.php:76 -msgid "Comment posts for module \"Comment\" with type \"Article\"" -msgstr "نظرهای ارسال شده برای ماژول \"Comment\" با نوع \"Article\"" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/IndexController.php:84 -#, php-format -msgid "Comment posts by %s" -msgstr "پست های نظر داده شده توسط %s" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/IndexController.php:94 -msgid "Comment posts by me" -msgstr "پست های نظر داده شده توسط من" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/IndexController.php:100 -msgid "Commented articles by me" -msgstr "مطالب نظر داده شده توسط من" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:70 -msgid "All comment posts" -msgstr "همه نظرهای ارسال شده" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:72 -msgid "All inactive comment posts" -msgstr "همه نظرهای غیر فعال" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:86 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:151 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:259 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:360 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:506 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:631 -msgid "all comments,comment,information,post,user" -msgstr "همه نظرها,نظر,اطلاعات,ارسال,پست,کاربر" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:137 -msgid "Comment posts of article" -msgstr "نظرهای ارسال شده مطلب" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:205 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:212 -msgid "My comments" -msgstr "نظرهای من" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:220 -msgid "My active comments" -msgstr "نظرهای فعال من" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:229 -msgid "My pending comments" -msgstr "نظرهای در انتظار تایید من" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:245 -msgid "Comment posts of user" -msgstr "نظر های ارسال شده توسط کاربر" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:322 -msgid "All" -msgstr "همه" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:347 -msgid "Comment posts of module" -msgstr "نظر های ارسال شده در ماژول" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:466 -msgid "All commented articles" -msgstr "همه مطالب دارای نظر" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:468 -msgid "Articles with comments" -msgstr "مطالب با نظرها" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:482 -msgid "My articles" -msgstr "مطلب من" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:490 -msgid "My articles with active comments" -msgstr "مطلب من با نظرهای فعال" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:577 -msgid "Received comments" -msgstr "نظرهای دریافت شده" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:584 -msgid "All Posts" -msgstr "همه ارسال ها" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:592 -msgid "Active Posts" -msgstr "پست های فعال" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:601 -msgid "Inactive Posts" -msgstr "پست های غیر فعال" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/ListController.php:617 -msgid "Comment posts on user" -msgstr "نظرهای ارسال شده کاربر" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:45 -msgid "Permanent link" -msgstr "پیوند پایدار" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:52 -#, php-format -msgid "Comment %s on %s" -msgstr "نظر شماره %s در %s" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:61 -msgid "Comment,information,post,user" -msgstr "نظر های ارسال شده توسط کاربر" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:89 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:140 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:234 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:281 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:339 -msgid "Operation denied." -msgstr "عملکرد غیر مجاز" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:101 -msgid "Comment post edit" -msgstr "ویرایش نظر ارسال شده" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:153 -msgid "Comment post reply" -msgstr "پاسخ به نظر ارسال شده" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:237 -msgid "Invalid submission." -msgstr "ارسال اشتباه" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:254 -msgid "Root not found." -msgstr "ریشه پیدا نشد" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:257 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/_post-form.phtml:3 -msgid "Comment is disabled." -msgstr "نظر غیر فعال شد" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:291 -msgid "Comment post saved successfully." -msgstr "نظر ارسال شده با موفقیت ذخیره شد" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:294 -msgid "Comment post not saved." -msgstr "نظر ارسال شده ذخیره نشد" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:299 -msgid "Invalid data, please check and re-submit." -msgstr "اطلاعات اشتباه، لطفا بررسی کنید و مجددا ارسال کنید" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:347 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:405 -msgid "Operation failed" -msgstr "خطا در عملکرد" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:396 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:451 -msgid "Invalid parameters." -msgstr "پارامتر های اشتباه" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:401 -msgid "Forbidden." -msgstr "غیر مجاز" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:457 -msgid "Login" -msgstr "وارد شوید" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Controller/Front/PostController.php:482 -msgid "Enable/Disable" -msgstr "فعال / غیر فعال" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Form/PostForm.php:83 -msgid "Comment" -msgstr "نظر" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Form/PostForm.php:88 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/_post-form.phtml:24 -msgid "Type your content" -msgstr "نظر خود را بیان کنید" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/src/Form/PostForm.php:99 -msgid "Save" -msgstr "ذخیره" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-list.phtml:79 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-module.phtml:85 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/admin/comment-user.phtml:86 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-lead.phtml:33 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-list.phtml:43 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-module.phtml:46 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-my-post.phtml:53 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-my-received.phtml:56 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-root.phtml:58 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-user-received.phtml:44 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-user.phtml:41 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-view.phtml:50 -msgid "Are you sure to delete this comment?" -msgstr "آیا اطمینان دارید که میخواهید این نظر حذف شود؟" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/_post-form.phtml:39 -#, php-format -msgid "Please login to leave comments." -msgstr "لطفا برای ارسال نظر به سایت وارد شوید" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-404.phtml:5 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-view.phtml:16 -msgid "Comment detail" -msgstr "جزییات نظر" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-404.phtml:7 -msgid "The comment post is not found." -msgstr "نظر ارسال شده یافت نشد" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-article.phtml:26 -#, php-format -msgid "%s comments" -msgstr "%s نظر" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-article.phtml:41 -msgid "Last commented: " -msgstr "آخرین نظر :" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-article.phtml:46 -#, php-format -msgid " at %s" -msgstr "در %s" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-article.phtml:59 -msgid "No data available yet." -msgstr "هیچ اطلاعات هنوز موجود نیست" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-edit.phtml:22 -msgid "Comment edit" -msgstr "ویرایش نظر" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-edit.phtml:42 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-list.phtml:32 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-my-post.phtml:38 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-reply.phtml:69 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-user.phtml:29 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-view.phtml:39 -msgid "Commented on " -msgstr "ارسال شده در" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-edit.phtml:59 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-reply.phtml:89 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-view.phtml:57 -msgid "No content." -msgstr "بدون نظر" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-lead.phtml:3 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-root.phtml:32 -msgid "All comments " -msgstr "همه نظرها" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-lead.phtml:43 -msgid "View all comments" -msgstr "نمایش همه نظر ها" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-lead.phtml:47 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-root.phtml:68 -msgid "No one has commented yet." -msgstr "هیچ کس هنوز نظری ارسال نکرده" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-list.phtml:16 -msgid "All active comments " -msgstr "همه نظر های فعال" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-list.phtml:54 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-module.phtml:57 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-my-post.phtml:64 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-my-received.phtml:67 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-user-received.phtml:55 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-user.phtml:52 -msgid "No comments available yet." -msgstr "هیچ نظری هنوز ارسال نشده است" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-module.phtml:18 -#, php-format -msgid "Comments for %s module" -msgstr "نظر های ماژول %s" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-module.phtml:34 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-my-received.phtml:41 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-user-received.phtml:32 -msgid "commented on " -msgstr "نظر ارسال شده در" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-my-post.phtml:44 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-my-received.phtml:47 -msgid "Pending" -msgstr "در انتظار تایید" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-reply.phtml:52 -#, php-format -msgid "Comment reply to %s" -msgstr "نظر در پاسخ به %s " - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-root.phtml:19 -msgid "Item not found." -msgstr "این مورد پیدا نشد" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-view.phtml:30 -msgid "In reply to:" -msgstr "در پاسخ به : " - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-view.phtml:31 -msgid "Click to open" -msgstr "برای مشاهده کلیک کنید" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/comment/template/front/comment-view.phtml:32 -#, php-format -msgid "Comment #%d" -msgstr "نظر #%d" - -#~ msgid "Submit" -#~ msgstr "ارسال" - -#~ msgid "Demo article with comments" -#~ msgstr "مطلب نمایشی با نظر" - -#~ msgid "Post comment" -#~ msgstr "ارسال نظر" - -#~ msgid "Cancel" -#~ msgstr "لغو" - -#~ msgid "Are sure want to delete this comment?" -#~ msgstr "آیا اطمینان دارید که میخواهید این نظر را حذف کنید؟" - -#, fuzzy -#~ msgid "Categories" -#~ msgstr "All Categories" - -#, fuzzy -#~ msgid "Comment categories" -#~ msgstr "All Categories" diff --git a/usr/module/comment/locale/fr/admin.mo b/usr/module/comment/locale/fr/admin.mo deleted file mode 100644 index a0cf36dc020cbbf8910444a864f6676c990f63b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7259 zcma)=Ym8l06~~VVg5#?~5meM&pcJI{c3K`SQ?O2-RA$R{w8@F92! zeA3rH3pMT~C_PTY4R8&UsD2xioCl!fU+`Rl7xVokcoF<6)cD8X+u@JkJK*zBcK@?) ze;LXiuR_^t4U=m8i-Be--}Rwb{b0FwJ2raHuzq6%(H;9!-G)zJqESz525V!8z_JH6O?`a=D+^|wNIxZ z|ALD#vf8hN>VF-S9ydbCJLb6;%Fho$>AwKg?{iS&?uYV&2Oy>jz6A-b;0N%VZ$K`n zb&g|1$u|Qv&plB3e%60K3N_F7q2zoP$__94`imH(`u9Wi+YUAUPN?|@a5Fp!H^Ng; z@$v^Kd%XggDmV|Lt%H|BwQq%rqdTGITZCKT!%%j39!k#_pzQXtum3mP#J7ae{)|HP zpMZ-0yP@Pw;0NJXAf^bOg4(a2`S!m;$?-oZf4hvqI#0$uPe8Tb2k8<#0#POSE+j;P zpTKM2ub}ii4JFToETZ$^Dk!~L5RrokC^6hpya37VxC!Qyvix;Tz_d|_)5MB$PfRgXGQ2kzk((ga; zW;lZKns*#Zue%^&6?}{$z4uY(Db;f)FCV8U7G|nSPw6e$wf=1s%_p1hqUbqF*-23x z>$$sxi;n~TU6`h9r(jZNQ~BK_fig#tzVabG+8gcX5y~D)^~hHg zzirB4%3TyaAD|qg+(gm2IZDx^z1dIE-i4Iv(cbBqpeU~N$iF{9xskG-a*(3uqa|E? z7~VhWzh(C>Ws1UfIKNcP>m1oZ(IX$+>fXxz)2sHm`DlN4`wHACxYfUFpQ~q`f4Lpr zK)H%COObEgLeXO>8{AtE?Ddq79P;lc;2r)QH*xX*VgJpw;{08oTPP9bLzLqb_l$S) zD2W4M(R!GvB+Ikvqm%UeHqOmJm1bti^pkGUtNXg@V7%9>M)4N9+04*L*JZfDc1@V( zQKx5FjA3W?_ciC}SdNO~;aN*TgYkY+#L^&VqY7@bJa4o+YZKyJTc*5kS2>3 zC1(0jmTAX!7E!NTbu`^D56x_nqG6xzl~s2xRqp|>e&cv6GMfgw%8jjP`e7W-S-00= z+%mjN6cWX<*OV?`#vtreE84#U5E6;&zo} zny~(A`myg&x7FguVc!~dGU_r(oGbL$*nWsfi!4w2)t+a;Zs*NlWy?z~I_1u)2TlIV ztjGGhqb!`kMLoNE8T7&>lMHMcx}#u^c5hGYx|J|T4o#R|6fgK{lZSJ|-zZtN$xu!O zH(+nn%WYbT;B*X4Hn5#&HtIMxYzKQ$HthDJILdNlNYbpVD)Ra2y>I(7mim2##o2D3 zo}38wS7BcsK>Opxuorb*AZ#>)o(&b@^R}~KuXlcG8v`|-Q;8(OmeVRZMGXs zHhhZrdM|lTZO3v4Mqey@)#>`aI@=}jX9h`3MO05gn*6uL3V`j_f=9^oiH@3EHGn;Q2+p_ig(JiB+ zbZi~6i;*Tcd%s)CeiLDqx2DrD&U%W#F@tw@%x;^dNs(nXEbbkd2;;eeU}#O-u>V>e z#>{LwGP!?p&x+`q+oL1?Fl)&sV{Ypj*cEU7FGn?ObWO{FF+e$x4Gi%e6RDY~5j(P9|wLQ|OJE6XEs~8s-~!axx6U ze16Qd+nd_$m4?Gfk#_8^QkXGQN>dLzY_Z7v6a!nM3>|UlQI$C@pQ;Z0FiI_X0}0S< zeY7|0I2+RHBHmRV)6M2!8haCqS>+C{@$9wLD)o>$+RNpuDV9&+)2}^kJ<>ba>losD zmco}g7#bf)`ZFnaLDtGixt5<+LShz^qL)M|_dID#)K@U9QgFxX7(qanY0ZvdTeCoK zgKzTdn{HL%qS+;WjZWh}J>uN7oytl>yWo4A*`Z3`GGjS@QXN9w4a?ujS)yS& zyhT%k=EiUg#uzEJa|9uJwMh{ChtDx(d>#4APoUuNJd>-$ZBCq>GlUdc=P-m@p|n>c zy({;ewdPHcHO`1Ltq_;#;DFyW{KSci{_?3bQT9Z-SWd45vRE~c3k44(UCI>ahpVWp)@Ps+ z%GI&aoP?W!E-s;Dit?gOgWc6T$Ki_ODez{=_U5@e0{M+i{ZGr9I6J8o5k;a|wN-VQ znGWapf#iNtDlFXAG{4J{c=G`==Rg@}>Vs}5xSSgoannQ00LSb^&hM*`TS-KTB`)GR z77GPeqe3|;XT9>tC`V(Ll{UA_)Td${@QMkSecEgzzLIt#?b0H<7ID)lDEU;b%4uP9 z^iX<4tGno3M3tl40hg6OPll=|l%VQ&?vTHgNi1h?+=&Ju>Hh(;$gtq(N>*lf_Nf;p zktY4>h2>D@!&`DoGHYX{v~HDQ^Adc@m4iC3oxsHhJ+3p~PtK;muH)m3C|_NHDVD!o z=vLu>D2fi7*I3dev`HK(?ZpEN+v~Z5h1}F#LXAtnEPun4K4{aG=2bRQ_*VKhP30$h zjo!6&s)bkeZLGc`TjLnXn(_q`%}ogn4mzI{IzP{7!0QY)@n@)9rA(TUr~Jj}vMl{F zGhwbDl9s%g|6efEC?aK`DZ-#{My|3AP`r;EieMtz&p^!XK(|20aw8( zxCy?2OW-Gnz;E#Bf)Ib8o8bLLA+AF|LT^LALN}n_p>4k(P}u)P`|ed-#-Z)odRGCf z5IdetS(9YLHHo2{&&hHS&zvmJ&Qc$1Q|khzC2=ectrU}{m>XvDL1f;&p_0{prC#E0 zoK0nB)LC_u9p-B2Niz~^S2LxupY-ml z>4diywKn#lEN9vW;zuv?Cu*?vwbLAtS9`W}m9f)Q4hqB3EA^Bt`EJb2QDs>6;z7KP zOm|fWw0!G)6-Fj-Dqk1t%wrvBp?Q|dINplmbzfW7Nd>4XS9k{Xr!cA3I}2U_FM%3=1w0R4 z4JF64;{w#W_rptI47L8l@NMu3cp>~cH1I`u5&XU5KjCJ|=Z$&ZwQve*KPynA4(6exb|PbZIu5ACEvv~YThfM$~Qx;w*<9*%Q1tR?-Nk__%vh+ z?@4IjS6umJsCj+{b&h{>^=GhI?eik|4tN#RerKT8Iq1qqpw4LxYM+ll?dvf(3BLrH z()%go&-<+_zYf*!-;U=}P`^!3>uiIPe-G6D_Co3JE_f+C2-Pohdv*?ow~lL2@_z=R zLhrLsdVCftzJA-){|f3{{{pq{xj5-9a1+#i4?)bnpER~i4L)YblIw%yo5*uyC9NfU z)*f`;_mHKx8_7zj$Gd@iH~9crX_0(8S$Zhbtox|JDe{NNr;+!O4f(xf*@cqssyp+q z!X`i9z6Hf_rJKpy$nPUBk*_4*MpoKIp3lEL?@dtp(An*Gb;AARE6DFB?ff6KIo4~{6emFryP9ZU?8QqS&~Mba#sc;n#oNPbfSK>jBBW(EH{UT=lu$c z@n&UKv!SfVVaJSX+84!#gI3Fib??^9CaE_U78ZdH8Wf!CEaaX!7q0s4pk-Qq>Q9(% z+xm$$%@vC;_+g82wIn;-3DPXG9>EkR>{Bd?p6>U8Pweo z^}mh3it9?JX3etYyeUixd-=C?bb>BXXw8b>k1$w7KKRbAjdKGd426MwbWpR*GDL#W zifWhKRc%Y-77CFeCL1D+X$Rp0-a>I$*ZXEAw#zqc9#1yk*p|w!-{IdVd#9a1U2dLv zbV@}`Y`KDqKSjyr=H!~X+2MAOtRQ7RtgwQ#EM{GlL1EE0Ew@3dzX~;qJ&O?sT{-Ln zNa8K6^rgw~1w#a^^jT7DAbiJ6mMh&m7}#UR=XxpkP}FqeXc_%^)s_j@?C{UR~R{%S`QVOzqx2 zxpQ)oj54YTWTkdEC`yVZs=T#305>CQ1z^rq`z_`>t!{U=CX!`i5sCsXBq95i?{y>-23Oe?D{ncqK{{b=>Rc6MC5 zsqEOBA1WHf_!dgb<8*IbVTmUXD^$i58yQDO*dP1K!fNa2jNw+F%O^2N+FLg^jO`Ij zGuGUTz4dMsa;5ph;*ZGWZyZaYN6U)By=Sg;hu!mR%U84`?sUteGH8L96?zU1cRB-!8au10i98&V&yor?Mr z)F*EsCd{yj-a48I@vZ#5Ws?blTHFlsAkkZogXI8^u)4|f=UJ5T8cSn~Bk5(p4oQW zYKzhmKgblT^!Ui?#ZYTn#gV+hxWe{`t;8YAbxN4!>P=*c`Fy#S3YQIlogin to leave comments." -msgstr "Connecte-toi pour laisser un commentaire !" - -#: template/front/comment-404.phtml:6 template/front/comment-view.phtml:17 -msgid "Comment detail" -msgstr "Détail du commentaire" - -#: template/front/comment-404.phtml:8 -msgid "The comment post is not found." -msgstr "Le commentaire n'a pas été trouvé" - -#: template/front/comment-article.phtml:27 -#, php-format -msgid "%s comments" -msgstr "%s commentaires" - -#: template/front/comment-article.phtml:42 -msgid "Last commented: " -msgstr "Dernier commenté :" - -#: template/front/comment-article.phtml:47 -#, php-format -msgid " at %s" -msgstr "à %s" - -#: template/front/comment-article.phtml:60 -msgid "No data available yet." -msgstr "Aucune donnée disponible actuellement." - -#: template/front/comment-edit.phtml:24 -msgid "Comment edit" -msgstr "Edition du commentaire" - -#: template/front/comment-edit.phtml:44 template/front/comment-list.phtml:33 -#: template/front/comment-my-post.phtml:39 -#: template/front/comment-reply.phtml:70 template/front/comment-user.phtml:30 -#: template/front/comment-view.phtml:40 -msgid "Commented on " -msgstr "Commenté sur" - -#: template/front/comment-edit.phtml:61 template/front/comment-reply.phtml:90 -#: template/front/comment-view.phtml:58 -msgid "No content." -msgstr "Pas de contenu." - -#: template/front/comment-lead.phtml:4 template/front/comment-root.phtml:34 -msgid "All comments " -msgstr "Tous les commentaires" - -#: template/front/comment-lead.phtml:49 -msgid "View all comments" -msgstr "Voir tous les commentaires" - -#: template/front/comment-lead.phtml:53 template/front/comment-root.phtml:70 -msgid "No one has commented yet." -msgstr "Personne n'a encore laissé de commentaires ici. Lance-toi !" - -#: template/front/comment-list.phtml:17 -msgid "All active comments " -msgstr "Tous les commentaires actifs" - -#: template/front/comment-list.phtml:55 template/front/comment-module.phtml:58 -#: template/front/comment-my-post.phtml:65 -#: template/front/comment-my-received.phtml:68 -#: template/front/comment-user-received.phtml:56 -#: template/front/comment-user.phtml:53 -msgid "No comments available yet." -msgstr "Aucun commentaire disponible actuellement." - -#: template/front/comment-module.phtml:19 -#, php-format -msgid "Comments for %s module" -msgstr "Commentaires pour le module %s" - -#: template/front/comment-module.phtml:35 -#: template/front/comment-my-received.phtml:42 -#: template/front/comment-user-received.phtml:33 -msgid "commented on " -msgstr "Commenté le" - -#: template/front/comment-my-post.phtml:45 -#: template/front/comment-my-received.phtml:48 -msgid "Pending" -msgstr "En attente" - -#: template/front/comment-reply.phtml:53 -#, php-format -msgid "Comment reply to %s" -msgstr "Commentaire en réponse à %s" - -#: template/front/comment-root.phtml:21 -msgid "Item not found." -msgstr "Elément non trouvé." - -#: template/front/comment-view.phtml:31 -msgid "In reply to:" -msgstr "En réponse à : " - -#: template/front/comment-view.phtml:32 -msgid "Click to open" -msgstr "Cliquer pour ouvrir" - -#: template/front/comment-view.phtml:33 -#, php-format -msgid "Comment #%d" -msgstr "Commentaire n°%d" - -#~ msgid "Demo article with comments" -#~ msgstr "Article demo avec commentaires" - -#~ msgid "Comment post not found." -#~ msgstr "Commentaire non trouvé" - -#~ msgid "Comment post" -#~ msgstr "Commentaire" - -#~ msgid "Submit" -#~ msgstr "Valider" - -#~ msgid "Are sure want to delete this comment?" -#~ msgstr "Etes-vous sûr de vouloir supprimer ce commentaire?" - -#~ msgid "Post comment" -#~ msgstr "Commentaire" - -#~ msgid "Cancel" -#~ msgstr "Annuler" - -#, fuzzy -#~ msgid "Categories" -#~ msgstr "All Categories" - -#, fuzzy -#~ msgid "Comment categories" -#~ msgstr "All Categories" diff --git a/usr/module/comment/locale/zh-cn/admin.mo b/usr/module/comment/locale/zh-cn/admin.mo deleted file mode 100644 index 9127e4bea7dd6f967bc83147d95ff2002854e358..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3718 zcmaKse{3AZ6~~7Hg*p^yX!^S_K+^)@4x3+bE+hmTg90(J5)*|sYP7x^#|wA6*WEq4 z*MI8NF+L@6?2yDH!4bCQM3y4Xah2j=<5>NVR{T}|KowF-CGYN?Dz#MVpB3W!cHZ9E zk=l{pedfJ+^WK{`v%bFemeT@b8{|hMUlZar;w|{W=(|;juY-q}CGZaD!{EK(80!n* zH=uvS`d`4?p#Keg5DdZl!8HhWH<$pw32tTX1RJ3L9Hcl3r2RIt7nIO{3sU}Z@LS+} zY+nNJf&Mx81Moi}o#!qDp*)X*YrzzFJJ<%2-(K)8@K+$Vh(jR$Ly?CFF?xsOYqxZ z9z;kn08*SGkj{4sr21z;>faxE{bSZY0ja+0Amv+TegS?D`hUT7;5sy&`m_PO8QcW^ z=_VnzfRyhxY$o0bQvcV1KLj6OeJk^2=01@86-a(rW{KCQK!g^vtS^Anw~v^gG5-lt zoSTr8>bxDK{P!|9Fq=Wz-^$zv()r%t^}`_b=>$l5CqM~a;`NU~%JWy|=OFooy#8;t zf62TR&7${w2T1#pAjN+Qgo|hesh-`eE0FvgwinrcjCq#r7eVU(2W($t{u!kGpR#@( zr1<|}{Yze7gU3dGYeB02`>a0*lK&$h)wczt_x}<|bt|?PK+69+5Z52Qz0Dwf>pzA( z1EG7^1bG7TG~_3cM#y&|>mih%#$%8NAaoCuy9q+$5y-QUM`WXb8c#7}Y{4W2`6-0H?Z+WB=zF1_(D(H) zgvJI4{olfKj0W934f;k`4(cfl8U5-zNMgPbf-4fuY)^m>(fqlzXWCYT9>tLDw(GgE zlD2a>WqC4BM%h`EIXhFx)_fzgcrKfbcVWg`5F%$6EDGf)S+on%Ent#SS>-9|bt_lZ zT%Y|PKBg-T$1~GeMIODiirii>vz~HlQ7Dfg-MmVhU1mB;nG`P;6neJ9GVsEBlzu)?dyK4^ zsfSI9ordehkyJ*j`9f#bbi1MI-TQeIEq2Al%Pzyrs!Vc) zCAue-A!EC;GNyG1)ar?T-Dr zN_&YNnZ#b~z;~RA9U9tqbtGCG6@3=U_5zZEe^I zYXKivqC*+ElvJwAP8ZyoIVFG7eW2x)hPEATt@V>MB^w)BY|BGa64a`c^wh7t$M7mm zYqLyu8;+~IEw6UGkZ7*^QGH#?NwivNo9;9vn>$UfVPE1!Wzj>X!rN{7c4brY>EuSN zXf^S&D)!I<$cFe)>LE9H6Nm);C#7nZLc z4bL6c>v|zLefb8*f$3`hbi8Y&0@v!`um~s0mGYEd8n2$6sw|ydo_|L>|LendZ(Iv! z27}ST@X|P~=@|#sN|Zcu2*wAilV?P=?_6bx_XO`=sLV{prs)a){M)Nc;i>7MG{+_m zs}Ytb!jU(ZuO1J^hWsNF!XG|SnTU@RemGjWc4C!(P#W=%puo}z?THrg`g&IeQRcb{ zUb^_|;IZoY$@+rcf+Gb(W#P~Lp7rQ>qP8f4@ekmji}y!{g3{=Y?ZL=ccx94v`sH(e z>HS!V+APA0hp>a9@+>%WEu5OKl&^)0WucEG{E-=Q(h2;5x#h)^+@tdssH+Q89JEqi z^2?JH&7U2voLXda@b-9cx)huoir&yzUod)EujuoNV64v{IgS?jSNnx-iwOJQgAd>4 z@wX}y$Eb~HO1vjh;sj{jsrUWT<$BYWuMP>F(Vv>FT)Dss--s@cn^(O!TAlaJJxj)kon<1^X)>dF9$kf8c`d c8!o0as;9WAD07rnn*^R-ICeCy;mnNq3aEFKrT_o{ diff --git a/usr/module/comment/locale/zh-cn/admin.po b/usr/module/comment/locale/zh-cn/admin.po deleted file mode 100644 index 77cadf74e3..0000000000 --- a/usr/module/comment/locale/zh-cn/admin.po +++ /dev/null @@ -1,613 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: comment\n" -"POT-Creation-Date: 2014-08-08 17:39+0800\n" -"PO-Revision-Date: 2014-08-08 17:39+0800\n" -"Last-Translator: Taiwen Jiang \n" -"Language-Team: eefocus\n" -"Language: zh_CN\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.6.7\n" -"X-Poedit-KeywordsList: _t;_a\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-SearchPath-0: c:\\code\\pi\\usr\\module\\comment\n" - -#: c:\code\pi\usr\module\comment/config/block.php:13 -msgid "Recent comments" -msgstr "最新评论" - -#: c:\code\pi\usr\module\comment/config/block.php:14 -msgid "Recent active comment posts." -msgstr "最新活跃评论" - -#: c:\code\pi\usr\module\comment/config/block.php:20 -msgid "Post count" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/block.php:21 -msgid "Number of posts to display." -msgstr "" - -#: c:\code\pi\usr\module\comment/config/block.php:28 -#: c:\code\pi\usr\module\comment/config/block.php:53 -msgid "Module" -msgstr "模块" - -#: c:\code\pi\usr\module\comment/config/block.php:29 -#: c:\code\pi\usr\module\comment/config/block.php:54 -msgid "Select module for articles." -msgstr "" - -#: c:\code\pi\usr\module\comment/config/block.php:38 -#: c:\code\pi\usr\module\comment/config/nav.php:20 -#: c:\code\pi\usr\module\comment/src/Controller/Admin/IndexController.php:62 -msgid "Commented articles" -msgstr "已评论文章" - -#: c:\code\pi\usr\module\comment/config/block.php:39 -msgid "Articles being commented." -msgstr "" - -#: c:\code\pi\usr\module\comment/config/block.php:45 -msgid "Article count" -msgstr "文章数" - -#: c:\code\pi\usr\module\comment/config/block.php:46 -msgid "Number of articles to display." -msgstr "" - -#: c:\code\pi\usr\module\comment/config/block.php:60 -msgid "Sort order" -msgstr "排序" - -#: c:\code\pi\usr\module\comment/config/block.php:61 -msgid "Criteria to select articles." -msgstr "" - -#: c:\code\pi\usr\module\comment/config/block.php:66 -#: c:\code\pi\usr\module\comment/template/admin/comment-index.phtml:90 -msgid "Most commented" -msgstr "热评文章排行" - -#: c:\code\pi\usr\module\comment/config/block.php:67 -msgid "Last commented" -msgstr "最新评论文章" - -#: c:\code\pi\usr\module\comment/config/block.php:68 -msgid "Last published" -msgstr "最后发布" - -#: c:\code\pi\usr\module\comment/config/block.php:79 -#: c:\code\pi\usr\module\comment/template/admin/comment-index.phtml:26 -msgid "Top posters" -msgstr "热心网友排行" - -#: c:\code\pi\usr\module\comment/config/block.php:80 -msgid "Users with most posts" -msgstr "最活跃用户" - -#: c:\code\pi\usr\module\comment/config/block.php:86 -msgid "User count" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/block.php:87 -msgid "Number of users to display." -msgstr "" - -#: c:\code\pi\usr\module\comment/config/block.php:94 -msgid "Excluded user ids" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/block.php:95 -msgid "Users to exclude, separated by \",\"." -msgstr "" - -#: c:\code\pi\usr\module\comment/config/block.php:101 -msgid "Excluded roles" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/block.php:102 -msgid "Roles to exclude." -msgstr "" - -#: c:\code\pi\usr\module\comment/config/comment.php:18 -msgid "Article comments" -msgstr "文章评论" - -#: c:\code\pi\usr\module\comment/config/comment.php:31 -msgid "Custom comments" -msgstr "定制评论" - -#: c:\code\pi\usr\module\comment/config/config.php:12 -msgid "Leading page comment limit" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/config.php:13 -msgid "Number of comments on leading page." -msgstr "" - -#: c:\code\pi\usr\module\comment/config/config.php:19 -msgid "List page comment limit" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/config.php:20 -msgid "Number of comments on list page." -msgstr "" - -#: c:\code\pi\usr\module\comment/config/config.php:26 -msgid "Display operation" -msgstr "显示设置" - -#: c:\code\pi\usr\module\comment/config/config.php:27 -msgid "Level of operations on post list pages." -msgstr "" - -#: c:\code\pi\usr\module\comment/config/config.php:33 -#: c:\code\pi\usr\module\comment/src/Controller/Admin/PostController.php:58 -#: c:\code\pi\usr\module\comment/src/Controller/Admin/TypeController.php:42 -#: c:\code\pi\usr\module\comment/template/admin/comment-list.phtml:28 -#: c:\code\pi\usr\module\comment/template/admin/comment-module.phtml:34 -#: c:\code\pi\usr\module\comment/template/admin/comment-user.phtml:35 -msgid "Disable" -msgstr "禁用" - -#: c:\code\pi\usr\module\comment/config/config.php:34 -msgid "For members" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/config.php:35 -msgid "For authors" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/config.php:36 -msgid "For administrators" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/config.php:43 -msgid "Auto approve submission" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/module.php:17 -msgid "Comment" -msgstr "评论" - -#: c:\code\pi\usr\module\comment/config/module.php:18 -msgid "Comment management and services." -msgstr "评论管理与服务" - -#: c:\code\pi\usr\module\comment/config/nav.php:14 -#: c:\code\pi\usr\module\comment/config/nav.php:61 -msgid "All comments" -msgstr "全部评论" - -#: c:\code\pi\usr\module\comment/config/nav.php:26 -msgid "My comments" -msgstr "我的评论" - -#: c:\code\pi\usr\module\comment/config/nav.php:35 -msgid "My received" -msgstr "我收到的评论" - -#: c:\code\pi\usr\module\comment/config/nav.php:44 -msgid "My articles" -msgstr "我的文章" - -#: c:\code\pi\usr\module\comment/config/nav.php:55 -msgid "Portal" -msgstr "评论首页" - -#: c:\code\pi\usr\module\comment/config/nav.php:71 -#: c:\code\pi\usr\module\comment/config/nav.php:80 -#: c:\code\pi\usr\module\comment/src/Controller/Admin/IndexController.php:95 -msgid "Active posts" -msgstr "激活评论" - -#: c:\code\pi\usr\module\comment/config/nav.php:89 -#: c:\code\pi\usr\module\comment/src/Controller/Admin/IndexController.php:104 -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:217 -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:396 -msgid "Inactive posts" -msgstr "已屏蔽评论" - -#: c:\code\pi\usr\module\comment/config/nav.php:100 -msgid "Types" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/nav.php:106 -msgid "By module" -msgstr "通过模块查询" - -#: c:\code\pi\usr\module\comment/config/nav.php:112 -msgid "By user" -msgstr "通过用户查询" - -#: c:\code\pi\usr\module\comment/config/nav.php:118 -msgid "By article" -msgstr "通过文章查询" - -#: c:\code\pi\usr\module\comment/config/nav.php:128 -msgid "Article with comments" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/nav.php:137 -msgid "Article with active comments" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/user.php:20 -msgid "Comment posts by me" -msgstr "我发表的评论" - -#: c:\code\pi\usr\module\comment/config/user.php:26 -msgid "Comment posts on my articles" -msgstr "我文章里面的评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/IndexController.php:23 -#, php-format -msgid "Comment portal for %s" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/IndexController.php:26 -msgid "Build comment data for demo articles" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/IndexController.php:33 -msgid "Demo article with comments" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/IndexController.php:39 -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:85 -msgid "All comment posts" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/IndexController.php:46 -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:89 -msgid "All active comment posts" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/IndexController.php:54 -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:87 -msgid "All inactive comment posts" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/IndexController.php:69 -msgid "Comment posts by user" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/IndexController.php:76 -msgid "Comment posts by module" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/IndexController.php:87 -msgid "Total posts" -msgstr "全部评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/IndexController.php:277 -#, php-format -msgid "Demo comment %d." -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:128 -msgid "Comments by username or id" -msgstr "根据用户名或ID搜索评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:167 -msgid "Comment posts of user" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:200 -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:377 -msgid "All Posts" -msgstr "全部评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:208 -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:386 -msgid "Active Posts" -msgstr "激活评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:239 -#: c:\code\pi\usr\module\comment/src/Controller/Admin/TypeController.php:22 -msgid "Comment types" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:334 -#, php-format -msgid "Comment posts of Module %s with type %s" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:340 -#, php-format -msgid "Comment posts of Module %s" -msgstr "%s 模块的评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:448 -msgid "Guest" -msgstr "访客" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:487 -msgid "All commented articles" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:489 -msgid "All active commented articles" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/ListController.php:561 -#: c:\code\pi\usr\module\comment/src/Controller/Admin/PostController.php:224 -#: c:\code\pi\usr\module\comment/src/Controller/Admin/TypeController.php:102 -msgid "Operation succeeded." -msgstr "操作成功" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/PostController.php:44 -msgid "Edit" -msgstr "编辑" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/PostController.php:51 -#: c:\code\pi\usr\module\comment/template/admin/comment-list.phtml:32 -#: c:\code\pi\usr\module\comment/template/admin/comment-module.phtml:38 -#: c:\code\pi\usr\module\comment/template/admin/comment-user.phtml:39 -msgid "Delete" -msgstr "删除" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/PostController.php:58 -#: c:\code\pi\usr\module\comment/src/Controller/Admin/TypeController.php:42 -#: c:\code\pi\usr\module\comment/template/admin/comment-list.phtml:23 -#: c:\code\pi\usr\module\comment/template/admin/comment-module.phtml:29 -#: c:\code\pi\usr\module\comment/template/admin/comment-user.phtml:30 -msgid "Enable" -msgstr "启用" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/PostController.php:67 -msgid "Comment post" -msgstr "发表评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/PostController.php:91 -msgid "Comment post edit" -msgstr "编辑评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/PostController.php:175 -msgid "Comment post saved successfully." -msgstr "评论成功" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/PostController.php:178 -msgid "Comment post not saved." -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/PostController.php:182 -msgid "Invalid data, please check and re-submit." -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/PostController.php:186 -msgid "Invalid submission." -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/PostController.php:224 -#: c:\code\pi\usr\module\comment/src/Controller/Admin/TypeController.php:105 -msgid "Operation failed." -msgstr "操作失败" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/TypeController.php:34 -msgid "Active" -msgstr "激活" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/TypeController.php:34 -msgid "Disabled" -msgstr "已禁用" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/TypeController.php:92 -msgid "Type was not found." -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/TypeController.php:96 -msgid "Invalid operation." -msgstr "无效操作" - -#: c:\code\pi\usr\module\comment/template/admin/comment-index.phtml:5 -msgid "Comment stats" -msgstr "评论数据" - -#: c:\code\pi\usr\module\comment/template/admin/comment-index.phtml:10 -#: c:\code\pi\usr\module\comment/template/admin/comment-index.phtml:53 -#: c:\code\pi\usr\module\comment/template/admin/comment-module-select.phtml:3 -#: c:\code\pi\usr\module\comment/template/admin/comment-type.phtml:6 -msgid "Title" -msgstr "标题" - -#: c:\code\pi\usr\module\comment/template/admin/comment-index.phtml:11 -#: c:\code\pi\usr\module\comment/template/admin/comment-index.phtml:54 -msgid "Amounts" -msgstr "数量" - -#: c:\code\pi\usr\module\comment/template/admin/comment-index.phtml:30 -msgid "Submitters" -msgstr "提交者" - -#: c:\code\pi\usr\module\comment/template/admin/comment-index.phtml:31 -#: c:\code\pi\usr\module\comment/template/admin/comment-index.phtml:95 -msgid "Comments" -msgstr "评论数" - -#: c:\code\pi\usr\module\comment/template/admin/comment-index.phtml:50 -msgid "Active comment posts by module" -msgstr "分类下的激活评论数" - -#: c:\code\pi\usr\module\comment/template/admin/comment-index.phtml:77 -msgid "Links" -msgstr "" - -#: c:\code\pi\usr\module\comment/template/admin/comment-index.phtml:94 -msgid "Article title" -msgstr "文章标题" - -#: c:\code\pi\usr\module\comment/template/admin/comment-list.phtml:93 -#: c:\code\pi\usr\module\comment/template/admin/comment-module.phtml:99 -#: c:\code\pi\usr\module\comment/template/admin/comment-user.phtml:100 -msgid "Pending" -msgstr "屏蔽" - -#: c:\code\pi\usr\module\comment/template/admin/comment-list.phtml:107 -#: c:\code\pi\usr\module\comment/template/admin/comment-module.phtml:113 -#: c:\code\pi\usr\module\comment/template/admin/comment-user.phtml:114 -msgid "No comments available yet." -msgstr "" - -#: c:\code\pi\usr\module\comment/template/admin/comment-list.phtml:187 -#: c:\code\pi\usr\module\comment/template/admin/comment-module.phtml:193 -#: c:\code\pi\usr\module\comment/template/admin/comment-user.phtml:194 -msgid "Are you sure delete these comments?" -msgstr "确认删除这些评论?" - -#: c:\code\pi\usr\module\comment/template/admin/comment-list.phtml:233 -#: c:\code\pi\usr\module\comment/template/admin/comment-module.phtml:239 -#: c:\code\pi\usr\module\comment/template/admin/comment-user.phtml:240 -msgid "Are you sure delete this article?" -msgstr "确认删除这篇文章?" - -#: c:\code\pi\usr\module\comment/template/admin/comment-module-select.phtml:4 -#: c:\code\pi\usr\module\comment/template/admin/comment-type.phtml:8 -msgid "Action" -msgstr "动作" - -#: c:\code\pi\usr\module\comment/template/admin/comment-module-select.phtml:11 -#: c:\code\pi\usr\module\comment/template/admin/comment-module-select.phtml:20 -#: c:\code\pi\usr\module\comment/template/admin/comment-type.phtml:14 -#: c:\code\pi\usr\module\comment/template/admin/comment-type.phtml:30 -msgid "View comments" -msgstr "查看评论" - -#: c:\code\pi\usr\module\comment/template/admin/comment-type.phtml:7 -msgid "Enable type" -msgstr "" - -#: c:\code\pi\usr\module\comment/template/admin/comment-type.phtml:23 -msgid "No" -msgstr "不" - -#: c:\code\pi\usr\module\comment/template/admin/comment-type.phtml:26 -msgid "Yes" -msgstr "是" - -#: c:\code\pi\usr\module\comment/template/admin/comment-user-select.phtml:2 -msgid "Filter comments by a specific user." -msgstr "根据具体用户来过滤评论" - -#: c:\code\pi\usr\module\comment/template/admin/comment-user-select.phtml:5 -#: c:\code\pi\usr\module\comment/template/admin/comment-user.phtml:18 -msgid "Type user id or identity" -msgstr "输入用户ID或用户名" - -#: c:\code\pi\usr\module\comment/template/admin/comment-user-select.phtml:6 -#: c:\code\pi\usr\module\comment/template/admin/comment-user.phtml:19 -msgid "Submit" -msgstr "提交" - -#~ msgid "Inactive Posts" -#~ msgstr "已屏蔽评论" - -#~ msgid "Operation failed" -#~ msgstr "操作失败" - -#~ msgid "Categories" -#~ msgstr "分类" - -#~ msgid "Comment categories" -#~ msgstr "评论分类" - -#~ msgid "Enable Category" -#~ msgstr "启用分类评论" - -#~ msgid "Please login." -#~ msgstr "请登录。" - -#~ msgid "My active comments" -#~ msgstr "我的激活评论" - -#~ msgid "My pending comments" -#~ msgstr "我的评论草稿" - -#~ msgid "All" -#~ msgstr "全部" - -#~ msgid "Reply" -#~ msgstr "回复" - -#~ msgid "Operation denied." -#~ msgstr "禁止操作" - -#~ msgid "Comment is disabled." -#~ msgstr "评论已关闭" - -#~ msgid "Login" -#~ msgstr "登录" - -#~ msgid "Enable/Disable" -#~ msgstr "打开/关闭" - -#~ msgid "Type your content" -#~ msgstr "请发表评论……" - -#, fuzzy -#~ msgid "Commented on " -#~ msgstr "发表评论" - -#, fuzzy -#~ msgid "Comment edit" -#~ msgstr "编辑评论" - -#, fuzzy -#~ msgid "No content." -#~ msgstr "请发表评论……" - -#, fuzzy -#~ msgid "All comments " -#~ msgstr "全部评论" - -#, fuzzy -#~ msgid " to leave comments." -#~ msgstr "我的激活评论" - -#, fuzzy -#~ msgid "Post" -#~ msgstr "全部评论" - -#, fuzzy -#~ msgid "No one has commented yet." -#~ msgstr "热评文章排行" - -#, fuzzy -#~ msgid "commented on " -#~ msgstr "热评文章排行" - -#, fuzzy -#~ msgid "All active comments " -#~ msgstr "我的激活评论" - -#, fuzzy -#~ msgid "%s comments" -#~ msgstr "我的评论" - -#, fuzzy -#~ msgid "Last commented: " -#~ msgstr "最新评论文章" - -#, fuzzy -#~ msgid "Comments for %s module" -#~ msgstr "我发表的评论" - -#, fuzzy -#~ msgid "Comment detail" -#~ msgstr "发表评论" - -#, fuzzy -#~ msgid "Comment #%d" -#~ msgstr "评论" - -#, fuzzy -#~ msgid "Comment reply to %s" -#~ msgstr "发表评论" - -#, fuzzy -#~ msgid "View all comments" -#~ msgstr "全部评论" diff --git a/usr/module/comment/locale/zh-cn/block.mo b/usr/module/comment/locale/zh-cn/block.mo deleted file mode 100644 index 75387dac4ef55df78294bc9a536ebb5cdbf99d61..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 470 zcmaJ-O-sW-5LNV)qh}9$@TMCROEIn=h_y`sjRA>RCL{uU<| z?ahJ5@;;b-%-7cD#~RH#VVkf+*dXi?x`_y%WFFDmW&S3%W(FDZQO=*hI%TwAvErGj zD$wY~cL^U@kVpo}sL4FT!s$1}HZY&-0#7gbv5{(rs zk*WpFZj{soJHa0|>&Q7erHitWzOjX$=`(LkY9kBa3CKz?Z!($;SFJ-o@CHUB)#k~f zrltt*xL?nu(#I?-rFDR(kI5B}R=KXoD_B0%naSxp!J?@`@0nkN2D@w+8^{&1(C_<) z\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.7\n" -"X-Poedit-KeywordsList: _b\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: C:\\wamp\\www\\master\\usr\\module\\comment\n" - -#, fuzzy -#~ msgid "All" -#~ msgstr "All Categories" - -#, fuzzy -#~ msgid "All Posts" -#~ msgstr "All Categories" - -#, fuzzy -#~ msgid "All comments " -#~ msgstr "All Categories" - -#, fuzzy -#~ msgid "All comments" -#~ msgstr "All Categories" - -#, fuzzy -#~ msgid "Categories" -#~ msgstr "All Categories" - -#, fuzzy -#~ msgid "Comment categories" -#~ msgstr "All Categories" diff --git a/usr/module/comment/locale/zh-cn/default.mo b/usr/module/comment/locale/zh-cn/default.mo deleted file mode 100644 index e3753044560690d699afa36106375980df915978..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3365 zcmZvcZEO@p7{^Be!77TN0-`bk6_wug1(0%-*HQ@D(uP)|v8HVAroDyhZnL}Bawf(~ zsk9JENlTI13MGX!LE1tHFQrgTG{z5__|2H;2kCCF@dJjB#t;6V-MQW!GP$|mJTLRi zGxN;sAMlye%i_c{232+L03j7;<8vGX|mnUbTgLA>>!G+*l zFbiA(2EZ4=Dv;tdNc$(?Y{(=@_GPL9&@lL?Pm#yGBO;Sn-A$;L(fBB zj!tbAI>n?$cZ}NG9^AY7iX2lu`Es0!B@h-$1?AwEW6DE*4p=V6bUza<3j?YjHTr(g z8NH59ca7e`YV@V()Nlpew@Kfcb?BMsZ=fgI8Vslw^xdGg2%YXUy#qQkl!*Dz6Kxp= z^mf;x(;K4pI6A$zZ1k1rZ=usWVO+6zrpYo*9@OjVgl3s+YtT{~1TWJ~5+V`mNr@|- zIpNM-bBbgL9@C@TjACHvJR~B*!YHgxFR__zH7qq45hia`t#ESXLPZOT2rG=J!2>i` zuNN9C^zup&0WC#^lc(k)q*~Jg)(EMlQXLT?|Fp6m8%Yz==a8A3N`nX?=U`BnW=%8_ ziKWjsd3B7}iRmzgsE@=bMVy_?1oIWStrV56@q}dZ8r{GIUZ;nm5y7^*C&RXT39};F zNRdX#OJpZZJEHLHlL4*RF73;OC#!6xjm&;Wp(j;?QB_66R zIm@6XjZuz}s?{cSyY=ZYR~k?j%AUuBhmuvq>fIY}z{%Y&+pCI3 zuHexmqB1!^Ai57_hQ40}E#Iz?Z?7;+>^_ii%_u9a@D&=uJrmz{#S#IYmy^53m$TNF zm&cq&z|pryG^jND(SEBvKe`#d3PaJ%h+^qRfLADLqtN&}s)9-u;4MMg zPr?? zmN;l-*GCjp+rWci#W01n@x6*2zWk&g\n" -"Language-Team: eefocus\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.7\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-SearchPath-0: c:\\code\\pi\\usr\\module\\comment\n" - -#: c:\code\pi\usr\module\comment/config/event.php:21 -msgid "Post submitted" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/event.php:24 -msgid "Post published" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/event.php:27 -msgid "Post updated" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/event.php:30 -msgid "Post enabled" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/event.php:33 -msgid "Post disabled" -msgstr "" - -#: c:\code\pi\usr\module\comment/config/event.php:36 -msgid "Post deleted" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Api/Api.php:528 -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:398 -msgid "Guest" -msgstr "访客" - -#: c:\code\pi\usr\module\comment/src/Api/Api.php:570 -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:518 -msgid "Edit" -msgstr "编辑" - -#: c:\code\pi\usr\module\comment/src/Api/Api.php:571 -#: c:\code\pi\usr\module\comment/src/Api/Api.php:627 -msgid "Enable" -msgstr "启用" - -#: c:\code\pi\usr\module\comment/src/Api/Api.php:572 -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:525 -#: c:\code\pi\usr\module\comment/template/front/comment-lead.phtml:36 -#: c:\code\pi\usr\module\comment/template/front/comment-root.phtml:65 -msgid "Delete" -msgstr "删除" - -#: c:\code\pi\usr\module\comment/src/Api/Api.php:573 -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:532 -#: c:\code\pi\usr\module\comment/template/front/comment-reply.phtml:80 -msgid "Reply" -msgstr "回复" - -#: c:\code\pi\usr\module\comment/src/Api/Api.php:624 -msgid "Disable" -msgstr "屏蔽" - -#: c:\code\pi\usr\module\comment/src/Api/Article.php:40 -#, php-format -msgid "Demo article %d" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Api/Custom.php:41 -#, php-format -msgid "Custom article %d" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Api/Search.php:66 -#, php-format -msgid "Comment by %s" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/PostController.php:301 -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:139 -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:192 -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:331 -msgid "Invalid post parameter." -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/PostController.php:305 -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:403 -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:462 -msgid "Operation succeeded." -msgstr "操作成功" - -#: c:\code\pi\usr\module\comment/src/Controller/Admin/PostController.php:305 -msgid "Operation failed." -msgstr "操作失败" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/CustomController.php:36 -#, php-format -msgid "Demo custom article #%d" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/DemoController.php:36 -#, php-format -msgid "Demo article #%d" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/IndexController.php:23 -#, php-format -msgid "Comment portal for %s" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/IndexController.php:35 -msgid "Demo article with comments" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/IndexController.php:49 -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:71 -msgid "All active comment posts" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/IndexController.php:63 -msgid "Commented articles" -msgstr "已评论文章" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/IndexController.php:70 -msgid "Comment posts for module \"Comment\"" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/IndexController.php:76 -msgid "Comment posts for module \"Comment\" with type \"Article\"" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/IndexController.php:84 -#, php-format -msgid "Comment posts by %s" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/IndexController.php:94 -msgid "Comment posts by me" -msgstr "我发表的评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/IndexController.php:100 -msgid "Commented articles by me" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:67 -msgid "All comment posts" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:69 -msgid "All inactive comment posts" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:128 -msgid "Comment posts of article" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:193 -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:200 -msgid "My comments" -msgstr "我的评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:208 -msgid "My active comments" -msgstr "我的激活评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:217 -msgid "My pending comments" -msgstr "我的屏蔽评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:233 -msgid "Comment posts of user" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:304 -msgid "All" -msgstr "全部" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:329 -msgid "Comment posts of module" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:445 -msgid "All commented articles" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:447 -msgid "Articles with comments" -msgstr "有评论的文章" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:461 -msgid "My articles" -msgstr "我评论过的文章" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:469 -msgid "My articles with active comments" -msgstr "我的有激活评论的文章" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:550 -msgid "Received comments" -msgstr "收到的评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:557 -msgid "All Posts" -msgstr "全部评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:565 -msgid "Active Posts" -msgstr "激活评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:574 -msgid "Inactive Posts" -msgstr "已屏蔽评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/ListController.php:590 -msgid "Comment posts on user" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:50 -msgid "Permanent link" -msgstr "永久链接" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:109 -msgid "Comment post not found." -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:112 -msgid "Comment post" -msgstr "发表评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:145 -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:196 -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:290 -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:336 -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:395 -msgid "Operation denied." -msgstr "禁止操作" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:157 -msgid "Comment post edit" -msgstr "编辑评论" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:209 -msgid "Comment post reply" -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:293 -msgid "Invalid submission." -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:310 -msgid "Root not found." -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:313 -#: c:\code\pi\usr\module\comment/template/front/_post-form.phtml:3 -msgid "Comment is disabled." -msgstr "评论已禁用。" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:345 -msgid "Comment post saved successfully." -msgstr "发表评论成功" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:348 -msgid "Comment post not saved." -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:353 -msgid "Invalid data, please check and re-submit." -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:403 -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:462 -msgid "Operation failed" -msgstr "操作失败" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:453 -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:508 -msgid "Invalid parameters." -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:458 -msgid "Forbidden." -msgstr "" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:514 -msgid "Login" -msgstr "登录" - -#: c:\code\pi\usr\module\comment/src/Controller/Front/PostController.php:539 -msgid "Enable/Disable" -msgstr "启用/禁用" - -#: c:\code\pi\usr\module\comment/src/Form/PostForm.php:82 -msgid "Comment" -msgstr "评论" - -#: c:\code\pi\usr\module\comment/src/Form/PostForm.php:88 -#: c:\code\pi\usr\module\comment/template/front/comment-edit.phtml:46 -#: c:\code\pi\usr\module\comment/template/front/comment-reply.phtml:78 -#: c:\code\pi\usr\module\comment/template/front/_post-form.phtml:24 -#: c:\code\pi\usr\module\comment/template/front/_post-form.phtml:28 -msgid "Type your content" -msgstr "请发表评论……" - -#: c:\code\pi\usr\module\comment/src/Form/PostForm.php:98 -msgid "Submit" -msgstr "提交" - -#: c:\code\pi\usr\module\comment/template/admin/comment-list.phtml:79 -#: c:\code\pi\usr\module\comment/template/admin/comment-module.phtml:85 -#: c:\code\pi\usr\module\comment/template/admin/comment-user.phtml:86 -#: c:\code\pi\usr\module\comment/template/front/comment-lead.phtml:35 -#: c:\code\pi\usr\module\comment/template/front/comment-list.phtml:50 -#: c:\code\pi\usr\module\comment/template/front/comment-module.phtml:53 -#: c:\code\pi\usr\module\comment/template/front/comment-my-post.phtml:61 -#: c:\code\pi\usr\module\comment/template/front/comment-my-received.phtml:64 -#: c:\code\pi\usr\module\comment/template/front/comment-root.phtml:64 -#: c:\code\pi\usr\module\comment/template/front/comment-user-received.phtml:51 -#: c:\code\pi\usr\module\comment/template/front/comment-user.phtml:46 -#: c:\code\pi\usr\module\comment/template/front/comment-view.phtml:55 -msgid "Are you sure to delete this comment?" -msgstr "确定删除评论?" - -#: c:\code\pi\usr\module\comment/template/front/comment-article.phtml:34 -#, php-format -msgid "%s comments" -msgstr "%s 条评论" - -#: c:\code\pi\usr\module\comment/template/front/comment-article.phtml:49 -msgid "Last commented: " -msgstr "最新评论:" - -#: c:\code\pi\usr\module\comment/template/front/comment-article.phtml:54 -#, php-format -msgid " at %s" -msgstr " 于 %s" - -#: c:\code\pi\usr\module\comment/template/front/comment-article.phtml:69 -msgid "No data available yet." -msgstr "" - -#: c:\code\pi\usr\module\comment/template/front/comment-edit.phtml:21 -msgid "Comment edit" -msgstr "编辑评论" - -#: c:\code\pi\usr\module\comment/template/front/comment-edit.phtml:39 -#: c:\code\pi\usr\module\comment/template/front/comment-list.phtml:37 -#: c:\code\pi\usr\module\comment/template/front/comment-my-post.phtml:44 -#: c:\code\pi\usr\module\comment/template/front/comment-reply.phtml:68 -#: c:\code\pi\usr\module\comment/template/front/comment-user.phtml:32 -#: c:\code\pi\usr\module\comment/template/front/comment-view.phtml:42 -msgid "Commented on " -msgstr "评论于" - -#: c:\code\pi\usr\module\comment/template/front/comment-edit.phtml:49 -msgid "Cancel" -msgstr "取消" - -#: c:\code\pi\usr\module\comment/template/front/comment-edit.phtml:50 -msgid "Save" -msgstr "保存" - -#: c:\code\pi\usr\module\comment/template/front/comment-edit.phtml:63 -#: c:\code\pi\usr\module\comment/template/front/comment-reply.phtml:92 -#: c:\code\pi\usr\module\comment/template/front/comment-view.phtml:66 -msgid "No content." -msgstr "无内容。" - -#: c:\code\pi\usr\module\comment/template/front/comment-lead.phtml:3 -#: c:\code\pi\usr\module\comment/template/front/comment-root.phtml:34 -msgid "All comments " -msgstr "全部评论" - -#: c:\code\pi\usr\module\comment/template/front/comment-lead.phtml:45 -msgid "View all comments" -msgstr "查看全部评论" - -#: c:\code\pi\usr\module\comment/template/front/comment-lead.phtml:49 -#: c:\code\pi\usr\module\comment/template/front/comment-root.phtml:75 -msgid "No one has commented yet." -msgstr "尚无评论." - -#: c:\code\pi\usr\module\comment/template/front/comment-list.phtml:19 -msgid "All active comments " -msgstr "全部激活评论" - -#: c:\code\pi\usr\module\comment/template/front/comment-list.phtml:68 -#: c:\code\pi\usr\module\comment/template/front/comment-module.phtml:71 -#: c:\code\pi\usr\module\comment/template/front/comment-my-post.phtml:79 -#: c:\code\pi\usr\module\comment/template/front/comment-my-received.phtml:82 -#: c:\code\pi\usr\module\comment/template/front/comment-user-received.phtml:69 -#: c:\code\pi\usr\module\comment/template/front/comment-user.phtml:64 -msgid "No comments available yet." -msgstr "尚无评论。" - -#: c:\code\pi\usr\module\comment/template/front/comment-module.phtml:19 -#, php-format -msgid "Comments for %s module" -msgstr "%s 模块的评论" - -#: c:\code\pi\usr\module\comment/template/front/comment-module.phtml:39 -#: c:\code\pi\usr\module\comment/template/front/comment-my-received.phtml:47 -#: c:\code\pi\usr\module\comment/template/front/comment-user-received.phtml:37 -msgid "commented on " -msgstr "评论于" - -#: c:\code\pi\usr\module\comment/template/front/comment-my-post.phtml:50 -#: c:\code\pi\usr\module\comment/template/front/comment-my-received.phtml:53 -msgid "Pending" -msgstr "屏蔽" - -#: c:\code\pi\usr\module\comment/template/front/comment-reply.phtml:50 -#, php-format -msgid "Comment reply to %s" -msgstr "回复 %s 的评论" - -#: c:\code\pi\usr\module\comment/template/front/comment-root.phtml:20 -msgid "Item not found." -msgstr "" - -#: c:\code\pi\usr\module\comment/template/front/comment-view.phtml:17 -msgid "Comment detail" -msgstr "评论详情" - -#: c:\code\pi\usr\module\comment/template/front/comment-view.phtml:33 -msgid "In reply to:" -msgstr "回复:" - -#: c:\code\pi\usr\module\comment/template/front/comment-view.phtml:34 -msgid "Click to open" -msgstr "打开" - -#: c:\code\pi\usr\module\comment/template/front/comment-view.phtml:35 -#, php-format -msgid "Comment #%d" -msgstr "" - -#: c:\code\pi\usr\module\comment/template/front/_post-form.phtml:37 -msgid "Post comment" -msgstr "发表评论" - -#: c:\code\pi\usr\module\comment/template/front/_post-form.phtml:43 -#, php-format -msgid "Please login to leave comments." -msgstr "请登录后发表评论" diff --git a/usr/module/comment/sql/mysql.sql b/usr/module/comment/sql/mysql.sql deleted file mode 100644 index e4c70cff06..0000000000 --- a/usr/module/comment/sql/mysql.sql +++ /dev/null @@ -1,64 +0,0 @@ -# Pi Engine schema -# http://pialog.org -# Author: Taiwen Jiang -# -------------------------------------------------------- - -# ------------------------------------------------------ -# Comment -# >>>> - -# Comment type -CREATE TABLE `{type}` ( - `id` int(10) unsigned NOT NULL auto_increment, - `module` varchar(64) NOT NULL default '', - `controller` varchar(64) NOT NULL default '', - `action` varchar(64) NOT NULL default '', - `identifier` varchar(64) NOT NULL default '', - `params` varchar(255) NOT NULL default '', - `name` varchar(64) NOT NULL default '', - `title` varchar(255) NOT NULL default '', - -- Callback to fetch source meta data - `callback` varchar(255) NOT NULL default '', - -- Locator to identify root meta data - `locator` varchar(255) NOT NULL default '', - `active` tinyint(1) unsigned NOT NULL default '1', - `icon` varchar(255) NOT NULL default '', - - PRIMARY KEY (`id`), - UNIQUE KEY `module_type` (`module`, `name`) -); - -# Comment root -CREATE TABLE `{root}` ( - `id` int(10) unsigned NOT NULL auto_increment, - `module` varchar(64) NOT NULL, - `type` varchar(64) NOT NULL default '', - `item` int(10) unsigned NOT NULL, - `active` tinyint(1) unsigned NOT NULL default '1', - -- User id of root item author - `author` int(10) unsigned NOT NULL default '0', - - PRIMARY KEY (`id`), - UNIQUE KEY `module_item` (`module`, `type`, `item`), - KEY `author` (`author`) -); - -# Comment posts -CREATE TABLE `{post}` ( - `id` int(10) unsigned NOT NULL auto_increment, - `uid` int(10) unsigned NOT NULL default '0', - `root` int(10) unsigned NOT NULL, - `reply` int(10) unsigned NOT NULL default '0', - `content` text, - -- Content markup: text, html, markdown - `markup` varchar(64) NOT NULL default '', - `time` int(10) unsigned NOT NULL default '0', - `time_updated` int(10) unsigned NOT NULL default '0', - `active` tinyint(1) unsigned NOT NULL default '1', - `ip` varchar(15) NOT NULL default '', - `module` varchar(64) NOT NULL, - - PRIMARY KEY (`id`), - KEY `uid` (`uid`), - KEY `root` (`root`) -); diff --git a/usr/module/comment/src/Api/Api.php b/usr/module/comment/src/Api/Api.php deleted file mode 100644 index e32f3b1f71..0000000000 --- a/usr/module/comment/src/Api/Api.php +++ /dev/null @@ -1,1486 +0,0 @@ - - */ -class Api extends AbstractApi -{ - /** @var string Module name */ - protected $module = 'comment'; - - /** @var string[] Post table columns */ - protected $postColumn = array( - 'id', - 'root', - 'reply', - 'uid', - 'ip', - 'time', - 'time_updated', - 'content', - 'markup', - 'active', - 'module' - ); - - /** @var string[] Comment root table columns */ - protected $rootColumn = array( - 'id', - 'module', - 'type', - 'item', - 'author', - 'active' - ); - - /** - * Canonize comment post data - * - * @param $data - * - * @return array - */ - protected function canonizePost($data) - { - $result = array(); - - if (array_key_exists('active', $data)) { - if (null === $data['active']) { - unset($data['active']); - } else { - $data['active'] = (int) $data['active']; - } - } - - foreach ($data as $key => $value) { - if (in_array($key, $this->postColumn)) { - $result[$key] = $value; - } - } - - return $result; - } - - /** - * Canonize comment root data - * - * @param $data - * - * @return array - */ - protected function canonizeRoot($data) - { - $result = array(); - - if (array_key_exists('active', $data)) { - if (null === $data['active']) { - unset($data['active']); - } else { - $data['active'] = (int) $data['active']; - } - } - - foreach ($data as $key => $value) { - if (in_array($key, $this->rootColumn)) { - $result[$key] = $value; - } - } - - return $result; - } - - /** - * Get URLs - * - * For AJAX request, set `$options['return'] = 1;` - * - * @param string $type - * @param array $options - * - * @return string - */ - public function getUrl($type, array $options = array()) - { - $params = array(); - switch ($type) { - case 'post': - if (!empty($options['post'])) { - $params = array( - 'controller' => 'post', - 'id' => (int) $options['post'], - ); - unset($options['post']); - } - break; - case 'approve': - if (!empty($options['post'])) { - $params = array( - 'controller' => 'post', - 'action' => $type, - 'id' => (int) $options['post'], - ); - if (isset($options['flag'])) { - $params['flag'] = $options['flag']; - unset($options['flag']); - } - unset($options['post']); - } - break; - case 'delete': - case 'edit': - case 'reply': - if (!empty($options['post'])) { - $params = array( - 'controller' => 'post', - 'action' => $type, - 'id' => (int) $options['post'], - ); - unset($options['post']); - } - break; - case 'submit': - $params = array('controller' => 'post', 'action' => $type); - break; - case 'list': - $params = array('controller' => 'list'); - break; - case 'root': - if (!empty($options['root'])) { - $rootId = $options['root']; - unset($options['root']); - } elseif ($root = Pi::api('api', 'comment')->getRoot($options)) { - $rootId = $root['id']; - } else { - $rootId = 0; - } - if ($rootId) { - $params = array( - 'controller' => 'list', - 'root' => (int) $rootId, - ); - } - break; - case 'user': - $params = array( - 'controller' => 'list', - 'action' => 'user', - ); - if (!empty($options['uid'])) { - $params['uid'] = (int) $options['uid']; - unset($options['uid']); - } - break; - case 'module': - if (!empty($options['name'])) { - $params = array( - 'controller' => 'list', - 'action' => 'module', - 'name' => $options['name'], - ); - if (!empty($options['type'])) { - $params['type'] = $options['type']; - unset($options['type']); - } - unset($options['name']); - } - break; - default: - break; - } - if ($options) { - $params = array_merge($options, $params); - } - /* - // For AJAX calls - if (isset($options['return'])) { - $params['return'] = $options['return']; - } - */ - $url = Pi::service('url')->assemble('comment', $params); - - return $url; - } - - /** - * Load comment data for rendering against matched route - * - * Data array: - * - root: [id, ]module, type, item, active - * - count - * - posts: id, uid, ip, content, time, active - * - users: uid, name, avatar, url - * - url_list - * - url_submit - * - url_ajax - * - * @param RouteMatch|array|string $routeMatch - * @param array $options - * - * @return array|bool - */ - public function load($routeMatch, array $options = array()) - { - if ($routeMatch instanceof RouteMatch) { - $params = $routeMatch->getParams(); - } else { - $params = (array) $routeMatch; - } - $limit = Pi::config('leading_limit', 'comment') ?: 5; - - // Look up root against route data - $root = array(); - $module = $params['module']; - $controller = $params['controller']; - $action = $params['action']; - $typeList = Pi::registry('type', 'comment')->read($module, '', null); - if (isset($typeList['route'][$controller][$action])) { - $lookupList = $typeList['route'][$controller][$action]; - } elseif (isset($typeList['locator'])) { - $lookupList = $typeList['locator']; - } else { - return false; - } - - $active = true; - $lookup = function ($data) use ($params, &$active) { - // Look up via locator callback - if (!empty($data['locator'])) { - $locator = new $data['locator']($params['module']); - $item = $locator->locate($params); - $active = $data['active']; - - return $item; - } - - // Look up via route - if (!isset($params[$data['identifier']])) { - return false; - } - $item = $params[$data['identifier']]; - if ($data['params']) { - foreach ($data['params'] as $param => $value) { - if (!isset($params[$param]) || $value != $params[$param]) { - return false; - } - } - } - $active = $data['active']; - - return $item; - }; - - // Look up against controller-action - foreach ($lookupList as $key => $data) { - $item = $lookup($data, $active); - if ($item) { - $root = array( - 'module' => $module, - 'type' => $key, - 'item' => $item, - ); - break; - } - } - - if (!$root) { - return false; - } - - // Load translations - Pi::service('i18n')->load('module/comment:default'); - - $rootData = $this->getRoot($root); - if (!$active) { - $root['active'] = 0; - $rootData['active'] = 0; - } - // Check against cache - if ($rootData['id']) { - $result = Pi::service('comment')->loadCache($rootData['id']); - if ($result) { - if (Pi::service()->hasService('log')) { - Pi::service('log')->info( - sprintf('Comment root %d is cached.', $rootData['id']) - ); - } - if (!$active) { - $result['root']['active'] = 0; - } - return $result; - } - } - - $result = array( - 'root' => $rootData ?: $root, - 'count' => 0, - 'posts' => array(), - 'users' => array(), - 'url_list' => '', - 'url_submit' => $this->getUrl('submit'), - ); - - if ($rootData) { - $result['count'] = $this->getCount($rootData['id']); - - //vd($result['count']); - if ($result['count']) { - $posts = $this->getList($rootData['id'], $limit); - $opOption = isset($options['display_operation']) - ? $options['display_operation'] - : Pi::service('config')->module('display_operation', 'comment'); - $avatarOption = isset($options['avatar']) - ? $options['avatar'] - : 'medium'; - $renderOptions = array( - 'target' => false, - 'operation' => $opOption, - 'user' => array( - 'avatar' => $avatarOption, - ), - ); - $posts = $this->renderList($posts, $renderOptions); - $result['posts'] = $posts; - $result['url_list'] = $this->getUrl( - 'root', - array('root' => $rootData['id']) - ); - - $status = Pi::service('comment')->saveCache( - $rootData['id'], - $result - ); - if ($status && Pi::service()->hasService('log')) { - Pi::service('log')->info(sprintf( - 'Comment root %d is saved to cache.', - $rootData['id'] - )); - } - } - } - - return $result; - } - - /** - * Render post content - * - * @param array|RowGateway|string $post - * - * @return string - */ - public function renderPost($post) - { - $content = ''; - $markup = 'text'; - if ($post instanceof RowGateway || is_array($post)) { - $content = $post['content']; - $markup = $post['markup']; - } elseif (is_string($post)) { - $content = $post; - } - //$renderer = ('markdown' == $markup || 'html' == $markup) ? 'html' : 'text'; - //$parser = ('markdown' == $markup) ? 'markdown' : false; - //$result = Pi::service('markup')->render($content, $renderer, $parser); - - $result = Pi::api('markup', 'comment')->render($content, $markup); - - return $result; - } - - /** - * Render list of posts - * - * Options: - * - user: - * - field: 'name' - * - avatar: false| - * - url: 'profile'|'comment' - * - * - operation: with array - * - uid: int - * - user: object - * - section: 'front'|'admin' - * - list: array( => ) - * - level: member, author, admin; default as author - * - operation: with string for level - * - * - target - * - * - Comprehensive mode - * ``` - * $posts = Pi::api('api', 'comment')->renderList($posts, array( - * 'user' => array( - * 'field' => 'name', - * 'url' => 'comment', - * 'avatar' => 'small', - * 'attributes' => array( - * 'alt' => __('View profile'), - * ), - * ), - * 'target' => true, - * 'operation' => array( - * 'uid' => Pi::service('user')->getId(), - * 'section' => 'admin', - * 'level' => 'author', - * ), - * )); - * ``` - * - * - Lean mode - * ``` - * $posts = Pi::api('api', 'comment')->renderList($posts, array( - * 'user' => true, - * 'target' => true, - * 'operation' => true, - * )); - * ``` - * - * - Default mode - * ``` - * $posts = Pi::api('api', 'comment')->renderList($posts); - * ``` - * - * @param array $posts - * @param array $options - * - * @return array - */ - public function renderList(array $posts, array $options = array()) - { - if (!$posts) { - return $posts; - } - - $ops = array(); - // Build authors - if (!isset($options['user']) || false !== $options['user']) { - $op = isset($options['user']) - ? (array) $options['user'] - : array(); - $label = !empty($op['field']) ? $op['field'] : 'name'; - $avatar = isset($op['avatar']) ? $op['avatar'] : 'small'; - $url = isset($op['url']) ? $op['url'] : 'profile'; - $attrs = isset($op['attributes']) ? $op['attributes'] : array(); - - $uids = array(); - foreach ($posts as $post) { - $uids[] = $post['uid']; - } - if ($uids) { - $uids = array_unique($uids); - $users = Pi::service('user')->mget($uids, array($label)); - $avatars = null; - if (false !== $avatar) { - $avatars = Pi::service('avatar')->getList( - $uids, - $avatar, - $attrs - ); - } - array_walk( - $users, - function (&$data, $uid) use ($url, $avatars) { - if ('comment' == $url) { - $data['url'] = $this->getUrl( - 'user', - array('uid' => $uid) - ); - } else { - $data['url'] = Pi::service('user')->getUrl( - 'profile', - $uid - ); - } - if (null !== $avatars) { - $data['avatar'] = $avatars[$uid]; - } - } - ); - } - $users[0] = array( - 'avatar' => Pi::service('avatar')->get(0, $avatar), - 'url' => Pi::url('www'), - 'name' => __('Guest'), - ); - - $ops['users'] = $users; - } - - // Build operations - if (!isset($options['operation']) || $options['operation']) { - if (!isset($options['operation'])) { - $op = array(); - } elseif (is_string($options['operation'])) { - $op = array('level' => $options['operation']); - } else { - $op = (array) $options['operation']; - } - - $uid = $user = $list = $section = $admin = null; - if (isset($op['uid'])) { - $uid = (int) $op['uid']; - } - if (isset($op['user'])) { - $user = $op['user']; - } - if (null === $uid) { - if (null === $user) { - $uid = Pi::service('user')->getId(); - } else { - $uid = $user->get('id'); - } - } - - if (isset($op['section'])) { - $section = $op['section']; - } else { - $section = Pi::engine()->section(); - } - - if (isset($op['list'])) { - $list = (array) $op['list']; - } - if (null === $list) { - $list = array( - 'edit' => __('Edit'), - 'approve' => __('Enable'), - 'delete' => __('Delete'), - 'reply' => __('Reply'), - ); - } - - $level = isset($op['level']) ? $op['level'] : 'author'; - $isAdmin = Pi::service('permission')->isAdmin('comment', $uid); - $setOperations = function ($post) use ( - $list, - $uid, - $isAdmin, - $level, - $section - ) { - if ('admin' == $level && $isAdmin) { - $opList = array('edit', 'approve', 'delete', 'reply'); - } elseif ('author' == $level && $uid == $post['uid']) { - $opList = array('edit', 'delete', 'reply'); - } elseif ($uid) { - $opList = array('reply'); - } else { - $opList = array(); - } - $operations = array(); - foreach ($opList as $op) { - if (!isset($list[$op])) { - continue; - } - $title = $url = ''; - switch ($op) { - case 'edit': - case 'delete': - if ('admin' == $section) { - $url = Pi::service('url')->assemble( - 'admin', - array( - 'module' => 'comment', - 'controller' => 'post', - 'action' => $op, - 'id' => $post['id'], - ) - ); - } else { - $url = $this->getUrl($op, array( - 'post' => $post['id'] - )); - } - $title = $list[$op]; - break; - case 'approve': - if ($post['active']) { - $flag = 0; - $title = __('Disable'); - } else { - $flag = 1; - $title = __('Enable'); - } - if ('admin' == $section) { - $url = Pi::service('url')->assemble( - 'admin', - array( - 'module' => 'comment', - 'controller' => 'post', - 'action' => $op, - 'id' => $post['id'], - 'flag' => $flag, - ) - ); - } else { - $url = $this->getUrl($op, array( - 'post' => $post['id'], - 'flag' => $flag, - )); - } - break; - case 'reply': - if ('admin' == $section) { - } else { - $url = $this->getUrl($op, array( - 'post' => $post['id'] - )); - } - $title = $list[$op]; - break; - default: - break; - } - if (!$url || !$title) { - continue; - } - - $operations[$op] = array( - 'title' => $title, - 'url' => $url, - ); - } - - return $operations; - }; - - $ops['operations'] = array( - 'uid' => $uid, - 'is_admin' => $isAdmin, - 'section' => $section, - 'list' => $list, - 'callback' => $setOperations, - ); - } - - // Build targets - if (!isset($options['target']) || $options['target']) { - $targets = array(); - $rootIds = array(); - foreach ($posts as $post) { - $rootIds[] = (int) $post['root']; - } - if ($rootIds) { - $rootIds = array_unique($rootIds); - $targets = $this->getTargetList(array( - 'root' => $rootIds - )); - } - $ops['targets'] = $targets; - } - - array_walk($posts, function (&$post) use ($ops) { - $post['content'] = $this->renderPost($post); - $post['url'] = $this->getUrl('post', array( - 'post' => $post['id'] - )); - if (!empty($ops['users'])) { - $uid = (int) $post['uid']; - if (isset($ops['users'][$uid])) { - $post['user'] = $ops['users'][$uid]; - } else { - $post['user'] = $ops['users'][0]; - } - } - if (!empty($ops['targets'])) { - $root = (int) $post['root']; - if (isset($ops['targets'][$root])) { - $post['target'] = $ops['targets'][$root]; - } else { - $post['target'] = $ops['targets'][0]; - } - } - if (!empty($ops['operations']) - && is_callable($ops['operations']['callback']) - ) { - $post['operations'] = $ops['operations']['callback']($post); - } - }); - - return $posts; - } - - /** - * Get comment post edit form - * - * @param array $data - * - * @return PostForm - */ - public function getForm(array $data = array(), array $options = array()) - { - $name = isset($options['name']) ? $options['name'] : ''; - $markup = isset($options['markup']) - ? $options['markup'] - : Pi::config('markup_format', $this->module); - $form = new PostForm($name, $markup); - - if ($data) { - $form->setData($data); - } - - return $form; - } - - /** - * Add comment of an item - * - * @param array $data root, uid, content, module, item, type, time - * - * @return int|bool - */ - public function addPost(array $data) - { - $id = isset($data['id']) ? (int) $data['id'] : 0; - if (isset($data['id'])) { - unset($data['id']); - } - - $postData = $this->canonizePost($data); - if (!$id) { - // Add root if not exist - if (empty($postData['root'])) { - $rootId = $this->addRoot($data); - if (!$rootId) { - return false; - } - $postData['root'] = $rootId; - - // Verify root - } else { - $root = Pi::model('root', 'comment')->find($postData['root']); - if (!$root) { - return false; - } - $type = Pi::registry('type', 'comment')->read( - $root['module'], - $root['type'] - ); - // Exit if type is disabled or not exist - if (!$type) { - return false; - } - if (empty($postData['module'])) { - $postData['module'] = $root['module']; - } - } - - if (!isset($postData['time'])) { - $postData['time'] = time(); - } - if (isset($postData['time_updated'])) { - unset($postData['time_updated']); - } - $row = Pi::model('post', 'comment')->createRow($postData); - } else { - $row = Pi::model('post', 'comment')->find($id); - if (!isset($postData['time_updated'])) { - $postData['time_updated'] = time(); - } - foreach (array('module', 'reply', 'root', 'time', 'uid') as $key) { - if (isset($postData[$key])) { - unset($postData[$key]); - } - } - $row->assign($postData); - } - - try { - $row->save(); - $id = (int) $row->id; - } catch (\Exception $d) { - $id = false; - } - - return $id; - } - - /** - * Add comment root of an item - * - * @param array $data module, item, author, type, time - * - * @return int|bool - */ - public function addRoot(array $data) - { - $id = isset($data['id']) ? (int) $data['id'] : 0; - if (isset($data['id'])) { - unset($data['id']); - } - $type = Pi::registry('type', 'comment')->read( - $data['module'], - $data['type'] - ); - // Exit if type is disabled or not exist - if (!$type) { - return false; - } - - if (!isset($data['author'])) { - $callback = $type['callback']; - $handler = new $callback($data['module']); - $source = $handler->get($data['item']); - $data['author'] = $source['uid']; - } - $rootData = $this->canonizeRoot($data); - if (!$id) { - $row = Pi::model('root', 'comment')->createRow($rootData); - } else { - $row = Pi::model('root', 'comment')->find($id); - $row->assign($rootData); - } - - try { - $row->save(); - $id = (int) $row->id; - } catch (\Exception $d) { - $id = false; - } - - return $id; - } - - /** - * Get a comment - * - * @param int $id - * - * @return array|bool uid, content, time, active, IP - */ - public function getPost($id) - { - $row = Pi::model('post', 'comment')->find($id); - $result = $row ? $row->toArray() : false; - - return $result; - } - - /** - * Get root - * - * @param int|array $condition - * - * @return array Module, type, item, callback, active - */ - public function getRoot($condition) - { - if (is_scalar($condition)) { - $row = Pi::model('root', 'comment')->find($condition); - $result = $row ? $row->toArray() : array(); - } else { - $where = $this->canonizeRoot($condition); - $rowset = Pi::model('root', 'comment')->select($where); - if (count($rowset) == 1) { - $result = $rowset->current()->toArray(); - } else { - $result = array(); - } - } - - return $result; - } - - /** - * Get target(s) content - * - * @param int|int[] $item - * @param array $options Callback or module + type - * - * @return mixed - */ - public function getTargetContent($item, array $options) - { - if (empty($options['module'])) { - return array(); - } - - $items = (array) $item; - if (!empty($options['callback'])) { - $handler = new $options['callback']($options['module']); - $list = array_values($handler->get($items)); - } else { - $vars = array('title', 'url', 'uid', 'time'); - $conditions = array( - 'module' => $options['module'], - 'type' => empty($options['type']) ? '' : $options['type'], - 'id' => $items, - ); - $list = Pi::service('module')->content($vars, $conditions); - } - if (is_scalar($item)) { - $result = current($list); - } else { - $result = $list; - } - - return $result; - } - - /** - * Get target content of a root - * - * @param int $root - * - * @return array|bool Title, url, uid, time - */ - public function getTarget($root) - { - $rootData = $this->getRoot($root); - if (!$rootData) { - return false; - } - $target = Pi::model('type', 'comment')->select(array( - 'module' => $rootData['module'], - 'name' => $rootData['type'], - ))->current(); - if (!$target) { - return false; - } - $data = array( - 'module' => $rootData['module'], - 'type' => $rootData['type'], - 'callback' => $target['callback'], - ); - $result = $this->getTargetContent($rootData['item'], $data); - - return $result; - } - - /** - * Get target list by root IDs - * - * @param array $ids - * - * @return array - */ - public function getTargetsByRoot(array $ids) - { - $result = array(); - if (!$ids) { - return $result; - } - - $rowset = Pi::model('root', 'comment')->select(array('id' => $ids)); - //$roots = array(); - $items = array(); - foreach ($rowset as $row) { - $id = (int) $row['id']; - //$roots[$id] = $row->toArray(); - $items[$row['module']][$row['type']][$row['item']] = $id; - } - //d($items); - $types = Pi::registry('type', 'comment')->read(); - $list = array(); - foreach ($items as $module => $mList) { - foreach ($mList as $type => $cList) { - if (!isset($types[$module][$type])) { - continue; - } - /* - $callback = $types[$module][$type]['callback']; - $handler = new $callback($module); - $targets = $handler->get(array_keys($cList)); - foreach ($targets as $item => $target) { - $root = $cList[$item]; - $list[$root] = $target; - } - */ - $data = array( - 'module' => $module, - 'type' => $type, - 'callback' => $types[$module][$type]['callback'], - ); - $targets = $this->getTargetContent(array_keys($cList), $data); - foreach ($targets as $target) { - $root = $cList[$target['id']]; - $list[$root] = $target; - } - } - } - foreach ($ids as $root) { - $result[$root] = $list[$root]; - } - - return $result; - } - - /** - * Get multiple targets being commented - * - * @param array|Where $condition - * @param int|null $limit - * @param int $offset - * @param string|null $order - * - * @return array List of targets indexed by root id - */ - public function getTargetList( - $condition, - $limit = null, - $offset = 0, - $order = null - ) { - $result = array(); - - if ($condition instanceof Where) { - $where = $condition; - } else { - $whereRoot = array(); - $wherePost = $this->canonizePost($condition); - /**/ - if (isset($wherePost['active'])) { - $whereRoot['active'] = $wherePost['active']; - } - /**/ - if (isset($condition['type'])) { - $whereRoot['type'] = $condition['type']; - } - - $where = array(); - foreach ($wherePost as $field => $value) { - $where['post.' . $field] = $value; - } - foreach ($whereRoot as $field => $value) { - $where['root.' . $field] = $value; - } - } - - $select = Pi::db()->select(); - $select->from( - array('root' => Pi::model('root', 'comment')->getTable()), - array('id', 'module', 'type', 'item', 'author') - ); - - $select->join( - array('post' => Pi::model('post', 'comment')->getTable()), - 'post.root=root.id', - //array() - array('time', 'uid') - ); - $select->group('post.root'); - $select->where($where); - $limit = (null === $limit) - ? Pi::config('list_limit', 'comment') - : (int) $limit; - $order = (null === $order) ? 'post.time desc' : $order; - if ($limit) { - $select->limit($limit); - } - if ($offset) { - $select->offset($offset); - } - if ($order) { - $select->order($order); - } - - $types = Pi::registry('type', 'comment')->read(); - $items = array(); - $keyList = array(); - $rowset = Pi::db()->query($select); - foreach ($rowset as $row) { - $root = (int) $row['id']; - $keyList[] = $root; - $items[$row['module']][$row['type']][$row['item']] = array( - 'root' => $root, - 'comment_time' => (int) $row['time'], - 'comment_uid' => (int) $row['uid'], - ); - } - - $targetList = array(); - foreach ($items as $module => $mList) { - foreach ($mList as $type => $cList) { - if (!isset($types[$module][$type])) { - continue; - } - /* - $callback = $targets[$module][$type]['callback']; - $handler = new $callback($module); - $targets = $handler->get(array_keys($cList)); - foreach ($targets as $item => $target) { - $root = $cList[$item]['root']; - $targetList[$root] = array_merge($target, $cList[$item]); - } - */ - - $data = array( - 'module' => $module, - 'type' => $type, - 'callback' => $types[$module][$type]['callback'], - ); - $targets = $this->getTargetContent(array_keys($cList), $data); - foreach ($targets as $target) { - $item = $target['id']; - $root = $cList[$item]['root']; - $targetList[$root] = array_merge($target, $cList[$item]); - } - } - } - foreach ($keyList as $key) { - $result[$key] = &$targetList[$key]; - } - - return $result; - } - - /** - * Get multiple comments - * - * @param int|array|Where $condition Root id or conditions - * @param int $limit - * @param int $offset - * @param string $order - * - * @return array|bool - */ - public function getList($condition, $limit = null, $offset = 0, $order = null) - { - $result = array(); - - $isJoin = false; - if ($condition instanceof Where) { - $where = $condition; - $isJoin = true; - } else { - $whereRoot = array(); - if (is_array($condition)) { - $wherePost = $this->canonizePost($condition); - if (isset($condition['type'])) { - $whereRoot['type'] = $condition['type']; - } - if (isset($condition['author'])) { - $whereRoot['author'] = $condition['author']; - } - if ($whereRoot) { - $isJoin = true; - } - } else { - $wherePost = array( - 'root' => (int) $condition, - 'active' => 1, - ); - } - //vd($wherePost); - if ($isJoin) { - $where = array(); - foreach ($wherePost as $field => $value) { - $where['post.' . $field] = $value; - } - foreach ($whereRoot as $field => $value) { - $where['root.' . $field] = $value; - } - } else { - $where = $wherePost; - } - } - - if (!$isJoin) { - $order = null === $order ? 'time desc' : $order; - $select = Pi::model('post', 'comment')->select(); - } else { - $order = null === $order ? 'post.time desc' : $order; - $select = Pi::db()->select(); - $select->from( - array('post' => Pi::model('post', 'comment')->getTable()) - ); - $select->join( - array('root' => Pi::model('root', 'comment')->getTable()), - 'root.id=post.root', - array() - ); - } - - $select->where($where); - $limit = (null === $limit) - ? Pi::config('list_limit', 'comment') - : (int) $limit; - if ($limit) { - $select->limit($limit); - } - if ($order) { - $select->order($order); - } - if ($offset) { - $select->offset($offset); - } - //$select->order($order); - if (!$isJoin) { - $rowset = Pi::model('post', 'comment')->selectWith($select); - foreach ($rowset as $row) { - $result[] = $row->toArray(); - } - } else { - $rowset = Pi::db()->query($select); - foreach ($rowset as $row) { - $result[] = (array) $row; - } - } - - return $result; - } - - /** - * Get comment count - * - * @param int|array $condition Root id or conditions - * - * @return int|bool - */ - public function getCount($condition = array()) - { - $isJoin = false; - if ($condition instanceof Where) { - $where = $condition; - $isJoin = true; - } else { - $whereRoot = array(); - //$wherePost = array(); - if (is_array($condition)) { - $wherePost = $this->canonizePost($condition); - if (isset($condition['type'])) { - $whereRoot['type'] = $condition['type']; - } - if (isset($condition['author'])) { - $whereRoot['author'] = $condition['author']; - } - if ($whereRoot) { - $isJoin = true; - } - } else { - $wherePost = array( - 'root' => (int) $condition, - 'active' => 1, - ); - } - if ($isJoin) { - $where = array(); - foreach ($wherePost as $field => $value) { - $where['post.' . $field] = $value; - } - foreach ($whereRoot as $field => $value) { - $where['root.' . $field] = $value; - } - } else { - $where = $wherePost; - } - } - - if (!$isJoin) { - $count = Pi::model('post', 'comment')->count($where); - } else { - $select = Pi::db()->select(); - $select->from( - array('post' => Pi::model('post', 'comment')->getTable()) - ); - $select->columns(array('count' => Pi::db()->expression('COUNT(*)'))); - $select->join( - array('root' => Pi::model('root', 'comment')->getTable()), - 'root.id=post.root', - array() - ); - $select->where($where); - $row = Pi::db()->query($select)->current(); - $count = (int) $row['count']; - } - - return $count; - } - - /** - * Get target count - * - * @param array|Where $condition - * - * @return int - */ - public function getTargetCount($condition = array()) - { - if ($condition instanceof Where) { - $where = $condition; - } else { - $whereRoot = array(); - $wherePost = $this->canonizePost($condition); - if (isset($wherePost['active'])) { - $whereRoot['active'] = $wherePost['active']; - } - if (isset($condition['type'])) { - $whereRoot['type'] = $condition['type']; - } - - $where = array(); - foreach ($wherePost as $field => $value) { - $where['post.' . $field] = $value; - } - foreach ($whereRoot as $field => $value) { - $where['root.' . $field] = $value; - } - } - - $select = Pi::db()->select(); - $select->from( - array('root' => Pi::model('root', 'comment')->getTable()) - ); - $select->columns(array( - 'count' => Pi::db()->expression('COUNT(DISTINCT root.id)') - )); - $select->join( - array('post' => Pi::model('post', 'comment')->getTable()), - 'post.root=root.id', - array() - ); - //$select->group('post.root'); - $select->where($where); - $row = Pi::db()->query($select)->current(); - $count = (int) $row['count']; - - return $count; - } - - /** - * Delete a comment - * - * @param int $id - * - * @return bool - */ - public function deletePost($id) - { - $row = Pi::model('post', 'comment')->find($id); - if (!$row) { - return false; - } - $result = true; - try { - $row->delete(); - } catch (\Exception $e) { - $result = false; - } - - return $result; - } - - /** - * Approve/Disapprove a comment - * - * @param int $id - * @param bool $flag - * - * @return bool - */ - public function approve($id, $flag = true) - { - $row = Pi::model('post', 'comment')->find($id); - if (!$row) { - return false; - } - if ((int) $row->active == (int) $flag) { - return false; - } - $row->active = (int) $flag; - $result = true; - try { - $row->save(); - } catch (\Exception $e) { - $result = false; - } - - return $result; - } - - /** - * Enable/Disable comments for a target - * - * @param array|int $root - * @param bool $flag - * - * @return bool - */ - public function enable($root, $flag = true) - { - $model = Pi::model('root', 'comment'); - if (is_int($root)) { - $row = $model->find($root); - if (!$row) { - return false; - } - } else { - $root = $this->canonizeRoot($root); - $row = $model->select($root)->current(); - if (!$row) { - $row = $model->createRow($root); - } - } - if ($row->id && (int) $row->active == (int) $flag) { - return false; - } - $row->active = (int) $flag; - $result = true; - try { - $row->save(); - } catch (\Exception $e) { - $result = false; - } - - return $result; - } - - /** - * Delete comment root and its comments - * - * @param int $root - * - * @return bool - */ - public function delete($root) - { - $row = Pi::model('root', 'comment')->find($root); - if (!$row) { - return false; - } - $result = true; - Pi::model('post', 'comment')->delete(array('root' => $root)); - try { - $row->delete(); - } catch (\Exception $e) { - $result = false; - } - - return $result; - } -} diff --git a/usr/module/comment/src/Api/Article.php b/usr/module/comment/src/Api/Article.php deleted file mode 100644 index 3219f859c9..0000000000 --- a/usr/module/comment/src/Api/Article.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Api; - -use Pi; -use Pi\Application\Api\AbstractComment; - -/** - * Comment target callback handler - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class Article extends AbstractComment -{ - /** @var string */ - protected $module = 'comment'; - - /** - * Get target data - * - * @param int|int[] $item Item id(s) - * - * @return array - */ - public function get($item) - { - $result = array(); - $items = (array) $item; - - foreach ($items as $id) { - $result[$id] = array( - 'id' => $id, - 'title' => sprintf(__('Demo article %d'), $id), - 'url' => Pi::service('url')->assemble( - 'comment', - array( - 'module' => 'comment', - 'controller' => 'demo', - 'id' => $id, - 'enable' => 'yes', - ) - ), - 'uid' => rand(1, 5), - 'time' => time(), - ); - } - - if (is_scalar($item)) { - $result = $result[$item]; - } - - return $result; - } -} diff --git a/usr/module/comment/src/Api/Custom.php b/usr/module/comment/src/Api/Custom.php deleted file mode 100644 index 8ba5dc5eb8..0000000000 --- a/usr/module/comment/src/Api/Custom.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Api; - -use Pi; -use Pi\Application\Api\AbstractComment; -use Zend\Mvc\Router\RouteMatch; - -/** - * Custom comment target callback handler and locator - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class Custom extends AbstractComment -{ - /** @var string */ - protected $module = 'comment'; - - /** - * Get target data - * - * @param int|int[] $item Item id(s) - * - * @return array - */ - public function get($item) - { - $result = array(); - $items = (array) $item; - - foreach ($items as $id) { - $result[$id] = array( - 'id' => $id, - 'title' => sprintf(__('Custom article %d'), $id), - 'url' => Pi::service('url')->assemble( - 'comment', - array( - 'module' => 'comment', - 'controller' => 'custom', - 'id' => $id, - 'custom' => 'yes', - ) - ), - 'uid' => rand(1, 5), - 'time' => time(), - ); - } - - if (is_scalar($item)) { - $result = $result[$item]; - } - - return $result; - } - - /** - * Locate source id via route - * - * @param RouteMatch|array $params - * - * @return mixed|bool - */ - public function locate($params = null) - { - if (null == $params) { - $params = Pi::engine()->application()->getRouteMatch(); - } - if ($params instanceof RouteMatch) { - $params = $params->getParams(); - } - if ('comment' == $params['module'] - && 'custom' == $params['controller'] - && !empty($params['custom']) - ) { - $item = $params['id']; - } else { - $item = false; - } - - return $item; - } -} diff --git a/usr/module/comment/src/Api/Event.php b/usr/module/comment/src/Api/Event.php deleted file mode 100644 index 877c785deb..0000000000 --- a/usr/module/comment/src/Api/Event.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Api; - -use Pi; -use Pi\Application\Api\AbstractApi; - -/** - * Comment Event Handler - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class Event extends AbstractApi -{ - /** - * Comment post submission - * - * @param int $id - */ - public function postsubmit($id) - { - return; - } - - /** - * Comment post publish - * - * @param int $id - */ - public function postpublish($id) - { - // Clear cache for leading comments - Pi::service('comment')->clearCache($id); - - // Insert timeline item - Pi::service('comment')->timeline($id); - - return; - } - - /** - * Comment post update - * - * @param int $id - */ - public function postupdate($id) - { - // Clear cache for leading comments - Pi::service('comment')->clearCache($id); - - return; - } - - /** - * Comment post enable - * - * @param int|int[] $id - */ - public function postenable($id) - { - // Clear cache for leading comments - Pi::service('comment')->clearCache($id); - - // Insert timeline item - if (is_array($id)) { - foreach ($id as $cid) { - Pi::service('comment')->timeline($cid); - } - } else { - Pi::service('comment')->timeline($id); - } - - return; - } - - /** - * Comment post disable - * - * @param int|int[] $id - */ - public function postdisable($id) - { - // Clear cache for leading comments - Pi::service('comment')->clearCache($id); - - return; - } - - /** - * Comment post delete - * - * @param int|int[] $root - */ - public function postdelete($root) - { - Pi::service('comment')->clearCache($root, true); - - return; - } - -} diff --git a/usr/module/comment/src/Api/Markup.php b/usr/module/comment/src/Api/Markup.php deleted file mode 100644 index 99aad92868..0000000000 --- a/usr/module/comment/src/Api/Markup.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Api; - -use Pi; -use Pi\Application\Api\AbstractApi; - -/** - * Comment markup renderer - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class Markup extends AbstractApi -{ - /** - * Render post content - * - * @param string $content Raw content - * @param array|string $options Source type: `markdown`, `html`, `text`; array for options - * - * @return string - */ - public function render($content, $options = array()) - { - if (is_string($options)) { - $options = array('format' => $options); - } - if (isset($options['format'])) { - $format = $options['format']; - } else { - $format = Pi::config('markup_format', $this->module); - } - - $options = array(); - switch ($format) { - case 'javascript': - $options = array( - 'filters' => array( - 'xss_sanitizer' => false, - ) - ); - break; - case 'html': - $options = array( - 'filters' => array( - 'xss_sanitizer' => false, - ) - ); - break; - case 'markdown': - break; - case 'text': - default: - if (isset($options['filters'])) { - $filters = $options['filters']; - } else { - $filters = Pi::config('markup_filters', $this->module); - if (!empty($filters)) { - $filters = array_fill_keys($filters, array()); - } - } - $options['filters'] = $filters; - break; - } - $markup = $format ?: 'text'; - $result = Pi::service('markup')->compile( - $content, - $markup, - $options - ); - - return $result; - } -} diff --git a/usr/module/comment/src/Api/Search.php b/usr/module/comment/src/Api/Search.php deleted file mode 100644 index 0447cfd808..0000000000 --- a/usr/module/comment/src/Api/Search.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Api; - -use Pi; -use Pi\Search\AbstractSearch; -use Pi\Db\Sql\Where; -use Pi\Application\Model\Model; - -/** - * Class for module search - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class Search extends AbstractSearch -{ - /** - * {@inheritDoc} - */ - protected $table = 'post'; - - /** - * {@inheritDoc} - */ - protected $searchIn = array( - 'content' - ); - - /** - * {@inheritDoc} - */ - protected $meta = array( - 'id' => 'id', - 'content' => 'content', - 'time' => 'time', - 'uid' => 'uid', - ); - - /** - * {@inheritDoc} - */ - protected function fetchResult( - Model $model, - Where $where, - $limit = 0, - $offset = 0 - ) { - $result = parent::fetchResult($model, $where, $limit, $offset); - - // Fetch users - $users = array(); - array_walk($result, function ($data) use (&$users) { - $users[$data['uid']] = array(); - }); - $users = Pi::service('user')->mget(array_keys($users), 'name'); - - // Build title - array_walk($result, function (&$data) use ($users) { - $data['title'] = sprintf(__('Comment by %s'), $users[$data['uid']]); - }); - - return $result; - } - - /** - * {@inheritDoc} - */ - protected function buildUrl(array $item) - { - $link = Pi::service('url')->assemble( - 'comment', - array('controller' => 'post', 'id' => $item['id']) - ); - - return $link; - } -} diff --git a/usr/module/comment/src/Block/Block.php b/usr/module/comment/src/Block/Block.php deleted file mode 100644 index 96dba64945..0000000000 --- a/usr/module/comment/src/Block/Block.php +++ /dev/null @@ -1,113 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Block; - -use Pi; - -class Block -{ - /** - * Recent comments block - */ - public static function post($options = array(), $module = null) - { - // Set options - $block = array(); - $block = array_merge($block, $options); - // Set options - $limit = intval($block['limit']); - $where = array( - 'active' => 1 - ); - // Get posts list - $posts = Pi::api('api', 'comment')->getList( - $where, - $limit - ); - // Set render options - $renderOptions = array( - 'user' => array( - 'avatar' => 'medium', - 'attributes' => array( - 'alt' => __('View profile'), - ), - ), - ); - // Get render posts list - $block['posts'] = Pi::api('api', 'comment')->renderList($posts, $renderOptions); - // return - return $block; - } - - /** - * Commented articles block - */ - public static function article($options = array(), $module = null) - { - // Set options - $block = array(); - $block = array_merge($block, $options); - // Set options - $limit = intval($block['limit']); - // Top count - $rowset = Pi::model('post', 'comment')->count( - array('active' => 1), - array('group' => 'root', 'limit' => $limit) - ); - $roots = array(); - foreach ($rowset as $row) { - $roots[$row['root']] = (int) $row['count']; - } - $rootIds = array_keys($roots); - $targets = Pi::api('api', 'comment')->getTargetsByRoot($rootIds); - array_walk($targets, function (&$target, $rootId) use ($roots) { - $target['count'] = $roots[$rootId]; - }); - $block['targets'] = $targets; - // return - return $block; - } - - /** - * Top posters block - */ - public static function user($options = array(), $module = null) - { - // Set options - $block = array(); - $block = array_merge($block, $options); - // Set options - $limit = intval($block['limit']); - // Top users - $rowset = Pi::model('post', 'comment')->count( - array('active' => 1), - array('group' => 'uid', 'limit' => $limit) - ); - $block['users'] = array(); - foreach ($rowset as $row) { - $block['users'][$row['uid']] = array( - 'count' => (int) $row['count'], - ); - } - if ($block['users']) { - $userNames = Pi::service('user')->mget(array_keys($block['users']), 'name'); - array_walk($block['users'], function (&$user, $uid) use ($userNames) { - $user['name'] = $userNames[$uid]; - $user['profile'] = Pi::service('user')->getUrl('profile', $uid); - $user['url'] = Pi::api('api', 'comment')->getUrl( - 'user', - array('uid' => $uid) - ); - }); - } - // return - return $block; - } -} \ No newline at end of file diff --git a/usr/module/comment/src/Controller/Admin/IndexController.php b/usr/module/comment/src/Controller/Admin/IndexController.php deleted file mode 100644 index 70e07d7135..0000000000 --- a/usr/module/comment/src/Controller/Admin/IndexController.php +++ /dev/null @@ -1,290 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Controller\Admin; - -use Pi; -use Pi\Mvc\Controller\ActionController; - -class IndexController extends ActionController -{ - /** - * Comment portal - */ - public function indexAction() - { - // Portal - $title = sprintf(_a('Comment portal for %s'), Pi::config('sitename')); - $links = array( - 'build' => array( - 'title' => _a('Build comment data for demo articles'), - 'url' => $this->url('', array( - 'controller' => 'index', - 'action' => 'build', - )), - ), - 'demo' => array( - 'title' => _a('Demo article with comments'), - 'url' => $this->url('comment', array( - 'controller' => 'demo', - )), - ), - 'all' => array( - 'title' => _a('All comment posts'), - 'url' => $this->url('', array( - 'controller' => 'list', - 'action' => 'index', - )), - ), - 'all-active' => array( - 'title' => _a('All active comment posts'), - 'url' => $this->url('', array( - 'controller' => 'list', - 'action' => 'index', - 'active' => 1, - )), - ), - 'all-inactive' => array( - 'title' => _a('All inactive comment posts'), - 'url' => $this->url('', array( - 'controller' => 'list', - 'action' => 'index', - 'active' => 0, - )), - ), - 'article' => array( - 'title' => _a('Commented articles'), - 'url' => $this->url('', array( - 'controller' => 'list', - 'action' => 'article', - )), - ), - 'user' => array( - 'title' => _a('Comment posts by user'), - 'url' => $this->url('', array( - 'controller' => 'list', - 'action' => 'user', - )), - ), - 'module' => array( - 'title' => _a('Comment posts by module'), - 'url' => $this->url('', array( - 'controller' => 'list', - 'action' => 'module', - )), - ), - ); - - // Statistics - $counts = array( - 'total' => array( - 'title' => _a('Total posts'), - 'count' => Pi::api('api', 'comment')->getCount(), - 'url' => $this->url('', array( - 'controller' => 'list', - 'action' => 'index', - )), - ), - 'active' => array( - 'title' => _a('Active posts'), - 'count' => Pi::api('api', 'comment')->getCount(array('active' => 1)), - 'url' => $this->url('', array( - 'controller' => 'list', - 'action' => 'index', - 'active' => 1, - )), - ), - 'inactive' => array( - 'title' => _a('Inactive posts'), - 'count' => Pi::api('api', 'comment')->getCount(array('active' => 0)), - 'url' => $this->url('', array( - 'controller' => 'list', - 'action' => 'index', - 'active' => 0, - )), - ), - ); - //d($counts); - - // Top users - $rowset = Pi::model('post', 'comment')->count( - array('active' => 1), - array('group' => 'uid', 'limit' => 5) - ); - $users = array(); - foreach ($rowset as $row) { - $users[$row['uid']] = array( - 'count' => (int) $row['count'], - ); - } - if ($users) { - $userNames = Pi::service('user')->mget(array_keys($users), 'name'); - array_walk($users, function (&$user, $uid) use ($userNames) { - $user['name'] = $userNames[$uid]; - $user['profile'] = Pi::service('user')->getUrl('profile', $uid); - $user['url'] = Pi::api('api', 'comment')->getUrl( - 'user', - array('uid' => $uid) - ); - }); - } - //d($users); - - // Top targets - $rowset = Pi::model('post', 'comment')->count( - array('active' => 1), - array('group' => 'root', 'limit' => 5) - ); - $roots = array(); - foreach ($rowset as $row) { - $roots[$row['root']] = (int) $row['count']; - } - $rootIds = array_keys($roots); - $targets = Pi::api('api', 'comment')->getTargetsByRoot($rootIds); - //$targets = Pi::api('api', 'comment')->getTargetList(array('root' => $rootIds)); - array_walk($targets, function (&$target, $rootId) use ($roots) { - $target['count'] = $roots[$rootId]; - }); - //d($targets); - - // Module stats - $modulelist = Pi::registry('modulelist')->read('active'); - $where = array( - 'post.active' => 1, - 'root.module' => array_keys($modulelist), - ); - $select = Pi::db()->select(); - $select->from( - array('post' => Pi::model('post', 'comment')->getTable()) - ); - $select->columns(array('count' => Pi::db()->expression('COUNT(*)'))); - $select->join( - array('root' => Pi::model('root', 'comment')->getTable()), - 'root.id=post.root', - array('module', 'type') - ); - $select->where($where); - $select->group(array('root.module', 'root.type')); - $resultSet = Pi::db()->query($select); - $list = array(); - foreach ($resultSet as $set) { - $list[$set['module']][$set['type']] = (int) $set['count']; - } - $types = Pi::registry('type', 'comment')->read(); - $modules = array(); - foreach ($modulelist as $name => $mData) { - if (!isset($list[$name])) { - continue; - } - $data = array( - 'title' => $mData['title'], - 'count' => 0, - 'url' => $this->url('', array( - 'controller' => 'list', - 'action' => 'module', - 'name' => $name, - )), - ); - $mCount = 0; - foreach ($types[$name] as $type => $cData) { - $typeData = array( - 'title' => $cData['title'], - 'count' => 0, - 'url' => $this->url('', array( - 'controller' => 'list', - 'action' => 'module', - 'name' => $name, - 'type' => $type, - )), - ); - if (isset($list[$name][$type])) { - $mCount += $list[$name][$type]; - $typeData['count'] = $list[$name][$type]; - } - $data['types'][$type] = $typeData; - } - $data['count'] = $mCount; - $modules[$name] = $data; - } - //d($modules); - - $this->view()->assign(array( - 'title' => $title, - 'counts' => $counts, - 'modules' => $modules, - 'users' => $users, - 'targets' => $targets, - 'links' => $links, - )); - - $this->view()->setTemplate('comment-index'); - } - - /** - * Build demo comment post data - */ - public function buildAction() - { - /* - $roots = Pi::model('root', 'comment')->delete(array( - 'module' => 'comment', - )); - foreach ($roots as $root) { - Pi::api('api', 'comment')->delete($root->id); - } - */ - Pi::model('root', 'comment')->delete(array( - 'module' => 'comment', - )); - Pi::model('post', 'comment')->delete(array( - 'module' => 'comment', - )); - - $rootIds = array(); - //$key = 1; - for ($i = 1; $i <= 10; $i++) { - $root = array( - 'module' => 'comment', - 'item' => $i, - 'type' => 'article', - 'active' => rand(0, 1), - ); - $rootIds[] = Pi::api('api', 'comment')->addRoot($root); - } - - for ($i = 1; $i <= 5; $i++) { - $root = array( - 'module' => 'comment', - 'item' => $i, - 'type' => 'custom', - 'active' => rand(0, 1), - ); - $rootIds[] = Pi::api('api', 'comment')->addRoot($root); - } - - for ($i = 0; $i < 1000; $i++) { - $post = array( - 'root' => $rootIds[rand(0, 14)], - 'uid' => rand(1, 5), - 'ip' => Pi::service('user')->getIp(), - 'active' => rand(0, 1), - 'content' => sprintf(_a('Demo comment %d.'), $i + 1), - 'time' => time() - rand(100, 100000), - ); - Pi::api('api', 'comment')->addPost($post); - } - - //exit(); - $this->redirect('comment', array( - 'action' => 'index', - 'id' => rand(1, 5), - 'enable' => 'yes', - )); - } -} diff --git a/usr/module/comment/src/Controller/Admin/ListController.php b/usr/module/comment/src/Controller/Admin/ListController.php deleted file mode 100644 index 8b1d7996e7..0000000000 --- a/usr/module/comment/src/Controller/Admin/ListController.php +++ /dev/null @@ -1,576 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Controller\Admin; - -use Pi; -use Pi\Mvc\Controller\ActionController; -use Pi\Paginator\Paginator; -use Zend\Db\Sql\Expression; - -/** - * Comment list controller - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class ListController extends ActionController -{ - /** - * All comment posts - */ - public function indexAction() - { - $active = _get('active'); - if (-1 == $active) { - $active = null; - } - $page = _get('page', 'int') ?: 1; - $limit = $this->config('list_limit') ?: 10; - $offset = ($page - 1) * $limit; - - $posts = Pi::api('api', 'comment')->getList( - array('active' => $active), - $limit, - $offset - ); - /* - // Comprehensive mode - $posts = Pi::api('api', 'comment')->renderList($posts, array( - 'user' => array( - 'field' => 'name', - 'url' => 'comment', - 'avatar' => 'small' - ), - 'target' => true, - 'operation' => array( - 'uid' => Pi::service('user')->getId(), - 'section' => 'admin', - 'level' => 'admin', - ), - )); - */ - /* - // Lean mode - $posts = Pi::api('api', 'comment')->renderList($posts, array( - 'user' => true, - 'target' => true, - 'operation' => true, - )); - */ - // Default mode - $posts = Pi::api('api', 'comment')->renderList($posts, array( - 'operation' => 'admin', - 'user' => array( - 'avatar' => 'medium', - ), - )); - $count = Pi::service('comment')->getCount(array('active' => $active)); - - $paginator = Paginator::factory($count, array( - 'page' => $page, - 'limit' => $limit, - 'url_options' => array( - 'params' => array( - 'active' => (null === $active) ? -1 : $active - ), - ), - )); - if (null === $active) { - $title = _a('All comment posts'); - } elseif (!$active) { - $title = _a('All inactive comment posts'); - } else { - $title = _a('All active comment posts'); - } - $this->view()->assign('comment', array( - 'title' => $title, - 'count' => $count, - 'posts' => $posts, - 'paginator' => $paginator, - 'active' => $active, - )); - - $this->view()->setTemplate('comment-list'); - } - - /** - * Active comment posts of a user - */ - public function userAction() - { - $uid = _get('uid'); - $keyword = _get('keyword'); - if (!empty($keyword)) { - $uid = $keyword; - } else { - $keyword = $uid; - } - $userModel = null; - if (is_numeric($uid)) { - $userModel = Pi::service('user')->getUser($uid); - } elseif ($uid) { - $userModel = Pi::service('user')->getUser($uid, 'identity'); - } - if ($userModel && $uid = $userModel->get('id')) { - $user = array( - 'name' => $userModel->get('name'), - 'url' => Pi::service('user')->getUrl('profile', $uid), - 'avatar' => Pi::service('avatar')->get($uid, 'medium'), - ); - } else { - $this->view()->assign(array( - 'title' => _a('Comments by username or id'), - 'url' => $this->url('', array('action' => 'user')), - )); - $this->view()->setTemplate('comment-user-select'); - - return; - } - - $active = _get('active'); - if (null !== $active) { - $active = (int) $active; - } - - $page = _get('page', 'int') ?: 1; - $limit = $this->config('list_limit') ?: 10; - $offset = ($page - 1) * $limit; - $where = array('uid' => $uid, 'active' => $active); - $posts = Pi::api('api', 'comment')->getList( - $where, - $limit, - $offset - ); - $posts = Pi::api('api', 'comment')->renderList($posts, array( - 'user' => false, - 'target' => true, - 'operation' => 'admin', - )); - $count = Pi::service('comment')->getCount($where); - - $paginator = Paginator::factory($count, array( - 'page' => $page, - 'limit' => $limit, - 'url_options' => array( - 'params' => array( - 'uid' => $uid, - 'active' => $active, - ), - ), - )); - $title = _a('Comment posts of user'); - $this->view()->assign('comment', array( - 'title' => $title, - 'count' => $count, - 'posts' => $posts, - 'paginator' => $paginator, - 'user' => $user, - 'active' => $active, - )); - - // Get count - $allCount = null === $active - ? $count - : Pi::service('comment')->getCount(array_merge( - $where, - array('active' => null) - )); - $activeCount = 1 === $active - ? $count - : Pi::service('comment')->getCount(array_merge( - $where, - array('active' => 1) - )); - $inactiveCount = 0 === $active - ? $count - : Pi::service('comment')->getCount(array_merge( - $where, - array('active' => 0) - )); - - $navTabs = array( - array( - 'active' => null === $active, - 'label' => _a('All Posts') . " ({$allCount})", - 'href' => $this->url('', array( - 'action' => 'user', - 'uid' => $uid, - )) - ), - array( - 'active' => 1 == $active, - 'label' => _a('Active Posts') . " ({$activeCount})", - 'href' => $this->url('', array( - 'action' => 'user', - 'uid' => $uid, - 'active' => 1, - )) - ), - array( - 'active' => 0 === $active, - 'label' => _a('Inactive posts') . " ({$inactiveCount})", - 'href' => $this->url('', array( - 'action' => 'user', - 'uid' => $uid, - 'active' => 0, - )) - ), - ); - $this->view()->assign(array( - 'tabs' => $navTabs, - 'keyword' => $keyword, - )); - $this->view()->setTemplate('comment-user'); - } - - /** - * Active comment posts of a module, or with its type - */ - public function moduleAction() - { - $module = _get('name'); - if (!$module) { - $title = _a('Comment types'); - - $modulelist = Pi::registry('modulelist')->read('active'); - $rowset = Pi::model('type', 'comment')->select(array( - 'module' => array_keys($modulelist), - )); - $types = array(); - foreach ($rowset as $row) { - $type = $row['name']; - $types[$row['module']][$type] = array( - 'title' => $row['title'], - 'url' => $this->url('', array( - 'controller' => 'list', - 'action' => 'module', - 'name' => $row['module'], - 'type' => $type, - )), - ); - } - $modules = array(); - foreach ($modulelist as $name => $data) { - if (!isset($types[$name])) { - continue; - } - $modules[$name] = array( - 'title' => $data['title'], - 'url' => $this->url('', array( - 'controller' => 'list', - 'action' => 'module', - 'name' => $name, - )), - 'types' => $types[$name], - ); - } - - //d($modules); - $this->view()->assign(array( - 'title' => $title, - 'modules' => $modules, - )); - - $this->view()->setTemplate('comment-module-select'); - return; - } - - $active = _get('active'); - if (null !== $active) { - $active = (int) $active; - } - - $type = _get('type') ?: ''; - $page = _get('page', 'int') ?: 1; - $limit = $this->config('list_limit') ?: 10; - $offset = ($page - 1) * $limit; - $where = array('module' => $module, 'active' => $active); - - $moduleData = Pi::registry('module')->read($module); - $moduleData = array( - 'name' => $module, - 'title' => $moduleData['title'], - ); - $typeData = array(); - if ($type) { - $typeData = Pi::registry('type', 'comment')->read( - $module, - $type - ); - $where['type'] = $type; - } - $posts = Pi::api('api', 'comment')->getList( - $where, - $limit, - $offset - ); - $posts = Pi::api('api', 'comment')->renderList($posts, array( - 'operation' => 'admin', - 'user' => array( - 'avatar' => 'medium', - ), - )); - $count = Pi::service('comment')->getCount($where); - - $params = array('name' => $module, 'active' => $active); - if ($type) { - $params['type'] = $type; - } - $paginator = Paginator::factory($count, array( - 'page' => $page, - 'limit' => $limit, - 'url_options' => array( - 'params' => $params, - ), - )); - if ($typeData) { - $title = sprintf( - _a('Comment posts of Module %s with type %s'), - $moduleData['title'], - $typeData['title'] - ); - } else { - $title = sprintf( - _a('Comment posts of Module %s'), - $moduleData['title'] - ); - } - $this->view()->assign('comment', array( - 'title' => $title, - 'count' => $count, - 'posts' => $posts, - 'paginator' => $paginator, - 'module' => $moduleData, - 'type' => $typeData, - 'active' => $active, - )); - - // Get count - $allCount = null === $active - ? $count - : Pi::service('comment')->getCount(array_merge( - $where, - array('active' => null) - )); - $activeCount = 1 === $active - ? $count - : Pi::service('comment')->getCount(array_merge( - $where, - array('active' => 1) - )); - $inactiveCount = 0 === $active - ? $count - : Pi::service('comment')->getCount(array_merge( - $where, - array('active' => 0) - )); - - $navTabs = array( - array( - 'active' => null === $active, - 'label' => _a('All Posts') . " ({$allCount})", - 'href' => $this->url('', array( - 'action' => 'module', - 'name' => $module, - 'type' => $type, - )) - ), - array( - 'active' => 1 == $active, - 'label' => _a('Active Posts') . " ({$activeCount})", - 'href' => $this->url('', array( - 'action' => 'module', - 'name' => $module, - 'type' => $type, - 'active' => 1, - )) - ), - array( - 'active' => 0 === $active, - 'label' => _a('Inactive posts') . " ({$inactiveCount})", - 'href' => $this->url('', array( - 'action' => 'module', - 'name' => $module, - 'type' => $type, - 'active' => 0, - )) - ), - ); - $this->view()->assign(array( - 'tabs' => $navTabs, - )); - $this->view()->setTemplate('comment-module'); - } - - /** - * All commented articles - */ - public function articleAction() - { - $active = _get('active', 1); - $active = $active ? 1 : null; - $page = _get('page', 'int') ?: 1; - $limit = $this->config('list_limit') ?: 10; - $offset = ($page - 1) * $limit; - - $targets = Pi::api('api', 'comment')->getTargetList( - array('active' => $active), - $limit, - $offset - ); - - $uids = array(); - foreach ($targets as $root => $target) { - $uids[] = $target['uid']; - $uids[] = $target['comment_uid']; - } - if ($uids) { - $uids = array_unique($uids); - $users = Pi::service('user')->mget($uids, array('name')); - $avatars = Pi::service('avatar')->getList($uids, 'small'); - array_walk($users, function (&$data, $uid) use ($avatars) { - $data['url'] = Pi::service('user')->getUrl( - 'profile', - $uid - ); - $data['avatar'] = $avatars[$uid]; - }); - } - $users[0] = array( - 'avatar' => Pi::service('avatar')->get(0, 'small'), - 'url' => Pi::url('www'), - 'name' => _a('Guest'), - ); - array_walk($targets, function (&$data, $root) use ($users) { - $data['user'] = isset($users[$data['uid']]) - ? $users[$data['uid']] : $users[0]; - $data['comment_user'] = isset($users[$data['comment_uid']]) - ? $users[$data['comment_uid']] : $users[0]; - $data['comment_url'] = Pi::api('api', 'comment')->getUrl('root', array( - 'root' => $root, - )); - }); - //d($targets); - - $count = Pi::api('api', 'comment')->getTargetCount(array( - 'active' => $active, - )); - - if ($targets) { - $roots = array_keys($targets); - $model = $this->getModel('post'); - $select = $model->select() - ->where(array('root' => $roots ?: array())) - ->columns(array('root', 'count' => new Expression('count(*)'))) - ->group(array('root')); - $rowset = $model->selectWith($select); - foreach ($rowset as $row) { - $targets[$row->root]['count'] = $row->count; - } - } - - $params = (null === $active) ? array() : array('active' => $active); - $paginator = Paginator::factory($count, array( - 'page' => $page, - 'limit' => $limit, - 'url_options' => array( - 'params' => $params, - ), - )); - if (null === $active) { - $title = _a('All commented articles'); - } else { - $title = _a('All active commented articles'); - } - $this->view()->assign('comment', array( - 'title' => $title, - 'count' => $count, - 'targets' => $targets, - 'paginator' => $paginator, - )); - - /* - $navTabs = array( - array( - 'active' => null === $active, - 'label' => _a('Articles with comments'), - 'href' => $this->url('', array( - 'action' => 'article', - )) - ), - array( - 'active' => 1 == $active, - 'label' => _a('Articles with active comments'), - 'href' => $this->url('', array( - 'action' => 'article', - 'active' => 1, - )) - ), - ); - $this->view()->assign(array( - 'tabs' => $navTabs, - )); - */ - $this->view()->setTemplate('comment-article', '', 'front'); - } - - /** - * Batch operation - * - * @internal string|array $from - */ - public function batchAction() - { - $op = _post('op'); - $uids = _post('uids'); - $uid = _post('uid'); - $all = _post('all'); - $from = _post('from', array()); - - $model = Pi::model('post', 'comment'); - if ($uid && $all) { - $where = array('uid' => $uid); - } elseif ($uids) { - $where = array('uid' => $uids); - } else { - $where = false; - } - if ($where) { - switch ($op) { - case 'enable': - $model->update(array('active' => 1), $where); - break; - case 'disable': - $model->update(array('active' => 0), $where); - break; - case 'delete': - $model->delete($where); - break; - default: - break; - } - } - $result = array( - 'status' => 1, - 'message' => _a('Operation succeeded.'), - ); - $message = $result['message']; - - // List, module/type, user - if (!$from) { - $from = array('action' => 'index'); - } elseif (is_string($from)) { - $from = array('action' => $from); - } - if (empty($from['action'])) { - $from['action'] = 'index'; - } - $this->jump($from, $message); - } -} diff --git a/usr/module/comment/src/Controller/Admin/PostController.php b/usr/module/comment/src/Controller/Admin/PostController.php deleted file mode 100644 index 90138ffeca..0000000000 --- a/usr/module/comment/src/Controller/Admin/PostController.php +++ /dev/null @@ -1,360 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Controller\Admin; - -use Pi; -use Pi\Mvc\Controller\ActionController; -use Module\Comment\Form\PostForm; -use Module\Comment\Form\PostFilter; - -/** - * Comment post controller - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class PostController extends ActionController -{ - /** - * Comment post - * - * @return string - */ - public function indexAction() - { - $id = _get('id', 'int') ?: 1; - $post = Pi::api('api', 'comment')->getPost($id); - $target = array(); - if ($post) { - $post['content'] = Pi::api('api', 'comment')->renderPost($post); - $target = Pi::api('api', 'comment')->getTarget($post['root']); - $user = Pi::service('user')->get($post['uid'], array('name')); - $user['url'] = Pi::service('user')->getUrl('profile', $post['uid']); - $user['avatar'] = Pi::service('avatar')->get($post['uid']); - $post['user'] = $user; - $active = $post['active']; - $post['operations'] = array( - 'edit' => array( - 'title' => _a('Edit'), - 'url' => $this->url('', array( - 'action' => 'edit', - 'id' => $id, - )), - ), - 'delete' => array( - 'title' => _a('Delete'), - 'url' => $this->url('', array( - 'action' => 'delete', - 'id' => $id, - )), - ), - 'approve' => array( - 'title' => $active ? _a('Disable') : _a('Enable'), - 'url' => $this->url('', array( - 'action' => 'approve', - 'id' => $id, - 'flag' => $active ? 0 : 1, - )), - ), - ); - } - $title = _a('Comment post'); - $this->view()->assign('comment', array( - 'title' => $title, - 'post' => $post, - 'target' => $target, - )); - $this->view()->setTemplate('comment-view', '', 'front'); - } - - public function editAction() - { - $id = _get('id', 'int') ?: 1; - $redirect = _get('redirect'); - - $post = Pi::api('api', 'comment')->getPost($id); - $target = array(); - if ($post) { - $target = Pi::api('api', 'comment')->getTarget($post['root']); - $user = Pi::service('user')->get($post['uid'], array('name')); - $user['url'] = Pi::service('user')->getUrl('profile', $post['uid']); - $user['avatar'] = Pi::service('avatar')->get($post['uid']); - $post['user'] = $user; - } - - $title = _a('Comment post edit'); - $this->view()->assign('comment', array( - 'title' => $title, - 'post' => $post, - 'target' => $target, - )); - - $data = array_merge($post, array( - 'redirect' => $redirect, - )); - $form = Pi::api('api', 'comment')->getForm($data); - $form->setAttribute('action', $this->url('', array( - 'action' => 'submit', - ))); - - $this->view()->assign('form', $form); - $this->view()->setTemplate('comment-edit', '', 'front'); - } - - /** - * Action for comment post submission - */ - public function submitAction() - { - $result = $this->processPost(); - $redirect = ''; - if ($this->request->isPost()) { - $return = (bool) $this->request->getPost('return'); - if (!$return) { - $redirect = $this->request->getPost('redirect'); - } - } else { - $return = (bool) $this->params('return'); - if (!$return) { - $redirect = $this->params('redirect'); - } - } - - if (!$return) { - if ($redirect) { - $redirect = urldecode($redirect); - } elseif (!empty($result['data'])) { - $redirect = $this->url('', array( - 'action' => 'index', - 'id' => $result['data'] - )); - } else { - $redirect = $this->url('', array('controller' => 'list')); - } - $this->jump($redirect, $result['message']); - } else { - return $result; - } - } - - /** - * Process comment post submission - * - * @return array - */ - protected function processPost() - { - $id = 0; - $isNew = false; - if ($this->request->isPost()) { - $data = $this->request->getPost(); - $markup = $data['markup']; - $form = new PostForm('comment-post', $markup); - $form->setInputFilter(new PostFilter); - $form->setData($data); - if ($form->isValid()) { - $values = $form->getData(); - if (empty($values['id'])) { - if (Pi::config('auto_approve', 'comment')) { - $values['active'] = 1; - } - $values['uid'] = Pi::service('user')->getId(); - $values['ip'] = Pi::service('user')->getIp(); - $isNew = true; - } - //vd($values); - $id = Pi::api('api', 'comment')->addPost($values); - if ($id) { - $status = 1; - $message = _a('Comment post saved successfully.'); - } else { - $status = 0; - $message = _a('Comment post not saved.'); - } - } else { - $status = -1; - $message = _a('Invalid data, please check and re-submit.'); - } - } else { - $status = -2; - $message = _a('Invalid submission.'); - } - - if (0 < $status && $id) { - if ($isNew) { - Pi::service('event')->trigger('post_submit', $id); - } else { - Pi::service('event')->trigger('post_update', $id); - } - } - - $result = array( - 'data' => $id, - 'status' => $status, - 'message' => $message, - ); - - return $result; - } - - /** - * Approve/disapprove a post - * - * @return bool - */ - public function approveAction() - { - $id = _get('id', 'int'); - $flag = _get('flag'); - $return = _get('return'); - $redirect = _get('redirect'); - - if (null === $flag) { - $status = Pi::api('api', 'comment')->approve($id); - } else { - $status = Pi::api('api', 'comment')->approve($id, $flag); - } - $message = $status - ? _a('Operation succeeded.') : _a('Operation failed.'); - - if (0 < $status && $id) { - if (null === $flag || $flag) { - Pi::service('event')->trigger('post_enable', $id); - } else { - Pi::service('event')->trigger('post_disable', $id); - } - } - - if (!$return) { - if ($redirect) { - $redirect = urldecode($redirect); - } else { - $redirect = $this->url('', array( - 'action' => 'index', - 'id' => $id, - )); - } - $this->jump($redirect, $message, $status == 1 ? 'success' : 'error'); - } else { - $result = array( - 'status' => (int) $status, - 'message' => $message, - 'data' => $id, - ); - - return $result; - } - } - - /** - * Batch enable or disable comment - * - * @return viewModel - */ - public function batchApproveAction() - { - $id = $this->params('id', ''); - $ids = array_filter(explode(',', $id)); - $flag = $this->params('flag', 0); - $redirect = $this->params('redirect', ''); - - $model = $this->getModel('post'); - $model->update(array('active' => $flag), array('id' => $ids)); - - if (null === $flag || $flag) { - Pi::service('event')->trigger('post_enable', $ids); - } else { - Pi::service('event')->trigger('post_disable', $ids); - } - - if ($redirect) { - $redirect = urldecode($redirect); - return $this->redirect()->toUrl($redirect); - } else { - // Go to list page - return $this->redirect()->toRoute('', array( - 'action' => 'index', - )); - } - } - - /** - * Delete a comment post - * - * @return array - */ - public function deleteAction() - { - $id = _get('id', 'int'); - $return = _get('return'); - $redirect = _get('redirect'); - - $post = Pi::api('api', 'comment')->getPost($id); - if (!$post) { - $status = -2; - $message = __('Invalid post parameter.'); - } else { - $status = Pi::api('api', 'comment')->deletePost($id); - $message = $status - ? __('Operation succeeded.') : __('Operation failed.'); - } - if (0 < $status && $id) { - Pi::service('event')->trigger('post_delete', $post['root']); - } - - if (!$return) { - if ($redirect) { - $redirect = urldecode($redirect); - } else { - $redirect = $this->url('', array('controller' => 'list')); - } - $this->jump($redirect, $message, $status == 1 ? 'success' : 'error'); - } else { - $result = array( - 'status' => (int) $status, - 'message' => $message, - 'data' => $id, - ); - - return $result; - } - } - - /** - * Batch delete comments - * - * @return viewModel - */ - public function batchDeleteAction() - { - $id = $this->params('id', ''); - $ids = array_filter(explode(',', $id)); - $redirect = $this->params('redirect', ''); - - $model = $this->getModel('post'); - $roots = array(); - $rowset = $model->select(array('id' => $ids)); - foreach ($rowset as $row) { - $roots[] = $row['root']; - } - $model->delete(array('id' => $ids)); - - Pi::service('event')->trigger('post_delete', $roots); - - if ($redirect) { - $redirect = urldecode($redirect); - return $this->redirect()->toUrl($redirect); - } else { - // Go to list page - return $this->redirect()->toRoute('', array( - 'action' => 'index', - )); - } - } -} diff --git a/usr/module/comment/src/Controller/Admin/TypeController.php b/usr/module/comment/src/Controller/Admin/TypeController.php deleted file mode 100644 index 33db134b24..0000000000 --- a/usr/module/comment/src/Controller/Admin/TypeController.php +++ /dev/null @@ -1,127 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Controller\Admin; - -use Pi; -use Pi\Mvc\Controller\ActionController; - -class TypeController extends ActionController -{ - /** - * Comment types - */ - public function indexAction() - { - $title = _a('Comment types'); - - $modulelist = Pi::registry('modulelist')->read('active'); - $rowset = Pi::model('type', 'comment')->select(array( - 'module' => array_keys($modulelist), - )); - $types = array(); - foreach ($rowset as $row) { - $type = $row['name']; - $types[$row['module']][$type] = array( - 'title' => $row['title'], - 'active' => $row['active'], - 'status' => $row['active'] ? _a('Active') : _a('Disabled'), - 'url' => $this->url('', array( - 'controller' => 'list', - 'action' => 'module', - 'name' => $row['module'], - 'type' => $type, - )), - 'enable' => array( - 'title' => $row['active'] ? _a('Disable') : _a('Enable'), - 'url' => $this->url('', array( - 'controller' => 'type', - 'action' => 'enable', - 'id' => $row['id'], - 'flag' => $row['active'] ? 0 : 1, - )), - ), - ); - } - $modules = array(); - foreach ($modulelist as $name => $data) { - if (!isset($types[$name])) { - continue; - } - $modules[$name] = array( - 'title' => $data['title'], - 'url' => $this->url('', array( - 'controller' => 'list', - 'action' => 'module', - 'name' => $name, - )), - 'types' => $types[$name], - ); - } - - //d($modules); - $this->view()->assign(array( - 'title' => $title, - 'modules' => $modules, - )); - - $this->view()->setTemplate('comment-type'); - } - - - /** - * Enable/disable a type - * - * @return bool - */ - public function enableAction() - { - $id = _get('id', 'int') ?: 1; - $flag = _get('flag', 'int'); - $return = _get('return'); - - $row = Pi::model('type', 'comment')->find($id); - if (!$row) { - $status = -1; - $message = _a('Type was not found.'); - } else { - if ($flag == (int) $row['active']) { - $status = 0; - $message = _a('Invalid operation.'); - } else { - $row['active'] = $flag; - try { - $row->save(); - $status = 1; - $message = _a('Operation succeeded.'); - } catch (\Exception $e) { - $status = 0; - $message = _a('Operation failed.'); - } - } - } - - // Clear cache - if ($status > 0) { - Pi::registry('type', 'comment')->flush(); - } - - if (!$return) { - $this->jump(array('action' => 'index'), $message, $status == 1 ? 'success' : 'error'); - } else { - $result = array( - 'status' => (int) $status, - 'message' => $message, - 'data' => $id, - ); - - return $result; - } - } -} diff --git a/usr/module/comment/src/Controller/Api/CommentController.php b/usr/module/comment/src/Controller/Api/CommentController.php deleted file mode 100644 index b670552a5d..0000000000 --- a/usr/module/comment/src/Controller/Api/CommentController.php +++ /dev/null @@ -1,104 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\User\Controller\Api; - -use Pi; -use Pi\Mvc\Controller\ApiController; - -/** - * Comment webservice controller - * - * Methods: - * - * - delete: <id> - * - get: <id> - * - insert: array(<field> => <value>) - * - list: <limit>, <offset>, <order>, array(<queryKey:queryValue>) - * - patch: <id>, array(<field> => <value>) - * - undelete: <id> - * - update: <id>, array(<field> => <value>) - * - * - mdelete: array(<id>) - * - mget: array(<id>) - * - mundelete: array(<id>) - * - * - count: array(<queryKey:queryValue>) - * - enable: <id> - * - disable: <id> - * - * - menable: array(<id>) - * - mdisable: array(<id>) - * - * - * @see https://developers.google.com/admin-sdk/directory/v1/reference/users - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class CommentController extends ApiController -{ - /** - * Placeholder - * - * @return array - */ - public function indexAction() - { - return array('status' => 1); - } - - /** - * Deletes a post - * - * @return array - */ - public function deleteAction() - { - return array('status' => 1); - } - - /** - * Gets a post - * - * @return array - */ - public function getAction() - { - return array('status' => 1); - } - - /** - * Gets multiple posts - * - * @return array - */ - public function mgetAction() - { - return array('status' => 1); - } - - /** - * Gets a list of posts - * - * @return array - */ - public function listAction() - { - return array('status' => 1); - } - - /** - * Gets count of posts - * - * @return array - */ - public function countAction() - { - return array('status' => 1); - } -} \ No newline at end of file diff --git a/usr/module/comment/src/Controller/Feed/IndexController.php b/usr/module/comment/src/Controller/Feed/IndexController.php deleted file mode 100644 index 05f4f13042..0000000000 --- a/usr/module/comment/src/Controller/Feed/IndexController.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Controller\Feed; - -use Pi; -use Pi\Mvc\Controller\FeedController; - -class IndexController extends FeedController -{ - public function indexAction() - { - $feed = $this->getDataModel(array( - 'title' => __('Comment feed'), - 'description' => __('Latest comments.'), - 'date_created' => time(), - )); - - $where = array('active' => 1); - $posts = Pi::api('api', 'comment')->getList( - $where, - 10 - ); - $renderOptions = array(); - $posts = Pi::api('api', 'comment')->renderList($posts, $renderOptions); - - foreach ($posts as $post) { - $entry = array( - 'title' => $post['target']['title'], - 'description' => $post['content'], - 'date_modified' => (int) $post['time'], - 'link' => Pi::url($post['url'], true) - ); - $feed->entry = $entry; - } - - return $feed; - } -} \ No newline at end of file diff --git a/usr/module/comment/src/Controller/Front/CustomController.php b/usr/module/comment/src/Controller/Front/CustomController.php deleted file mode 100644 index 9afcff389c..0000000000 --- a/usr/module/comment/src/Controller/Front/CustomController.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Controller\Front; - -use Pi; -use Pi\Mvc\Controller\ActionController; -use Pi\Paginator\Paginator; - -class CustomController extends ActionController -{ - /** - * Demo for article with comments - */ - public function indexAction() - { - $id = _get('id', 'int') ?: rand(1, 5); - $page = _get('page', 'int') ?: 1; - $paginator = Paginator::factory(100, array( - 'limit' => 10, - 'page' => $page, - 'url_options' => array( - 'params' => array( - 'id' => $id, - 'custom' => 'yes', - ), - ), - )); - $this->view()->assign(array( - 'title' => sprintf(__('Demo custom article #%d'), $id), - 'paginator' => $paginator, - )); - - $this->view()->setTemplate('demo'); - } -} diff --git a/usr/module/comment/src/Controller/Front/DemoController.php b/usr/module/comment/src/Controller/Front/DemoController.php deleted file mode 100644 index 7f2a3478fb..0000000000 --- a/usr/module/comment/src/Controller/Front/DemoController.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Controller\Front; - -use Pi; -use Pi\Mvc\Controller\ActionController; -use Pi\Paginator\Paginator; - -class DemoController extends ActionController -{ - /** - * Demo for article with comments - */ - public function indexAction() - { - $id = _get('id', 'int') ?: rand(1, 5); - $page = _get('page', 'int') ?: 1; - $paginator = Paginator::factory(100, array( - 'limit' => 10, - 'page' => $page, - 'url_options' => array( - 'params' => array( - 'id' => $id, - 'enable' => 'yes', - ), - ), - )); - $this->view()->assign(array( - 'title' => sprintf(__('Demo article #%d'), $id), - 'paginator' => $paginator, - )); - - $this->view()->setTemplate('demo'); - } -} diff --git a/usr/module/comment/src/Controller/Front/IndexController.php b/usr/module/comment/src/Controller/Front/IndexController.php deleted file mode 100644 index 16ba904e6c..0000000000 --- a/usr/module/comment/src/Controller/Front/IndexController.php +++ /dev/null @@ -1,129 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Controller\Front; - -use Pi; -use Pi\Mvc\Controller\ActionController; - -class IndexController extends ActionController -{ - /** - * Demo for article with comments - */ - public function indexAction() - { - //$this->redirect('', array('controller' => 'demo')); - $title = sprintf(__('Comment portal for %s'), Pi::config('sitename')); - $links = array( - /* - 'build' => array( - 'title' => __('Build comment data for demo articles'), - 'url' => $this->url('', array( - 'controller' => 'demo', - 'action' => 'build' - )), - ), - */ - /* 'demo' => array( - 'title' => __('Demo article with comments'), - 'url' => $this->url('', array( - 'controller' => 'demo' - )), - ), */ - /* - 'all' => array( - 'title' => __('All comment posts'), - 'url' => Pi::api('api', 'comment')->getUrl('list', array( - 'active' => null, - )), - ), - */ - 'all-active' => array( - 'title' => __('All active comment posts'), - 'url' => Pi::api('api', 'comment')->getUrl('list', array( - 'active' => 1, - )), - ), - /* - 'all-inactive' => array( - 'title' => __('All inactive comment posts'), - 'url' => Pi::api('api', 'comment')->getUrl('list', array( - 'active' => 0, - )), - ), - */ - 'article' => array( - 'title' => __('Commented articles'), - 'url' => $this->url('', array( - 'controller' => 'list', - 'action' => 'article', - )), - ), - 'module' => array( - 'title' => __('Comment posts for module "Comment"'), - 'url' => Pi::api('api', 'comment')->getUrl('module', array( - 'name' => 'comment', - )), - ), - 'type' => array( - 'title' => __('Comment posts for module "Comment" with type "Article"'), - 'url' => Pi::api('api', 'comment')->getUrl('module', array( - 'name' => 'comment', - 'type' => 'article', - )), - ), - 'user' => array( - 'title' => sprintf( - __('Comment posts by %s'), - Pi::service('user')->get(1, 'name') - ), - 'url' => Pi::api('api', 'comment')->getUrl('user', array( - 'uid' => 1, - )), - ), - ); - if ($uid = Pi::service('user')->getId()) { - $links['my-post'] = array( - 'title' => __('Comment posts by me'), - 'url' => Pi::api('api', 'comment')->getUrl('user', array( - 'uid' => $uid, - )), - ); - $links['my-article'] = array( - 'title' => __('Commented articles by me'), - 'url' => $this->url('', array( - 'controller' => 'list', - 'action' => 'article', - 'uid' => $uid, - )), - ); - } - $this->view()->assign(array( - 'title' => $title, - 'links' => $links, - )); - $this->view()->setTemplate('comment-index'); - } - - /** - * Action for comment JavaScript loading - */ - public function loadAction() - { - $uri = $this->params('uri'); - $content = Pi::service('comment')->loadContent($uri); - $result = array( - 'status' => 1, - 'content' => $content, - ); - - return $result; - } -} diff --git a/usr/module/comment/src/Controller/Front/ListController.php b/usr/module/comment/src/Controller/Front/ListController.php deleted file mode 100644 index 7c6e44796e..0000000000 --- a/usr/module/comment/src/Controller/Front/ListController.php +++ /dev/null @@ -1,633 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Controller\Front; - -use Pi; -use Pi\Mvc\Controller\ActionController; -use Pi\Paginator\Paginator; -use Zend\Db\Sql\Expression; - -/** - * Comment list controller - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class ListController extends ActionController -{ - /** - * All comment posts - */ - public function indexAction() - { - /* - $active = _get('active'); - //vd($active); - if (null !== $active) { - $active = (int) $active; - } - */ - $active = 1; - $page = _get('page', 'int') ?: 1; - $limit = $this->config('list_limit') ?: 10; - $offset = ($page - 1) * $limit; - - $where = array('active' => $active); - $posts = Pi::api('api', 'comment')->getList( - $where, - $limit, - $offset - ); - $renderOptions = array( - 'operation' => $this->config('display_operation'), - 'user' => array( - 'avatar' => 'medium', - 'attributes' => array( - 'alt' => __('View profile'), - ), - ), - ); - $posts = Pi::api('api', 'comment')->renderList($posts, $renderOptions); - $count = Pi::api('api', 'comment')->getCount($where); - - //$params = (null === $active) ? array() : array('active' => $active); - $paginator = Paginator::factory($count, array( - 'page' => $page, - 'limit' => $limit, - /* - 'url_options' => array( - 'params' => $params, - ), - */ - )); - if (null === $active) { - $title = __('All comment posts'); - } elseif (!$active) { - $title = __('All inactive comment posts'); - } else { - $title = __('All active comment posts'); - } - $this->view()->assign('comment', array( - 'title' => $title, - 'count' => $count, - 'posts' => $posts, - 'paginator' => $paginator, - )); - - $this->view()->setTemplate('comment-list'); - $this->view()->headTitle($title); - $this->view()->headDescription($title, 'set'); - $this->view()->headKeywords(__('all comments,comment,information,post,user'), 'set'); - } - - /** - * List of comment posts of a root - * - * @return string - */ - public function rootAction() - { - $rootId = _get('root', 'int') ?: 1; - $root = Pi::model('root', 'comment')->find($rootId); - $isActive = null; - $count = null; - $target = null; - $posts = null; - $paginator = null; - - if ($root) { - $isActive = $root['active']; - $page = _get('page', 'int') ?: 1; - $limit = $this->config('list_limit') ?: 10; - $offset = ($page - 1) * $limit; - $posts = Pi::api('api', 'comment')->getList($rootId, $limit, $offset); - $renderOptions = array( - 'operation' => $this->config('display_operation'), - 'user' => array( - 'avatar' => 'medium', - 'attributes' => array( - 'alt' => __('View profile'), - ), - ), - ); - $posts = Pi::api('api', 'comment')->renderList($posts, $renderOptions); - $count = Pi::api('api', 'comment')->getCount($rootId); - - $target = Pi::api('api', 'comment')->getTarget($rootId); - - $paginator = Paginator::factory($count, array( - 'page' => $page, - 'limit' => $limit, - 'url_options' => array( - 'params' => array( - 'root' => $root->id, - ), - ), - )); - } else { - - } - - $title = __('Comment posts of article'); - $this->view()->assign('comment', array( - 'title' => $title, - 'root' => $rootId, - 'active' => $isActive, - 'target' => $target, - 'count' => $count, - 'posts' => $posts, - 'paginator' => $paginator, - )); - - $this->view()->setTemplate('comment-root'); - $this->view()->headTitle($title); - $this->view()->headDescription($title, 'set'); - $this->view()->headKeywords(__('all comments,comment,information,post,user'), 'set'); - } - - /** - * Active comment posts of a user - */ - public function userAction() - { - $my = _get('my', 'int'); - if ($my) { - Pi::service('authentication')->requireLogin(); - $uid = Pi::user()->getId(); - $active = _get('active'); - if (null !== $active) { - $active = (int) $active; - } - $opOptions = array( - 'admin' => false, - ); - } else { - $uid = _get('uid', 'int') ?: Pi::user()->getId(); - $active = 1; - $opOptions = $this->config('display_operation'); - } - $page = _get('page', 'int') ?: 1; - $limit = $this->config('list_limit') ?: 10; - $offset = ($page - 1) * $limit; - - $where = array('uid' => $uid, 'active' => $active); - $posts = Pi::api('api', 'comment')->getList( - $where, - $limit, - $offset - ); - $renderOptions = array( - 'user' => false, - 'operation' => $opOptions, - ); - $posts = Pi::api('api', 'comment')->renderList($posts, $renderOptions); - $count = Pi::api('api', 'comment')->getCount($where); - - if ($my) { - $params = array('my' => 1); - } else { - $params = $where; - } - $paginator = Paginator::factory($count, array( - 'page' => $page, - 'limit' => $limit, - 'url_options' => array( - 'params' => $params, - ), - )); - if ($my) { - $title = __('My comments'); - $user = null; - $template = 'comment-my-post'; - - $navTabs = array( - array( - 'active' => null === $active, - 'label' => __('My comments'), - 'href' => $this->url('', array( - 'action' => 'user', - 'my' => 1, - )) - ), - array( - 'active' => 1 == $active, - 'label' => __('My active comments'), - 'href' => $this->url('', array( - 'action' => 'user', - 'my' => 1, - 'active' => 1, - )) - ), - array( - 'active' => 0 === $active, - 'label' => __('My pending comments'), - 'href' => $this->url('', array( - 'action' => 'user', - 'my' => 1, - 'active' => 0, - )) - ), - ); - $this->view()->assign(array( - 'tabs' => $navTabs, - )); - - } else { - $user = Pi::service('user')->get($uid, array('name')); - $user['avatar'] = Pi::service('avatar')->get($uid, 'medium'); - $user['url'] = Pi::service('user')->getUrl('profile', $uid); - $title = __('Comment posts of user'); - $template = 'comment-user'; - } - $this->view()->assign('comment', array( - 'title' => $title, - 'count' => $count, - 'posts' => $posts, - 'paginator' => $paginator, - 'user' => $user, - )); - - $this->view()->setTemplate($template); - $this->view()->headTitle($title); - $this->view()->headDescription($title, 'set'); - $this->view()->headKeywords(__('all comments,comment,information,post,user'), 'set'); - } - - /** - * Active comment posts of a module, or with its type - */ - public function moduleAction() - { - //$active = _get('active', 'int') ?: 1; - $active = 1; - $module = _get('name') ?: 'comment'; - $type = _get('type') ?: ''; - $page = _get('page', 'int') ?: 1; - $limit = $this->config('list_limit') ?: 10; - $offset = ($page - 1) * $limit; - $where = array('module' => $module, 'active' => $active); - - $moduleData = Pi::registry('module')->read($module); - $moduleData = array( - 'name' => $module, - 'title' => $moduleData['title'], - ); - $typeData = array(); - if ($type) { - $typeData = Pi::registry('type', 'comment')->read( - $module, - $type - ); - $where['type'] = $type; - } - $posts = Pi::api('api', 'comment')->getList( - $where, - $limit, - $offset - ); - $renderOptions = array( - 'operation' => $this->config('display_operation'), - 'user' => array( - 'avatar' => 'medium', - 'attributes' => array( - 'alt' => __('View profile'), - ), - ), - ); - $posts = Pi::api('api', 'comment')->renderList($posts, $renderOptions); - $count = Pi::api('api', 'comment')->getCount($where); - - //$params = array('name' => $module, 'active' => $active); - $params = array('name' => $module); - if ($type) { - $params['type'] = $type; - } - $paginator = Paginator::factory($count, array( - 'page' => $page, - 'limit' => $limit, - 'url_options' => array( - 'params' => $params, - ), - )); - - $navTabs = array( - array( - 'active' => empty($type), - 'label' => __('All'), - 'href' => $this->url('', array( - 'name' => $module, - 'module' => 'list', - 'action' => 'module', - )) - ), - ); - $allType = Pi::registry('type', 'comment')->read(); - foreach ($allType[$module] as $name => $row) { - $navTabs[] = array( - 'active' => $type == $name, - 'label' => $row['title'], - 'href' => $this->url('', array( - 'name' => $module, - 'type' => $name, - 'module' => 'list', - 'action' => 'module', - )), - ); - } - $this->view()->assign(array( - 'tabs' => $navTabs, - )); - - $title = __('Comment posts of module'); - $this->view()->assign('comment', array( - 'title' => $title, - 'count' => $count, - 'posts' => $posts, - 'paginator' => $paginator, - 'module' => $moduleData, - 'type' => $typeData, - )); - - $this->view()->setTemplate('comment-module'); - $this->view()->headTitle($title); - $this->view()->headDescription($title, 'set'); - $this->view()->headKeywords(__('all comments,comment,information,post,user'), 'set'); - } - - /** - * All commented articles - */ - public function articleAction() - { - /* - $active = _get('active'); - if (null !== $active) { - $active = 1; - } - */ - $my = _get('my', 'int'); - if ($my) { - Pi::service('authentication')->requireLogin(); - $uid = Pi::user()->getId(); - $active = _get('active'); - if (null !== $active) { - $active = (int) $active; - } - $where = array('author' => $uid, 'active' => $active); - } else { - $active = 1; - $where = array('active' => $active); - } - - //$active = 1; - $page = _get('page', 'int') ?: 1; - $limit = $this->config('list_limit') ?: 10; - $offset = ($page - 1) * $limit; - - $targets = Pi::api('api', 'comment')->getTargetList( - $where, - $limit, - $offset - ); - - $uids = array(); - foreach ($targets as $root => $target) { - $uids[] = $target['uid']; - $uids[] = $target['comment_uid']; - } - if ($uids) { - $uids = array_unique($uids); - $users = Pi::service('user')->mget($uids, array('name')); - $avatars = Pi::service('avatar')->getList($uids, 'small'); - array_walk($users, function (&$data, $uid) use ($avatars) { - $data['url'] = Pi::service('user')->getUrl( - 'profile', - $uid - ); - $data['avatar'] = $avatars[$uid]; - }); - } - $users[0] = array( - 'avatar' => Pi::service('avatar')->get(0, 'small'), - 'url' => Pi::url('www'), - 'name' => __('Guest'), - ); - array_walk($targets, function (&$data, $root) use ($users) { - $data['user'] = isset($users[$data['uid']]) - ? $users[$data['uid']] : $users[0]; - $data['comment_user'] = isset($users[$data['comment_uid']]) - ? $users[$data['comment_uid']] : $users[0]; - $data['comment_url'] = Pi::api('api', 'comment')->getUrl('root', array( - 'root' => $root, - )); - }); - //d($targets); - - $count = Pi::api('api', 'comment')->getTargetCount(array( - 'active' => $active, - )); - - if ($targets) { - $model = $this->getModel('post'); - $select = $model->select() - ->where(array('root' => array_keys($targets))) - ->columns(array('root', 'count' => new Expression('count(*)'))) - ->group(array('root')); - $rowset = $model->selectWith($select); - foreach ($rowset as $row) { - $targets[$row->root]['count'] = $row->count; - } - } - - //$params = (null === $active) ? array() : array('active' => $active); - if ($my) { - if (null === $active) { - $params = array('my' => 1); - } else { - $params = array('my' => 1, 'active' => $active); - } - } else { - $params = array(); - } - $paginator = Paginator::factory($count, array( - 'page' => $page, - 'limit' => $limit, - 'url_options' => array( - 'params' => $params, - ), - )); - if (null === $active) { - $title = __('All commented articles'); - } else { - $title = __('Articles with comments'); - } - - $this->view()->assign('comment', array( - 'title' => $title, - 'count' => $count, - 'targets' => $targets, - 'paginator' => $paginator, - )); - - if ($my) { - $navTabs = array( - array( - 'active' => $my && null === $active, - 'label' => __('My articles'), - 'href' => $this->url('', array( - 'action' => 'article', - 'my' => 1, - )) - ), - array( - 'active' => $my && $active, - 'label' => __('My articles with active comments'), - 'href' => $this->url('', array( - 'action' => 'article', - 'my' => 1, - 'active' => 1, - )) - ), - ); - $this->view()->assign(array( - 'tabs' => $navTabs, - )); - } - - $this->view()->setTemplate('comment-article'); - $this->view()->headTitle($title); - $this->view()->headDescription($title, 'set'); - $this->view()->headKeywords(__('all comments,comment,information,post,user'), 'set'); - } - - /** - * All posts commented on me - */ - public function receivedAction() - { - /* - $active = _get('active'); - if (null !== $active) { - $active = 1; - } - */ - $my = _get('my', 'int'); - $uid = _get('uid', 'int'); - $active = _get('active'); - $page = _get('page', 'int') ?: 1; - $limit = $this->config('list_limit') ?: 10; - $offset = ($page - 1) * $limit; - - if (!$my && $uid) { - $active = 1; - - } else { - Pi::service('authentication')->requireLogin(); - $my = 1; - $uid = Pi::user()->getId(); - if (null !== $active) { - $active = (int) $active; - } - } - $where = array( - 'author' => $uid, - 'active' => $active - ); - - $posts = Pi::api('api', 'comment')->getList( - $where, - $limit, - $offset - ); - $options = array( - 'user' => array( - 'avatar' => 'medium', - 'attributes' => array( - 'alt' => __('View profile'), - ), - ), - ); - $posts = Pi::api('api', 'comment')->renderList($posts, $options); - $count = Pi::api('api', 'comment')->getCount($where); - - if ($my) { - $params = array( - 'my' => 1, - 'active' => $active, - ); - } else { - $params = array( - 'uid' => $uid, - ); - } - $paginator = Paginator::factory($count, array( - 'page' => $page, - 'limit' => $limit, - 'url_options' => array( - 'params' => $params, - ), - )); - if ($my) { - $title = __('Received comments'); - $user = null; - $template = 'comment-my-received'; - - $navTabs = array( - array( - 'active' => null === $active, - 'label' => __('All Posts'), - 'href' => $this->url('', array( - 'action' => 'received', - 'my' => 1, - )) - ), - array( - 'active' => 1 == $active, - 'label' => __('Active Posts'), - 'href' => $this->url('', array( - 'action' => 'received', - 'my' => 1, - 'active' => 1, - )) - ), - array( - 'active' => 0 === $active, - 'label' => __('Inactive Posts'), - 'href' => $this->url('', array( - 'action' => 'received', - 'my' => 1, - 'active' => 0, - )) - ), - ); - $this->view()->assign(array( - 'tabs' => $navTabs, - )); - - } else { - $user = Pi::service('user')->get($uid, array('name')); - $user['avatar'] = Pi::service('avatar')->get($uid, 'medium'); - $user['url'] = Pi::service('user')->getUrl('profile', $uid); - $title = __('Comment posts on user'); - $template = 'comment-user-received'; - } - $this->view()->assign('comment', array( - 'title' => $title, - 'count' => $count, - 'posts' => $posts, - 'paginator' => $paginator, - 'user' => $user, - )); - - $this->view()->setTemplate($template); - $this->view()->headTitle($title); - $this->view()->headDescription($title, 'set'); - $this->view()->headKeywords(__('all comments,comment,information,post,user'), 'set'); - } -} diff --git a/usr/module/comment/src/Controller/Front/PostController.php b/usr/module/comment/src/Controller/Front/PostController.php deleted file mode 100644 index 8953ae238e..0000000000 --- a/usr/module/comment/src/Controller/Front/PostController.php +++ /dev/null @@ -1,511 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Controller\Front; - -use Pi; -use Pi\Mvc\Controller\ActionController; -use Module\Comment\Form\PostForm; -use Module\Comment\Form\PostFilter; - -/** - * Comment post controller - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class PostController extends ActionController -{ - /** - * Comment post view - * - * @return string - */ - public function indexAction() - { - $id = _get('id', 'int') ?: 1; - $post = Pi::api('api', 'comment')->getPost($id); - - if ($post && $post['active']) { - $post['content'] = Pi::api('api', 'comment')->renderPost($post); - $target = Pi::api('api', 'comment')->getTarget($post['root']); - $user = Pi::service('user')->get($post['uid'], array('name')); - $user['url'] = Pi::service('user')->getUrl('profile', $post['uid']); - $user['avatar'] = Pi::service('avatar')->get($post['uid']); - $post['user'] = $user; - - // User operations - $operations = array( - 'permanent' => array( - 'title' => __('Permanent link'), - 'url' => Pi::api('api', 'comment')->getUrl('post', array( - 'post' => $id, - )), - ), - ); - $post['operations'] = $operations; - $title = sprintf(__('Comment %s on %s'), _number($post['id']), $target['title']); - $this->view()->assign('comment', array( - 'title' => $title, - 'post' => $post, - 'target' => $target, - )); - $this->view()->setTemplate('comment-view'); - $this->view()->headTitle($title); - $this->view()->headDescription($title, 'set'); - $this->view()->headKeywords(__('Comment,information,post,user'), 'set'); - } else { - $this->view()->setTemplate('comment-404'); - } - } - - /** - * Edit a comment post - */ - public function editAction() - { - $currentUser = Pi::service('user')->getUser(); - $currentUid = $currentUser->get('id'); - $id = _get('id', 'int') ?: 1; - $redirect = _get('redirect'); - - $message = ''; - $target = array(); - $post = Pi::api('api', 'comment')->getPost($id); - // Verify post - if (!$post) { - $message = __('Invalid post parameter.'); - // Verify author - } elseif (!$currentUid - || ($post['uid'] != $currentUid && !$currentUser->isAdmin('comment')) - ) { - $message = __('Operation denied.'); - $post = array(); - } else { - $target = Pi::api('api', 'comment')->getTarget($post['root']); - $user = array( - 'uid' => $currentUid, - 'name' => $currentUser->get('name'), - 'avatar' => Pi::service('avatar')->get($currentUid), - ); - $post['user'] = $user; - } - - $title = __('Comment post edit'); - $this->view()->assign('comment', array( - 'title' => $title, - 'post' => $post, - 'target' => $target, - 'message' => $message, - )); - - $data = array_merge($post, array( - 'redirect' => $redirect, - )); - $options = array( - 'markup' => $post['markup'], - ); - $form = Pi::api('api', 'comment')->getForm($data, $options); - - $this->view()->assign('form', $form); - $this->view()->setTemplate('comment-edit'); - } - - /** - * Reply a comment post - */ - public function replyAction() - { - $currentUser = Pi::service('user')->getUser(); - $currentUid = $currentUser->get('id'); - $id = _get('id', 'int') ?: 1; - $redirect = _get('redirect'); - - $message = ''; - $target = array(); - $post = Pi::api('api', 'comment')->getPost($id); - // Verify post - if (!$post) { - $message = __('Invalid post parameter.'); - // Verify authentication - } elseif (!$currentUid) { - //$status = 0; - $message = __('Operation denied.'); - $post = array(); - } else { - $target = Pi::api('api', 'comment')->getTarget($post['root']); - $post['content'] = Pi::api('api', 'comment')->renderPost($post); - $user = array( - 'uid' => $currentUid, - 'name' => $currentUser->get('name'), - 'avatar' => Pi::service('avatar')->get($currentUid), - ); - $post['user'] = $user; - } - - $title = __('Comment post reply'); - $this->view()->assign('comment', array( - 'title' => $title, - 'post' => $post, - 'target' => $target, - 'message' => $message, - )); - - $data = array_merge($post, array( - 'redirect' => $redirect, - 'root' => $post['root'], - 'reply' => $id, - 'id' => '', - 'content' => '', - )); - $form = Pi::api('api', 'comment')->getForm($data); - - $this->view()->assign('form', $form); - $this->view()->setTemplate('comment-reply'); - } - - /** - * Action for comment post submission - */ - public function submitAction() - { - $result = $this->processPost(); - $redirect = ''; - if ($this->request->isPost()) { - $return = (bool) $this->request->getPost('return'); - if (!$return) { - $redirect = $this->request->getPost('redirect'); - } - } else { - $return = (bool) $this->params('return'); - if (!$return) { - $redirect = $this->params('redirect'); - } - } - - if (!$return) { - $redirect = $redirect - ? urldecode($redirect) - : $this->getRequest()->getServer('HTTP_REFERER'); - if (!$redirect) { - if (!empty($result['data'])) { - $redirect = Pi::api('api', 'comment')->getUrl('post', array( - 'post' => $result['data'] - )); - } else { - $redirect = Pi::service('url')->assemble('comment'); - } - } - - if ($result['data']) { - $this->redirect($redirect . '#comment-' . $result['data']); - } else { - $this->jump($redirect, $result['message']); - } - } else { - return $result; - } - } - - /** - * Process comment post submission - * - * @return array - */ - protected function processPost() - { - $currentUser = Pi::service('user')->getUser(); - $currentUid = $currentUser->get('id'); - - $id = 0; - $status = 1; - $isNew = false; - $isEnabled = false; - - if (!$currentUid) { - $status = -1; - $message = __('Operation denied.'); - } elseif (!$this->request->isPost()) { - $status = -2; - $message = __('Invalid submission.'); - } else { - $data = $this->request->getPost(); - - // Temporarily force to text - //$data['markup'] = 'text'; - - $markup = $data['markup']; - $form = new PostForm('comment-post', $markup); - $form->setInputFilter(new PostFilter); - $form->setData($data); - if ($form->isValid()) { - $values = $form->getData(); - if (!empty($values['root'])) { - $root = Pi::model('root', 'comment')->find($values['root']); - if (!$root) { - $status = -1; - $message = __('Root not found.'); - } elseif (!$root['active']) { - $status = -1; - $message = __('Comment is disabled.'); - } - } - if (0 < $status) { - // For new post - if (empty($values['id'])) { - if ($this->config('auto_approve')) { - $values['active'] = 1; - $isEnabled = true; - } else { - $values['active'] = 0; - } - $values['uid'] = $currentUid; - $values['ip'] = Pi::service('user')->getIp(); - $isNew = true; - } else { - $post = Pi::api('api', 'comment')->getPost($values['id']); - if (!$post) { - $status = -2; - $message = __('Invalid post parameter.'); - } elseif ($currentUid != $post['uid'] - && !$currentUser->isAdmin('comment') - ) { - $status = -1; - $message = __('Operation denied.'); - } else { - $isEnabled = empty($post['active']) ? false : true; - } - } - } - if (0 < $status) { - $id = Pi::api('api', 'comment')->addPost($values); - if ($id) { - $status = 1; - $message = __('Comment post saved successfully.'); - } else { - $status = 0; - $message = __('Comment post not saved.'); - } - } - } else { - $status = -1; - $message = __('Invalid data, please check and re-submit.'); - } - } - - if (0 < $status && $id) { - if ($isNew) { - if ($isEnabled) { - Pi::service('event')->trigger('post_publish', $id); - } else { - Pi::service('event')->trigger('post_submit', $id); - } - } elseif ($isEnabled) { - Pi::service('event')->trigger('post_update', $id); - } - } - - $result = array( - 'data' => $id, - 'status' => $status, - 'message' => $message, - ); - - return $result; - } - - /** - * Approve/disapprove a post - * - * @return bool - */ - public function approveAction() - { - $currentUser = Pi::service('user')->getUser(); - $id = _get('id', 'int'); - $flag = _get('flag'); - $return = _get('return'); - $redirect = _get('redirect'); - - if (!$currentUser->isAdmin('comment')) { - $status = -1; - $message = __('Operation denied.'); - } else { - if (null === $flag) { - $status = Pi::api('api', 'comment')->approve($id); - } else { - $status = Pi::api('api', 'comment')->approve($id, $flag); - } - $message = $status - ? __('Operation succeeded.') : __('Operation failed'); - } - - if (0 < $status && $id) { - if (null === $flag || $flag) { - Pi::service('event')->trigger('post_enable', $id); - } else { - Pi::service('event')->trigger('post_disable', $id); - } - } - - if (!$return) { - $redirect = $redirect - ? urldecode($redirect) - : $this->getRequest()->getServer('HTTP_REFERER'); - if (!$redirect) { - $redirect = Pi::api('api', 'comment')->getUrl('post', array( - 'post' => $id - )); - } - $this->jump($redirect, $message, $status == 1 ? 'success' : 'error'); - } else { - $result = array( - 'status' => (int) $status, - 'message' => $message, - 'data' => $id, - ); - - return $result; - } - } - - /** - * Delete a comment post - * - * @return array - */ - public function deleteAction() - { - $currentUser = Pi::service('user')->getUser(); - $currentUid = $currentUser->get('id'); - - $id = _get('id', 'int'); - $return = _get('return'); - $redirect = _get('redirect'); - - $post = Pi::api('api', 'comment')->getPost($id); - if (!$post) { - $status = 422; - $message = __('Invalid parameters.'); - } elseif ($currentUid != $post['uid'] - && !$currentUser->isAdmin('comment') - ) { - $status = 403; - $message = __('Forbidden.'); - } else { - $status = Pi::api('api', 'comment')->deletePost($id); - $message = $status - ? __('Operation succeeded.') : __('Operation failed'); - } - - if (0 < $status && $id) { - Pi::service('event')->trigger('post_delete', $post['root']); - } - - if (!$return) { - $redirect = $redirect - ? urldecode($redirect) - : $this->getRequest()->getServer('HTTP_REFERER'); - if (!$redirect) { - $redirect = Pi::service('url')->assemble('comment'); - } - $this->jump($redirect, $message, $status > 0 ? 'success' : 'error'); - } else { - $this->response->setStatusCode($status); - return array( - 'message' => $message - ); - } - } - - /** - * Get privileged operation list on a post - * - * @return array - */ - public function operationAction() - { - $id = _get('id', 'int'); - $uid = _get('uid', 'int'); - - $status = 1; - $message = ''; - $operations = array(); - - $postRow = null; - if (!$uid && $id) { - $postRow = Pi::model('post', 'comment')->find($id); - if ($postRow) { - $uid = (int) $postRow['uid']; - } - } - if (!$id || !$uid) { - $status = -1; - $message = __('Invalid parameters.'); - } else { - $currentUser = Pi::service('user')->getUser(); - $currentUid = $currentUser->get('id'); - $ops = array( - 'login' => array( - 'title' => __('Login'), - 'url' => Pi::service('authentication')->getUrl('login'), - ), - 'edit' => array( - 'title' => __('Edit'), - 'url' => Pi::api('api', 'comment')->getUrl( - 'edit', - array('post' => $id) - ), - ), - 'delete' => array( - 'title' => __('Delete'), - 'url' => Pi::api('api', 'comment')->getUrl( - 'delete', - array('post' => $id) - ), - ), - 'reply' => array( - 'title' => __('Reply'), - 'url' => Pi::api('api', 'comment')->getUrl( - 'reply', - array('post' => $id) - ), - ), - 'approve' => array( - 'title' => __('Enable/Disable'), - 'url' => Pi::api('api', 'comment')->getUrl( - 'approve', - array( - 'post' => $id, - 'flag' => !(int) $postRow['active'], - ) - ), - ), - ); - - if (!$currentUid) { - $operations = $ops['login']; - } elseif ($currentUser->isAdmin('comment')) { - $operations = $ops; - unset($operations['login']); - } elseif ($uid == $currentUid) { - $operations = $ops; - unset($operations['login'], $operations['approve']); - } elseif ($uid != $currentUid) { - $operations = $ops['reply']; - } - } - $result = array( - 'status' => $status, - 'message' => $message, - 'data' => $operations, - ); - - return $result; - } -} diff --git a/usr/module/comment/src/Controller/Front/TestController.php b/usr/module/comment/src/Controller/Front/TestController.php deleted file mode 100644 index 703d736126..0000000000 --- a/usr/module/comment/src/Controller/Front/TestController.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Controller\Front; - -use Pi; -use Pi\Mvc\Controller\ActionController; - -/** - * Test cases controller - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class TestController extends ActionController -{ - /** - * Default action if none provided - * - * @return string - */ - public function indexAction() - { - $this->view()->setTemplate(false); - } -} diff --git a/usr/module/comment/src/Form/PostFilter.php b/usr/module/comment/src/Form/PostFilter.php deleted file mode 100644 index e3d2fce550..0000000000 --- a/usr/module/comment/src/Form/PostFilter.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Form; - -use Zend\InputFilter\InputFilter; - -class PostFilter extends InputFilter -{ - public function __construct() - { - $this->add(array( - 'name' => 'content', - 'allow_empty' => false, - 'filters' => array( - array( - 'name' => 'StringTrim', - ), - ), - )); - - foreach (array( - 'id', - 'root', - 'reply' - ) as $intElement - ) { - $this->add(array( - 'name' => $intElement, - 'allow_empty' => true, - 'filters' => array( - array( - 'name' => 'Int', - ), - ), - )); - } - - foreach (array( - 'module', - 'type', - 'item', - 'markup', - 'redirect' - ) as $stringElement - ) { - $this->add(array( - 'name' => $stringElement, - 'allow_empty' => true, - 'filters' => array( - array( - 'name' => 'StringTrim', - ), - ), - )); - } - } -} diff --git a/usr/module/comment/src/Form/PostForm.php b/usr/module/comment/src/Form/PostForm.php deleted file mode 100644 index 9a98f9c078..0000000000 --- a/usr/module/comment/src/Form/PostForm.php +++ /dev/null @@ -1,128 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Form; - -use Pi; -use Pi\Form\Form as BaseForm; - - -/** - * Form of comment post - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class PostForm extends BaseForm -{ - /** - * Editor type - * - * @var string - */ - protected $markup = 'text'; - - /** - * Constructor - * - * @param string|int $name Optional name for the element - * @param string $markup Page type: text, html, markdown - */ - public function __construct($name = '', $markup = '') - { - $name = $name ?: 'comment-post'; - $this->markup = $markup ?: $this->markup; - parent::__construct($name); - $this->setAttribute('action', Pi::service('comment')->getUrl('submit')); - } - - /** - * Load filter - * - * @return PostFilter - */ - public function getInputFilter() - { - if (!$this->filter) { - $this->filter = new PostFilter; - } - - return $this->filter; - } - - /** - * {@inheritdoc} - */ - public function init() - { - $set = ''; - switch ($this->markup) { - case 'html': - $editor = 'html'; - break; - case 'markdown': - $editor = 'markitup'; - $set = 'markdown'; - break; - case 'text': - default: - $editor = 'textarea'; - $this->markup = 'text'; - break; - } - - $this->add(array( - 'name' => 'content', - 'type' => 'editor', - 'options' => array( - 'label' => __('Comment'), - 'editor' => $editor, - 'set' => $set, - ), - 'attributes' => array( - 'placeholder' => __('Type your content'), - 'class' => 'form-control', - 'rows' => 5, - ), - )); - - $this->add(array( - 'name' => 'submit', - //'type' => 'button', - 'attributes' => array( - 'type' => 'submit', - 'value' => __('Save'), - 'class' => 'btn btn-primary', - ), - )); - - $this->add(array( - 'name' => 'markup', - 'attributes' => array( - 'type' => 'hidden', - 'value' => $this->markup, - ), - )); - - foreach (array( - 'id', - 'root', - 'reply', - 'module', - 'type', - 'item', - 'redirect' - ) as $hiddenElement - ) { - $this->add(array( - 'name' => $hiddenElement, - 'type' => 'hidden', - )); - } - } -} diff --git a/usr/module/comment/src/Installer/Action/Install.php b/usr/module/comment/src/Installer/Action/Install.php deleted file mode 100644 index b31d9c00be..0000000000 --- a/usr/module/comment/src/Installer/Action/Install.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Installer\Action; - -use Pi; -use Pi\Application\Installer\Action\Install as BasicInstall; -//use Pi\Application\Installer\Module as ModuleInstaller; -use Pi\Application\Installer\Resource\Comment as CommentResource; -use Zend\EventManager\Event; - -class Install extends BasicInstall -{ - /** - * {@inheritDoc} - */ - protected function attachDefaultListeners() - { - $events = $this->events; - $events->attach('install.post', array($this, 'checkModules'), 10); - parent::attachDefaultListeners(); - - return $this; - } - - /** - * Check other modules and register comments if available - * - * @param Event $e - * @return void - */ - public function checkModules(Event $e) - { - $module = $e->getParam('module'); - - $modules = Pi::registry('module')->read(); - if (isset($modules['comment'])) { - unset($modules['comment']); - } - $moduleList = array_keys($modules); - foreach ($moduleList as $mod) { - $options = Pi::service('module')->loadMeta($mod, 'comment', true); - if (empty($options)) { - continue; - } - /* - if (is_string($options)) { - $optionsFile = sprintf( - '%s/%s/config/%s', - Pi::path('module'), - Pi::service('module')->directory($mod), - $options - ); - $options = include $optionsFile; - if (empty($options) || !is_array($options)) { - continue; - } - } - */ - - $resourceHandler = new CommentResource($options); - $e->setParam('module', $mod); - $resourceHandler->setEvent($e); - $resourceHandler->installAction(); - } - - $e->setParam('module', $module); - } -} diff --git a/usr/module/comment/src/Installer/Action/Update.php b/usr/module/comment/src/Installer/Action/Update.php deleted file mode 100644 index 212d34fa69..0000000000 --- a/usr/module/comment/src/Installer/Action/Update.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Installer\Action; - -use Pi\Application\Installer\Action\Update as BasicUpdate; -use Module\Comment\Installer\Schema; -use Zend\EventManager\Event; - -/** - * Module update handler - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class Update extends BasicUpdate -{ - /** - * {@inheritDoc} - */ - protected function attachDefaultListeners() - { - $events = $this->events; - $events->attach('update.pre', array($this, 'updateSchema')); - parent::attachDefaultListeners(); - - return $this; - } - - /** - * Update module table schema - * - * @param Event $e - * @return bool - */ - public function updateSchema(Event $e) - { - $moduleVersion = $e->getParam('version'); - $updator = new Schema\Updator110($this); - $result = $updator->upgrade($moduleVersion); - - return $result; - } -} diff --git a/usr/module/comment/src/Installer/Schema/Updator110.php b/usr/module/comment/src/Installer/Schema/Updator110.php deleted file mode 100644 index dd95fa79ff..0000000000 --- a/usr/module/comment/src/Installer/Schema/Updator110.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Installer\Schema; - -use Pi; -use Pi\Application\Installer\Schema\AbstractUpdator; - -/** - * System schema update handler - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class Updator110 extends AbstractUpdator -{ - /** - * Update module table schema - * - * @param string $version - * - * @return bool - */ - public function upgrade($version) - { - $result = $this->from100($version); - - return $result; - } - - /** - * Upgrade from previous version - * - * @param string $version - * - * @return bool - */ - protected function from100($version) - { - $status = true; - if (version_compare($version, '1.1.0', '<')) { - - $tablesRename = array( - 'category' => 'type', - ); - foreach ($tablesRename as $old => $new) { - $tableOld = Pi::db()->prefix($old, 'comment'); - $tableNew = Pi::db()->prefix($new, 'comment'); - $sql = sprintf('RENAME TABLE %s TO %s', $tableOld, $tableNew); - $status = $this->queryTable($sql); - } - - $table = Pi::db()->prefix('type', 'comment'); - $sql = sprintf( - 'ALTER TABLE %s - DROP KEY `module_category`, - ADD UNIQUE KEY `module_type` (`module`, `name`);', - $table - ); - $status = $this->queryTable($sql); - - $table = Pi::db()->prefix('root', 'comment'); - $sql = sprintf( - 'ALTER TABLE %s - CHANGE `category` `type` varchar(64) NOT NULL default \'\', - DROP KEY `module_item`, - ADD UNIQUE KEY `module_item` (`module`, `type`, `item`);', - $table - ); - $status = $this->queryTable($sql); - } - - return $status; - } -} diff --git a/usr/module/comment/src/Model/Type.php b/usr/module/comment/src/Model/Type.php deleted file mode 100644 index 82d0ce9093..0000000000 --- a/usr/module/comment/src/Model/Type.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Model; - -use Pi\Application\Model\Model; - -/** - * Comment type model - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class Type extends Model -{ - /** - * Columns to be encoded - * - * @var array - */ - protected $encodeColumns = array( - 'params' => true, - ); -} diff --git a/usr/module/comment/src/Registry/Type.php b/usr/module/comment/src/Registry/Type.php deleted file mode 100644 index 8748712e83..0000000000 --- a/usr/module/comment/src/Registry/Type.php +++ /dev/null @@ -1,137 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - * @package Registry - */ - -namespace Module\Comment\Registry; - -use Pi; -use Pi\Application\Registry\AbstractRegistry; - -/** - * Pi comment type registry - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class Type extends AbstractRegistry -{ - /** @var string Module name */ - protected $module = 'comment'; - - /** - * {@inheritDoc} - */ - protected function loadDynamic($options = array()) - { - $list = array(); - - $model = Pi::model('type', $this->module); - if (-1 != $options['active']) { - $where = array('active' => $options['active']); - } else { - $where = array(); - } - if ($options['module']) { - $where['module'] = $options['module']; - } else { - $moduleList = Pi::registry('modulelist')->read('active'); - $where['module'] = array_keys($moduleList); - } - $rowset = $model->select($where); - foreach ($rowset as $row) { - $data = array( - 'title' => $row['title'], - 'icon' => $row['icon'], - 'active' => $row['active'], - 'callback' => $row['callback'], - 'locator' => $row['locator'], - 'identifier' => $row['identifier'], - 'params' => $row['params'], - ); - $name = $row['name']; - $controller = $row['controller']; - $action = $row['action']; - - if ($options['module']) { - if ($options['type']) { - if (empty($row['locator'])) { - $data = array_merge($data, array( - 'controller' => $controller, - 'action' => $action, - )); - } - $list[$row['name']] = $data; - } else { - if (empty($row['locator'])) { - $list['route'][$controller][$action][$name] = $data; - } else { - $list['locator'][$name] = $data; - } - } - } else { - if (empty($row['locator'])) { - $data = array_merge($data, array( - 'controller' => $controller, - 'action' => $action, - )); - } - $list[$row['module']][$name] = $data; - } - } - - return $list; - } - - /** - * {@inheritDoc} - * @param string $module - * @param string $type - * @param bool|null $active - */ - public function read($module = '', $type = '', $active = true) - { - $catName = $type; - $type = $catName ? 1 : 0; - $active = (null === $active) ? -1 : (int) $active; - $options = compact('module', 'type', 'active'); - $data = $this->loadData($options); - if ($module && $catName) { - $data = isset($data[$catName]) ? $data[$catName] : array(); - } - - return $data; - } - - /** - * {@inheritDoc} - * @param string $name - */ - public function create($meta = '') - { - $this->clear(''); - $this->read($meta); - - return true; - } - - /** - * {@inheritDoc} - */ - public function setNamespace($meta = '') - { - return parent::setNamespace(''); - } - - /** - * {@inheritDoc} - */ - public function flush() - { - return $this->clear(''); - } -} diff --git a/usr/module/comment/src/Route/Comment.php b/usr/module/comment/src/Route/Comment.php deleted file mode 100644 index 4e5b76e159..0000000000 --- a/usr/module/comment/src/Route/Comment.php +++ /dev/null @@ -1,154 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Comment\Route; - -use Pi\Mvc\Router\Http\Standard; - -/** - * Comment route - * - * Use cases: - * - * - Simplified URLs: - * - Item comment list: /list/<root-id> => List::Root - * - Comment post view: /post/<post-id> => Post::Index - * - * - Standard URLs: - * - Comment home: / => Index::Index - * - Comment home: /list => List::Index - * - User comments: /list/user/id/<uid> => List::User - * - Module comments: /list/module/name/<module-name> => List::Module - * - Comment post submit: /post/submit => Post::Submit - * - Comment post delete: /post/delete/id/<post-id> => Post::Delete - * - Comment post approve: /post/approve/id/<post-id> => Post::approve - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class Comment extends Standard -{ - /** - * Default values. - * @var array - */ - protected $defaults = array( - 'module' => 'comment', - 'controller' => 'index', - 'action' => 'index' - ); - - /** - * {@inheritDoc} - */ - protected $structureDelimiter = '/'; - - /** - * {@inheritDoc} - */ - protected function parse($path) - { - $matches = null; - - $parts = array_filter(explode($this->structureDelimiter, $path)); - //$count = count($parts); - if ($parts) { - $term = array_shift($parts); - // /list/<root-id> - if ('list' == $term) { - if ($parts && is_numeric($parts[0])) { - $matches = array( - 'controller' => 'list', - 'action' => 'root', - 'root' => (int) array_shift($parts), - ); - } - - // /post/<post-id> - } elseif ('post' == $term) { - if ($parts && is_numeric($parts[0])) { - $matches = array( - 'controller' => 'post', - 'action' => 'index', - 'id' => (int) array_shift($parts), - ); - } - - } - - if ($matches && $parts) { - $matches = array_merge($matches, $this->parseParams($parts)); - } - } - - if (null !== $matches) { - $matches = array_merge($this->defaults, $matches); - } else { - $path = $this->defaults['module'] . $this->structureDelimiter . $path; - $matches = parent::parse($path); - } - - return $matches; - } - - /** - * assemble(): Defined by Route interface. - * - * @see Route::assemble() - * @param array $params - * @param array $options - * @return string - */ - public function assemble( - array $params = array(), - array $options = array() - ) { - if (!$params) { - return $this->prefix; - } - - $url = null; - - $controller = isset($params['controller']) ? $params['controller'] : ''; - $action = isset($params['action']) ? $params['action'] : ''; - - // /list/<root-id> - if ('list' == $controller) { - if ('' == $action || 'root' == $action) { - if (!empty($params['root'])) { - $url .= 'list' . $this->paramDelimiter . $params['root']; - unset($params['root']); - } - } - - // /post/<post-id> - } elseif ('post' == $controller) { - if ('' == $action || 'index' == $action) { - if (!empty($params['id'])) { - $url .= 'post' . $this->paramDelimiter . $params['id']; - unset($params['id']); - } - } - } - - if ($url) { - $part = $this->assembleParams($params); - $url .= $part ? $this->paramDelimiter . $part : ''; - $url = $this->prefix . $this->paramDelimiter . $url; - } else { - $params['module'] = $this->defaults['module']; - $url = parent::assemble($params, $options); - $urlPrefix = $this->prefix . $this->paramDelimiter - . $this->defaults['module']; - $urlSuffix = substr($url, strlen($urlPrefix)); - $url = $this->prefix . $urlSuffix; - } - - return $url; - } -} diff --git a/usr/module/comment/template/admin/comment-index.phtml b/usr/module/comment/template/admin/comment-index.phtml deleted file mode 100644 index 91856417d5..0000000000 --- a/usr/module/comment/template/admin/comment-index.phtml +++ /dev/null @@ -1,114 +0,0 @@ -<div class="row"> - <div class="col-md-6"> - <div class="panel panel-default"> - <div class="panel-heading"> - <?php echo _a('Comment stats'); ?> - </div> - <table class="table"> - <thead> - <tr> - <th><?php echo _a('Title'); ?> - <th><?php echo _a('Amounts'); ?> - <tbody> - <?php foreach ($counts as $name => $data) { ?> - <tr> - <td> - <?php echo _escape($data['title']); ?> - <td> - <a href="<?php echo $data['url']; ?>" - title="<?php echo _escape($data['title']); ?>" target="_blank"> - <?php echo $data['count']; ?> - </a> - <?php } ?> - </table> - </div> - <div class="panel panel-default"> - <div class="panel-heading"><?php echo _a('Top posters'); ?></div> - <table class="table table-striped"> - <tr> - <th></th> - <th><?php echo _a('Submitters'); ?></th> - <th><?php echo _a('Comments'); ?></th> - </tr> - <?php - $index = 0; - foreach ($users as $uid => $data) { - ?> - <tr> - <td><?php echo _escape(++$index); ?></td> - <td><?php echo _escape($data['name']); ?></td> - <td> - <a href="<?php echo $data['url']; ?>" title="<?php echo _escape($data['name']); ?>" target="_blank"> - <?php echo $data['count']; ?> - </a> - </td> - </tr> - <?php } ?> - </table> - </div> - <div class="panel panel-default"> - <div class="panel-heading"><?php echo _a('Active comment posts by module'); ?></div> - <table class="table table-striped"> - <tr> - <th><?php echo _a('Title'); ?></th> - <th><?php echo _a('Amounts'); ?></th> - </tr> - <?php foreach ($modules as $name => $data) { ?> - <tr> - <td><?php echo _escape($data['title']); ?></td> - <td><a href="<?php echo $data['url']; ?>" title="<?php echo _escape($data['title']); ?>" target="_blank"> - <?php echo $data['count']; ?> - </a></td> - </tr> - <?php foreach ($data['types'] as $type => $cData) { ?> - <tr> - <td>  <?php echo _escape($cData['title']); ?></td> - <td><a href="<?php echo $cData['url']; ?>" title="<?php echo _escape($cData['title']); ?>" target="_blank"> - <?php echo $cData['count']; ?></a> - </td> - </tr> - <?php } ?> - <?php } ?> - </table> - </div> - </div> - <div class="col-md-6"> - <div class="panel panel-default"> - <div class="panel-heading"><?php echo _a('Links'); ?></div> - <div class="panel-body"> - <ul> - <?php foreach ($links as $name => $data) { ?> - <li><a href="<?php echo $data['url']; ?>" title="<?php echo _escape($data['title']); ?>" target="_blank"> - <?php echo _escape($data['title']); ?> - </a> - </li> - <?php } ?> - </ul> - </div> - </div> - <div class="panel panel-default"> - <div class="panel-heading"><?php echo _a('Most commented'); ?></div> - <table class="table table-striped"> - <tr> - <th></th> - <th><?php echo _a('Article title'); ?></th> - <th><?php echo _a('Comments'); ?></th> - </tr> - <?php - $index = 0; - foreach ($targets as $name => $data) { - ?> - <tr> - <td><?php echo _escape(++$index); ?></td> - <td><?php echo _escape($data['title']); ?></td> - <td> - <a href="<?php echo $data['url']; ?>" title="<?php echo _escape($data['title']); ?>" target="_blank"> - <?php echo $data['count']; ?> - </a> - </td> - </tr> - <?php } ?> - </table> - </div> - </div> -</div> diff --git a/usr/module/comment/template/admin/comment-list.phtml b/usr/module/comment/template/admin/comment-list.phtml deleted file mode 100644 index f851a59131..0000000000 --- a/usr/module/comment/template/admin/comment-list.phtml +++ /dev/null @@ -1,249 +0,0 @@ -<?php -$this->backbone(); -$this->css($this->assetModule('css/admin.css')); -// Count -$count = $comment['count']; -// Comment list generated by comment module: -// id, time, content, user, IP -// user: uid, name, avatar, profile -$posts = $comment['posts']; -// Pagination object -$paginator = $comment['paginator']; -$active = $comment['active']; -?> -<div id="pi-js-comment"> - <?php - if ($posts) { - ?> - <div class="pi-comment-batch-operation"> - <input type="checkbox" class="check-all" style="margin-right: 20px"> - <?php - if (0 === $active || null === $active) { - ?> - <input type="button" name="enable" class="btn disabled" value="<?php echo _a('Enable'); ?>"> - <?php - } - if (1 === $active || null === $active) { - ?> - <input type="button" name="disable" class="btn disabled" value="<?php echo _a('Disable'); ?>"> - <?php - } - ?> - <input type="button" name="delete" class="btn disabled" value="<?php echo _a('Delete'); ?>"> - </div> - - <div class="pi-comment-list"> - <table style="width: 100%" class="table table-striped"> - <?php - foreach ($posts as $post) { - $post['active'] = (int) $post['active']; - ?> - <tr> - <td style="width: 30px"> - <input type="checkbox" value="<?php echo $post['id']; ?>" class="check-one"> - </td> - <td style="text-align: center; width: 50px"><?php echo $post['user']['avatar']; ?></td> - <td style="width: 100px"> - <a class="<?php echo 0 === $post['active'] && 0 !== $active ? ' muted' : ''; ?>" href="<?php echo $post['user']['url']; ?>"> - <strong><?php echo _escape($post['user']['name']); ?></strong> - </a> - <div class="muted"><?php echo _escape($post['ip']); ?></div> - </td> - <td> - <a class="pi-comment-article-title<?php echo 0 === $post['active'] && 0 !== $active ? ' muted' : ''; ?>" target="_blank" href="<?php echo $post['target']['url']; ?>" title="<?php echo _escape($post['target']['title']); ?>"> - <strong><?php echo _escape($post['target']['title']); ?></strong> - </a> - <div class="pi-comment-content<?php echo 0 === $post['active'] && 0 !== $active ? ' muted' : ''; ?>"> - <?php echo $post['content']; ?> - </div> - <div class="one-action"> - <?php - foreach ($post['operations'] as $op => $value) { - $class = ''; - switch ($op) { - case 'approve': - $class = 'icon-ban-circle'; - break; - case 'edit': - $class = 'icon-pencil'; - break; - case 'delete': - $class = 'icon-trash'; - break; - case 'reply': - $class = 'icon-share-alt'; - break; - } - ?> - <span class="operation"> - <a class="muted" href="<?php echo $value['url']; ?>"<?php echo 'delete' == $op ? sprintf(' onclick="return confirm(\'%s\')"', __('Are you sure to delete this comment?')) : ''; ?>> - <i class="<?php echo $class; ?>" style="text-decoration: none"></i> - <?php echo _escape($value['title']); ?> - </a> - </span> - <?php - } - ?> - </div> - </td> - <td style="width: 140px" class="muted"><?php echo _date($post['time']); ?></td> - <td style="width: 60px"> - <?php if (0 === $post['active'] && 0 !== $active) { - ?> - <span style="color: #999999"><strong><?php echo _a('Pending'); ?></strong></span> - <?php - } - ?> - </td> - </tr> - <?php - } - ?> - </table> - </div> - <?php - } else { - ?> - <div class="pi-comment-none"><?php echo _a('No comments available yet.'); ?></div> - <?php - } - ?> - - <?php - if ($posts && $paginator) { - echo $this->pagination($paginator); - } - ?> -</div> - -<script> -(function($) { - var page = { - url : "<?php echo $this->url('', array('controller' => 'list', 'action' => 'index')); ?>".replace(/index\/$/,""), - el : $("#pi-js-comment"), - $ : function(selector) { - return this.el.find(selector); - }, - init : function() { - _.bindAll(this); - this.$(".operation a").mouseover(this.removeOperationClass); - this.$(".operation a").mouseout(this.addOperationClass); - this.$(".check-all").click(this.checkAll); - this.$(".check-one").click(this.clickOne); - this.$("[name=enable]").click(this.batchOperation); - this.$("[name=disable]").click(this.batchOperation); - this.$("[name=delete]").click(this.batchOperation); - }, - removeOperationClass : function(e) { - var el = $(e.target).parents(".operation"); - el.find("a").removeClass("muted"); - }, - addOperationClass : function(e) { - var el = $(e.target).parents(".operation"); - el.find("a").addClass("muted"); - }, - checkAll : function() { - var flag = this.$(".check-all").prop("checked"); - this.$(".check-one").prop("checked", flag).each(function() { - var tr = $(this).parents("tr:first"); - if (flag) { - tr.addClass("info"); - } else { - tr.removeClass("info"); - } - }); - this.toggleBulk(); - }, - batchOperation : function(e) { - var url = "<?php echo $this->url('', array('controller' => 'post', 'action' => 'index')); ?>".replace(/index\/$/,""); - var el = $(e.target); - var name = el.attr('name'); - var operation, flag; - var id = [], - fn = function() { - this.$(".check-one:checked").each(function() { - id.push($(this).val()); - }); - if ('enable' == name || 'disable' == name) { - operation = 'batch-approve'; - if ('enable' == name) { - flag = 1; - } else { - flag = 0; - } - } else { - operation = 'batch-' + name; - } - if ('batch-approve' == operation) { - location.href = url + operation + "/id/" + id.join(",") + "/flag/" - + flag + "?redirect=" + this.encodeUrl(); - } else { - location.href = url + operation + "/id/" + id.join(",") + "?redirect=" - + this.encodeUrl(); - } - }; - if (name) { - if (name == "delete") { - if (confirm("<?php echo _a('Are you sure delete these comments?'); ?>")) { - fn.call(this); - } - } else { - fn.call(this); - } - } - }, - clickOne : function(e) { - var el = $(e.target), - tr = el.parents("tr:first"); - if (el.prop("checked")) { - tr.addClass("info"); - } else { - tr.removeClass("info"); - } - this.toggleBulk(); - }, - toggleBulk : function() { - var enableObj = this.$("[name=enable]"); - var disableObj = this.$("[name=disable]"); - var deleteObj = this.$("[name=delete]"); - if (this.$(".check-one:checked").length) { - deleteObj.removeClass("disabled"); - if (enableObj) { - enableObj.removeClass("disabled"); - } - if (disableObj) { - disableObj.removeClass("disabled"); - } - } else { - deleteObj.addClass("disabled"); - if (enableObj) { - enableObj.addClass("disabled"); - } - if (disableObj) { - disableObj.addClass("disabled"); - } - } - }, - oneAction : function(e) { - var el = $(e.target), - id = el.parents("tr:first").attr("data-id"), - val = el.attr("data-value"), - status=el.attr("data-status"); - if (val == "delete") { - if (confirm("<?php echo _a('Are you sure delete this article?'); ?>")) { - location.href = this.url + "delete?id=" + id + "&from=" + this.encodeUrl(); - } - } else if (status) { - location.href = this.url + val + "?id=" + id + "&status=" - + status + "&from=" + this.encodeUrl(); - } else { - location.href = this.url + val + "?id=" + id + "&from=" + this.encodeUrl(); - } - }, - encodeUrl : function() { - return encodeURIComponent(location.href); - } - } - page.init(); -})(jQuery) -</script> \ No newline at end of file diff --git a/usr/module/comment/template/admin/comment-module-select.phtml b/usr/module/comment/template/admin/comment-module-select.phtml deleted file mode 100644 index 1069defa07..0000000000 --- a/usr/module/comment/template/admin/comment-module-select.phtml +++ /dev/null @@ -1,26 +0,0 @@ -<table class="table table-striped" style="margin-top: 20px"> - <tr> - <th><?php echo _a('Title'); ?></th> - <th><?php echo _a('Action'); ?></th> - </tr> - <?php foreach ($modules as $name => $data) { ?> - <tr> - <td><?php echo _escape($name); ?></td> - <td> - <a href="<?php echo $data['url']; ?>" title="<?php echo _escape($data['title']); ?>"> - <?php echo _a('View comments'); ?> - </a> - </td> - </tr> - <?php foreach ($data['types'] as $type) { ?> - <tr> - <td>    <?php echo $type['title']; ?></td> - <td> - <a href="<?php echo $type['url']; ?>" title="<?php echo _escape($type['title']); ?>"> - <?php echo _a('View comments'); ?> - </a> - </td> - </tr> - <?php } ?> - <?php } ?> -</table> diff --git a/usr/module/comment/template/admin/comment-module.phtml b/usr/module/comment/template/admin/comment-module.phtml deleted file mode 100644 index 36607288bc..0000000000 --- a/usr/module/comment/template/admin/comment-module.phtml +++ /dev/null @@ -1,255 +0,0 @@ -<?php -$this->backbone(); -$this->css($this->assetModule('css/admin.css')); - -// Module and type -$moduleData = $comment['module']; -$typeData = $comment['type']; -// Count -$count = $comment['count']; -// Comment list generated by comment module: -// id, time, content, user, IP -// user: uid, name, avatar, profile -$posts = $comment['posts']; -// Pagination object -$paginator = $comment['paginator']; -$active = $comment['active']; -?> - -<div style="font-weight: bold; margin: 10px 0"><?php echo _escape($comment['title']); ?></div> -<div id="pi-js-comment"> - <?php - if ($posts) { - ?> - <div class="pi-comment-batch-operation"> - <input type="checkbox" class="check-all" style="margin-right: 20px"> - <?php - if (0 === $active || null === $active) { - ?> - <input type="button" name="enable" class="btn disabled" value="<?php echo _a('Enable'); ?>"> - <?php - } - if (1 === $active || null === $active) { - ?> - <input type="button" name="disable" class="btn disabled" value="<?php echo _a('Disable'); ?>"> - <?php - } - ?> - <input type="button" name="delete" class="btn disabled" value="<?php echo _a('Delete'); ?>"> - </div> - - <div class="pi-comment-list"> - <table style="width: 100%" class="table table-striped"> - <?php - foreach ($posts as $post) { - $post['active'] = (int) $post['active']; - ?> - <tr> - <td style="width: 30px"> - <input type="checkbox" value="<?php echo _escape($post['id']); ?>" class="check-one"> - </td> - <td style="text-align: center; width: 50px"><?php echo $post['user']['avatar']; ?></td> - <td style="width: 100px"> - <a class="<?php echo 0 === $post['active'] && 0 !== $active ? ' muted' : ''; ?>" href="<?php echo $post['user']['url']; ?>"> - <strong><?php echo _escape($post['user']['name']); ?></strong> - </a> - <div class="muted"><?php echo _escape($post['ip']); ?></div> - </td> - <td> - <a class="pi-comment-article-title<?php echo 0 === $post['active'] && 0 !== $active ? ' muted' : ''; ?>" target="_blank" href="<?php echo $post['target']['url']; ?>" title="<?php echo _escape($post['target']['title']); ?>"> - <strong><?php echo _escape($post['target']['title']); ?></strong> - </a> - <div class="pi-comment-content<?php echo 0 === $post['active'] && 0 !== $active ? ' muted' : ''; ?>"> - <?php echo $post['content']; ?> - </div> - <div class="one-action"> - <?php - foreach ($post['operations'] as $op => $value) { - $class = ''; - switch ($op) { - case 'approve': - $class = 'icon-ban-circle'; - break; - case 'edit': - $class = 'icon-pencil'; - break; - case 'delete': - $class = 'icon-trash'; - break; - case 'reply': - $class = 'icon-share-alt'; - break; - } - ?> - <span class="operation"> - <a class="muted" href="<?php echo $value['url']; ?>"<?php echo 'delete' == $op ? sprintf(' onclick="return confirm(\'%s\')"', __('Are you sure to delete this comment?')) : ''; ?>> - <i class="<?php echo $class; ?>" style="text-decoration: none"></i> - <?php echo $value['title']; ?> - </a> - </span> - <?php - } - ?> - </div> - </td> - <td style="width: 140px" class="muted"><?php echo _date($post['time']); ?></td> - <td style="width: 60px"> - <?php if (0 === $post['active'] && 0 !== $active) { - ?> - <span style="color: #999999"><strong><?php echo _a('Pending'); ?></strong></span> - <?php - } - ?> - </td> - </tr> - <?php - } - ?> - </table> - </div> - <?php - } else { - ?> - <div class="pi-comment-none"><?php echo _a('No comments available yet.'); ?></div> - <?php - } - ?> - - <?php - if ($posts && $paginator) { - echo $this->pagination($paginator); - } - ?> -</div> - -<script> -(function($) { - var page = { - url : "<?php echo $this->url('', array('controller' => 'list', 'action' => 'index')); ?>".replace(/index\/$/,""), - el : $("#pi-js-comment"), - $ : function(selector) { - return this.el.find(selector); - }, - init : function() { - _.bindAll(this); - this.$(".operation a").mouseover(this.removeOperationClass); - this.$(".operation a").mouseout(this.addOperationClass); - this.$(".check-all").click(this.checkAll); - this.$(".check-one").click(this.clickOne); - this.$("[name=enable]").click(this.batchOperation); - this.$("[name=disable]").click(this.batchOperation); - this.$("[name=delete]").click(this.batchOperation); - }, - removeOperationClass : function(e) { - var el = $(e.target).parents(".operation"); - el.find("a").removeClass("muted"); - }, - addOperationClass : function(e) { - var el = $(e.target).parents(".operation"); - el.find("a").addClass("muted"); - }, - checkAll : function() { - var flag = this.$(".check-all").prop("checked"); - this.$(".check-one").prop("checked", flag).each(function() { - var tr = $(this).parents("tr:first"); - if (flag) { - tr.addClass("info"); - } else { - tr.removeClass("info"); - } - }); - this.toggleBulk(); - }, - batchOperation : function(e) { - var url = "<?php echo $this->url('', array('controller' => 'post', 'action' => 'index')); ?>".replace(/index\/$/,""); - var el = $(e.target); - var name = el.attr('name'); - var operation, flag; - var id = [], - fn = function() { - this.$(".check-one:checked").each(function() { - id.push($(this).val()); - }); - if ('enable' == name || 'disable' == name) { - operation = 'batch-approve'; - if ('enable' == name) { - flag = 1; - } else { - flag = 0; - } - } else { - operation = 'batch-' + name; - } - if ('batch-approve' == operation) { - location.href = url + operation + "/id/" + id.join(",") + "/flag/" - + flag + "?redirect=" + this.encodeUrl(); - } else { - location.href = url + operation + "/id/" + id.join(",") + "?redirect=" - + this.encodeUrl(); - } - }; - if (name) { - if (name == "delete") { - if (confirm("<?php echo _a('Are you sure delete these comments?'); ?>")) { - fn.call(this); - } - } else { - fn.call(this); - } - } - }, - clickOne : function(e) { - var el = $(e.target), - tr = el.parents("tr:first"); - if (el.prop("checked")) { - tr.addClass("info"); - } else { - tr.removeClass("info"); - } - this.toggleBulk(); - }, - toggleBulk : function() { - var enableObj = this.$("[name=enable]"); - var disableObj = this.$("[name=disable]"); - var deleteObj = this.$("[name=delete]"); - if (this.$(".check-one:checked").length) { - deleteObj.removeClass("disabled"); - if (enableObj) { - enableObj.removeClass("disabled"); - } - if (disableObj) { - disableObj.removeClass("disabled"); - } - } else { - deleteObj.addClass("disabled"); - if (enableObj) { - enableObj.addClass("disabled"); - } - if (disableObj) { - disableObj.addClass("disabled"); - } - } - }, - oneAction : function(e) { - var el = $(e.target), - id = el.parents("tr:first").attr("data-id"), - val = el.attr("data-value"), - status=el.attr("data-status"); - if (val == "delete") { - if (confirm("<?php echo _a('Are you sure delete this article?'); ?>")) { - location.href = this.url + "delete?id=" + id + "&from=" + this.encodeUrl(); - } - } else if (status) { - location.href = this.url + val + "?id=" + id + "&status=" - + status + "&from=" + this.encodeUrl(); - } else { - location.href = this.url + val + "?id=" + id + "&from=" + this.encodeUrl(); - } - }, - encodeUrl : function() { - return encodeURIComponent(location.href); - } - } - page.init(); -})(jQuery) -</script> diff --git a/usr/module/comment/template/admin/comment-type.phtml b/usr/module/comment/template/admin/comment-type.phtml deleted file mode 100644 index 1e53245a31..0000000000 --- a/usr/module/comment/template/admin/comment-type.phtml +++ /dev/null @@ -1,32 +0,0 @@ -<table class="table table-striped" style="margin-top: 20px"> - <tr> - <th><?php echo _a('Title'); ?></th> - <th><?php echo _a('Enable type'); ?></th> - <th><?php echo _a('Action'); ?></th> - </tr> - <?php foreach ($modules as $name => $data) { ?> - <tr> - <td><?php echo _escape($name); ?></td> - <td></td> - <td><a href="<?php echo $data['url']; ?>" target="_blank"><?php echo _a('View comments'); ?></a> - </td> - </tr> - <?php foreach ($data['types'] as $type) { ?> - <tr> - <td>    <?php echo $type['title']; ?></td> - <td> - <div class="btn-group"> - <a class="btn<?php echo !$type['active'] ? ' btn-danger active' : ' btn-default'; ?>" href="<?php echo $type['enable']['url']; ?>"> - <?php echo _a('No'); ?> - </a> - <a class="btn<?php echo $type['active'] ? ' btn-success active' : ' btn-default'; ?>" href="<?php echo $type['enable']['url']; ?>"> - <?php echo _a('Yes'); ?> - </a> - </div> - </td> - <td><a href="<?php echo $type['url']; ?>" target="_blank"><?php echo _a('View comments'); ?></a> - </td> - </tr> - <?php } ?> - <?php } ?> -</table> diff --git a/usr/module/comment/template/admin/comment-user-select.phtml b/usr/module/comment/template/admin/comment-user-select.phtml deleted file mode 100644 index 54d0d553ea..0000000000 --- a/usr/module/comment/template/admin/comment-user-select.phtml +++ /dev/null @@ -1,7 +0,0 @@ -<div style="font-size: 16px; font-weight: bold"><?php echo _escape($title); ?></div> -<div style="margin-top: 10px" class="muted"><?php echo _a('Filter comments by a specific user.'); ?></div> - -<form name="comment-user" method="GET" action="<?php echo $url; ?>" style="margin-top: 20px" class="form-inline"> - <input type="text" name="uid" value="" placeholder="<?php echo _a('Type user id or identity'); ?>"> - <button type="submit" class="btn"><?php echo _a('Submit'); ?></button> -</form> \ No newline at end of file diff --git a/usr/module/comment/template/admin/comment-user.phtml b/usr/module/comment/template/admin/comment-user.phtml deleted file mode 100644 index 31238cddc8..0000000000 --- a/usr/module/comment/template/admin/comment-user.phtml +++ /dev/null @@ -1,256 +0,0 @@ -<?php -$this->backbone(); -$this->css($this->assetModule('css/admin.css')); - -// User data -$user = $comment['user']; -// Count -$count = $comment['count']; -// Comment list generated by comment module: -// id, time, content, IP -$posts = $comment['posts']; -// Pagination object -$paginator = $comment['paginator']; -$active = $comment['active']; -?> - -<form name="comment-user" method="GET" action="<?php echo $url; ?>" style="margin-top: 10px" class="form-inline"> - <input type="text" name="keyword" value="<?php echo $keyword; ?>" placeholder="<?php echo _a('Type user id or identity'); ?>"> - <button type="submit" class="btn"><?php echo _a('Submit'); ?></button> -</form> -<div id="pi-js-comment"> - <?php - if ($posts) { - ?> - <div class="pi-comment-batch-operation"> - <input type="checkbox" class="check-all" style="margin-right: 20px"> - <?php - if (0 === $active || null === $active) { - ?> - <input type="button" name="enable" class="btn disabled" value="<?php echo _a('Enable'); ?>"> - <?php - } - if (1 === $active || null === $active) { - ?> - <input type="button" name="disable" class="btn disabled" value="<?php echo _a('Disable'); ?>"> - <?php - } - ?> - <input type="button" name="delete" class="btn disabled" value="<?php echo _a('Delete'); ?>"> - </div> - - <div class="pi-comment-list"> - <table style="width: 100%" class="table table-striped"> - <?php - foreach ($posts as $post) { - $post['active'] = (int) $post['active']; - ?> - <tr> - <td style="width: 30px"> - <input type="checkbox" value="<?php echo $post['id']; ?>" class="check-one"> - </td> - <td style="text-align: center; width: 50px"><?php echo $user['avatar']; ?></td> - <td style="width: 100px"> - <a class="<?php echo 0 === $post['active'] && 0 !== $active ? ' muted' : ''; ?>" href="<?php echo $user['url']; ?>"> - <strong><?php echo _escape($user['name']); ?></strong> - </a> - <div class="muted"><?php echo _escape($post['ip']); ?></div> - </td> - <td> - <a class="pi-comment-article-title<?php echo 0 === $post['active'] && 0 !== $active ? ' muted' : ''; ?>" target="_blank" href="<?php echo $post['target']['url']; ?>" title="<?php echo _escape($post['target']['title']); ?>"> - <strong><?php echo _escape($post['target']['title']); ?></strong> - </a> - <div class="pi-comment-content<?php echo 0 === $post['active'] && 0 !== $active ? ' muted' : ''; ?>"> - <?php echo $post['content']; ?> - </div> - <div class="one-action"> - <?php - foreach ($post['operations'] as $op => $value) { - $class = ''; - switch ($op) { - case 'approve': - $class = 'icon-ban-circle'; - break; - case 'edit': - $class = 'icon-pencil'; - break; - case 'delete': - $class = 'icon-trash'; - break; - case 'reply': - $class = 'icon-share-alt'; - break; - } - ?> - <span class="operation"> - <a class="muted" href="<?php echo $value['url']; ?>"<?php echo 'delete' == $op ? sprintf(' onclick="return confirm(\'%s\')"', __('Are you sure to delete this comment?')) : ''; ?>> - <i class="<?php echo $class; ?>" style="text-decoration: none"></i> - <?php echo _escape($value['title']); ?> - </a> - </span> - <?php - } - ?> - </div> - </td> - <td style="width: 140px" class="muted"><?php echo _date($post['time']); ?></td> - <td style="width: 60px"> - <?php if (0 === $post['active'] && 0 !== $active) { - ?> - <span style="color: #999999"><strong><?php echo _a('Pending'); ?></strong></span> - <?php - } - ?> - </td> - </tr> - <?php - } - ?> - </table> - </div> - <?php - } else { - ?> - <div class="pi-comment-none"><?php echo _a('No comments available yet.'); ?></div> - <?php - } - ?> - - <?php - if ($posts && $paginator) { - echo $this->pagination($paginator); - } - ?> -</div> - -<script> -(function($) { - var page = { - url : "<?php echo $this->url('', array('controller' => 'list', 'action' => 'index')); ?>".replace(/index\/$/,""), - el : $("#pi-js-comment"), - $ : function(selector) { - return this.el.find(selector); - }, - init : function() { - _.bindAll(this); - this.$(".operation a").mouseover(this.removeOperationClass); - this.$(".operation a").mouseout(this.addOperationClass); - this.$(".check-all").click(this.checkAll); - this.$(".check-one").click(this.clickOne); - this.$("[name=enable]").click(this.batchOperation); - this.$("[name=disable]").click(this.batchOperation); - this.$("[name=delete]").click(this.batchOperation); - }, - removeOperationClass : function(e) { - var el = $(e.target).parents(".operation"); - el.find("a").removeClass("muted"); - }, - addOperationClass : function(e) { - var el = $(e.target).parents(".operation"); - el.find("a").addClass("muted"); - }, - checkAll : function() { - var flag = this.$(".check-all").prop("checked"); - this.$(".check-one").prop("checked", flag).each(function() { - var tr = $(this).parents("tr:first"); - if (flag) { - tr.addClass("info"); - } else { - tr.removeClass("info"); - } - }); - this.toggleBulk(); - }, - batchOperation : function(e) { - var url = "<?php echo $this->url('', array('controller' => 'post', 'action' => 'index')); ?>".replace(/index\/$/,""); - var el = $(e.target); - var name = el.attr('name'); - var operation, flag; - var id = [], - fn = function() { - this.$(".check-one:checked").each(function() { - id.push($(this).val()); - }); - if ('enable' == name || 'disable' == name) { - operation = 'batch-approve'; - if ('enable' == name) { - flag = 1; - } else { - flag = 0; - } - } else { - operation = 'batch-' + name; - } - if ('batch-approve' == operation) { - location.href = url + operation + "/id/" + id.join(",") + "/flag/" - + flag + "?redirect=" + this.encodeUrl(); - } else { - location.href = url + operation + "/id/" + id.join(",") + "?redirect=" - + this.encodeUrl(); - } - }; - if (name) { - if (name == "delete") { - if (confirm("<?php echo _a('Are you sure delete these comments?'); ?>")) { - fn.call(this); - } - } else { - fn.call(this); - } - } - }, - clickOne : function(e) { - var el = $(e.target), - tr = el.parents("tr:first"); - if (el.prop("checked")) { - tr.addClass("info"); - } else { - tr.removeClass("info"); - } - this.toggleBulk(); - }, - toggleBulk : function() { - var enableObj = this.$("[name=enable]"); - var disableObj = this.$("[name=disable]"); - var deleteObj = this.$("[name=delete]"); - if (this.$(".check-one:checked").length) { - deleteObj.removeClass("disabled"); - if (enableObj) { - enableObj.removeClass("disabled"); - } - if (disableObj) { - disableObj.removeClass("disabled"); - } - } else { - deleteObj.addClass("disabled"); - if (enableObj) { - enableObj.addClass("disabled"); - } - if (disableObj) { - disableObj.addClass("disabled"); - } - } - }, - oneAction : function(e) { - var el = $(e.target), - id = el.parents("tr:first").attr("data-id"), - val = el.attr("data-value"), - status=el.attr("data-status"); - if (val == "delete") { - if (confirm("<?php echo _a('Are you sure delete this article?'); ?>")) { - location.href = this.url + "delete?id=" + id + "&from=" + this.encodeUrl(); - } - } else if (status) { - location.href = this.url + val + "?id=" + id + "&status=" - + status + "&from=" + this.encodeUrl(); - } else { - location.href = this.url + val + "?id=" + id + "&from=" + this.encodeUrl(); - } - }, - encodeUrl : function() { - return encodeURIComponent(location.href); - } - } - page.init(); -})(jQuery) -</script> diff --git a/usr/module/comment/template/block/article-list.phtml b/usr/module/comment/template/block/article-list.phtml deleted file mode 100644 index c84d016baa..0000000000 --- a/usr/module/comment/template/block/article-list.phtml +++ /dev/null @@ -1,23 +0,0 @@ -<div class="pi-comment-block-user"> - <table class="table table-striped"> - <tr> - <th></th> - <th><?php echo _b('Article title'); ?></th> - <th><?php echo _b('Comments'); ?></th> - </tr> - <?php - $index = 0; - foreach ($block['targets'] as $name => $data) { - ?> - <tr> - <td><?php echo _escape(++$index); ?></td> - <td><?php echo _escape($data['title']); ?></td> - <td> - <a href="<?php echo $data['url']; ?>" title="<?php echo _escape($data['title']); ?>" target="_blank"> - <?php echo $data['count']; ?> - </a> - </td> - </tr> - <?php } ?> - </table> -</div> \ No newline at end of file diff --git a/usr/module/comment/template/block/post-list.phtml b/usr/module/comment/template/block/post-list.phtml deleted file mode 100644 index 7806e9fe3e..0000000000 --- a/usr/module/comment/template/block/post-list.phtml +++ /dev/null @@ -1,38 +0,0 @@ -<?php $this->css($this->assetModule('css/block.css', 'comment')); ?> -<div class="pi-comment pi-comment-block-post"> - <?php if ($block['posts']) { ?> - <div class="pi-comment-list" itemscope itemtype="http://schema.org/UserComments"> - <?php foreach ($block['posts'] as $post) { ?> - <div class="media"> - <a class="pull-left" href="<?php echo $post['user']['url']; ?>" target="_blank"> - <?php echo $post['user']['avatar']; ?> - </a> - <div class="media-body"> - <div class="pi-comment-box"> - <span itemprop="creator" itemscope itemtype="http://schema.org/Person"> - <span class="pi-comment-user" itemprop="name"> - <a href="<?php echo $post['user']['url']; ?>" target="_blank" title="<?php echo $post['user']['name']; ?>" class="highlight"> - <?php echo $post['user']['name']; ?> - </a> - </span> - </span> - <span class="pull-right muted pi-comment-time"><?php echo _date($post['time']); ?></span> - <meta itemprop="commentTime" content="<?php echo date("Y-m-d H:i:s", $post['time']); ?>" /> - </div> - <div class="pi-comment-desc"> - <span class="muted pull-left"><?php echo _b('On '); ?></span> - <a class="comment-title-hidden highlight pull-left" href="<?php echo $post['target']['url']; ?>" title="<?php echo $post['target']['title']; ?>"> - <?php echo $post['target']['title']; ?> - </a> - </div> - <div class="pi-comment-content" itemprop="commentText"> - <?php echo $post['content']; ?> - </div> - </div> - </div> - <?php } ?> - </div> - <?php } else { ?> - <div class="pi-comment-none"><?php echo _b('No comments available yet.'); ?></div> - <?php } ?> -</div> \ No newline at end of file diff --git a/usr/module/comment/template/block/user-list.phtml b/usr/module/comment/template/block/user-list.phtml deleted file mode 100644 index e32fc9a68a..0000000000 --- a/usr/module/comment/template/block/user-list.phtml +++ /dev/null @@ -1,23 +0,0 @@ -<div class="pi-comment-block-user"> - <table class="table table-striped"> - <tr> - <th></th> - <th><?php echo _b('Submitters'); ?></th> - <th><?php echo _b('Comments'); ?></th> - </tr> - <?php - $index = 0; - foreach ($block['users'] as $uid => $data) { - ?> - <tr> - <td><?php echo _escape(++$index); ?></td> - <td><?php echo _escape($data['name']); ?></td> - <td> - <a href="<?php echo $data['url']; ?>" title="<?php echo _escape($data['name']); ?>" target="_blank"> - <?php echo $data['count']; ?> - </a> - </td> - </tr> - <?php } ?> - </table> -</div> \ No newline at end of file diff --git a/usr/module/comment/template/front/_post-form.phtml b/usr/module/comment/template/front/_post-form.phtml deleted file mode 100644 index 423d7e3bea..0000000000 --- a/usr/module/comment/template/front/_post-form.phtml +++ /dev/null @@ -1,82 +0,0 @@ -<?php -if (isset($root['active']) && empty($root['active'])) { - echo '<div class="well well-sm">' . __('Comment is disabled.') . '</div>'; - return; -} -//$uid = Pi::user()->getId(); -if (!empty($root['id'])) { - $formData = array( - 'root' => $root['id'] - ); -} else { - $formData = array( - 'module' => $root['module'], - 'type' => $root['type'], - 'item' => $root['item'], - ); -} -$formData['redirect'] = rawurlencode($uri); -$form = Pi::service('comment')->getForm($formData); -?> -<div class="comment-item" id="js-comment-form"> - <textarea placeholder="<?php _e('Type your content'); ?>" class="form-control js-comment-txt" rows="3"></textarea> - <div class="hide clearfix comment-form"> - <?php - echo $this->form()->openTag($form); - echo $this->formElement($form->get('content')); - echo $this->formElement($form->get('submit')); - $elements = $form->elementList(); - foreach ($elements['hidden'] as $element) { - echo $this->formElement($element); - } - echo $this->form()->closeTag(); - ?> - </div> - <div class="hide well well-sm"> - <?php echo sprintf(__('Please <a href="%s">login</a> to leave comments.'), Pi::service('authentication')->getUrl('login', $uri)); ?> - </div> -</div> -<?php -$url = Pi::service('url')->assemble('default', array( - 'module' => 'system', - 'controller' => 'index', - 'action' => 'user', -)); -?> -<script> - (function ($) { - var comment = { - el: $('#js-comment-form'), - $: function (selector) { - return this.el.find(selector); - }, - init: function () { - this.textarea = this.$('.js-comment-txt'); - this.events(); - }, - events: function () { - var self = this; - this.textarea.focus(function () { - $.getJSON('<?php echo $url; ?>?' + new Date().getTime()).done(function (data) { - self.textarea.hide(); - if (data.uid) { - self.$('.comment-form').removeClass('hide'); - self.$('[name=content]').focus(); - } else { - self.$('.well').removeClass('hide'); - } - }); - }); - } - }; - comment.init(); - })(jQuery) -</script> -<div class="pi-status active js-comment-status" data-id=""> - <div class="pi-status-director"></div> -</div> -<script> - $('.js-comment-status').click(function() { - location.href = '<?php $this->url(); ?>' + $(this).data('id'); - }); -</script> \ No newline at end of file diff --git a/usr/module/comment/template/front/comment-404.phtml b/usr/module/comment/template/front/comment-404.phtml deleted file mode 100644 index 74b8372064..0000000000 --- a/usr/module/comment/template/front/comment-404.phtml +++ /dev/null @@ -1,15 +0,0 @@ -<?php -$this->css($this->assetModule('css/front.css', 'comment')); -$this->headMeta('noindex', 'robots'); -?> -<div class="pi-comment"> - <h1 class="pi-comment-header"><?php _e('Comment detail'); ?></h1> - <div class="alert alert-danger"> - <p><?php echo __('The comment post is not found.'); ?></p> - <p class="text-right"> - <a href="<?php echo Pi::url('www'); ?>"> - <?php echo _escape(Pi::config('sitename')); ?> - </a> - </p> - </div> -</div> \ No newline at end of file diff --git a/usr/module/comment/template/front/comment-article.phtml b/usr/module/comment/template/front/comment-article.phtml deleted file mode 100644 index e0be0af3e4..0000000000 --- a/usr/module/comment/template/front/comment-article.phtml +++ /dev/null @@ -1,61 +0,0 @@ -<?php -$this->css($this->assetModule('css/front.css')); -$this->headMeta('noindex', 'robots'); - -// Count -$count = $comment['count']; -// Article list: -// title, url, time, user -// comment_user, comment_time, comment_url -$targets = $comment['targets']; -// Pagination object -$paginator = $comment['paginator']; -?> -<?php if (empty($tabs)) { ?> - <h1 class="pi-comment-header"> - <?php echo _escape($comment['title']); ?> - </h1> - <?php -} else { - echo $this->tab($tabs); -} -?> -<?php if ($targets) { ?> - <div class="pi-comment-article pi-comment-list"> - <?php foreach ($targets as $root => $target) { ?> - <div class="media"> - <a class="pi-comment-count pull-left" href="<?php echo $target['comment_url']; ?>" target="_blank" title="<?php echo sprintf(__('%s comments'), $target['count']); ?>" target="_blank"> - <?php echo $target['count']; ?> - </a> - <div class="media-body"> - <div style="font-size: 13px"> - <a class="common-article-title comment-title-hidden pull-left" href="<?php echo $target['url']; ?>" target="_blank" title="<?php echo _escape($target['title']); ?>" style="margin: 0; font-weight: normal; max-width: 60%;"> - <?php echo _escape($target['title']); ?> - </a> - <span class="muted"> -<span> - <a class="muted" href="<?php echo $target['user']['url']; ?>" target="_blank"> - <?php echo $target['user']['name']; ?> - </a> - <span class="pull-right muted pi-comment-time"><?php echo _date($target['time']); ?></span> - </div> - <div class="pi-comment-desc"> - <span class="muted pull-left"><?php _e('Last commented: '); ?></span> - <a class="highlight pull-left" href="<?php echo $target['comment_user']['url']; ?>" style="margin-left: 5px"> - <?php echo $target['comment_user']['name']; ?> - </a> - <span class="muted" style="margin-left: 5px"> - <?php echo sprintf(__(' at %s'), _date($target['comment_time'])); ?> - </span> - </div> - </div> - </div> - <?php } ?> - <?php - if ($paginator) { - echo $this->pagination($paginator); - } - ?> - </div> -<?php } else { ?> - <div class="pi-comment-none"><?php _e('No data available yet.'); ?></div> -<?php } ?> \ No newline at end of file diff --git a/usr/module/comment/template/front/comment-edit.phtml b/usr/module/comment/template/front/comment-edit.phtml deleted file mode 100644 index e64be0daf5..0000000000 --- a/usr/module/comment/template/front/comment-edit.phtml +++ /dev/null @@ -1,65 +0,0 @@ -<?php -$this->css($this->assetModule('css/front.css', 'comment')); -$this->headMeta('noindex', 'robots'); - -// Target data: -// title, time, user -// user: uid, name, avatar, url -$target = $comment['target']; - -// Comment post -// content, time, user -$post = $comment['post']; - -$uid = Pi::user()->getId(); -$avatar = Pi::avatar()->get($uid, 'medium', false); -if ($uid) { - $url = Pi::service('user')->getUrl('profile', $uid); -} else { - $url = Pi::url('www'); -} -?> -<div class="pi-comment"> - <h1 class="pi-comment-header"> - <?php _e('Comment edit'); ?> - </h1> - <?php if (!empty($comment['message'])) { ?> - <div class="alert alert-danger"><?php echo _escape($comment['message']); ?></div> - <?php } ?> - <div class="media"> - <a class="pull-left" href="<?php echo $url; ?>"> - <img class="media-object" src="<?php echo $avatar; ?>"> - </a> - <div class="media-body"> - <?php if ($post) { ?> - <div class="clearfix"> - <span class="pi-comment-user"> - <a href="<?php echo $url; ?>" target="_blank" title="<?php echo $post['user']['name']; ?>" class="highlight"> - <?php echo $post['user']['name']; ?> - </a> - </span> - <span class="pull-right muted pi-comment-time"><?php echo _date($post['time']); ?></span> - </div> - <div class="pi-comment-desc"> - <span class="muted pull-left"><?php _e('Commented on '); ?></span> - <a class="highlight comment-title-hidden" href="<?php echo $target['url']; ?>" title="<?php echo _escape($target['title']); ?>" style="max-width: 70%"> - <?php echo $target['title']; ?> - </a> - </div> - <?php - echo $this->form()->openTag($form); - echo $this->formElement($form->get('content')); - echo $this->formElement($form->get('submit')); - - $elements = $form->elementList(); - foreach ($elements['hidden'] as $element) { - echo $this->formElement($element); - } - echo $this->form()->closeTag(); - } else { - ?> - <div class="pi-comment-none"><?php _e('No content.'); ?></div> - <?php } ?> - </div> - </div> -</div> \ No newline at end of file diff --git a/usr/module/comment/template/front/comment-index.phtml b/usr/module/comment/template/front/comment-index.phtml deleted file mode 100644 index 96fd2d35e5..0000000000 --- a/usr/module/comment/template/front/comment-index.phtml +++ /dev/null @@ -1,16 +0,0 @@ -<?php -$this->css($this->assetModule('css/front.css', 'comment')); -$this->headMeta('noindex', 'robots'); -?> -<div class="pi-comment-portal"> - <h1 class="pi-comment-header"><?php echo _escape($title); ?></h1> - <ul> - <?php foreach ($links as $key => $link) { ?> - <li> - <a href="<?php echo $link['url']; ?>" title="<?php echo _escape($link['title']); ?>" target="_blank"> - <?php echo _escape($link['title']); ?> - </a> - </li> - <?php } ?> - </ul> -</div> \ No newline at end of file diff --git a/usr/module/comment/template/front/comment-lead.phtml b/usr/module/comment/template/front/comment-lead.phtml deleted file mode 100644 index f1de02bad2..0000000000 --- a/usr/module/comment/template/front/comment-lead.phtml +++ /dev/null @@ -1,57 +0,0 @@ -<div class="panel panel-default" id="comments"> - <div class="panel-heading"> - <h2 class="panel-title"> - <?php _e('All comments '); ?> - <strong>(<?php echo _number($count) ?: _number(0); ?>)</strong> - </h2> - </div> - <div class="panel-body" itemscope itemtype="http://schema.org/UserComments"> - <?php include $this->template('./_post-form.phtml'); ?> - <?php if (count($posts)) { ?> - <?php - $template =<<<'EOT' -<div class="media-heading" itemprop="creator" itemscope itemtype="http://schema.org/Person"> - <a href="%s" target="_blank" style="margin-right: 20px; margin-left: 20px;" itemprop="name">%s</a> - <span class="muted">%s</span> -</div> -<div class="clearfix" itemprop="commentText">%s</div> -<meta itemprop="commentTime" content="%s" /> -EOT; - ?> - <?php foreach ($posts as $item) { ?> - <div class="media comment-item clearfix" id="comment-<?php echo $item['id']; ?>"> - <a class="pull-left" href="<?php echo $item['user']['url']; ?>" target="_blank"> - <?php echo $item['user']['avatar']; ?> - </a> - <div class="media-body"> - <?php echo sprintf( - $template, - $item['user']['url'], - $item['user']['name'], - _date($item['time']), - $item['content'], - date("Y-m-d H:i:s", $item['time']) - ); ?> - <div class="comment-operation"> - <?php if ($uid == $item['uid']) { - echo sprintf( - '<a href="%s#comments" onclick="return confirm(\'%s\')">%s</a>', - $this->url('comment', array('controller' => 'post', 'action' => 'delete', 'id' => $item['id'])), - __('Are you sure to delete this comment?'), - __('Delete') - ); - } ?> - </div> - </div> - </div> - <?php } ?> - <a href="<?php echo $url_list; ?>" class="btn btn-default btn-block" style="margin-top: 10px;"> - <?php _e('View all comments'); ?> - </a> - <?php } else { ?> - <div class="text-center comment-none"> - <strong class="text-muted"><?php _e('No one has commented yet.'); ?></strong> - </div> - <?php } ?> - </div> -</div> \ No newline at end of file diff --git a/usr/module/comment/template/front/comment-list.phtml b/usr/module/comment/template/front/comment-list.phtml deleted file mode 100644 index 78d3bde5bc..0000000000 --- a/usr/module/comment/template/front/comment-list.phtml +++ /dev/null @@ -1,67 +0,0 @@ -<?php -$this->css($this->assetModule('css/front.css', 'comment')); -$this->headMeta('noindex', 'robots'); - -// Count -$count = $comment['count']; -// Comment list generated by comment module: -// id, time, content, user -// uid, name, avatar, profile_url, IP -$posts = $comment['posts']; -// Pagination object -$paginator = $comment['paginator']; -?> - <div class="pi-comment"> - <?php if ($posts) { ?> - <div class="pi-comment-list"> - <h1 class="pi-comment-header"><?php echo __('All active comments ') . "({$count})"; ?></h1> - <?php foreach ($posts as $post) { ?> - <div class="media"> - <a class="pull-left" href="<?php echo $post['user']['url']; ?>" target="_blank"> - <?php echo $post['user']['avatar']; ?> - </a> - <div class="media-body"> - <div> - <span class="pi-comment-user"> - <a href="<?php echo $post['user']['url']; ?>" target="_blank" title="<?php echo $post['user']['name']; ?>" class="highlight"> - <?php echo $post['user']['name']; ?> - </a> - </span> - <span class="pull-right muted pi-comment-time"><?php echo _date($post['time']); ?></span> - </div> - <div class="pi-comment-desc"> - <span class="muted pull-left"><?php _e('Commented on '); ?></span> - <a class="comment-title-hidden highlight pull-left" style="max-width: 70%" href="<?php echo $post['target']['url']; ?>" title="<?php echo $post['target']['title']; ?>"> - <?php echo $post['target']['title']; ?> - </a> - </div> - <div class="pi-comment-content"> - <?php echo $post['content']; ?> - </div> - <div class="pi-comment-operation"> - <?php foreach ($post['operations'] as $operation => $optData) { ?> - <span class="operation muted"> - <a href="<?php echo $optData['url']; ?>"<?php echo 'delete' == $operation ? sprintf(' onclick="return confirm(\'%s\')"', __('Are you sure to delete this comment?')) : ''; ?>> - <?php echo _escape($optData['title']); ?> - </a> - </span> - <?php } ?> - </div> - </div> - </div> - <?php } ?> - </div> - <?php } else { ?> - <div class="pi-comment-none"><?php _e('No comments available yet.'); ?></div> - <?php } ?> - </div> -<?php -if ($posts && $paginator) { - echo $this->pagination( - $paginator, - 'Sliding', - 'paginator.phtml', - array('class' => 'pagination-right') - ); -} -?> \ No newline at end of file diff --git a/usr/module/comment/template/front/comment-module.phtml b/usr/module/comment/template/front/comment-module.phtml deleted file mode 100644 index 1441f069ae..0000000000 --- a/usr/module/comment/template/front/comment-module.phtml +++ /dev/null @@ -1,70 +0,0 @@ -<?php -$this->css($this->assetModule('css/front.css', 'comment')); -$this->headMeta('noindex', 'robots'); - -// Module and type -$moduleData = $comment['module']; -$typeData = $comment['type']; -// Count -$count = $comment['count']; -// Comment list generated by comment module: -// id, time, content, user -// uid, name, avatar, profile_url, IP -$posts = $comment['posts']; -// Pagination object -$paginator = $comment['paginator']; -?> - <div class="pi-comment"> - <h1 class="pi-comment-header"> - <span><?php echo sprintf(__('Comments for %s module'), $moduleData['name']); ?></span> - <span>(<?php echo _escape($count); ?>)</span> - </h1> - <div class="pi-comment-tab"><?php echo $this->tab($tabs, array('class' => 'nav nav-pills')); ?></div> - <?php if ($posts) { ?> - <div class="pi-comment-list"> - <?php foreach ($posts as $post) { ?> - <div class="media"> - <a class="pull-left" href="<?php echo $post['user']['url']; ?>" target="_blank"> - <?php echo $post['user']['avatar']; ?> - </a> - <div class="media-body"> - <div class="pi-comment-desc" style="margin-top: 0"> - <a href="<?php echo $post['user']['url']; ?>" target="_blank" title="<?php echo $post['user']['name']; ?>" class="pi-comment-user highlight pull-left" style="margin-right: 10px"> - <?php echo $post['user']['name']; ?> - </a> - <span class="muted pull-left"><?php _e('commented on '); ?></span> - <a class="highlight comment-title-hidden pull-left" href="<?php echo $post['target']['url']; ?>" title="<?php echo $post['target']['title']; ?>"> - <?php echo $post['target']['title']; ?> - </a> - <span class="muted pi-comment-time"><?php echo _date($post['time']); ?></span> - </div> - <div class="pi-comment-content"> - <?php echo $post['content']; ?> - </div> - <div class="pi-comment-operation"> - <?php foreach ($post['operations'] as $operation => $optData) { ?> - <span class="operation muted"> - <a href="<?php echo $optData['url']; ?>"<?php echo 'delete' == $operation ? sprintf(' onclick="return confirm(\'%s\')"', __('Are you sure to delete this comment?')) : ''; ?>> - <?php echo _escape($optData['title']); ?> - </a> - </span> - <?php } ?> - </div> - </div> - </div> - <?php } ?> - </div> - <?php } else { ?> - <div class="pi-comment-none"><?php _e('No comments available yet.'); ?></div> - <?php } ?> - </div> -<?php -if ($posts && $paginator) { - echo $this->pagination( - $paginator, - 'Sliding', - 'paginator.phtml', - array('class' => 'pagination-right') - ); -} -?> \ No newline at end of file diff --git a/usr/module/comment/template/front/comment-my-post.phtml b/usr/module/comment/template/front/comment-my-post.phtml deleted file mode 100644 index ea264eedde..0000000000 --- a/usr/module/comment/template/front/comment-my-post.phtml +++ /dev/null @@ -1,77 +0,0 @@ -<?php -$this->css($this->assetModule('css/front.css', 'comment')); -$this->headMeta('noindex', 'robots'); - -// User data -$user = $comment['user']; -// Count -$count = $comment['count']; -// Comment list generated by comment module: -// id, time, content, user -// uid, name, avatar, profile_url, IP -$posts = $comment['posts']; -// Pagination object -$paginator = $comment['paginator']; - -$uid = Pi::user()->getId(); -$avatar = Pi::avatar()->get($uid, 'medium'); -if ($uid) { - $url = Pi::service('user')->getUrl('profile', $uid); -} else { - $url = Pi::url('www'); -} -if (empty($user)) { - $user['url'] = $url; - $user['avatar'] = $avatar; -} -?> - <div class="pi-comment"> - <?php echo $this->tab($tabs); ?> - <?php if ($posts) { ?> - <div class="pi-comment-list"> - <?php foreach ($posts as $post) { ?> - <div class="media<?php echo 0 == $post['active'] ? ' muted' : ''; ?>"> - <a class="pull-left" href="<?php echo $user['url']; ?>" target="_blank"> - <?php echo $user['avatar']; ?> - </a> - <div class="media-body"> - <div class="pi-comment-desc" style="margin-top: 0"> - <span class="muted pull-left"><?php _e('Commented on '); ?></span> - <a class="highlight comment-title-hidden pull-left" href="<?php echo $post['target']['url']; ?>" title="<?php echo _escape($post['target']['title']); ?>"> - <?php echo _escape($post['target']['title']); ?> - </a> - <span class="muted pi-comment-time"><?php echo _date($post['time']); ?></span> - <?php if (0 == $post['active']) { ?> - <span class="pull-right label"><?php _e('Pending'); ?></span> - <?php } ?> - </div> - <div class="pi-comment-content<?php echo 0 == $post['active'] ? ' muted' : ''; ?>"> - <?php echo $post['content']; ?> - </div> - <div class="pi-comment-operation"> - <?php foreach ($post['operations'] as $operation => $optData) { ?> - <span class="operation muted"> - <a href="<?php echo $optData['url']; ?>"<?php echo 'delete' == $operation ? sprintf(' onclick="return confirm(\'%s\')"', __('Are you sure to delete this comment?')) : ''; ?>> - <?php echo _escape($optData['title']); ?> - </a> - </span> - <?php } ?> - </div> - </div> - </div> - <?php } ?> - </div> - <?php } else { ?> - <div class="pi-comment-none"><?php _e('No comments available yet.'); ?></div> - <?php } ?> - </div> -<?php -if ($posts && $paginator) { - echo $this->pagination( - $paginator, - 'Sliding', - 'paginator.phtml', - array('class' => 'pagination-right') - ); -} -?> \ No newline at end of file diff --git a/usr/module/comment/template/front/comment-my-received.phtml b/usr/module/comment/template/front/comment-my-received.phtml deleted file mode 100644 index 8ccf3bb1ba..0000000000 --- a/usr/module/comment/template/front/comment-my-received.phtml +++ /dev/null @@ -1,80 +0,0 @@ -<?php -$this->css($this->assetModule('css/front.css', 'comment')); -$this->headMeta('noindex', 'robots'); - -// User data -$user = $comment['user']; -// Count -$count = $comment['count']; -// Comment list generated by comment module: -// id, time, content, user -// uid, name, avatar, profile_url, IP -$posts = $comment['posts']; -// Pagination object -$paginator = $comment['paginator']; - -$uid = Pi::user()->getId(); -$avatar = Pi::avatar()->get($uid, 'medium', false); -if ($uid) { - $url = Pi::service('user')->getUrl('profile', $uid); -} else { - $url = Pi::url('www'); -} -if (empty($user)) { - $user['url'] = $url; - $user['avatar'] = $avatar; -} -?> - <div class="pi-comment"> - <?php echo $this->tab($tabs); ?> - <?php if ($posts) { ?> - <div class="pi-comment-list"> - <?php foreach ($posts as $post) { ?> - <div class="media<?php echo 0 == $post['active'] ? ' muted' : ''; ?>"> - <a class="pull-left" href="<?php echo $user['url']; ?>" target="_blank"> - <img src="<?php echo $user['avatar']; ?>"> - </a> - <div class="media-body"> - <div class="pi-comment-desc" style="margin-top: 0"> - <a href="<?php echo $post['user']['url']; ?>" target="_blank" title="<?php echo $post['user']['name']; ?>" class="pi-comment-user highlight pull-left" style="margin-right: 10px"> - <?php echo $post['user']['name']; ?> - </a> - <span class="muted pull-left"><?php _e('commented on '); ?></span> - <a class="highlight comment-title-hidden pull-left" href="<?php echo $post['target']['url']; ?>" title="<?php echo $post['target']['title']; ?>" style="max-width: 30%"> - <?php echo $post['target']['title']; ?> - </a> - <span class="muted pi-comment-time"><?php echo _date($post['time']); ?></span> - <?php if (0 == $post['active']) { ?> - <span class="pull-right label"><?php _e('Pending'); ?></span> - <?php } ?> - </div> - <div class="pi-comment-content<?php echo 0 == $post['active'] ? ' muted' : ''; ?>"> - <?php echo $post['content']; ?> - </div> - <div class="pi-comment-operation"> - <?php foreach ($post['operations'] as $operation => $optData) { ?> - <span class="operation muted"> - <a href="<?php echo $optData['url']; ?>"<?php echo 'delete' == $operation ? sprintf(' onclick="return confirm(\'%s\')"', __('Are you sure to delete this comment?')) : ''; ?>> - <?php echo _escape($optData['title']); ?> - </a> - </span> - <?php } ?> - </div> - </div> - </div> - <?php } ?> - </div> - <?php } else { ?> - <div class="pi-comment-none"><?php _e('No comments available yet.'); ?></div> - <?php } ?> - </div> -<?php -if ($posts && $paginator) { - echo $this->pagination( - $paginator, - 'Sliding', - 'paginator.phtml', - array('class' => 'pagination-right') - ); -} -?> \ No newline at end of file diff --git a/usr/module/comment/template/front/comment-reply.phtml b/usr/module/comment/template/front/comment-reply.phtml deleted file mode 100644 index a1ba0b59d4..0000000000 --- a/usr/module/comment/template/front/comment-reply.phtml +++ /dev/null @@ -1,94 +0,0 @@ -<?php -$this->css($this->assetModule('css/front.css', 'comment')); -$this->headMeta('noindex', 'robots'); - -// Target data: -// Title, time, user -// uid, name, avatar, profile_url -$target = $comment['target']; - -// Comment post -// content, time, user -$post = $comment['post']; - -$uid = Pi::user()->getId(); -$avatar = Pi::avatar()->get($uid, 'medium', false); -if ($uid) { - $url = Pi::service('user')->getUrl('profile', $uid); -} else { - $url = Pi::url('www'); -} -// Add head style -$style = <<<'EOT' - textarea { - border: 0; - padding: 0; - margin: 0; - box-shadow: none; - width: 100%; - min-width: 100%; - max-width: 100%; - height: 75px; - max-height: 75px; - min-height: 75px; - } - textarea:focus { - border: 0px; - box-shadow: none; - } - .media-body .form-textarea { - margin-top: 20px; - border: 1px solid #dddddd; - padding: 4px 6px; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset; - border-radius: 4px; - height: 75px; - } -EOT; -$this->headStyle()->appendStyle($style); - -?> -<div class="pi-comment"> - <h1 class="pi-comment-header"> - <?php echo sprintf(__('Comment reply to %s'), $post['user']['name']); ?> - </h1> - <div class="media"> - <a class="pull-left" href="<?php echo $url; ?>"> - <img class="media-object" src="<?php echo $avatar; ?>"> - </a> - <div class="media-body"> - <?php if ($post) { ?> - <div class="clearfix"> - <span class="pi-comment-user"> - <a href="<?php echo $post['user']['url']; ?>" target="_blank" title="<?php echo $post['user']['name']; ?>" class="highlight"> - <?php echo $post['user']['name']; ?> - </a> - </span> - <span class="pull-right muted pi-comment-time"><?php echo _date($post['time']); ?></span> - </div> - <div class="pi-comment-desc"> - <span class="muted pull-left"><?php _e('Commented on '); ?></span> - <a class="highlight comment-title-hidden" href="<?php echo $target['url']; ?>" title="<?php echo _escape($target['title']); ?>" style="max-width: 70%"> - <?php echo _escape($target['title']); ?> - </a> - </div> - <div class="pi-comment-content"> - <?php echo $post['content']; ?> - </div> - <?php - echo $this->form()->openTag($form); - echo $this->formElement($form->get('content')); - echo $this->formElement($form->get('submit')); - - $elements = $form->elementList(); - foreach ($elements['hidden'] as $element) { - echo $this->formElement($element); - } - echo $this->form()->closeTag(); - ?> - <?php } else { ?> - <div class="pi-comment-none"><?php _e('No content.'); ?></div> - <?php } ?> - </div> - </div> -</div> \ No newline at end of file diff --git a/usr/module/comment/template/front/comment-root.phtml b/usr/module/comment/template/front/comment-root.phtml deleted file mode 100644 index 3280de7c49..0000000000 --- a/usr/module/comment/template/front/comment-root.phtml +++ /dev/null @@ -1,82 +0,0 @@ -<?php -$this->headMeta('noindex', 'robots'); - -// Root id -$rootId = $comment['root']; -// Count -$count = $comment['count']; -// Target data: -// Title, time, user -// uid, name, avatar, profile_url -$target = $comment['target']; -// Comment list generated by comment module: -// id, time, content, user -// uid, name, avatar, profile_url, IP -$posts = $comment['posts']; -// Pagination object -$paginator = $comment['paginator']; -?> -<?php -if (!$target) { - echo '<div class="alert">' . __('Item not found.') . '</div>'; - return; -} -$this->css($this->assetModule('css/front.css', 'comment')); -$uid = Pi::user()->getId(); -?> - <h4 class="comment-target-title"> - <a href="<?php echo $target['url']; ?>" title="<?php echo _escape($target['title']); ?>"> - <?php echo _escape($target['title']); ?> - </a> - </h4> - <div class="comments-panel" id="comments"> - <div class="comments-header"> - <h4><?php _e('All comments '); ?> (<?php echo $comment['count'] ?: 0; ?>)</h4> - </div> - <?php if (count($comment['posts'])) { ?> - <?php foreach ($comment['posts'] as $item) { ?> - <div class="media comment-item" id="comment-<?php echo $item['id']; ?>"> - <a class="pull-left" href="<?php echo $item['user']['url']; ?>" target="_blank"> - <?php echo $item['user']['avatar']; ?> - </a> - <div class="media-body"> - <?php echo sprintf(' - <div class="media-heading"> - <a href="%s" target="_blank" style="margin-right: 20px;">%s</a> - <span class="muted">%s</span> - </div> - <p>%s - ', - $item['user']['url'], - $item['user']['name'], - _date($item['time']), - $item['content'] - ); ?> - <div class="comment-operation"> - <?php if ($uid == $item['uid']) { - echo sprintf( - '<a href="%s#comments" onclick="return confirm(\'%s\')">%s</a>', - $this->url('', array('controller' => 'post', 'action' => 'delete', 'id' => $item['id'])), - __('Are you sure to delete this comment?'), - __('Delete') - ); - } ?> - </div> - </div> - </div> - <?php } ?> - <?php } else { ?> - <div class="text-center comment-none"> - <strong class="muted"><?php _e('No one has commented yet.'); ?></strong> - </div> - <?php } ?> - </div> -<?php -if ($paginator) { - echo $this->pagination( - $paginator, - 'Sliding', - 'paginator.phtml', - array('class' => 'pagination-right')); -} -?> \ No newline at end of file diff --git a/usr/module/comment/template/front/comment-user-received.phtml b/usr/module/comment/template/front/comment-user-received.phtml deleted file mode 100644 index 0332e69075..0000000000 --- a/usr/module/comment/template/front/comment-user-received.phtml +++ /dev/null @@ -1,68 +0,0 @@ -<?php -$this->css($this->assetModule('css/front.css', 'comment')); -$this->headMeta('noindex', 'robots'); - -// User data -$user = $comment['user']; -// Count -$count = $comment['count']; -// Comment list generated by comment module: -// id, time, content, user -// uid, name, avatar, profile_url, IP -$posts = $comment['posts']; -// Pagination object -$paginator = $comment['paginator']; - -?> - <div class="pi-comment"> - <?php if ($posts) { ?> - <div class="pi-comment-list"> - <h1 class="pi-comment-header"> - <?php echo sprintf('%s\'s received comments ', $user['name']) . "({$count})"; ?> - </h1> - <?php foreach ($posts as $post) { ?> - <div class="media"> - <a class="pull-left" href="<?php echo $user['url']; ?>" target="_blank"> - <?php echo $user['avatar']; ?> - </a> - <div class="media-body"> - <div class="pi-comment-desc" style="margin-top: 0"> - <a href="<?php echo $post['user']['url']; ?>" target="_blank" title="<?php echo $post['user']['name']; ?>" class="pi-comment-user highlight pull-left" style="margin-right: 10px"> - <?php echo $post['user']['name']; ?> - </a> - <span class="muted pull-left"><?php _e('commented on '); ?></span> - <a class="highlight comment-title-hidden pull-left" href="<?php echo $post['target']['url']; ?>" title="<?php echo $post['target']['title']; ?>"> - <?php echo $post['target']['title']; ?> - </a> - <span class="muted pi-comment-time"><?php echo _date($post['time']); ?></span> - </div> - <div class="pi-comment-content"> - <?php echo $post['content']; ?> - </div> - <div class="pi-comment-operation"> - <?php foreach ($post['operations'] as $operation => $optData) { ?> - <span class="operation muted"> - <a href="<?php echo $optData['url']; ?>"<?php echo 'delete' == $operation ? sprintf(' onclick="return confirm(\'%s\')"', __('Are you sure to delete this comment?')) : ''; ?>> - <?php echo _escape($optData['title']); ?> - </a> - </span> - <?php } ?> - </div> - </div> - </div> - <?php } ?> - </div> - <?php } else { ?> - <div class="pi-comment-none"><?php _e('No comments available yet.'); ?></div> - <?php } ?> - </div> -<?php -if ($posts && $paginator) { - echo $this->pagination( - $paginator, - 'Sliding', - 'paginator.phtml', - array('class' => 'pagination-right') - ); -} -?> \ No newline at end of file diff --git a/usr/module/comment/template/front/comment-user.phtml b/usr/module/comment/template/front/comment-user.phtml deleted file mode 100644 index da68372523..0000000000 --- a/usr/module/comment/template/front/comment-user.phtml +++ /dev/null @@ -1,65 +0,0 @@ -<?php -$this->css($this->assetModule('css/front.css', 'comment')); -$this->headMeta('noindex', 'robots'); - -// User data -$user = $comment['user']; -// Count -$count = $comment['count']; -// Comment list generated by comment module: -// id, time, content, user -// uid, name, avatar, profile_url, IP -$posts = $comment['posts']; -// Pagination object -$paginator = $comment['paginator']; - -?> - <div class="pi-comment"> - <?php if ($posts) { ?> - <div class="pi-comment-list"> - <h1 class="pi-comment-header"> - <?php echo sprintf('%s\'s comments ', $user['name']) . "({$count})"; ?> - </h1> - <?php foreach ($posts as $post) { ?> - <div class="media"> - <a class="pull-left" href="<?php echo $user['url']; ?>" target="_blank"> - <?php echo $user['avatar']; ?> - </a> - <div class="media-body"> - <div class="pi-comment-desc" style="margin-top: 0"> - <span class="muted pull-left"><?php _e('Commented on '); ?></span> - <a class="highlight comment-title-hidden pull-left" href="<?php echo $post['target']['url']; ?>" title="<?php echo _escape($post['target']['title']); ?>"> - <?php echo _escape($post['target']['title']); ?> - </a> - <span class="muted pi-comment-time"><?php echo _date($post['time']); ?></span> - </div> - <div class="pi-comment-content"> - <?php echo $post['content']; ?> - </div> - <div class="pi-comment-operation"> - <?php foreach ($post['operations'] as $operation => $optData) { ?> - <span class="operation muted"> - <a href="<?php echo $optData['url']; ?>"<?php echo 'delete' == $operation ? sprintf(' onclick="return confirm(\'%s\')"', __('Are you sure to delete this comment?')) : ''; ?>> - <?php echo _escape($optData['title']); ?> - </a> - </span> - <?php } ?> - </div> - </div> - </div> - <?php } ?> - </div> - <?php } else { ?> - <div class="pi-comment-none"><?php _e('No comments available yet.'); ?></div> - <?php } ?> - </div> -<?php -if ($posts && $paginator) { - echo $this->pagination( - $paginator, - 'Sliding', - 'paginator.phtml', - array('class' => 'pagination-right') - ); -} -?> \ No newline at end of file diff --git a/usr/module/comment/template/front/comment-view.phtml b/usr/module/comment/template/front/comment-view.phtml deleted file mode 100644 index 4f55b0824f..0000000000 --- a/usr/module/comment/template/front/comment-view.phtml +++ /dev/null @@ -1,62 +0,0 @@ -<?php -$this->jQuery(); -$this->backbone(); -$this->css($this->assetModule('css/front.css', 'comment')); -$this->headMeta('noindex', 'robots'); - -// Target data: -// Title, time, user -// uid, name, avatar, profile_url -$target = $comment['target']; - -// Comment post -// content, time, user -$post = $comment['post']; -?> -<div class="pi-comment"> - <h1 class="pi-comment-header"><?php _e('Comment detail'); ?></h1> - <div class="media"> - <a class="pull-left" href="<?php echo $post['user']['url']; ?>"> - <?php echo Pi::avatar()->get($post['uid'], 'medium'); ?> - </a> - <div class="media-body"> - <?php if ($post) { ?> - <div class="clearfix"> - <span class="pi-comment-user"> - <a href="<?php echo $post['user']['url']; ?>" target="_blank" title="<?php echo $post['user']['name']; ?>" class="highlight"> - <?php echo $post['user']['name']; ?> - </a> - </span> - <?php if ($post['reply']) { ?> - <span style="font-size: 14px"><?php _e('In reply to:'); ?></span> - <span style="font-size: 14px"><a class="highlight" href="<?php echo Pi::service('comment')->getUrl('post', array('post' => $post['reply'])); ?>" target="_blank" title="<?php _e('Click to open'); ?>"> - <?php echo sprintf(__('Comment #%d'), $post['reply']); ?> - </a> - </span> - <?php } ?> - <span class="pull-right muted pi-comment-time"><?php echo _date($post['time']); ?></span> - </div> - <div class="pi-comment-desc"> - <span class="muted pull-left"><?php _e('Commented on '); ?></span> - <a class="highlight comment-title-hidden" href="<?php echo $target['url']; ?>" title="<?php echo _escape($target['title']); ?>" style="max-width: 70%"> - <?php echo _escape($target['title']); ?> - </a> - </div> - <div class="pi-comment-content"> - <?php echo $post['content']; ?> - </div> - <div class="pi-comment-operation"> - <?php foreach ($post['operations'] as $operation => $optData) { ?> - <span class="operation muted"> - <a href="<?php echo $optData['url']; ?>"<?php echo 'delete' == $operation ? sprintf(' onclick="return confirm(\'%s\')"', __('Are you sure to delete this comment?')) : ''; ?>> - <?php echo _escape($optData['title']); ?> - </a> - </span> - <?php } ?> - </div> - <?php } else { ?> - <div class="pi-comment-none"><?php _e('No content.'); ?></div> - <?php } ?> - </div> - </div> -</div> \ No newline at end of file diff --git a/usr/module/comment/template/front/demo.phtml b/usr/module/comment/template/front/demo.phtml deleted file mode 100644 index fdc117b594..0000000000 --- a/usr/module/comment/template/front/demo.phtml +++ /dev/null @@ -1,3 +0,0 @@ -<h2 class="page-header"><?php echo _escape($title); ?></h2> -<p>Demo article with comments.</p> -<?php echo $this->pagination($paginator); ?> \ No newline at end of file diff --git a/usr/module/message/README.md b/usr/module/message/README.md deleted file mode 100644 index cc84b2af66..0000000000 --- a/usr/module/message/README.md +++ /dev/null @@ -1,7 +0,0 @@ -Message Module -============== - -This is the Message module for Pi. - -User private messages and the system notification are provided. - diff --git a/usr/module/message/asset/script/admin.css b/usr/module/message/asset/script/admin.css deleted file mode 100644 index 2884f14a2c..0000000000 --- a/usr/module/message/asset/script/admin.css +++ /dev/null @@ -1,4 +0,0 @@ -.message-single { - padding: 15px 5px; - border-bottom: 1px solid #ccc; -} \ No newline at end of file diff --git a/usr/module/message/asset/script/front.css b/usr/module/message/asset/script/front.css deleted file mode 100644 index 510c31cc27..0000000000 --- a/usr/module/message/asset/script/front.css +++ /dev/null @@ -1,283 +0,0 @@ -/* Base */ -.messages-min-body { - min-height: 450px; -} - -.message-nav-tabs li.active a:hover { - cursor: pointer; -} - -/* Message */ -.message-item { - padding: 12px 20px 18px 15px; - padding-left: 12px \9; - margin-top: 0; -} - -.message-hidden .message-mark, -.message-hidden .message-divider { - display: none; -} - -.message-item-read .message-hidden span { - display: block; - float: right; -} - -.message-head span { - font-weight: normal; -} - -.message-detail-primary:hover .message-hidden, -.message-item:hover .message-hidden { - /* display: block; */ -} - -.message-hidden { - margin-top: -5px; - display: none; -} - -.message-media-right { - width: 200px; -} - -.message-time { - font-size: 13px; -} - -.message-divider { - color: #e5e5e5; -} - -.message-media-left { - padding-right: 5px; -} - -.message-detail img, -.message-media-left img { - width: 46px; - height: 46px; -} - -.message-media-left img { - margin: 3px 0 0 15px; - margin-left: 12px \9; -} - -.message-head span { - color: #999; -} - -.message-head a { - color: #000; -} - -.message-head a:hover { - color: #005580; -} - -.message-content a { - color: #000; - text-decoration: none; - width: 100%; - padding: 8px; - display: block; - margin: 0 -8px; -} - -.message-content a:hover { - color: #000; - text-decoration: none; - background-color: #e0e0e0; - border-radius: 4px; -} - -.message-foot-form { - margin: 15px 0 0 15px; - margin-left: 12px \9; -} - -.message-pagination { - margin-top: 15px; -} - -.message-hidden span { - margin-left: 5px; -} - -.message-nav-btn { - margin: 2px 0 0 10px; -} - -.message-nav { - margin-bottom: 15px; -} - -.message-nav li { - margin-right: 10px; -} - -.message-page { - margin: 0; -} - -.message-form-select, -.message-batch-action { - margin-left: 15px; -} - -.message-item-read { - background: #eefbff; -} - -.message-item-read .message-content p a { - color: #333; -} - -/* detail */ -.message-detail { - margin-top: 0; - padding-top: 10px; -} - -.message-item, -.message-detail-head { - border-bottom: 1px solid #e5e5e5; -} - -.message-detail-head, .message-detail-primary { - padding: 0 20px 0 15px; -} - -.message-detail-primary { - padding-top: 5px; -} - -.message-detail-primary img { - margin-right: 10px; -} - -.message-detail-hidden { - padding-top: 12px; - height: 30px; -} - -.message-input-posi { - position: relative; -} - -.message-head .message-label-type { - margin-left: 5px; - background-color: #999; - color: #fff; -} - -.message-detail-text { - padding: 5px 0 0 80px; - margin-bottom: 20px; -} - -/* new Message */ -.message-form-posi { - position: relative; -} - -.message-form-posi .message-label-left { - width: 70px; -} - -.message-form-posi span { - margin: 5px 15px 0 0; -} - -.message-input-right { - margin-left: 90px !important; -} - -.message-input-posi span { - margin-left: 12px; -} - -.message-form-posi .message-send-text span { - margin: 20px 0 0 210px; -} - -.message-send-text .message-textarea { - resize: none; -} - -.message-btn-margin { - position: absolute; - left: 520px; - top: 195px; - top: 172px \9; -} - -@-moz-document url-prefix() { - .message-btn-margin { - top: 210px; - } - .message-send-text span { - top: 215px; - } - .message-detail-text span { - top: 170px; - } -} - -.message-user-suc { - position: absolute; - top: 6px; - left: 5px; - line-height: 14px; -} - -.message-user-suc a { - display: block; - margin-left: 2px; - margin-top: 1px; - color: #fff; - font-size: 16px; - text-decoration: none; -} - -.message-username { - border: 1px #b94a48 solid !important; - box-shadow: 0 0 6px #D59392 !important; -} - -.message-error { - color: #b94a48; -} - -.message-alert + form { - display: none; -} - -.message-return { - font-size: 14px; - margin-top: 10px; -} - -/* model*/ -.message-modal-block { - padding: 15px; -} - -.message-user-name { - color: #333; - font-weight: bold; -} - -.form-group label.col-md-12 { - text-align: left; -} - -.message-checkbox { - margin-top: 10px; -} - -.message-avatar { - margin: 0 20px; -} \ No newline at end of file diff --git a/usr/module/message/asset/script/index-detail.js b/usr/module/message/asset/script/index-detail.js deleted file mode 100644 index 039eae6176..0000000000 --- a/usr/module/message/asset/script/index-detail.js +++ /dev/null @@ -1,50 +0,0 @@ -(function ($) { - var options; - var app = { - init: function () { - this.cacheElements(); - this.bindEvents(); - }, - $: function (selector) { - return this.$el.find(selector); - }, - cacheElements: function () { - this.$el = $('#message-js'); - this.$form = this.$('form'); - this.$content = this.$("[name='content']"); - this.$delete = this.$('a[data-confirm]'); - }, - bindEvents: function () { - this.$form.submit(this.submitAction); - this.$content.focus(this.conFocus); - this.$delete.click(this.deleteAction); - }, - submitAction: function () { - var self = $('[name="content"]'), - val = self.val(); - app.$form.find('span').remove(); - if (val == '') { - app.$form.append('<span></span>'); - app.$form.find('span').addClass('pull-right message-error').html('You can’t send a empty message'); - self.addClass('message-username'); - return false; - } - }, - conFocus: function () { - $(this).removeClass('message-username'); - app.$form.find('span').empty(); - }, - deleteAction: function () { - var href = app.$delete.attr('href'); - $('#confirm-modal').find('.modal-body').text($(this).attr('data-confirm')); - $('.confirm-ok').attr('href', href); - $('#confirm-modal').modal('show'); - return false; - }, - }; - - this.messageIndex = function (opts) { - options = opts || {}; - app.init(); - }; -})(jQuery); \ No newline at end of file diff --git a/usr/module/message/asset/script/index-index.js b/usr/module/message/asset/script/index-index.js deleted file mode 100644 index d4cb8017d9..0000000000 --- a/usr/module/message/asset/script/index-index.js +++ /dev/null @@ -1,85 +0,0 @@ -(function ($) { - var options; - var app = { - init: function () { - this.cacheElements(); - this.bindEvents(); - }, - $: function (selector) { - return this.$el.find(selector); - }, - cacheElements: function () { - this.$el = $('#message-js'); - this.$delete = this.$('a[data-confirm]'); - this.$select = this.$('.message-batch-action'); - this.$items = this.$('.message-item'); - this.$batch = this.$('.message-js-batch'); - this.$confirm = this.$('.confirm-ok'); - }, - bindEvents: function () { - this.$batch.click(this.checkedAll); - this.$select.change($.proxy(this.batchAction, this)); - this.$items.bind('click', this.itemsBind); - this.$delete.click(this.deleteAction); - this.$confirm.on('click', $.proxy(this.confirmAction, this)); - }, - checkedAll: function () { - //Note: if you donot bind this, you must use app - app.$('.message-js-check').attr('checked', app.$batch.prop('checked')); - }, - confirmAction: function () { - var checked = this.$('.message-js-check:checked'); - var ids = []; - if (checked.length) { - checked.each(function () { - ids.push($(this).attr('data-id')); - }); - location.href = options.host + 'index/delete/ids-' + ids.join(','); - } - }, - batchAction: function () { - var checked = this.$('.message-js-check:checked'); - var action = $.trim(this.$select.val()); - var ids = []; - if (checked.length) { - if (action == "delete") { - if (checked.length > 1) { - $('#confirm-modal').modal('show'); - } else { - $('#confirm-modal').modal('show'); - } - return false; - } - checked.each(function () { - ids.push($(this).attr('data-id')); - }); - var url = options.host + "index/" + action + "/ids-" + ids; - if (options.p) { - location.href = url + '/p-' + options.p; - } else { - location.href = url; - } - } else { - this.$select.attr('value', ''); - } - }, - itemsBind: function (c) { - if (c.target.tagName === "A" || c.target.tagName === "INPUT" || c.target.tagName === "IMG") { - return; - } - window.location = $(this).find(".message-content-link").attr("href") - }, - deleteAction: function () { - var href = $(this).attr('href'); - $('#confirm-modal').find('.modal-body').text($(this).attr('data-confirm')); - $('.confirm-ok').attr('href', href); - $('#confirm-modal').modal('show'); - return false; - }, - }; - - this.messageIndex = function (opts) { - options = opts || {}; - app.init(); - }; -})(jQuery); \ No newline at end of file diff --git a/usr/module/message/asset/script/index-send.js b/usr/module/message/asset/script/index-send.js deleted file mode 100644 index 06ca1cd01b..0000000000 --- a/usr/module/message/asset/script/index-send.js +++ /dev/null @@ -1,121 +0,0 @@ -(function ($) { - var options; - var app = { - init: function () { - this.cacheElements(); - this.bindEvents(); - this.errorAction(); - }, - $: function (selector) { - return this.$el.find(selector); - }, - cacheElements: function () { - this.$el = $('#message-js'); - this.$username = this.$("input[name='username']"); - this.$posi = this.$('.message-input-posi'); - this.$form = this.$('form'); - this.$content = this.$("[name='content']"); - this.$error = this.$('.message-js-error'); - }, - bindEvents: function () { - this.$username.blur(this.userBlur); - this.$username.focus(this.userFocus); - this.$posi.on('click', '.message-user-suc>a', this.posiOn); - this.$form.submit(this.submitAction); - this.$content.focus(this.conFocus); - }, - userBlur: function () { - var val = $(this).val(); - $.get(options.url, { - username: val - }).done(function (res) { - res = $.parseJSON(res); - app.$posi.find('p').remove(); - - if (res.status) { - app.$posi.append('<p class="label message-user-suc"></p>'); - app.$posi.find('p').html('<a href="javascript:;" class="pull-right">×</a>' + val); - app.$username.removeClass().parent().find('span').empty(); - } else { - if (val != '') { - app.$posi.find('span').remove(); - app.$posi.append('<span></span>'); - var tip = 'User ' + val + ' is not found'; - app.$posi.find('p').empty(); - app.$posi.find('span').html(tip == null ? '' : tip).addClass('message-error'); - app.$username.addClass('message-username'); - } - } - }); - }, - userFocus: function () { - $(this).removeClass().parent().find('span').empty(); - $(this).parent().find('p').empty(); - }, - posiOn: function () { - $(this).parent().empty(); - app.$username.val(''); - }, - submitAction: function () { - var self = $('[name="content"]'), - sendTxt = $('.message-send-text'), - val = self.val(), - user = app.$username.val(), - inner = app.$posi.find('p').innerHTML; - sendTxt.find('span').remove(); - // app.$posi.find('span').remove(); - if (user == '' && val == '') { - app.$posi.find('span').remove(); - app.$posi.append('<span></span>'); - var tip = 'User can’t be empty'; - app.$posi.find('span').html(tip).addClass('message-error'); - app.$username.addClass('message-username'); - sendTxt.append('<span></span>'); - sendTxt.find('span').addClass('help-block message-error').html('You can’t send a empty message'); - self.addClass('message-username'); - return false; - } - if (user == '') { - app.$posi.find('span').remove(); - app.$posi.append('<span></span>'); - var tip = 'User can’t be empty'; - app.$posi.find('span').html(tip).addClass('message-error'); - app.$username.addClass('message-username'); - return false; - } - if (val == '') { - sendTxt.append('<span></span>'); - sendTxt.find('span').addClass('help-block message-error').html('You can’t send a empty message'); - self.addClass('message-username'); - return false; - } - if (user != '' && inner == '' && val == '') { - app.$posi.append('<span></span>'); - var tip = 'User ' + val + ' is not found'; - app.$posi.find('p').empty(); - app.$posi.find('span').html(tip == null ? '' : tip).addClass('message-error'); - app.$username.addClass('message-username'); - return false; - } - if (inner != '') { - app.$posi.find('span').empty; - } - }, - conFocus: function () { - $(this).removeClass('message-username'); - $(this).parent().find('span').empty(); - }, - errorAction: function () { - var errForm = app.$error.next('form'), - errInput = errForm.find('input[name="username"]'), - errTip = 'User ' + errInput.val() + ' is not found'; - app.$posi.append('<span></span>'); - errInput.addClass('message-username').next('span').html(errTip).addClass('message-error'); - } - }; - - this.messageIndex = function (opts) { - options = opts || {}; - app.init(); - }; -})(jQuery); \ No newline at end of file diff --git a/usr/module/message/asset/script/notify-index.js b/usr/module/message/asset/script/notify-index.js deleted file mode 100644 index a9e86c695c..0000000000 --- a/usr/module/message/asset/script/notify-index.js +++ /dev/null @@ -1,85 +0,0 @@ -(function ($) { - var options; - var app = { - init: function () { - this.cacheElements(); - this.bindEvents(); - }, - $: function (selector) { - return this.$el.find(selector); - }, - cacheElements: function () { - this.$el = $('#message-js'); - this.$delete = this.$('a[data-confirm]'); - this.$select = this.$('.message-batch-action'); - this.$items = this.$('.message-item'); - this.$batch = this.$('.message-js-batch'); - this.$confirm = this.$('.confirm-ok'); - }, - bindEvents: function () { - this.$batch.click(this.checkedAll); - this.$select.change($.proxy(this.batchAction, this)); - this.$items.bind('click', this.itemsBind); - this.$delete.click(this.deleteAction); - this.$confirm.on('click', $.proxy(this.confirmAction, this)); - }, - checkedAll: function () { - //Note: if you donot bind this, you must use app - app.$('.message-js-check').attr('checked', app.$batch.prop('checked')); - }, - confirmAction: function () { - var checked = this.$('.message-js-check:checked'); - var ids = []; - if (checked.length) { - checked.each(function () { - ids.push($(this).attr('data-id')); - }); - location.href = options.host + 'notify/delete/ids-' + ids.join(','); - } - }, - batchAction: function () { - var checked = this.$('.message-js-check:checked'); - var action = $.trim(this.$select.val()); - var ids = []; - if (checked.length) { - if (action == "delete") { - if (checked.length > 1) { - $('#confirm-modal').modal('show'); - } else { - $('#confirm-modal').modal('show'); - } - return false; - } - checked.each(function () { - ids.push($(this).attr('data-id')); - }); - var url = options.host + "notify/" + action + "/ids-" + ids; - if (options.p) { - location.href = url + '/p-' + options.p; - } else { - location.href = url; - } - } else { - this.$select.attr('value', ''); - } - }, - itemsBind: function (c) { - if (c.target.tagName === "A" || c.target.tagName === "INPUT" || c.target.tagName === "IMG") { - return; - } - window.location = $(this).find(".message-content-link").attr("href") - }, - deleteAction: function () { - var href = $(this).attr('href'); - $('#confirm-modal').find('.modal-body').text($(this).attr('data-confirm')); - $('.confirm-ok').attr('href', href); - $('#confirm-modal').modal('show'); - return false; - }, - }; - - this.messageIndex = function (opts) { - options = opts || {}; - app.init(); - }; -})(jQuery); \ No newline at end of file diff --git a/usr/module/message/config/module.php b/usr/module/message/config/module.php deleted file mode 100644 index 5c3e31486a..0000000000 --- a/usr/module/message/config/module.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -/** - * Application manifest - */ -return array( - // Module meta - 'meta' => array( - // Module title, required - 'title' => _a('Message'), - // Description, for admin, optional - 'description' => _a('A module to send message'), - // Version number, required - 'version' => '1.0.6', - // Distribution license, required - 'license' => 'New BSD', - // Module is ready for clone? Default as false - 'clonable' => false, - 'icon' => 'fa-envelope-o', - ), - // Author information - 'author' => array( - // Author full name, required - 'Dev' => 'Xingyu Ji; Liu Chuang', - // Email address, optional - 'Email' => 'xingyu@eefocus.com', - 'UI/UE' => '@zhangsimon, @loidco', - 'QA' => 'Zhang Hua, @lavenderli', - // Website link, optional - 'Website' => 'http://pialog.org', - // Credits and aknowledgement, optional - 'Credits' => 'Zend Framework Team; Pi Engine Team; EEFOCUS Team.' - ), - // resource - 'resource' => array( - // Database meta - 'database' => array( - // SQL schema/data file - 'sqlfile' => 'sql/mysql.sql', - ), - // permission - 'permission' => 'permission.php', - // page - 'page' => 'page.php', - // Navigation definition - 'navigation' => 'navigation.php', - // User specs - 'user' => 'user.php', - ), -); diff --git a/usr/module/message/config/navigation.php b/usr/module/message/config/navigation.php deleted file mode 100755 index a84570df19..0000000000 --- a/usr/module/message/config/navigation.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -return array( - // Hide from front menu - 'front' => false, - // Admin side - 'admin' => array( - 'list' => array( - 'label' => _a('List'), - 'permission' => array( - 'resource' => 'list', - ), - 'route' => 'admin', - 'module' => 'message', - 'controller' => 'list', - 'action' => 'index', - ), - 'prune' => array( - 'label' => _a('Prune'), - 'permission' => array( - 'resource' => 'prune', - ), - 'route' => 'admin', - 'module' => 'message', - 'controller' => 'prune', - 'action' => 'index', - ), - ), -); \ No newline at end of file diff --git a/usr/module/message/config/page.php b/usr/module/message/config/page.php deleted file mode 100755 index 337549f327..0000000000 --- a/usr/module/message/config/page.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt New BSD License - */ - -/** - * @author Hossein Azizabadi <azizabadi@faragostaresh.com> - */ -return array( - // Admin section - 'admin' => array( - array( - 'title' => _a('List'), - 'controller' => 'list', - 'permission' => 'list', - ), - array( - 'title' => _a('Prune'), - 'controller' => 'prune', - 'permission' => 'prune', - ), - ), -); \ No newline at end of file diff --git a/usr/module/message/config/permission.php b/usr/module/message/config/permission.php deleted file mode 100755 index 376bb2a1b0..0000000000 --- a/usr/module/message/config/permission.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt New BSD License - */ - -/** - * @author Hossein Azizabadi <azizabadi@faragostaresh.com> - */ -return array( - // Admin section - 'admin' => array( - 'list' => array( - 'title' => _a('List'), - 'access' => array(), - ), - 'prune' => array( - 'title' => _a('Prune'), - 'access' => array(), - ), - ), -); \ No newline at end of file diff --git a/usr/module/message/config/user.php b/usr/module/message/config/user.php deleted file mode 100644 index 5a50537cd7..0000000000 --- a/usr/module/message/config/user.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -/** - * User profile and resource specs - * - * @see Pi\Application\Installer\Resource\User - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -return array( - // Quicklinks - 'quicklink' => array( - 'message' => array( - 'title' => _a('Messages'), - 'link' => Pi::service('url')->assemble( - 'default', - array('module' => 'message') - ), - 'icon' => 'icon-bell', - ), - ), -); diff --git a/usr/module/message/doc/changelog.txt b/usr/module/message/doc/changelog.txt deleted file mode 100644 index ef0104bcb9..0000000000 --- a/usr/module/message/doc/changelog.txt +++ /dev/null @@ -1,9 +0,0 @@ -Message Module Changelog - - -July 25th, 2013 -============================= -1. Create message moudle with version 1.0.0. - - -Xingyu Ji diff --git a/usr/module/message/doc/manifest.md b/usr/module/message/doc/manifest.md deleted file mode 100644 index ec138fa5c1..0000000000 --- a/usr/module/message/doc/manifest.md +++ /dev/null @@ -1,15 +0,0 @@ -Message Module -============== -Features and Requirements - -1. Feature description -2. Use case -3. Information architecture - -Design - -1. System architecture -2. Controller && Action design -3. Api design -4. Main Program Logical Flowchart -5. Database design diff --git a/usr/module/message/doc/releasenotes.md b/usr/module/message/doc/releasenotes.md deleted file mode 100644 index efe1b1292d..0000000000 --- a/usr/module/message/doc/releasenotes.md +++ /dev/null @@ -1,17 +0,0 @@ -Message Module 1.0.0 Release -============================ - -This is the first version of the Message module for Pi. -User can send private messages to each other and receive system notification by this module. - -Api provided -============ -- Send a message -- Send a notification -- Get total account -- Get new message count to alert - ---------------------- -[Xingyu Ji](http://github.com/jixingyu), [Pi Team](http://pi-engine.org) - -July 18nd, 2013 diff --git a/usr/module/message/locale/en/admin.mo b/usr/module/message/locale/en/admin.mo deleted file mode 100644 index e2bae93ab2475b9014f7aa03ed5edb93c27625dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 454 zcmaKnu};G<6h(_*%E-*%feq{?EkVHrgeV0SS`k4&Y}F%qB(7S!vRz95ftBCmTX><U z-FVWKb$zbw>+jv2uLjK)X^*r|+9n;6>PbkS1W#zKGwVsM8Ds8wzu?bkoibXoRPiY~ z2PFpSea5>M!4u$D;8C(x7#;Jl#al6pVi_MDgza`nLH>a6s=nag+yI>CnFZ}8;Ek0m z1GPZSZWZW~o%&xluFZvaN|)6fgt4W_^?5L$-8r@58NyVuwU-QaFzgR|n=eEn47x^p z)b!eNMzuYD_~vW^N_SXZfpzH5p0aD6Y;tw0H?+K`b5qdUk|nRo2QT~vHQH6()L@}J yi$o$~A}h=9aJewHa0BJMWFzQ|>SKTK5**IJSCR?Q6k-D&5o}(igm_3WX#4;@l!A2t diff --git a/usr/module/message/locale/en/admin.po b/usr/module/message/locale/en/admin.po deleted file mode 100644 index b02b3b4273..0000000000 --- a/usr/module/message/locale/en/admin.po +++ /dev/null @@ -1,38 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-message\n" -"POT-Creation-Date: 2016-02-25 15:54+0330\n" -"PO-Revision-Date: 2016-02-25 15:54+0330\n" -"Last-Translator: Taiwen Jiang <taiwenjiang@tsinghua.org.cn>\n" -"Language-Team: \n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.5\n" -"X-Poedit-KeywordsList: _a;_t\n" -"X-Poedit-Basepath: ../..\n" -"X-Poedit-SearchPath-0: .\n" - -#: config/module.php:17 -msgid "Message" -msgstr "" - -#: config/module.php:19 -msgid "A module to send message" -msgstr "" - -#: config/navigation.php:16 config/page.php:17 config/permission.php:17 -msgid "List" -msgstr "" - -#: config/navigation.php:26 config/page.php:22 config/permission.php:21 -msgid "Prune" -msgstr "" - -#: config/user.php:20 -msgid "Messages" -msgstr "" - -#~ msgid "Checked all" -#~ msgstr "All Categories" diff --git a/usr/module/message/locale/en/block.mo b/usr/module/message/locale/en/block.mo deleted file mode 100644 index 8a0437aa7d87ad6113d926f09cf3342ac4233e4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 451 zcmaKnO-{ow5QU3il_hHyUa$kZNux@^{0LDBDx@NUfY>2784_2mUD;DgkH7)A9%o@f zrDn%SPuBDI<az$t-}~;+?2ryfhooK7F{zn^^hNN5&L*>+%-Jav$VVlA0q3<fl4Y9D z!FyFfkUivl;6Nb(eytEB>xEIDM<MUUEDB{5ABAxoQjkBwhi)GDH<v1pJa@|YnL_I% z%avY%VRu@Yik;z~n>OYWy*5?7RKmJS6y_pG>2^u2cn)eV+15)2CK!*#!}bf22!nw& z2!^(;7gQVJ6T6F<(&m&EwQ?Tt{5ikjNt<h0y@TUJQ`nMrOO{MD2Cw`U47g3*%tEP= uMIsS>A{)!^VZE}h^r`kJ+1sQgSIWaeVJ(>uT_IZV1j-e4Mu>+5gU&CABY{Z( diff --git a/usr/module/message/locale/en/block.po b/usr/module/message/locale/en/block.po deleted file mode 100644 index 6c775f35df..0000000000 --- a/usr/module/message/locale/en/block.po +++ /dev/null @@ -1,18 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-message\n" -"POT-Creation-Date: 2015-10-23 10:13+0330\n" -"PO-Revision-Date: 2015-10-23 10:13+0330\n" -"Last-Translator: Taiwen Jiang <taiwenjiang@tsinghua.org.cn>\n" -"Language-Team: \n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.5\n" -"X-Poedit-KeywordsList: _b\n" -"X-Poedit-Basepath: ../..\n" -"X-Poedit-SearchPath-0: .\n" - -#~ msgid "Checked all" -#~ msgstr "All Categories" diff --git a/usr/module/message/locale/en/default.mo b/usr/module/message/locale/en/default.mo deleted file mode 100644 index 526ee667c933d30c579fd4a7e6531b5495e3912c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 505 zcmaKou};G<5QYPSB}fd+4Bo+R+7eW`1p%d?LMs9U#DXf59EnS6SGG&(JFxP4JOEF@ zrIpCW$)D`=fA;<M_s+(bhp~?ABKycD(m~3IkS*jE`CRk7XPmc@A6(;DMtSxxx;Z3o zkP=Z8US#wb5=Z+feFS5rR-8nVPQY4`fgjz(v}-^(6zI8dz)2&hAJU*f8zHHOJUrM7 zn#}+U=^ebw@`8Ws2EsZT8=-6=oHm@qLe4>vD=Ab)I&PVb%jCpasj_?~m^K+p)UiLn z-5I)~F^CB#e>o?h{9%9CtDaD2f#222fx>Q!DcW}M;cC-DNYy4uE{p|t^blXrR#jKJ zdIdv!D$yzS=A`u^o&Q8HL4jG>jWndvkveO!5S3L*uVFFQCba`;9VeqvdjyquCM-;a h%Q<1J##klXgD^=Rp+o}|eebj=NEbgj(?){zegXKcjZpvq diff --git a/usr/module/message/locale/en/default.po b/usr/module/message/locale/en/default.po deleted file mode 100644 index fdec6fa939..0000000000 --- a/usr/module/message/locale/en/default.po +++ /dev/null @@ -1,264 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-message\n" -"POT-Creation-Date: 2016-02-25 15:54+0330\n" -"PO-Revision-Date: 2016-02-25 15:54+0330\n" -"Last-Translator: Taiwen Jiang <taiwenjiang@tsinghua.org.cn>\n" -"Language-Team: \n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.5\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: ../..\n" -"X-Poedit-SearchPath-0: .\n" - -#: src/Api/Breadcrumbs.php:47 -msgid "Archive" -msgstr "" - -#: src/Api/Breadcrumbs.php:53 -msgid "Message detail" -msgstr "" - -#: src/Api/Breadcrumbs.php:59 src/Controller/Front/IndexController.php:326 -msgid "Send message" -msgstr "" - -#: src/Controller/Admin/PruneController.php:24 -msgid "" -"You can prune all old message, select time to remove messages before that " -"time and you can filter list of removed messages by this from option." -msgstr "" - -#: src/Controller/Admin/PruneController.php:41 -#, php-format -msgid "%s old messages removed" -msgstr "" - -#: src/Controller/Admin/PruneController.php:43 -msgid "No messages removed ! check your selected filter and try again" -msgstr "" - -#: src/Controller/Admin/PruneController.php:48 -msgid "Prune old messages" -msgstr "" - -#: src/Controller/Front/IndexController.php:184 -#: src/Controller/Front/NotifyController.php:43 -#, php-format -msgid "Private message ( <span class=\"label label-danger\">%s</span> unread )" -msgstr "" - -#: src/Controller/Front/IndexController.php:188 -#: src/Controller/Front/NotifyController.php:47 -#, php-format -msgid "Notification ( <span class=\"label label-danger\">%s</span> unread )" -msgstr "" - -#: src/Controller/Front/IndexController.php:224 -msgid "Username is invalid, please try again." -msgstr "" - -#: src/Controller/Front/IndexController.php:240 -#: src/Controller/Front/IndexController.php:377 -msgid "Send failed, please try again." -msgstr "" - -#: src/Controller/Front/IndexController.php:275 -msgid "User" -msgstr "" - -#: src/Controller/Front/IndexController.php:279 -msgid "not found" -msgstr "" - -#: src/Controller/Front/IndexController.php:285 -msgid "Sorry, you can't send message to yourself." -msgstr "" - -#: src/Controller/Front/IndexController.php:297 -msgid "An error occurred, please try again." -msgstr "" - -#: src/Form/PruneForm.php:34 -msgid "All messages Before" -msgstr "" - -#: src/Form/PruneForm.php:50 -msgid "Just read messages by user" -msgstr "" - -#: src/Form/PruneForm.php:54 -msgid "Remove read messages by user before selected time" -msgstr "" - -#: src/Form/PruneForm.php:62 -msgid "Just deleted messages by user" -msgstr "" - -#: src/Form/PruneForm.php:66 -msgid "Remove deleted messages by user before selected time" -msgstr "" - -#: src/Form/PruneForm.php:74 -msgid "Prune" -msgstr "" - -#: src/Form/ReplyForm.php:66 src/Form/SendForm.php:77 -msgid "Content" -msgstr "" - -#: src/Form/ReplyForm.php:88 src/Form/SendForm.php:93 -msgid "Send" -msgstr "" - -#: src/Form/SendForm.php:55 -msgid "Recipient" -msgstr "" - -#: src/Form/SendForm.php:83 -msgid "Message content" -msgstr "" - -#: template/admin/list-index.phtml:4 -msgid "List of messages" -msgstr "" - -#: template/admin/list-index.phtml:19 template/admin/list-index.phtml:40 -#: template/admin/list-index.phtml:47 template/front/index-detail.phtml:28 -#: template/front/index-index.phtml:36 -msgid "From" -msgstr "" - -#: template/admin/list-index.phtml:21 template/admin/list-index.phtml:41 -#: template/admin/list-index.phtml:59 template/front/index-detail.phtml:28 -#: template/front/index-index.phtml:36 -msgid "To" -msgstr "" - -#: template/admin/list-index.phtml:23 template/admin/list-index.phtml:42 -msgid "Send on" -msgstr "" - -#: template/admin/list-index.phtml:25 -msgid "ID" -msgstr "" - -#: template/admin/list-index.phtml:31 -msgid "Full details" -msgstr "" - -#: template/admin/list-index.phtml:38 -msgid "Close" -msgstr "" - -#: template/admin/list-index.phtml:49 template/admin/list-index.phtml:61 -msgid "Name" -msgstr "" - -#: template/admin/list-index.phtml:50 template/admin/list-index.phtml:62 -msgid "Identity" -msgstr "" - -#: template/admin/list-index.phtml:51 template/admin/list-index.phtml:63 -msgid "Email" -msgstr "" - -#: template/admin/list-index.phtml:52 template/admin/list-index.phtml:64 -msgid "Is read ?" -msgstr "" - -#: template/admin/list-index.phtml:52 template/admin/list-index.phtml:53 -#: template/admin/list-index.phtml:64 template/admin/list-index.phtml:65 -msgid "Yes" -msgstr "" - -#: template/admin/list-index.phtml:52 template/admin/list-index.phtml:53 -#: template/admin/list-index.phtml:64 template/admin/list-index.phtml:65 -msgid "No" -msgstr "" - -#: template/admin/list-index.phtml:53 template/admin/list-index.phtml:65 -msgid "Is deleted ?" -msgstr "" - -#: template/admin/list-index.phtml:85 -msgid "Message list is empty !" -msgstr "" - -#: template/front/_confirm-modal.phtml:5 -msgid "Delete this message?" -msgstr "" - -#: template/front/_confirm-modal.phtml:8 template/front/index-detail.phtml:64 -#: template/front/index-index.phtml:55 template/front/notify-detail.phtml:52 -msgid "Once you delete this message, it cannot be undone." -msgstr "" - -#: template/front/_confirm-modal.phtml:12 -msgid "Delete message" -msgstr "" - -#: template/front/_confirm-modal.phtml:14 -msgid "Cancel" -msgstr "" - -#: template/front/index-detail.phtml:10 template/front/index-index.phtml:13 -#: template/front/notify-detail.phtml:10 template/front/notify-index.phtml:13 -msgid "Private message" -msgstr "" - -#: template/front/index-detail.phtml:14 template/front/index-index.phtml:17 -#: template/front/notify-detail.phtml:14 template/front/notify-index.phtml:8 -#: template/front/notify-index.phtml:17 -msgid "Notification" -msgstr "" - -#: template/front/index-detail.phtml:45 template/front/index-index.phtml:56 -#: template/front/index-index.phtml:102 template/front/notify-detail.phtml:53 -#: template/front/notify-index.phtml:53 -msgid "Delete" -msgstr "" - -#: template/front/index-index.phtml:8 -msgid "Message" -msgstr "" - -#: template/front/index-index.phtml:70 template/front/index-index.phtml:101 -#: template/front/notify-index.phtml:52 -msgid "Mark as read" -msgstr "" - -#: template/front/index-index.phtml:76 -msgid "Read" -msgstr "" - -#: template/front/index-index.phtml:89 -msgid "No message for you!" -msgstr "" - -#: template/front/index-index.phtml:98 template/front/notify-index.phtml:49 -msgid "Checked all" -msgstr "All Categories" - -#: template/front/index-index.phtml:100 template/front/notify-index.phtml:51 -msgid "Massive operation" -msgstr "" - -#: template/front/index-index.phtml:113 -msgid "Once you delete those message, it cannot be undone." -msgstr "" - -#: template/front/index-send.phtml:9 -msgid "Return message list page" -msgstr "" - -#: template/front/index-send.phtml:11 -msgid "Write message" -msgstr "" - -#: template/front/notify-index.phtml:38 -msgid "No notification for you!" -msgstr "" diff --git a/usr/module/message/locale/en/mail/notification.txt b/usr/module/message/locale/en/mail/notification.txt deleted file mode 100644 index 606d0586ea..0000000000 --- a/usr/module/message/locale/en/mail/notification.txt +++ /dev/null @@ -1,17 +0,0 @@ -[comment]Get new message[/comment] - -[format]html[/format] - -[subject]New message[/subject] - -[body] -<div style="padding: 1px; direction: ltr;"> - <h3 style="font-size: 1.1em;">Dear %name%</h3> - <div style="padding: 3px 0; margin: 1px; 0">You get new message on %site_name% website from %sender%.</div> - <div style="padding: 3px 0; margin: 1px; 0">Please log into the site to check your messages.</div> - <div style="padding: 3px 0; margin: 1px; 0">Don't reply to this email !</div> - <div style="margin-top: 10px"> - <a href="%site_url%" title="%site_name%">%site_name%</a> - </div> -</div> -[/body] diff --git a/usr/module/message/locale/fa/admin.mo b/usr/module/message/locale/fa/admin.mo deleted file mode 100644 index c3adb64e1f72d1648657442b14613b1b9da20b9d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 657 zcmaKou}>616vjsZHA|$hvM^?PGt1t=nadIjL?FbwxWUud!EpPyTfCdO%*?4IG!Tgv zv?l%sCv<3UVPk2#D+zy#-@qnED16Cpzj^b$_vU5K?@fMTh+E(RXn<+32Yh@3_rWok z1i!#-@EhC#f4~&T!PX7N&Y=&%;!VZ^=qA+Hy@lR|I_M1a0E%)p0j>wEi+%iDAO2mo z$oo1S_J}*pEvc0E$y(VV*2t`5%`z#~vcwD(;j4G3?ZjFtUX!tzRxwX9QMLxji<Ve2 zBpnR#Ogf5rHL5%oQB_oHyi$v6^N*srxd??~o!(`Bz<=u+(mK&HQrVt#+Qd9)NYxo) zP0=FRzmms%TL#Uw=JI&4N*D!8S~*gfu{*#rjy|~AK~H9Cfw#NTSaMHZwN^xZT<71~ zCL@+rTc?@o#Js+hx!{dhB}L|Pi9}PHIbI3tVGYh@DxTBsdu>wd|6j~E<idt;E6u0U z(m=Xy%)@Xt49CVxlBV5FV2KE3z>33s^!ID=x%kNQQGS~L$VWI9KhKVEIAq0s@#*6B WgpKb?lfxR}8Uv1fU;h2<i2Vb;-@+vT diff --git a/usr/module/message/locale/fa/admin.po b/usr/module/message/locale/fa/admin.po deleted file mode 100644 index 49818dcd25..0000000000 --- a/usr/module/message/locale/fa/admin.po +++ /dev/null @@ -1,50 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-message\n" -"POT-Creation-Date: 2016-02-25 15:54+0330\n" -"PO-Revision-Date: 2016-02-25 15:54+0330\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: fa\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.5\n" -"X-Poedit-KeywordsList: _a;_t\n" -"X-Poedit-Basepath: ../..\n" -"X-Poedit-SearchPath-0: .\n" - -#: config/module.php:17 -msgid "Message" -msgstr "پیام" - -#: config/module.php:19 -msgid "A module to send message" -msgstr "ماژول ارسال پیام" - -#: config/navigation.php:16 config/page.php:17 config/permission.php:17 -msgid "List" -msgstr "فهرست" - -#: config/navigation.php:26 config/page.php:22 config/permission.php:21 -msgid "Prune" -msgstr "پاکسازی" - -#: config/user.php:20 -msgid "Messages" -msgstr "پیام ها" - -#~ msgid "Send" -#~ msgstr "ارسال پیام گروهی" - -#~ msgid "Private message" -#~ msgstr "پیام شخصی" - -#~ msgid "Notification" -#~ msgstr "آگاهی رسانی" - -#~ msgid "New message" -#~ msgstr "پیام جدید" - -#~ msgid "Checked all" -#~ msgstr "All Categories" diff --git a/usr/module/message/locale/fa/block.mo b/usr/module/message/locale/fa/block.mo deleted file mode 100644 index b3a71704aa9a83c3d46f351418ed9a2c7c7ad4c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 462 zcmaJ-u};G<5G{f!BQt{sHn=!RRZ)ysC<RrtB7%U}kegf^qr|Rkx1s+5zsI+5Q3YY* z$xqhZd%k<}*WtlukFZBPA|4a>iKoOCL*fUC=XAH8U!>N&VeVm4z%yE>j20|aP@{8l zi9vdw!N{WYB*3-wC|DB31BenxA{HkiPEMkJKO!SM;6}9r{`F0z^N?AoT_wG-f(28l zmuuPu8Or)kE!aW^v&n4S1&hNd7#ZzR(~Rwk!gzf5d{s%MFIZkm>(F05Wj8SFeC@6U zS{Uox6iP1z8_tyvUf>or+Fgj$V4*yV!?UnY%C3Yv+&0D*ZmOIY>~-ELSJL51`ckm4 zYd)g1d6`lhBEk4ZTHZ7bFMVC{%H*=*D@6w^R!Hw52?t@s*Us|V6zdB4&!_jk0mlo4 AVgLXD diff --git a/usr/module/message/locale/fa/block.po b/usr/module/message/locale/fa/block.po deleted file mode 100644 index 32d7ba29d6..0000000000 --- a/usr/module/message/locale/fa/block.po +++ /dev/null @@ -1,19 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-message\n" -"POT-Creation-Date: 2015-02-20 12:12+0330\n" -"PO-Revision-Date: 2015-02-20 12:12+0330\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: fa\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.7.3\n" -"X-Poedit-KeywordsList: _b\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: /var/www/html/local/pi/pi-release-2.5.0/usr/module/" -"message\n" - -#~ msgid "Checked all" -#~ msgstr "All Categories" diff --git a/usr/module/message/locale/fa/default.mo b/usr/module/message/locale/fa/default.mo deleted file mode 100644 index f5c671ca4c0ed1d02f37a60e28fe8dacc768b9a0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5400 zcmcJRUu+dw9mmhI?227o1r=RU_rSs~>~b$HY*#F>gue!sKMj;s_CYeecM5m8y;EnV zmHJ@9rhg!5%xdD3SxxXyO9d{4B4WrstnZrmG(*kC#Q35<_+r$kiJ$NMx%XCD0!Al2 z^Xbev=XZYp=f1yU>30lQ7vnRGKRss5QF!-pZd`v`YRo6$-{HsL@+XX03)jI9z=QBf zcnm%TPeT5T%T4oVq2>elH2gaJIJ^k?GvDKeX!Aq(A$S=sfj@=I;GOLKd+>ui{|bH< z#_-edukfRA1&3(=b8tCqhdO^Z{0KY<b^aSr_EezGJr8x>7?gb%;j8c+_$l}sD7k-u zyWtXqZif5d7I+Ry{uQ_n-i4@SmZ1C!xD4u?RZ#j{_%eJEcED3m=X?ul-8B3htV5mq zONdA_2VaE0gVOhDglYY9_&i(*KMZ$3h3+-@HarUXGr#55OKkrDCFd}~S_{v?WAGi= z2LB8()%*j>A4^bzBhAW;&qB?whq8MUd=~D6+J6d4uQ#Fm>}BuAq2zoUDqi1(E8!Km z75)Os@Bf7I$2N?Se|n(uatvz!4`AYN_z9lxLfP|cD82rbaVf$6JkL+TZ@@iJ@p}(y z-xCOV1FnL-a42I8l|S22@^yFwvc>!eZh*5870vrl_Wcp|!^hbaz^_8(#qXi~@eE1O z4c9{Xa}chE7vTx`6DWT@#-!Fi2@k>LQ0u?KO?LV4o5XJzqM})b5j>hshVtzNMt&*3 zR^<;Fi%|a4*<WBh$KdGX+LTdoe1)OB*vu#}6dUyh%g8U~lYF78ogqKxmug#juVE-| zx}IUER`ct5{!xx@WGI()$;a}$F2!G${Hz=yq)Cib2e>=&uY51R$QSAds+kUkF2z?q z)kPX7eq9gOF<xRM*Sf%Z)w1n(gTOiM2G)1`y&<=3c2%p*m%H6Q&v(tPnst5O^Q~7Z z4f?)Y-e?D^t`oR6^oOl;+NsovW|v<&QyFs29;a4vt7gv`w{+GmTc^tZRWD$|tA%bY zG<)5u8@d_tv+~FAOeM(Q?KJ!Pol4d0_q~3ze-OpWZpe$k9N23Pl#x{lhs}Y2*OFMa zJN4kZj{ZA17=(?9hLyd;b}(@LbT(Oe-_)TB8@;|<iNG9o{Ik|c1@jODSZTch*LT8- zS2KrG59YL`%*^b4rgLMuD)HFp_78-^cC|U;^t<MW$6tP;#pia|8)UBWt`Q%*+Lq*5 zE%0rC;U!t#SE+`sZ=G7X84_);d10lmQc5&!mD_yFs^)`TZ?^{nPR*98*tug()#-Js zHn|tdPVKbouX%M{uzi!(ylMw)i3c~BqeNT^W&XCULELC7p)ENzG_k!dd&*wTEiSNy z6v;iX$ewP$GUSAfRpvjQ|4Ze&{lS`xEbj9v!W<)!xRojc6{YR5q(Bx;DU4ICG(!?r z2yC`#!Ax6hM>y!$a!=SKT?VL7bKI?!lbh|M1{SVCt;x5hYe~@Kp6?HDOyWZvUI<aK zxypuKl1gM!U(xh<=7h>aw;GA5M6J|@oN8sklK+xlX$i+kH!vqj0uHeQi94zNR+nzf zoMYu09h~-@T;U*hNO;Bx(>2Ox<&{KcDV{h)^_exSmfgc?;`Pxks81DV(J1ZuJhF}m zdv8)Kg#+cn>#iR#+hw~eg{=PDx{vl0_7Ep+E9@oBy6oomj#mopn+uyeZAWKU=gTj( zZ`sn$!oo3ks3HLiuj@?L9dd%O(BnI`pz4I4-(}klQ9*-*ve4r?{VmU3M6~Vjfy4Wn ziggs*+p>OH=oubBnb18KZW^f4YPZn=96xZw9VdGB7q&Ln>8w82FYK$8ymF;>y320u zt%Pk~E_~6gsar{jZqF@KkR8RX#ZG3@$HHsw@Yg)Q9H{qo*;A*sopPI#yJ_?TPI#uv z7K@vT#pc9u*P-WkGgWA3vd!>KiQk=@h$iDv8^0CR=O*IOxe4AyllLx1H>1hu29MEf zR5#IdJesa+Y#5IwwfL=QDju;~Yvv~IUAED+=yo(|qnY@EHrJV{$KzUXGn%#$J4T}0 z@p&z&#}}e0CT5a(4w#Ova>$sycR3zIuX@o$m!g?y7R4?Y_Wc}a0Sm9OZ_38w@n}45 zkb>}dEK@VOX%KWhKA)jsC7Tg7)_At*GE791di4Et9v{Rb{EJ20ZgcKrbcZpGUh;t^ zXHf!+I2#o(G@8!OlDlLN!mc4z+9uD9*YSCLcDt!VoI0|hO1gZSy*IUNG%@vdG-Vds zxX>{RZy(2*ib6B$oQ?OS@11xoRhJ0fuQyiA%9bQFhQ)XRZ_Gq>o9Um+G|hhqXp6H= zbS1hG{aE?dqJpeiP%S0WWIUoAN>gXGk<a5%{ECbj98bPAW2uExD5Rt$JY=iIj4KRO zBnC*4wn$-L{BFYsTAn0}RuLq=*v$+@|LA8dN1BpXj;WK{l0Aw!b%{-n#j!|AU4lE~ z3l`&*IkU*s{<(=XqcgRc$udjws5NE$Ls}4By2rT^)UuaSS>WxXePriFK6MASY*4z( zpE9B)ps6D==cSg*MAdk{@_ZT)`9HA@4QG?!N7ofYTm#5R3jP0oM4p(W2f1}?ZlaN@ zjW_=rcg=60oHDPUHq?k49W?8_1~041#?=B0xiy1#Ch3*xJY-SQNt$iofl?P~C+c9t zghFZU+~lfWbJ{gR$2nPlm5cIj_2APMXc^>x+QJ_BOw^<KX1S7fr(1a8s_JTyZebF$ zR7OeXPAh7JDvdA50xY9^FX{6Z-B6)VrIk#kKFmi*E=y!Lx<<=+N*>~+Pu)z5BNa?} z^`^dc1djz-SE3zAA2djcJ}C`NC*4JR=GE8~`*r#>d-Or1S(~Ou4Yug>-F%~_a4WjX z>Z^_NN=ot}3{5@(6ljYAI&ehUm??js>JRu~kpG}i6ToxxGARGVC#p5FFKMCj#e!1j zr|c!P%(FaAKk6n4M%I{G5;>_KIWYMF!jFb~R8!K-7PX5EB->asLP)5VtXN5??4y#z zTfxEoF(R#kjpBqm$%k}GoiK@<zADJny5xI%osf|)>9_4s`z1fM2)h~s@hAPvzXA7; B&*K09 diff --git a/usr/module/message/locale/fa/default.po b/usr/module/message/locale/fa/default.po deleted file mode 100644 index 8aa8a7a0a9..0000000000 --- a/usr/module/message/locale/fa/default.po +++ /dev/null @@ -1,315 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-message\n" -"POT-Creation-Date: 2016-02-25 15:54+0330\n" -"PO-Revision-Date: 2016-02-25 15:55+0330\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: fa\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.5\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: ../..\n" -"X-Poedit-SearchPath-0: .\n" - -#: src/Api/Breadcrumbs.php:47 -msgid "Archive" -msgstr "آرشیو" - -#: src/Api/Breadcrumbs.php:53 -msgid "Message detail" -msgstr "جزئیات پیام" - -#: src/Api/Breadcrumbs.php:59 src/Controller/Front/IndexController.php:326 -msgid "Send message" -msgstr "ارسال پیام" - -#: src/Controller/Admin/PruneController.php:24 -msgid "" -"You can prune all old message, select time to remove messages before that " -"time and you can filter list of removed messages by this from option." -msgstr "" -"شما میتوانید تمام پیام های قدیمی را پاکسازی کنید ، تاریخی که تمام پیام ها " -"قبل از آن حذف خواهد شد را انتخاب کنید ، همچنین شما میتوانید از فیلتر های " -"موجود در فرم هم استفاده فرمایید. لازم به ذکر است این فرایند برگشت پذیر نیست" - -#: src/Controller/Admin/PruneController.php:41 -#, php-format -msgid "%s old messages removed" -msgstr "%s پیام قدیمی پاکسازی شد" - -#: src/Controller/Admin/PruneController.php:43 -msgid "No messages removed ! check your selected filter and try again" -msgstr "" -"هیپ پیامی حذف نشد ! لطفا تنظیمات خود را مجددا بررسی کرده و تلاش نمایید." - -#: src/Controller/Admin/PruneController.php:48 -msgid "Prune old messages" -msgstr "پاکسازی پیام های قدیمی" - -#: src/Controller/Front/IndexController.php:184 -#: src/Controller/Front/NotifyController.php:43 -#, php-format -msgid "Private message ( <span class=\"label label-danger\">%s</span> unread )" -msgstr "پیام شخصی ( <span class=\"label label-danger\">%s</span> خوانده نشده )" - -#: src/Controller/Front/IndexController.php:188 -#: src/Controller/Front/NotifyController.php:47 -#, php-format -msgid "Notification ( <span class=\"label label-danger\">%s</span> unread )" -msgstr "" -"آگاهی رسانی ( <span class=\"label label-danger\">%s</span> خوانده نشده )" - -#: src/Controller/Front/IndexController.php:224 -msgid "Username is invalid, please try again." -msgstr "نام کاربری صحیح نیست ، دوباره امتحان کنید." - -#: src/Controller/Front/IndexController.php:240 -#: src/Controller/Front/IndexController.php:377 -msgid "Send failed, please try again." -msgstr "ارسال موفقیت آمیز نبود ، دوباره امتحان کنید." - -#: src/Controller/Front/IndexController.php:275 -msgid "User" -msgstr "کاربر" - -#: src/Controller/Front/IndexController.php:279 -msgid "not found" -msgstr "یافت نشد" - -#: src/Controller/Front/IndexController.php:285 -msgid "Sorry, you can't send message to yourself." -msgstr "متاسفانه شما نمیتوانید به خودتان پیام بفرستید." - -#: src/Controller/Front/IndexController.php:297 -msgid "An error occurred, please try again." -msgstr "یک خطا روی داده است ، لطفا دوباره امتحان کنید." - -#: src/Form/PruneForm.php:34 -msgid "All messages Before" -msgstr "تمام پیام های قبل از" - -#: src/Form/PruneForm.php:50 -msgid "Just read messages by user" -msgstr "فقط پیام های خوانده شده توسط مخاطب" - -#: src/Form/PruneForm.php:54 -msgid "Remove read messages by user before selected time" -msgstr "فقط پاکسازی پیام های خوانده شده توسط کاربر قبل از تاریخ انتخابی" - -#: src/Form/PruneForm.php:62 -msgid "Just deleted messages by user" -msgstr "فقط پیام های حذف شده توسط مخاطب" - -#: src/Form/PruneForm.php:66 -msgid "Remove deleted messages by user before selected time" -msgstr "فقط پاکسازی پیام های حذف شده توسط کاربر قبل از تاریخ انتخابی" - -#: src/Form/PruneForm.php:74 -msgid "Prune" -msgstr "پاکسازی" - -#: src/Form/ReplyForm.php:66 src/Form/SendForm.php:77 -msgid "Content" -msgstr "تماس" - -#: src/Form/ReplyForm.php:88 src/Form/SendForm.php:93 -msgid "Send" -msgstr "ارسال" - -#: src/Form/SendForm.php:55 -msgid "Recipient" -msgstr "دریافت کننده" - -#: src/Form/SendForm.php:83 -msgid "Message content" -msgstr "متن پیام" - -#: template/admin/list-index.phtml:4 -msgid "List of messages" -msgstr "فهرست پیام ها" - -#: template/admin/list-index.phtml:19 template/admin/list-index.phtml:40 -#: template/admin/list-index.phtml:47 template/front/index-detail.phtml:28 -#: template/front/index-index.phtml:36 -msgid "From" -msgstr "از" - -#: template/admin/list-index.phtml:21 template/admin/list-index.phtml:41 -#: template/admin/list-index.phtml:59 template/front/index-detail.phtml:28 -#: template/front/index-index.phtml:36 -msgid "To" -msgstr "به" - -#: template/admin/list-index.phtml:23 template/admin/list-index.phtml:42 -msgid "Send on" -msgstr "ارسال شده در تاریخ" - -#: template/admin/list-index.phtml:25 -msgid "ID" -msgstr "شناسه" - -#: template/admin/list-index.phtml:31 -msgid "Full details" -msgstr "اطلاعات کامل" - -#: template/admin/list-index.phtml:38 -msgid "Close" -msgstr "بستن" - -#: template/admin/list-index.phtml:49 template/admin/list-index.phtml:61 -msgid "Name" -msgstr "نام" - -#: template/admin/list-index.phtml:50 template/admin/list-index.phtml:62 -msgid "Identity" -msgstr "هویت" - -#: template/admin/list-index.phtml:51 template/admin/list-index.phtml:63 -msgid "Email" -msgstr "ایمیل" - -#: template/admin/list-index.phtml:52 template/admin/list-index.phtml:64 -msgid "Is read ?" -msgstr "خوانده شده ؟" - -#: template/admin/list-index.phtml:52 template/admin/list-index.phtml:53 -#: template/admin/list-index.phtml:64 template/admin/list-index.phtml:65 -msgid "Yes" -msgstr "بله" - -#: template/admin/list-index.phtml:52 template/admin/list-index.phtml:53 -#: template/admin/list-index.phtml:64 template/admin/list-index.phtml:65 -msgid "No" -msgstr "خیر" - -#: template/admin/list-index.phtml:53 template/admin/list-index.phtml:65 -msgid "Is deleted ?" -msgstr "حذف شده ؟" - -#: template/admin/list-index.phtml:85 -msgid "Message list is empty !" -msgstr "فهرست پیام ها خالی است !" - -#: template/front/_confirm-modal.phtml:5 -msgid "Delete this message?" -msgstr "این پیام حذف شود؟" - -#: template/front/_confirm-modal.phtml:8 template/front/index-detail.phtml:64 -#: template/front/index-index.phtml:55 template/front/notify-detail.phtml:52 -msgid "Once you delete this message, it cannot be undone." -msgstr "شما این پیام را حذف کردید ، این فرایند برگشت پذیر نیست." - -#: template/front/_confirm-modal.phtml:12 -msgid "Delete message" -msgstr "حذف پیام" - -#: template/front/_confirm-modal.phtml:14 -msgid "Cancel" -msgstr "لغو" - -#: template/front/index-detail.phtml:10 template/front/index-index.phtml:13 -#: template/front/notify-detail.phtml:10 template/front/notify-index.phtml:13 -msgid "Private message" -msgstr "پیام شخصی" - -#: template/front/index-detail.phtml:14 template/front/index-index.phtml:17 -#: template/front/notify-detail.phtml:14 template/front/notify-index.phtml:8 -#: template/front/notify-index.phtml:17 -msgid "Notification" -msgstr "آگاهی رسانی" - -#: template/front/index-detail.phtml:45 template/front/index-index.phtml:56 -#: template/front/index-index.phtml:102 template/front/notify-detail.phtml:53 -#: template/front/notify-index.phtml:53 -msgid "Delete" -msgstr "حذف" - -#: template/front/index-index.phtml:8 -msgid "Message" -msgstr "پیام" - -#: template/front/index-index.phtml:70 template/front/index-index.phtml:101 -#: template/front/notify-index.phtml:52 -msgid "Mark as read" -msgstr "به عنوان خوانده شده نشان کن" - -#: template/front/index-index.phtml:76 -msgid "Read" -msgstr "مشاهده" - -#: template/front/index-index.phtml:89 -msgid "No message for you!" -msgstr "هیچ پیامی برای شما وجود ندارد !" - -#: template/front/index-index.phtml:98 template/front/notify-index.phtml:49 -msgid "Checked all" -msgstr "انتخاب همه" - -#: template/front/index-index.phtml:100 template/front/notify-index.phtml:51 -msgid "Massive operation" -msgstr "عملکرد های پیام" - -#: template/front/index-index.phtml:113 -msgid "Once you delete those message, it cannot be undone." -msgstr "شما این پیام را حذف کردید ، این فرایند برگشت پذیر نیست." - -#: template/front/index-send.phtml:9 -msgid "Return message list page" -msgstr "بازگشت به صفحه فهرست پیام ها" - -#: template/front/index-send.phtml:11 -msgid "Write message" -msgstr "نوشتن پیام" - -#: template/front/notify-index.phtml:38 -msgid "No notification for you!" -msgstr "هیچ اطلاع رسانی برای شما وجود ندارد !" - -#~ msgid "This part not finished now !" -#~ msgstr "این بخش هنوز تکمیل نشده است !" - -#~ msgid "Delete these messages?" -#~ msgstr "این پیام ها حذف شوند؟" - -#~ msgid "Once you delete these messages, they cannot be undone." -#~ msgstr "شما این پیام ها را حذف کردید ، این فرایند برگشت پذیر نیست." - -#~ msgid "Delete messages" -#~ msgstr "حذف پیام ها" - -#~ msgid "Message archive" -#~ msgstr "آرشیو پیام ها" - -#~ msgid "" -#~ "<div class=\"alert alert-info message-alert\">No message for you!</div>" -#~ msgstr "" -#~ "<div class=\"alert alert-info message-alert\">هیچ پیامی برای شما نیست !</" -#~ "div>" - -#~ msgid "Messages" -#~ msgstr "پیام ها" - -#~ msgid "" -#~ "<div class=\"alert alert-info message-alert\">No notification for you!</" -#~ "div>" -#~ msgstr "" -#~ "<div class=\"alert alert-info message-alert\">هیچ آگاهی رسانی برای شما " -#~ "نیست !</div>" - -#~ msgid "Notification(%s unread)" -#~ msgstr "آگاهی رسانی (%s خوانده نشده)" - -#~ msgid "Private message(%s unread)" -#~ msgstr "پایام خصوصی (%s خوانده نشده)" - -#~ msgid "Notification(%s unread)" -#~ msgstr "آگاهی رسانی (%s خوانده نشده)" - -#~ msgid "Need login" -#~ msgstr "برای استفاده وارد شوید" - -#~ msgid "New message" -#~ msgstr "پیام جدید" diff --git a/usr/module/message/locale/fa/mail/notification.txt b/usr/module/message/locale/fa/mail/notification.txt deleted file mode 100644 index 8d69753510..0000000000 --- a/usr/module/message/locale/fa/mail/notification.txt +++ /dev/null @@ -1,17 +0,0 @@ -[comment]Get new message[/comment] - -[format]html[/format] - -[subject]New message[/subject] - -[body] -<div style="padding: 1px; direction: rtl;"> - <h3 style="font-size: 1.1em;">Dear %name%</h3> - <div style="padding: 3px 0; margin: 1px; 0">You get new message on %site_name% website from %sender%.</div> - <div style="padding: 3px 0; margin: 1px; 0">Please log into the site to check your messages.</div> - <div style="padding: 3px 0; margin: 1px; 0">Don't reply to this email !</div> - <div style="margin-top: 10px"> - <a href="%site_url%" title="%site_name%">%site_name%</a> - </div> -</div> -[/body] \ No newline at end of file diff --git a/usr/module/message/locale/fr/admin.mo b/usr/module/message/locale/fr/admin.mo deleted file mode 100644 index 98e3b57f0d9b7a2e07aea9a0b0f2e4340b98e305..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 719 zcmaKpJ#Q015QY~BA38cJ3X18`p3mkZ=Asnf1Qg*DCt?s?wA_u)i|k!%cMlSYh9AKn zpn{T$5{U*nTB`gO-t`$Qp@@;58|}?IJFj+5uWh{-h)duG7=x?eEr{_ETnC@P7Wf7( zgYV!9_z5n8U*N+zAx@Ed;NAJ||7YZ=|AHL#Uy<XiAIOl43*g^CX{Cwx#)xypeOlPM zoihbXo=r^)_FgqC#@Yu_tPkt#Md@0@_}W)o1$j`*=j^<;CZ|%%b!$>SnaGi26;P0S zDsWDNtbbQ#x8-0+{d@VXJ2$gImO&_=@@pM0I9s>f>Bh<jIdRJPxeC_hR47-`9(!k7 z?^(6S$yk}Dg>N}wwfLVPr>RSdgJOSUy`N^u$eO?gQ%;t!8~8Z%mUE@e4plSdJcr$9 zlZSG+(M2~?c5>fTw$`S}Y4}oy<b{01hFxc~v|Q^z{dAaaqtYGaV?KFfUG3uw=X9iY zj$+%o_&|AHsxZqbO?zp&DID6?RXpm<<kY$O+jhu!ky(jGnV~fiMYq+OsbL=%K{fk7 a%k{*8j179KtJRkLYTbOszFXI@6TbmKGQws6 diff --git a/usr/module/message/locale/fr/admin.po b/usr/module/message/locale/fr/admin.po deleted file mode 100644 index f3d5ea9f47..0000000000 --- a/usr/module/message/locale/fr/admin.po +++ /dev/null @@ -1,42 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-message\n" -"POT-Creation-Date: 2016-04-28 19:35+0200\n" -"PO-Revision-Date: 2016-04-28 19:37+0200\n" -"Last-Translator: Marc Desrousseaux\n" -"Language-Team: Marc Desrousseaux\n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.7\n" -"X-Poedit-KeywordsList: _a;_t\n" -"X-Poedit-Basepath: ../..\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-SearchPath-0: .\n" - -#: config/module.php:17 -msgid "Message" -msgstr "Message" - -#: config/module.php:19 -msgid "A module to send message" -msgstr "Module de gestion des messages et notifications" - -#: config/navigation.php:16 config/page.php:17 config/permission.php:17 -msgid "List" -msgstr "Liste" - -#: config/navigation.php:26 config/page.php:22 config/permission.php:21 -msgid "Prune" -msgstr "Purger" - -#: config/user.php:20 -msgid "Messages" -msgstr "Messages" - -#~ msgid "Send" -#~ msgstr "Envoyer" - -#~ msgid "Checked all" -#~ msgstr "All Categories" diff --git a/usr/module/message/locale/fr/block.mo b/usr/module/message/locale/fr/block.mo deleted file mode 100644 index b5ce59c4c491492e5c1853228d2dd51524ce4a3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 473 zcmaKo&rSj{5XLcj+M{O=J$Tb8UHrGycoEPLA#P+f-b~pYpaxpfb`>7Pvv20JIGat_ z8<Tu#Cf_$Rzx40;=%+<>Ksq6vk`77dq^c6qFPU9>tIV!aXFo9yFf8B=o!8b#mTFj` z_iBz&`kX<}p$cR`Uj>w`BjRfim(WRA+?5wsXQCqn1>pt1bhTh_ZlrvG%qioSDp)7k zSh<|_(K}mukE+~6BW30#9fu6nYF|LInTy85@t{GExrln!1T=JIyC&R#o6ue_l{U95 zUnu7>+`VQGkTki9W`+(1Cbxw)bIFpa4$(V2qCr<<rWOkwSj-cCLr&eo6K=n)EBr|N sAlb*XaqgAJwF(Q#IB#>_7!zB%9D6m1WHrie;RNYB7AXyapwX!H53zEIJOBUy diff --git a/usr/module/message/locale/fr/block.po b/usr/module/message/locale/fr/block.po deleted file mode 100644 index 278cc19fdc..0000000000 --- a/usr/module/message/locale/fr/block.po +++ /dev/null @@ -1,19 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-message\n" -"POT-Creation-Date: 2016-04-28 19:35+0200\n" -"PO-Revision-Date: 2016-04-28 19:35+0200\n" -"Last-Translator: Marc Desrousseaux\n" -"Language-Team: Marc Desrousseaux\n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.7\n" -"X-Poedit-KeywordsList: _b\n" -"X-Poedit-Basepath: ../..\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-SearchPath-0: .\n" - -#~ msgid "Checked all" -#~ msgstr "All Categories" diff --git a/usr/module/message/locale/fr/default.mo b/usr/module/message/locale/fr/default.mo deleted file mode 100644 index c68669ed1e33a35958b0521264c94ab342366a0d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4674 zcmbuBTWlOx8GsL=Kryr>DU?gNoFolyQqRVAL*j0lL{7X0Cw6VwPH7O5ne3dkhs@3_ zXJ(dcpFl{J`T!zG6bS@EfRHvq;t3?AJh2jwAn{g#3KDM!2_b}lC;0xkt`j>H810#F zXU^?E|8-tJ^w8H8SCjTZ+MnK})GECDW^P>ncu1-D!hgcY;lZ~k^&~tF-v+P1x59P! z4tO2%Q-+)L--Oa1!$;vu@ZIng$WMKT8%wJnz<0tSJOF<RABI0G-v1oFo#$V{55d>q z2jJh~yWk-<k@?5qK{yR%|4Z;Ocm>M-pMr88AIiR8gtFhuP|o)Xya2xq-v@sSW!=BQ zOYi`T&cYUa2Ht|Q{*Pb_-i3&y4j}v?_%M`x4nvV&!_)92oPk?V_PGsZ+#UE~_+u#h z{t~jJ`VBk@{{ThaM_Ek9AA}!;Pryguc_^m43cm_hAwTtdZr{VUe}r>9e;H$m9)1Bu zp4Xx5^EjId4?~gv806^cO!59al=WIr?6?Zw13f6`ehG?vUw{+vOU3h7pv=2ny#E#y zIe!Rc|2xouzk{;xBOFHTs-f6r28vuQDE%u1KLbTyF_iVbR`6ALgy(O<b$Ay}!pCp| zwoqr`JY0ZR;mhz7@Yj%^I*d^l;7KUwir`_GLecweDC@imW&Zb}jQ=wfJDo;&k#`H8 zg4<B!{st7i+=1udPatMde}R}l{S_|4e?jr%MQ(Dg7vXF0(@@5pVKJHaF`CFHXDct! zr^q^fHF&^vGMzjNkI_UPxkNs>K0-S~dy+Owb7<l#k{dLwyu^+tiic@<w(Nl76JoEU zG|4A&y`LtrT3+I>a;7Po_=;Sjb2+bE5)X2TexIOWx=g2{Pt=mdo%pW!CF;)df%w1- zO)l|Av5{P&E7A8;wBxj=Y1wr=)=}W;u8CuJ+r-+MZqzrPnh%2d<t5XJtWoo!Hr7T~ zN9}fMt?{OGFEDOwbYchE-FE%3q2_IS$L||;*$vw!P?vX1`=;@<8}L7fVmhKQF=3(> zOkfgIpxmo`Om_UZe0Nc`x~?CnMH_Y1Vv1m%Nq7;fr3JO*v6i0<)KbiAS<%xM<-r<P z{#{Aqr0S?nd1Ii{*x0-`8+l*Xvd_e*QwkBQ71!R>ZoV)Nam*=o)HBvi{3ui_xduz> zc5%$&eIawz9mw*W(R6#sKp#=hyIrH6kNA~4YILp#QA%I+uCk9lqT8Zb8DMqH!P|23 zjvpk(YB%(1lgRWiO8k!B&LkaQw|>j0`awUXpNo5LsM`VOJbyHBZ<s)5cgJ(XZDWsK zI37QDO2%B!X_#s7gj&VoB2b}kJ#NG)?I*hJhDf4s80L6UXc~J=!9_|9>@#Q0`h7R4 zMyY$A|3~51Y#JKY;=U^))H;sDt?l=GaohDQK=ySh4kxivn<ViuY%yt1Pup)slG?D; zgwEWhM}(>k6METAcZh+#V^GGFQ}eMn=tgAiU@Ef@c9={Mu^y$9D03w|snbxKk-8?~ zA-5366i4;Lz8m;^hWsb3KW2{WCRW#R0yfdTOr6C3xJsuA<!DijY@FwuQsB5$NV4N5 z`55tM@he%faPdqb5}!rF8k;@H9j`;WAU-8H8%o@+6XA7OIQlHX;w*X23&zIuHuakC z6!AZ?wz}zD#!fQLS-{PjdUkr|j5B@OnVr)!&o-Yq{q*$g^fUvVb<_7{fd`ITcH_j^ zv~Cy&ZW7t1CXclBf{AUE#<6kJTNBHKRElk#P2+YSG@z+Fc4B2|rB#bQ)0mzpGODvV z=pk-mZY8IB0m=9rIl{HENzPx}Ty*B@aUxB}Sf>@XBhL@Fn|khspG>^yeB6YR&qU0% z$asY8Ok=KbmY)34xoQTVkE|C<c5Ldct#ezZ?z}`P=()*GQ#Tr?8jZSRgCx~9mvdp7 zI+vzebHkvKoi!#p(@dRE)Fg@r(N>iJid2~B(J&beb)5Ek*6)snB>d5^<A;7iChkgX zZlY2hP{pcjKHqnFe~p-?av4&kA??Pg?VB()Q;f51Uwf01y9Xpr&yXt9K31s<*?btL z0l}~_8cLSM-sniPRiYM+Wrd=mrD`LWOvaY~G#RlFX3v*pZCfy^70P*}u#MHV(XgC0 z8eUY(=|#@se=g0AyZfYLYU#OF2a{>y6C`+WN+9nuDL`NMj~3$^bW!V3iXXdLs#=$r z4N|q*8x8ZyCray5CQMn|N_}WAt<JuXpKScqvYTZ!*{B?rS*P#wLW*9O7OJH{hm(9= zXg6)Abwcb(-Af{$k@LGcDm_plUqD9c9!Z9?NaC=N)#J*P+9Yf$#+Ub%?RRe~9b?6D zZ0qr&`F~W<FbdJ>iOf$s5y>`ib2mpc{7pow{YaZm2R}?lLmW6sHNM?5=`HNYyh$po zcxz+-wJM{$!G+2X7=o^kJC=`9b&1CR>PsO%r#_+9QcEez?zk#Oxi{X`vd;%6Su*iM zmzdz8j;UP{UfH|wWELCqd{&kWAPV*5n<4PK)T;f~s>0z7EwXMBoKTX%=)1CklxH!O zl%{*arxo@i@(VHE$7Mwgl@TA5gtGCHmx3xp@>eK6Kt1HZC>RazbAx2k<QwvxRmB!U z5-(17bf?RQ*SxwmmLHbI#k-lGMSPI*eO7m7L0MG)|By0UZHuMGHdU*suQt=dLB;5M zo10I9DkSme(pshMNId~6*ll-Xr6$zoZ|HKP(Qw-h@)Vf|J)73arp{_&w_-kWnQ&Z) b%xNa&V^H#7{uyyk?vSsFknd~?266Fk<Ovd` diff --git a/usr/module/message/locale/fr/default.po b/usr/module/message/locale/fr/default.po deleted file mode 100644 index 81452797e0..0000000000 --- a/usr/module/message/locale/fr/default.po +++ /dev/null @@ -1,315 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-message\n" -"POT-Creation-Date: 2016-04-28 19:34+0200\n" -"PO-Revision-Date: 2016-04-28 19:34+0200\n" -"Last-Translator: Marc Desrousseaux\n" -"Language-Team: Marc Desrousseaux\n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.7\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: ../..\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-SearchPath-0: .\n" - -#: src/Api/Breadcrumbs.php:47 -msgid "Archive" -msgstr "Archive" - -#: src/Api/Breadcrumbs.php:53 -msgid "Message detail" -msgstr "Détail du message" - -#: src/Api/Breadcrumbs.php:59 src/Controller/Front/IndexController.php:326 -msgid "Send message" -msgstr "Envoyer le message" - -#: src/Controller/Admin/PruneController.php:24 -msgid "" -"You can prune all old message, select time to remove messages before that " -"time and you can filter list of removed messages by this from option." -msgstr "" -"Tu peux purger les anciens messages, sélectionne la date avant laquelle les " -"messages seront supprimés. Tu peux également filtrer la liste des messages à " -"supprimer en sélectionnant l'une des options de sélection." - -#: src/Controller/Admin/PruneController.php:41 -#, php-format -msgid "%s old messages removed" -msgstr "%s anciens messages ont été supprimés définitivement" - -#: src/Controller/Admin/PruneController.php:43 -msgid "No messages removed ! check your selected filter and try again" -msgstr "" -"Aucun message supprimé ! Vérifie tes filtres de sélection et essaye de " -"nouveau." - -#: src/Controller/Admin/PruneController.php:48 -msgid "Prune old messages" -msgstr "Purger les anciens messages" - -#: src/Controller/Front/IndexController.php:184 -#: src/Controller/Front/NotifyController.php:43 -#, php-format -msgid "Private message ( <span class=\"label label-danger\">%s</span> unread )" -msgstr "Message Privé ( <span class=\"label label-danger\">%s</span> non lu )" - -#: src/Controller/Front/IndexController.php:188 -#: src/Controller/Front/NotifyController.php:47 -#, php-format -msgid "Notification ( <span class=\"label label-danger\">%s</span> unread )" -msgstr "Notification ( <span class=\"label label-danger\">%s</span> non lu)" - -#: src/Controller/Front/IndexController.php:224 -msgid "Username is invalid, please try again." -msgstr "Le nom de compte utilisateur est invalide, merci d'essayer de nouveau." - -#: src/Controller/Front/IndexController.php:240 -#: src/Controller/Front/IndexController.php:377 -msgid "Send failed, please try again." -msgstr "Envoi non effectué, merci d'essayer de nouveau" - -#: src/Controller/Front/IndexController.php:275 -msgid "User" -msgstr "Utilisateur" - -#: src/Controller/Front/IndexController.php:279 -msgid "not found" -msgstr "non trouvé" - -#: src/Controller/Front/IndexController.php:285 -msgid "Sorry, you can't send message to yourself." -msgstr "Désolé, tu ne peux pas t'envoyer un message à toi-même." - -#: src/Controller/Front/IndexController.php:297 -msgid "An error occurred, please try again." -msgstr "Une erreur est survenue, merci d'essayer de nouveau." - -#: src/Form/PruneForm.php:34 -msgid "All messages Before" -msgstr "Tous les messages Avant" - -#: src/Form/PruneForm.php:50 -msgid "Just read messages by user" -msgstr "Uniquement les messages lus par l'utilisateur" - -#: src/Form/PruneForm.php:54 -msgid "Remove read messages by user before selected time" -msgstr "Supprimer les messages lus par les utilisateurs avant la date limite" - -#: src/Form/PruneForm.php:62 -msgid "Just deleted messages by user" -msgstr "Uniquement les messages supprimés par l'utilisateur" - -#: src/Form/PruneForm.php:66 -msgid "Remove deleted messages by user before selected time" -msgstr "" -"Supprimer les messages supprimés par les utilisateurs avant la date limite" - -#: src/Form/PruneForm.php:74 -msgid "Prune" -msgstr "Purge" - -#: src/Form/ReplyForm.php:66 src/Form/SendForm.php:77 -msgid "Content" -msgstr "Contenu" - -#: src/Form/ReplyForm.php:88 src/Form/SendForm.php:93 -msgid "Send" -msgstr "Envoyer" - -#: src/Form/SendForm.php:55 -msgid "Recipient" -msgstr "Destinataire" - -#: src/Form/SendForm.php:83 -msgid "Message content" -msgstr "Contenu du message" - -#: template/admin/list-index.phtml:4 -msgid "List of messages" -msgstr "Liste des messages" - -#: template/admin/list-index.phtml:19 template/admin/list-index.phtml:40 -#: template/admin/list-index.phtml:47 template/front/index-detail.phtml:28 -#: template/front/index-index.phtml:36 -msgid "From" -msgstr "De" - -#: template/admin/list-index.phtml:21 template/admin/list-index.phtml:41 -#: template/admin/list-index.phtml:59 template/front/index-detail.phtml:28 -#: template/front/index-index.phtml:36 -msgid "To" -msgstr "A" - -#: template/admin/list-index.phtml:23 template/admin/list-index.phtml:42 -msgid "Send on" -msgstr "Envoyé le" - -#: template/admin/list-index.phtml:25 -msgid "ID" -msgstr "ID" - -#: template/admin/list-index.phtml:31 -msgid "Full details" -msgstr "En détail" - -#: template/admin/list-index.phtml:38 -msgid "Close" -msgstr "Fermer" - -#: template/admin/list-index.phtml:49 template/admin/list-index.phtml:61 -msgid "Name" -msgstr "Nom" - -#: template/admin/list-index.phtml:50 template/admin/list-index.phtml:62 -msgid "Identity" -msgstr "Identité" - -#: template/admin/list-index.phtml:51 template/admin/list-index.phtml:63 -msgid "Email" -msgstr "Email" - -#: template/admin/list-index.phtml:52 template/admin/list-index.phtml:64 -msgid "Is read ?" -msgstr "Lu?" - -#: template/admin/list-index.phtml:52 template/admin/list-index.phtml:53 -#: template/admin/list-index.phtml:64 template/admin/list-index.phtml:65 -msgid "Yes" -msgstr "Oui" - -#: template/admin/list-index.phtml:52 template/admin/list-index.phtml:53 -#: template/admin/list-index.phtml:64 template/admin/list-index.phtml:65 -msgid "No" -msgstr "Non" - -#: template/admin/list-index.phtml:53 template/admin/list-index.phtml:65 -msgid "Is deleted ?" -msgstr "Supprimé?" - -#: template/admin/list-index.phtml:85 -msgid "Message list is empty !" -msgstr "La liste de message est vide !" - -#: template/front/_confirm-modal.phtml:5 -msgid "Delete this message?" -msgstr "Supprimer ce message?" - -#: template/front/_confirm-modal.phtml:8 template/front/index-detail.phtml:64 -#: template/front/index-index.phtml:55 template/front/notify-detail.phtml:52 -msgid "Once you delete this message, it cannot be undone." -msgstr "" -"Une fois la suppression de ce message effectuée, tu ne peux pas l'annuler." - -#: template/front/_confirm-modal.phtml:12 -msgid "Delete message" -msgstr "Supprimer ce message" - -#: template/front/_confirm-modal.phtml:14 -msgid "Cancel" -msgstr "Annuler" - -#: template/front/index-detail.phtml:10 template/front/index-index.phtml:13 -#: template/front/notify-detail.phtml:10 template/front/notify-index.phtml:13 -msgid "Private message" -msgstr "Message privé" - -#: template/front/index-detail.phtml:14 template/front/index-index.phtml:17 -#: template/front/notify-detail.phtml:14 template/front/notify-index.phtml:8 -#: template/front/notify-index.phtml:17 -msgid "Notification" -msgstr "Notification" - -#: template/front/index-detail.phtml:45 template/front/index-index.phtml:56 -#: template/front/index-index.phtml:102 template/front/notify-detail.phtml:53 -#: template/front/notify-index.phtml:53 -msgid "Delete" -msgstr "Supprimer" - -#: template/front/index-index.phtml:8 -msgid "Message" -msgstr "Message" - -#: template/front/index-index.phtml:70 template/front/index-index.phtml:101 -#: template/front/notify-index.phtml:52 -msgid "Mark as read" -msgstr "Marquer comme lu" - -#: template/front/index-index.phtml:76 -msgid "Read" -msgstr "Lire" - -#: template/front/index-index.phtml:89 -msgid "No message for you!" -msgstr "Il n'y a aucun message pour toi !" - -#: template/front/index-index.phtml:98 template/front/notify-index.phtml:49 -msgid "Checked all" -msgstr "Sélectionner Tout" - -#: template/front/index-index.phtml:100 template/front/notify-index.phtml:51 -msgid "Massive operation" -msgstr "Opération de masse" - -#: template/front/index-index.phtml:113 -msgid "Once you delete those message, it cannot be undone." -msgstr "" -"Une fois la suppression du message effectuée, tu ne peux pas l'annuler." - -#: template/front/index-send.phtml:9 -msgid "Return message list page" -msgstr "Retourner à la page de liste des messages" - -#: template/front/index-send.phtml:11 -msgid "Write message" -msgstr "Ecrire un message" - -#: template/front/notify-index.phtml:38 -msgid "No notification for you!" -msgstr "Il n'y a aucune notification pour toi !" - -#~ msgid "This part not finished now !" -#~ msgstr "Cette fonctionnalité n'est pas encore finalisée !" - -#~ msgid "Delete these messages?" -#~ msgstr "Supprimer ces messages?" - -#~ msgid "Once you delete these messages, they cannot be undone." -#~ msgstr "" -#~ "Une fois que vous avez supprimé ces messages, l'action ne peut être " -#~ "annulée." - -#~ msgid "Delete messages" -#~ msgstr "Supprimer les messages" - -#~ msgid "Message archive" -#~ msgstr "Archive des messages" - -#~ msgid "" -#~ "<div class=\"alert alert-info message-alert\">No message for you!</div>" -#~ msgstr "" -#~ "<div class=\"alert alert-info message-alert\">Aucun message pour vous !</" -#~ "div>" - -#~ msgid "Messages" -#~ msgstr "Messages" - -#~ msgid "" -#~ "<div class=\"alert alert-info message-alert\">No notification for you!</" -#~ "div>" -#~ msgstr "" -#~ "<div class=\"alert alert-info message-alert\">Aucune notification pour " -#~ "vous !</div>" - -#~ msgid "Private message(%s unread)" -#~ msgstr "Messages privés (%s non lus)" - -#~ msgid "Notification(%s unread)" -#~ msgstr "Notifications(%s non lues)" - -#~ msgid "Notification(%s unread)" -#~ msgstr "Notifications(%s non lues)" diff --git a/usr/module/message/locale/fr/mail/notification.txt b/usr/module/message/locale/fr/mail/notification.txt deleted file mode 100644 index 915eeeff54..0000000000 --- a/usr/module/message/locale/fr/mail/notification.txt +++ /dev/null @@ -1,17 +0,0 @@ -[comment]Get new message[/comment] - -[format]html[/format] - -[subject]Nouveau message reçu sur %site_name%[/subject] - -[body] -<div style="padding: 1px; direction: ltr;"> - <h3 style="font-size: 1.1em;">Cher %name%,</h3> - <div style="padding: 3px 0; margin: 1px; 0">Tu as reçu un nouveau message de la part de %sender% sur le site %site_name% .</div> - <div style="padding: 3px 0; margin: 1px; 0">Connecte-toi sur le site pour lire tes messages.</div> - <div style="padding: 3px 0; margin: 1px; 0">Merci de ne pas répondre à ce mail !</div> - <div style="margin-top: 10px"> - <a href="%site_url%" title="%site_name%">%site_name%</a> - </div> -</div> -[/body] \ No newline at end of file diff --git a/usr/module/message/locale/zh-cn/admin.mo b/usr/module/message/locale/zh-cn/admin.mo deleted file mode 100644 index 569774b2aaa22b6f439438c4e0806af44149cbe3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 609 zcmZvZ&rj4q6vs!!AL)^k2V>?=rnU>nI)G6Dk+2&ZS&cDG$ZY%A9n;R#nJGVRVmx_( zXdoJm2TpSH#=(pKi5Fq_-|*F4vN7=`pM2Z*zVq_U%&+mWLxMGi+(71#%Sen=RUp@q zSIAZ59dZr%fPA_@$QRU`$katbuAr_B^#v-93CiE9_Ft;L?$cbSWd_t~YC)wm2Wv$K zNb_H{Br^IXB#y15>=_s<wc<3AZ0Pr*$1S#CKsX$*Md5(cS`bdMFl4om26y<>?TMfs z1ZZSWU{h8L{_mR^_!`1G)-pobOgL>g&BP`K1d~ZRm*M#~$gmdH?sak@Ge6P!U9TZj zr^NKE1tRCvYpyhxMrlJo@D{Xkpm6a{fe9UKyIVyjq?)BkR~QR!{%PwWtB-tDfDJHg zNhLa!s>5l$EuHtAErS9xNET^GrK6!g?a$z3@XJ<VXG@#ZHl%f&u8Z0A>ez7jKv*b* z>vHOknrk3T(v7gq0!|lsye!?LvK=R-bvkE-j7w|c!Gp!;7f<>J$EQE`dIu+G`|nSG c9`$y=_dmbw9Uq;2{rLO!8`A%_i`{ei11rV2y8r+H diff --git a/usr/module/message/locale/zh-cn/admin.po b/usr/module/message/locale/zh-cn/admin.po deleted file mode 100644 index 6e5553869b..0000000000 --- a/usr/module/message/locale/zh-cn/admin.po +++ /dev/null @@ -1,38 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-message\n" -"POT-Creation-Date: 2013-11-21 09:46+0800\n" -"PO-Revision-Date: 2013-11-21 09:47+0800\n" -"Last-Translator: lavenderli <lisibei1212@gmail.com>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.7\n" -"X-Poedit-KeywordsList: _a;_t\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: D:\\GitHub\\custom-pi\\usr\\module\\message\n" - -#: D:\GitHub\custom-pi\usr\module\message/config/module.php:17 -msgid "Message" -msgstr "私信" - -#: D:\GitHub\custom-pi\usr\module\message/config/module.php:19 -msgid "A module to send message" -msgstr "用于收发信息的模块。" - -#: D:\GitHub\custom-pi\usr\module\message/config/user.php:20 -msgid "Messages" -msgstr "私信" - -#~ msgid "Private message" -#~ msgstr "私信" - -#~ msgid "Notification" -#~ msgstr "通知" - -#~ msgid "New message" -#~ msgstr "新私信" - -#~ msgid "Checked all" -#~ msgstr "All Categories" diff --git a/usr/module/message/locale/zh-cn/block.mo b/usr/module/message/locale/zh-cn/block.mo deleted file mode 100644 index 22536403eca4dc836d81e9ad99f79daf3bd9e4db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 470 zcmaJ-O-sW-5LNV)qh}9$@TMCROEIn=h_y<!#h_6<1Z0|w&6Z|2>~4(xA>RCL{uU<| z&CP+w@;=yk%-7cD#~RH#VVkf+*dXi?+KC9CWFFDmX8tBNdXAanqntmXu~I9+V#!Oi z7G~(hcL^UD1V;wH1c!nh1YwVdArAu<_C!D04Wb~RAiu{q*?#bEZVcA(#DKC3aM}o# zfNW5)8wqO0PTUWhx8&Sesb)nDzBV&IQ)k|o)S6oH1fdknn~WyIu65`K-aspdiWV#@ zYU=Ra?N<ws>X>B(7>n-oF}dPVmuri>qTxf8>73RH7EPt|p7}K@G^>WO##}lU`hEY9 zoE7D_xNNk^?O0kT*vqtYF2G_1t`N-c#0LbE6*0*?5NsgQ2FfaJnkFsjB52aunzYn; Ky}<PM_-o(v7mGUp diff --git a/usr/module/message/locale/zh-cn/block.po b/usr/module/message/locale/zh-cn/block.po deleted file mode 100644 index 943de15409..0000000000 --- a/usr/module/message/locale/zh-cn/block.po +++ /dev/null @@ -1,17 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-message\n" -"POT-Creation-Date: 2013-11-10 13:58+0800\n" -"PO-Revision-Date: 2013-11-10 13:58+0800\n" -"Last-Translator: Taiwen Jiang <taiwenjiang@tsinghua.org.cn>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.7\n" -"X-Poedit-KeywordsList: _b\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: C:\\wamp\\www\\master\\usr\\module\\message\n" - -#~ msgid "Checked all" -#~ msgstr "All Categories" diff --git a/usr/module/message/locale/zh-cn/default.mo b/usr/module/message/locale/zh-cn/default.mo deleted file mode 100644 index 880b24372d58d2bc045f2926d73d722470b2ab65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2687 zcmbW1U2GIp6vwZK9~2ZpMf|>?qG)H?Eh&-(iWN#lTWFxD4^7B)_O>0Eo!QLH78?`O zVxX;|DMbpdRH3n8Lt;PBw9ryWc;ngl%8NVG-9$rt&}aW=<}R&mdBB_5`OUre+;h+Q z-*flQ%Ei45?RETK!f)$CjFp0Qi||5=KFnAJ7y~~9kAP%*3w#Wm1|J3Qf=j`F<oKe+ z;dl}FB*s^O%RvsV0;AwFU?qr$)#0@aRKXRX36gy)_&9hHECMs&YH$F24x9ovfxm$z z;Ic=;b=$!g(BBI#0S|$+&IMu0y1-Y!Qy}d-3cd~A04eo6NOpgK>%hOjC&1N6mi(;) zzkya!upIr{5QDfB!9ELCgXC8OVZu_9M<l<HJO+~83CRrjBKnskZ-KP_4oG@<Ald&d zxd_3~{Bn@SSAnG8Ym%klM)WHsKL^Qv7+eXCfq2+$+5Z)!c^{-W{si%`B@mzVc^aho zGRX>%bgTl&?yzJUggn97KLwH|v>#*)&Sfn~b+86M%B#@mOrI}wz*prr+=Y38lqbc2 zQVVL4_N6nUIH>X9jaVfKRIAh|r<a2-d7ko{K=nJjQGL>#pgN!i$#FpvdNbDy)p541 zRSjXgJa{X**<kUca2&N!D8bO$vOV`kc!Op07Aw7G>jtbZdr&W?<?0Q(rn<Ui&UIC8 za$(zWZ)sZEwnd_trwpMwg1dGLR~uE`jIeTBYtowq+o778FxZYJp&b?pgpO~^bcN}% zox%{VkSJs_r|T5@Zj-<UGF@l;%&_hhMz^zFwv}Yns(qNN4!4DxK*w<q2Dehe4w7Nj zp<-N<QOLf-_6WphSdF^L_RPxutv4Lb(<XUaKX0Niz86W7+B^~D#Qz&@G4)%xrkaqI z*9*8ySf+@u`O9XqDdxJnz>*qUZ&uxVO0YS7inb8cKB4I;os`}u+_Y^LbmE5YxIBfj zVf%%d2wuEF)s2Nul57e~*?!BmTZ)5Jk<ObgcV^9U*P<EQ5k^CV)mrR;BkbU1s!73- zn{GC%hQ46Id}8af(juW6Ea-#;twTa{mE8&DV_`d}$2hOi6<G;IHG6B79XK2+RAncW ziSv?ZY@-s3DJ3x;i^WSy--&LHMq#Mz6U{m~SlDh;Xji2=u2O5OremnCWyiUpHX}!2 z8#><#<@9=?$4X))?=>bNSwypvWkpr0*_ftlSS!?IoEKH^uCADgHWrB%$(mPcTT+P7 z6`#2qQU)%{7Opj^5X{|npmvwCdB%<cXb`qiVQN-FHyh)8bG_~seX3LnlS-K)tFc4^ zMG}jYM&89t*i}9fEk`Un;Z)(2<NV;kEeFNS<omd$Db;O?^T^ELexc&F)?iqP#`(^8 zU8U}Rkgl)O(vE8-m6TqWcI>*Ol}H<+t|0sa{iFC-`u)C6|ICO#*5S7e|BwHqdmi$w z-%g*uC_Q-X6ZzAbyVp<ThR5^mUAf`j-&>C|Z|aoa|HJf;ZP}as%<DdbO__IWF#qKs z^Nt_$hORNM<3c_&AW<+3#$;!@e<(LJ5Sry~X0j9K!il@r&$Bsm{&)Q|b6$5(uKhCe zFSO@|MzU8Yyzwi!;YsFqUdy+4`(Jlur}|iEEhCZp<@;K5m)fQ?lipM>3sdB{%YNTw zEMLFCNcL*0fA-SsP)LO!(okb><hXzKg8y@`-+9A3_dV%yzct9<zH4NBA!dcdnSXjL zJ2{q}m|$@4b&SZgI?m?$p>uanzO_xl8yL;~a&g`%b@xc;{#T>^Po0?ej}C@0Pfunb uqc=Vp`U&lVqwVhTZnU!L(}RA;xP*7Ii&ph^%-i93rm#cbWs;#|g#8PxXl&pB diff --git a/usr/module/message/locale/zh-cn/default.po b/usr/module/message/locale/zh-cn/default.po deleted file mode 100644 index 30c2cd3569..0000000000 --- a/usr/module/message/locale/zh-cn/default.po +++ /dev/null @@ -1,186 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-message\n" -"POT-Creation-Date: 2013-11-21 11:25+0800\n" -"PO-Revision-Date: 2013-11-21 11:26+0800\n" -"Last-Translator: lavenderli <lisibei1212@gmail.com>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.7\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: D:\\GitHub\\custom-pi\\usr\\module\\message\n" - -#: D:\GitHub\custom-pi\usr\module\message/src/Controller/Front/IndexController.php:183 -#: D:\GitHub\custom-pi\usr\module\message/src/Controller/Front/NotifyController.php:41 -#, php-format -msgid "Private message(%s unread)" -msgstr "私信 (%s未读) " - -#: D:\GitHub\custom-pi\usr\module\message/src/Controller/Front/IndexController.php:187 -#, php-format -msgid "Notification(%s unread)" -msgstr "通知 (%s未读)" - -#: D:\GitHub\custom-pi\usr\module\message/src/Controller/Front/IndexController.php:208 -msgid "Need login" -msgstr "需要登录" - -#: D:\GitHub\custom-pi\usr\module\message/src/Controller/Front/IndexController.php:233 -msgid "Username is invalid, please try again." -msgstr "用户名无效,请重试。" - -#: D:\GitHub\custom-pi\usr\module\message/src/Controller/Front/IndexController.php:249 -#: D:\GitHub\custom-pi\usr\module\message/src/Controller/Front/IndexController.php:376 -msgid "Send failed, please try again." -msgstr "发送失败,请重试。" - -#: D:\GitHub\custom-pi\usr\module\message/src/Controller/Front/IndexController.php:283 -msgid "User" -msgstr "用户" - -#: D:\GitHub\custom-pi\usr\module\message/src/Controller/Front/IndexController.php:287 -msgid "not found" -msgstr "未找到" - -#: D:\GitHub\custom-pi\usr\module\message/src/Controller/Front/IndexController.php:293 -msgid "Sorry, you can't send message to yourself." -msgstr "抱歉,您无法给自己发送私信。" - -#: D:\GitHub\custom-pi\usr\module\message/src/Controller/Front/IndexController.php:305 -msgid "An error occurred, please try again." -msgstr "出错,请重试。" - -#: D:\GitHub\custom-pi\usr\module\message/src/Controller/Front/IndexController.php:334 -msgid "Send message" -msgstr "发私信" - -#: D:\GitHub\custom-pi\usr\module\message/src/Controller/Front/NotifyController.php:45 -#, php-format -msgid "Notification(%s unread)" -msgstr "通知 (%s未读)" - -#: D:\GitHub\custom-pi\usr\module\message/src/Form/ReplyForm.php:66 -#: D:\GitHub\custom-pi\usr\module\message/src/Form/SendForm.php:77 -msgid "Content" -msgstr "内容" - -#: D:\GitHub\custom-pi\usr\module\message/src/Form/ReplyForm.php:86 -#: D:\GitHub\custom-pi\usr\module\message/src/Form/SendForm.php:91 -msgid "Send" -msgstr "发送" - -#: D:\GitHub\custom-pi\usr\module\message/src/Form/SendForm.php:55 -msgid "Recipient" -msgstr "收件人" - -#: D:\GitHub\custom-pi\usr\module\message/src/Form/SendForm.php:83 -msgid "Message content" -msgstr "私信内容" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-archive.phtml:3 -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-detail.phtml:11 -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-index.phtml:9 -#: D:\GitHub\custom-pi\usr\module\message/template/front/notify-index.phtml:10 -msgid "Private message" -msgstr "私信" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-archive.phtml:7 -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-detail.phtml:14 -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-index.phtml:13 -#: D:\GitHub\custom-pi\usr\module\message/template/front/notify-detail.phtml:10 -#: D:\GitHub\custom-pi\usr\module\message/template/front/notify-index.phtml:13 -msgid "Archive" -msgstr "归档私信" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-detail.phtml:62 -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-index.phtml:50 -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-index.phtml:99 -#: D:\GitHub\custom-pi\usr\module\message/template/front/notify-detail.phtml:62 -#: D:\GitHub\custom-pi\usr\module\message/template/front/notify-index.phtml:47 -#: D:\GitHub\custom-pi\usr\module\message/template/front/notify-index.phtml:103 -msgid "Delete" -msgstr "删除" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-index.phtml:63 -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-index.phtml:98 -#: D:\GitHub\custom-pi\usr\module\message/template/front/notify-index.phtml:63 -#: D:\GitHub\custom-pi\usr\module\message/template/front/notify-index.phtml:102 -msgid "Mark as read" -msgstr "标记为已读" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-index.phtml:71 -msgid "To" -msgstr "发往" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-index.phtml:71 -msgid "From" -msgstr "发自" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-index.phtml:85 -msgid "<div class=\"alert alert-info message-alert\">No message for you!</div>" -msgstr "<div class=\"alert alert-info message-alert\">没有新消息</div>" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-index.phtml:95 -#: D:\GitHub\custom-pi\usr\module\message/template/front/notify-index.phtml:99 -msgid "Checked all" -msgstr "全部" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-index.phtml:97 -#: D:\GitHub\custom-pi\usr\module\message/template/front/notify-index.phtml:101 -msgid "Massive operation" -msgstr "批量操作" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-send.phtml:20 -msgid "Return message list page" -msgstr "回到私信列表" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/index-send.phtml:22 -msgid "Write message" -msgstr "写私信" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/notify-detail.phtml:8 -msgid "Messages" -msgstr "私信" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/notify-index.phtml:88 -msgid "" -"<div class=\"alert alert-info message-alert\">No notification for you!</div>" -msgstr "<div class=\"alert alert-info message-alert\">没有新通知</div>" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/_confirm-modal.phtml:4 -msgid "Delete this message?" -msgstr "确认删除这条私信?" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/_confirm-modal.phtml:7 -msgid "Once you delete this message, it cannot be undone." -msgstr "一旦确认删除,这条消息将无法找回。" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/_confirm-modal.phtml:11 -msgid "Delete message" -msgstr "删除私信" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/_confirm-modal.phtml:13 -#: D:\GitHub\custom-pi\usr\module\message/template/front/_confirm-modal.phtml:29 -msgid "Cancel" -msgstr "取消" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/_confirm-modal.phtml:20 -msgid "Delete these messages?" -msgstr "确认删除这些私信?" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/_confirm-modal.phtml:23 -msgid "Once you delete these messages, they cannot be undone." -msgstr "一旦确认删除,这些消息将无法找回。" - -#: D:\GitHub\custom-pi\usr\module\message/template/front/_confirm-modal.phtml:27 -msgid "Delete messages" -msgstr "删除私信" - -#~ msgid "Notification" -#~ msgstr "系统通知" - -#~ msgid "New message" -#~ msgstr "发消息" diff --git a/usr/module/message/sql/mysql.sql b/usr/module/message/sql/mysql.sql deleted file mode 100644 index ddb87085cd..0000000000 --- a/usr/module/message/sql/mysql.sql +++ /dev/null @@ -1,33 +0,0 @@ -CREATE TABLE `{message}` ( - `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, - `uid_from` INT(11) UNSIGNED NOT NULL DEFAULT 0, - `uid_to` INT(11) UNSIGNED NOT NULL DEFAULT 0, - `content` TEXT, - `time_send` INT(11) UNSIGNED NOT NULL DEFAULT 0, - `is_read_from` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, - `is_read_to` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, - `is_deleted_from` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, - `is_deleted_to` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, - `conversation` VARCHAR(32) NOT NULL DEFAULT '', - PRIMARY KEY (`id`), - KEY `conversation` (`conversation`), - KEY `uid_from` (`uid_from`), - KEY `uid_to` (`uid_to`), - KEY `time_send` (`time_send`), - KEY `select_1` (`uid_from`, `is_deleted_from`), - KEY `select_2` (`uid_to`, `is_deleted_to`), - KEY `unread` (`uid_to`, `is_deleted_to`, `is_read_to`) -); - -CREATE TABLE `{notification}` ( - `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, - `uid` INT(11) UNSIGNED NOT NULL DEFAULT 0, - `subject` VARCHAR(255) NOT NULL, - `content` TEXT, - `tag` VARCHAR(64) NOT NULL DEFAULT '', - `time_send` INT(11) UNSIGNED NOT NULL DEFAULT 0, - `is_read` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, - `is_deleted` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, - - PRIMARY KEY (`id`) -); \ No newline at end of file diff --git a/usr/module/message/src/Api/Api.php b/usr/module/message/src/Api/Api.php deleted file mode 100644 index 6fd7d021ce..0000000000 --- a/usr/module/message/src/Api/Api.php +++ /dev/null @@ -1,458 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Message\Api; - -use Pi; -use Pi\Application\Api\AbstractApi; -use Zend\Db\Sql\Predicate\Expression; - -/** - * Message manipulation API - * - * Usage: - * - * ``` - * // Send message to a user - * Pi::user()->message()->send(1, 'message 2=>1', 2); - * or - * Pi::api('api', 'message')->send(1, 'message 2=>1', 2); - * // Send notification to a user - * Pi::user()->message() - * ->notify(1, 'notification to 1', 'subject', 'announcement'); - * or - * Pi::api('api', 'message')->notify( - * 1, - * 'notification to 1', - * 'subject', - * 'announcement' - * ); - * // Get message total count of current user - * Pi::user()->message()->getCount(1); - * or - * Pi::api('api', 'message')->getCount(1); - * // Get message alert (new) count of current user - * Pi::user()->message()->getAlert(1); - * or - * Pi::api('api', 'message')->getAlert(1); - * // get Unread - * Pi::api('api', 'message')->getUnread($uid, $type); - * // - * Pi::api('api', 'message')->setConversation(); - * - * @author Xingyu Ji <xingyu@eefocus.com> - */ -class Api extends AbstractApi -{ - /** - * Send a message - * - * @param int $to - * @param string $message - * @param int $from - * @param string $conversation - * @return bool - */ - public function send($to, $message, $from, $conversation = '') - { - $result = true; - $model = Pi::model('message', $this->getModule()); - - $conversation = empty($conversation) ? $this->setConversation() : $conversation; - $messageData = array( - 'uid_from' => $from, - 'uid_to' => $to, - 'is_read_to' => 0, - 'is_read_from' => 1, - 'content' => $message, - 'time_send' => time(), - 'conversation' => $conversation, - ); - $row = $model->createRow($messageData); - try { - $row->save(); - } catch (\Exception $e) { - $result = false; - } - if ($result) { - //audit log - Pi::service('audit')->log('message', array($from, $to)); - } - - // increase message alert - $this->increaseAlert($to); - - // Send mail - $this->sendMail($to, $message, $from); - - return $result; - } - - /** - * Send a notification - * - * @param int $to - * @param string $message - * @param string $subject - * @param string $tag - * @return int|bool - */ - public function notify($to, $message, $subject, $tag = '') - { - $message = array( - 'uid' => $to, - 'subject' => $subject, - 'content' => $message, - 'tag' => $tag, - 'time_send' => time(), - ); - $model = Pi::model('notification', $this->getModule()); - $row = $model->createRow($message); - $row->save(); - if (!$row->id) { - return false; - } - - return $row->id; - } - - /** - * Get total count - * - * @param int $uid - * @param bool $includeRead Include read messages - * @param string $type Message, notification, all - * - * @return int - */ - public function getCount($uid, $includeRead = false, $type = '') - { - switch ($type) { - case 'message': - case 'notification': - break; - default: - $type = ''; - break; - } - if ('notification' == $type) { - $where = array( - 'uid' => $uid, - 'is_deleted' => 0 - ); - if (!$includeRead) { - $where['is_read'] = 0; - } - $model = Pi::model('notification', $this->getModule()); - /* - $select = $model->select(); - $select->columns(array( - 'count' => Pi::db()->expression('count(*)'), - )); - $select->where($where); - $row = $model->selectWith($select)->current(); - $count = (int) $row['count']; - */ - } elseif ('message' == $type) { - $whereTo = array( - 'uid_to' => $uid, - 'is_deleted_to' => 0, - ); - $whereFrom = array( - 'uid_from' => $uid, - 'is_deleted_from' => 0, - ); - if (!$includeRead) { - $whereTo['is_read_to'] = 0; - $whereFrom['is_read_from'] = 0; - } - - $where = Pi::db()->where(); - $where->addPredicate(Pi::db()->where($whereTo)); - $where->orPredicate(Pi::db()->where($whereFrom)); - $model = Pi::model('message', $this->getModule()); - /* - $select = $model->select(); - $select->columns(array( - 'count' => Pi::db()->expression('count(*)'), - )); - - $select->where($where); - $row = $model->selectWith($select)->current(); - $count = (int) $row['count']; - */ - $count = $model->count($where); - } else { - $count = $this->getCount($uid, $includeRead, 'message') - + $this->getCount($uid, $includeRead, 'notification'); - } - - return $count; - } - - /** - * Get new message count to alert - * - * Alert user the new message he receives since last visit. - * - * @param int $uid - * @return int - */ - public function getAlert($uid) - { - return (int)Pi::user()->data()->get($uid, 'message-alert'); - } - - /** - * Dismiss message alter by resetting alert count to zero - * - * @param int $uid - * @return bool - */ - public function dismissAlert($uid) - { - return Pi::user()->data()->increment($uid, 'message-alert', 0); - } - - /** - * Increment message alter - * - * @param int $uid - * @return bool - */ - public function increaseAlert($uid) - { - return Pi::user()->data()->increment($uid, 'message-alert', 1); - } - - /** - * Send notification as mail - * - * @param int $uid - * @return bool - */ - public function sendMail($to, $message, $from) - { - if (Pi::service('module')->isActive('notification')) { - // Get user info - $user = Pi::user()->get($to, array( - 'id', 'identity', 'name', 'email' - )); - // Get sender info - $sender = Pi::user()->get($from, array( - 'id', 'identity', 'name', 'email' - )); - // Set to user - $toUser = array( - $user['email'] => $user['name'], - ); - // Set information - $information = array( - 'name' => $user['name'], - 'sender' => $sender['name'], - ); - // Send mail - Pi::api('mail', 'notification')->send( - $toUser, - 'notification', - $information, - 'message' - ); - } - } - - /** - * Message summary - * - * @param string $message - * @param int $length - * @return string - */ - /* public static function messageSummary($message, $length = 40) - { - $encoding = Pi::service('i18n')->getCharset(); - $message = trim($message); - - if ($length && strlen($message) > $length) { - $wordscut = ''; - if (strtolower($encoding) == 'utf-8') { - $n = 0; - $tn = 0; - $noc = 0; - while ($n < strlen($message)) { - $t = ord($message[$n]); - if ($t == 9 || $t == 10 || (32 <= $t && $t <= 126)) { - $tn = 1; - $n++; - $noc++; - } elseif (194 <= $t && $t <= 223) { - $tn = 2; - $n += 2; - $noc += 2; - } elseif (224 <= $t && $t < 239) { - $tn = 3; - $n += 3; - $noc += 2; - } elseif (240 <= $t && $t <= 247) { - $tn = 4; - $n += 4; - $noc += 2; - } elseif (248 <= $t && $t <= 251) { - $tn = 5; - $n += 5; - $noc += 2; - } elseif ($t == 252 || $t == 253) { - $tn = 6; - $n += 6; - $noc += 2; - } else { - $n++; - } - if ($noc >= $length) { - break; - } - } - if ($noc > $length) { - $n -= $tn; - } - $wordscut = substr($message, 0, $n); - } else { - for ($i = 0; $i < $length - 1; $i++) { - if (ord($message[$i]) > 127) { - $wordscut .= $message[$i] . $message[$i + 1]; - $i++; - } else { - $wordscut .= $message[$i]; - } - } - } - $message = $wordscut . '...'; - } - - return trim($message); - } */ - - /** - * Get unread message count - * - * @param int $uid - * @param string $type - * @return int|false - */ - public static function getUnread($uid, $type = '') - { - switch ($type) { - case 'message': - case 'notification': - break; - default: - $type = ''; - break; - } - if ('notification' == $type) { - $where = array( - 'uid' => $uid, - 'is_deleted' => 0, - 'is_read' => 0, - ); - $model = Pi::model('notification', 'message'); - /* - $select = $model->select(); - $select->columns(array( - 'count' => Pi::db()->expression('count(*)'), - )); - $select->where($where); - $row = $model->selectWith($select)->current(); - $count = (int) $row['count']; - */ - $count = $model->count($where); - } elseif ('message' == $type) { - $where = array( - 'uid_to' => $uid, - 'is_deleted_to' => 0, - 'is_read_to' => 0, - ); - $model = Pi::model('message', 'message'); - /* - $select = $model->select(); - $select->columns(array( - 'count' => Pi::db()->expression('count(*)'), - )); - $select->where($where); - $row = $model->selectWith($select)->current(); - $count = (int) $row['count']; - */ - $count = $model->count($where); - } else { - $count = static::getUnread($uid, 'message') - + static::getUnread($uid, 'notification'); - } - - return $count; - } - - public function setConversation($time = '') - { - $time = !empty($time) ? $time : time(); - return md5($time); - } - - public function canonizeMessage($message) - { - // Set message to array - $message = $message->toArray(); - //current user id - $userId = Pi::user()->getUser()->id; - // Set modle - $model = Pi::model('message', $this->getModule()); - // Get user - if ($userId == $message['uid_from']) { - //get username url - $user = Pi::user()->getUser($message['uid_to']) - ?: Pi::user()->getUser(0); - $message['name'] = $user->name; - } else { - //get username url - $user = Pi::user()->getUser($message['uid_from']) - ?: Pi::user()->getUser(0); - $message['name'] = $user->name; - } - - // Get avatar - $message['avatar'] = Pi::user()->avatar($message['uid_from'], 'medium', array( - 'alt' => $user->name, - 'class' => 'img-circle', - )); - - // Set profile Url - $message['profileUrl'] = Pi::user()->getUrl( - 'profile', - $message['uid_from'] - ); - - // Set content type - $type = ($this->is_html($message['content'])) ? 'html' : 'text'; - - //markup content - $message['content'] = Pi::service('markup')->render($message['content'], 'html', $type); - - if (!$message['is_read_to'] && $userId == $message['uid_to']) { - //mark the message as read - $model->update(array('is_read_to' => 1), array('id' => $message['id'])); - } - - return $message; - } - - public function is_html($message) - { - // return $string != strip_tags($string) ? true:false; - return preg_match("/<[^<]+>/",$message,$m) != 0; - } -} diff --git a/usr/module/message/src/Api/Breadcrumbs.php b/usr/module/message/src/Api/Breadcrumbs.php deleted file mode 100644 index 3e1c458793..0000000000 --- a/usr/module/message/src/Api/Breadcrumbs.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt New BSD License - */ - -/** - * @author Hossein Azizabadi <azizabadi@faragostaresh.com> - */ -namespace Module\Message\Api; - -use Pi; -use Pi\Application\Api\AbstractBreadcrumbs; - -class Breadcrumbs extends AbstractBreadcrumbs -{ - /** - * {@inheritDoc} - */ - public function load() - { - // Get params - $params = Pi::service('url')->getRouteMatch()->getParams(); - // Set module link - $moduleData = Pi::registry('module')->read($this->getModule()); - // Set index link - if ($params['action'] == 'index') { - $href = ''; - } else { - $href = Pi::service('url')->assemble('default', array( - 'module' => $this->getModule(), - )); - } - // Set result - $result = array(); - $result[] = array( - 'label' => $moduleData['title'], - 'href' => $href, - ); - // Set module internal links - switch ($params['action']) { - case 'archive': - $result[] = array( - 'label' => __('Archive'), - ); - break; - - case 'detail': - $result[] = array( - 'label' => __('Message detail'), - ); - break; - - case 'send': - $result[] = array( - 'label' => __('Send message'), - ); - break; - } - - return $result; - } -} diff --git a/usr/module/message/src/Controller/Admin/IndexController.php b/usr/module/message/src/Controller/Admin/IndexController.php deleted file mode 100644 index 8a356e0aac..0000000000 --- a/usr/module/message/src/Controller/Admin/IndexController.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt New BSD License - */ - -/** - * @author Hossein Azizabadi <azizabadi@faragostaresh.com> - */ -namespace Module\Message\Controller\Admin; - -use Pi; -use Pi\Mvc\Controller\ActionController; - -class IndexController extends ActionController -{ - public function indexAction() - { - return $this->redirect()->toRoute('', array( - 'controller' => 'list', - 'action' => 'index', - )); - } -} \ No newline at end of file diff --git a/usr/module/message/src/Controller/Admin/ListController.php b/usr/module/message/src/Controller/Admin/ListController.php deleted file mode 100644 index b43376df76..0000000000 --- a/usr/module/message/src/Controller/Admin/ListController.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt New BSD License - */ - -/** - * @author Hossein Azizabadi <azizabadi@faragostaresh.com> - */ -namespace Module\Message\Controller\Admin; - -use Pi; -use Pi\Mvc\Controller\ActionController; -use Pi\Paginator\Paginator; -use Zend\Db\Sql\Predicate\Expression; - -class ListController extends ActionController -{ - public function indexAction() - { - // Get page - $page = $this->params('page', 1); - $list = array(); - $limit = 50; - // Set info - $order = array('time_send DESC', 'id DESC'); - $offset = (int)($page - 1) * $limit; - // Get info - $select = $this->getModel('message')->select()->order($order)->offset($offset)->limit($limit); - $rowset = $this->getModel('message')->selectWith($select); - // Make list - foreach ($rowset as $row) { - $list[$row->id] = $row->toArray(); - // markup content - $list[$row->id]['content'] = Pi::service('markup')->compile( - $row->content, - 'html', - array('nl2br' => false) - ); - // content Short - $list[$row->id]['contentShort'] = (mb_strlen(strip_tags($row->content), 'utf-8') > 300) ? mb_substr(strip_tags($row->content), 0, 300, 'utf-8' ) . ' ... ' : strip_tags($row->content); - // user from - $list[$row->id]['userFrom'] = Pi::user()->getUser($row->uid_from)->toArray(); - $list[$row->id]['userFrom']['avatar'] = Pi::user()->avatar($row->uid_from, 'medium', array( - 'alt' => $list[$row->id]['userFrom']['name'], - 'class' => 'img-circle', - )); - // user to - $list[$row->id]['userTo'] = Pi::user()->getUser($row->uid_to)->toArray(); - $list[$row->id]['userTo']['avatar'] = Pi::user()->avatar($row->uid_to, 'medium', array( - 'alt' => $list[$row->id]['userTo']['name'], - 'class' => 'img-circle', - )); - // Tiem send view - $list[$row->id]['time_send_view'] = _date($row->time_send); - } - // Set paginator - $columns = array('count' => new Expression('count(*)')); - $select = $this->getModel('message')->select()->columns($columns); - $count = $this->getModel('message')->selectWith($select)->current()->count; - $paginator = Paginator::factory(intval($count)); - $paginator->setItemCountPerPage($limit); - $paginator->setCurrentPageNumber($page); - $paginator->setUrlOptions(array( - 'router' => $this->getEvent()->getRouter(), - 'route' => $this->getEvent()->getRouteMatch()->getMatchedRouteName(), - 'params' => array_filter(array( - 'module' => $this->getModule(), - 'controller' => 'list', - 'action' => 'index', - )), - )); - // Set view - $this->view()->setTemplate('list-index'); - $this->view()->assign('list', $list); - $this->view()->assign('paginator', $paginator); - } -} \ No newline at end of file diff --git a/usr/module/message/src/Controller/Admin/PruneController.php b/usr/module/message/src/Controller/Admin/PruneController.php deleted file mode 100644 index ea62b3d383..0000000000 --- a/usr/module/message/src/Controller/Admin/PruneController.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt New BSD License - */ - -/** - * @author Hossein Azizabadi <azizabadi@faragostaresh.com> - */ -namespace Module\Message\Controller\Admin; - -use Pi; -use Pi\Mvc\Controller\ActionController; -use Module\Message\Form\PruneForm; - -class PruneController extends ActionController -{ - public function indexAction() - { - $form = new PruneForm('prune'); - $message = __('You can prune all old message, select time to remove messages before that time and you can filter list of removed messages by this from option.'); - if ($this->request->isPost()) { - // Set form date - $values = $this->request->getPost(); - // Set prune create - $where = array('`time_send` < ?' => strtotime($values['date'])); - // Set prune read - if ($values['read']) { - $where['is_read_to'] = 1; - } - // Set prune deleted - if ($values['deleted']) { - $where['is_deleted_to'] = 1; - } - // Delete storys - $number = Pi::model('message', $this->params('module'))->delete($where); - if ($number) { - $message = sprintf(__('%s old messages removed'), $number); - } else { - $message = __('No messages removed ! check your selected filter and try again'); - } - } - $this->view()->setTemplate('prune-index'); - $this->view()->assign('form', $form); - $this->view()->assign('title', __('Prune old messages')); - $this->view()->assign('message', $message); - } -} \ No newline at end of file diff --git a/usr/module/message/src/Controller/Front/IndexController.php b/usr/module/message/src/Controller/Front/IndexController.php deleted file mode 100755 index 1f34701bfc..0000000000 --- a/usr/module/message/src/Controller/Front/IndexController.php +++ /dev/null @@ -1,581 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Message\Controller\Front; - -use Module\Message\Form\SendForm; -use Module\Message\Form\SendFilter; -use Module\Message\Form\ReplyForm; -use Module\Message\Form\ReplyFilter; -use Module\Message\Service; -use Pi\Paginator\Paginator; -use Pi\Mvc\Controller\ActionController; -use Pi; - -/** - * Private message controller - * - * Feature list: - * - * - List of messages - * - Show details of a message - * - Reply a message - * - Send a message - * - Mark the messages as read - * - Delete one or more messages - * - * @author Xingyu Ji <xingyu@eefocus.com> - */ -class IndexController extends ActionController -{ - /** - * List private messages - * - * @return void - */ - public function indexAction() - { - $page = _get('p', 'int'); - $page = $page ?: 1; - $limit = Pi::config('list_number'); - $offset = (int)($page - 1) * $limit; - - //current user id - Pi::service('authentication')->requireLogin(); - $userId = Pi::user()->getId(); - - // dismiss alert - Pi::user()->message->dismissAlert($userId); - - $model = $this->getModel('message'); - //get private message list count - $select = $model->select() - ->columns(array( - 'count' => new \Zend\Db\Sql\Predicate\Expression( - 'count(*)' - ) - )) - ->where(function ($where) use ($userId) { - $fromWhere = clone $where; - $toWhere = clone $where; - $fromWhere->equalTo('uid_from', $userId); - $fromWhere->equalTo('is_deleted_from', 0); - $toWhere->equalTo('uid_to', $userId); - $toWhere->equalTo('is_deleted_to', 0); - $where->andPredicate($fromWhere) - ->orPredicate($toWhere); - }); - $count = $model->selectWith($select)->current()->count; - - if ($count) { - //get private message list group by user - $select = $model->select() - ->where(function ($where) use ($userId) { - $fromWhere = clone $where; - $toWhere = clone $where; - $fromWhere->equalTo('uid_from', $userId); - $fromWhere->equalTo('is_deleted_from', 0); - $toWhere->equalTo('uid_to', $userId); - $toWhere->equalTo('is_deleted_to', 0); - $where->andPredicate($fromWhere) - ->orPredicate($toWhere); - }) - ->group(new \Zend\Db\Sql\Predicate\Expression('conversation DESC')) - ->order('time_send DESC') - ->limit($limit) - ->offset($offset); - $rowset = $model->selectWith($select); - $messageList = $rowset->toArray(); - //jump to last page - if (empty($messageList) && $page > 1) { - $this->redirect()->toRoute('', array( - 'controller' => 'index', - 'action' => 'index', - 'p' => ceil($count / $limit), - )); - - return; - } - - array_walk($messageList, function (&$v, $k) use ($userId) { - // markup content - $v['content'] = Pi::service('markup')->compile( - $v['content'], - 'html', - array('nl2br' => false) - ); - $v['content'] = (mb_strlen(strip_tags($v['content']), 'utf-8') > 300) ? mb_substr(strip_tags($v['content']), 0, 300, 'utf-8' ) . ' ... ' : strip_tags($v['content']); - - if ($userId == $v['uid_from']) { - $v['is_read'] = 1; - $user = Pi::user()->getUser($v['uid_to']) - ?: Pi::user()->getUser(0); - // get username url - $v['name'] = $user->name; - // username link, 4 locations - $v['profileUrl'] = Pi::user()->getUrl('profile', - $v['uid_to']); - } else { - $v['is_read'] = $v['is_read_to']; - $user = Pi::user()->getUser($v['uid_from']) - ?: Pi::user()->getUser(0); - //get username url - $v['name'] = $user->name; - $v['profileUrl'] = Pi::user()->getUrl('profile', - $v['uid_from']); - } - - //get avatar - $v['avatar'] = Pi::user()->avatar($v['uid_from'], 'medium', array( - 'alt' => $user->name, - 'class' => 'img-circle', - )); - - unset( - $v['is_read_from'], - $v['is_read_to'], - $v['delete_status_from'], - $v['delete_status_to'] - ); - }); - - $paginator = Paginator::factory(intval($count), array( - 'page' => $page, - 'limit' => $limit, - 'url_options' => array( - 'page_param' => 'p', - 'params' => array( - 'module' => $this->getModule(), - 'controller' => 'index', - 'action' => 'index', - ), - ), - )); - - $this->view()->assign('paginator', $paginator); - $this->view()->assign('uid', $userId); - } else { - $messageList = array(); - } - $this->renderNav(); - $this->view()->assign('messages', $messageList); - - return; - } - - /** - * Render new message count of tab navigation - * - * @return void - */ - protected function renderNav() - { - //current user id - Pi::service('authentication')->requireLogin(); - $userId = Pi::user()->getUser()->id; - - $messageTitle = sprintf( - __('Private message ( <span class="label label-danger">%s</span> unread )'), - _number(Pi::api('api', 'message')->getUnread($userId, 'message')) - ); - $notificationTitle = sprintf( - __('Notification ( <span class="label label-danger">%s</span> unread )'), - _number(Pi::api('api', 'message')->getUnread($userId, 'notification')) - ); - $this->view()->assign('messageTitle', $messageTitle); - $this->view()->assign('notificationTitle', $notificationTitle); - } - - /** - * Send a private message - * - * @return void - */ - public function sendAction() - { - Pi::service('authentication')->requireLogin(); - $uid = Pi::user()->getId(); - $toUserId = _get('uid'); - $name = Pi::user()->get($toUserId, 'name'); - $form = $this->getSendForm('send'); - $form->setData(array('name' => $name)); - if ($this->request->isPost()) { - $post = $this->request->getPost(); - $form->setData($post); - $form->setInputFilter(new SendFilter); - if (!$form->isValid()) { - $this->renderSendForm($form); - - return; - } - $data = $form->getData(); - //check name - $toUserId = Pi::user()->getUids(array('name' => $data['name'])); - $toUserId = array_shift($toUserId); - if (!$toUserId) { - $this->view()->assign( - 'errMessage', - __('Username is invalid, please try again.' - )); - $this->renderSendForm($form); - - return; - } - - //current user id - $result = Pi::api('api', 'message')->send( - $toUserId, - $data['content'], - $uid - ); - if (!$result) { - $this->view()->assign( - 'errMessage', - __('Send failed, please try again.' - )); - $this->renderSendForm($form); - - return; - } - - $this->redirect()->toRoute('', array( - 'controller' => 'index', - 'action' => 'index' - )); - - return; - } - $this->renderSendForm($form); - } - - /** - * Check if username exists - * - * @return string json type - */ - public function checkUsernameAction() - { - Pi::service('authentication')->requireLogin(); - try { - $username = _get('username', 'string'); - $user = Pi::user()->getUser($username, 'identity'); - $uid = $user ? $user->id : 0; - //current user id - $selfUid = Pi::user()->getUser()->id; - //check username - if (!$uid) { - return array( - 'status' => 0, - 'message' => __('User') - . ' ' - . $username - . ' ' - . __('not found') - ); - } elseif ($uid == $selfUid) { - return array( - 'status' => 0, - 'message' => __( - __('Sorry, you can\'t send message to yourself.') - ) - ); - } else { - return array( - 'status' => 1, - 'username' => $username - ); - } - } catch (Exception $e) { - return array( - 'status' => 0, - 'message' => __('An error occurred, please try again.') - ); - } - } - - /** - * Initialize send form instance - * - * @param string $name - * @return SendForm - */ - protected function getSendForm($name) - { - $form = new SendForm($name); - $form->setAttribute('action', $this->url('', array( - 'action' => 'send' - ))); - - return $form; - } - - /** - * Render send form - * - * @param SendForm $form - * @return void - */ - protected function renderSendForm($form) - { - $this->view()->assign('title', __('Send message')); - $this->view()->assign('form', $form); - $this->renderNav(); - } - - /** - * Message detail and reply message - * - * @return void - */ - public function detailAction() - { - Pi::service('authentication')->requireLogin(); - $messageId = _get('mid', 'int'); - $messageId = $messageId ?: 0; - // Current user id - $userId = Pi::user()->getUser()->id; - // Get message detail - $detail = $this->showDetail($messageId); - if ($userId == $detail['uid_from']) { - $toId = $detail['uid_to']; - } else { - $toId = $detail['uid_from']; - } - // Set form - $form = new ReplyForm('reply'); - $form->setAttribute('action', $this->url('', array( - 'action' => 'detail', - 'mid' => $messageId, - ))); - // Manage post reply - if ($this->request->isPost()) { - $post = $this->request->getPost(); - $form->setData($post); - $form->setInputFilter(new ReplyFilter); - if (!$form->isValid()) { - $this->view()->assign('form', $form); - $this->showDetail($messageId); - - return; - } - $data = $form->getData(); - $result = Pi::api('api', 'message')->send( - $data['uid_to'], - $data['content'], - $userId, - $detail['conversation'] - ); - if (!$result) { - $this->view()->assign( - 'errMessage', - __('Send failed, please try again.' - )); - $this->view()->assign('form', $form); - $this->showDetail($messageId); - - return; - } - - $this->redirect()->toRoute('', array( - 'controller' => 'index', - 'action' => 'index' - )); - - return; - } - // Set to form - $form->setData(array('uid_to' => $toId)); - // Get list of conversations - $list = array(); - $where = array( - 'conversation' => $detail['conversation'], - 'is_deleted_from' => 0, - 'is_deleted_to' => 0 - ); - $order = array('time_send ASC', 'id ASC'); - $model = $this->getModel('message'); - $select = $model->select()->where($where)->order($order); - $rowset = $model->selectWith($select); - foreach ($rowset as $row) { - $list[$row->id] = Pi::api('api', 'message')->canonizeMessage($row); - } - - // Set view - $this->view()->assign('form', $form); - $this->view()->assign('list', $list); - } - - /** - * Show details of a message - * - * @param int $messageId - * @return array - */ - protected function showDetail($messageId) - { - Pi::service('authentication')->requireLogin(); - //current user id - $userId = Pi::user()->getUser()->id; - - // dismiss alert - Pi::user()->message->dismissAlert($userId); - - $model = $this->getModel('message'); - //get private message - $select = $model->select() - ->where(function ($where) use ($messageId, $userId) { - $subWhere = clone $where; - $subWhere->equalTo('uid_from', $userId); - $subWhere->or; - $subWhere->equalTo('uid_to', $userId); - $where->equalTo('id', $messageId) - ->andPredicate($subWhere); - }); - $rowset = $model->selectWith($select)->current(); - if (!$rowset) { - return; - } - $detail = $rowset->toArray(); - - // Get user - if ($userId == $detail['uid_from']) { - //get username url - $user = Pi::user()->getUser($detail['uid_to']) - ?: Pi::user()->getUser(0); - $detail['name'] = $user->name; - } else { - //get username url - $user = Pi::user()->getUser($detail['uid_from']) - ?: Pi::user()->getUser(0); - $detail['name'] = $user->name; - } - - // Get avatar - $detail['avatar'] = Pi::user()->avatar($detail['uid_from'], 'medium', array( - 'alt' => $user->name, - 'class' => 'img-circle', - )); - - // Set profile Url - $detail['profileUrl'] = Pi::user()->getUrl( - 'profile', - $detail['uid_from'] - ); - - //markup content - $detail['content'] = Pi::service('markup')->render($detail['content'], 'html', 'html'); - - if (!$detail['is_read_to'] && $userId == $detail['uid_to']) { - //mark the message as read - $model->update(array('is_read_to' => 1), array('id' => $messageId)); - } - - $this->view()->assign('message', $detail); - $this->view()->assign('uid', $userId); - $this->renderNav(); - - return $detail; - } - - /** - * Mark the message as read - * - * @return void - */ - public function markAction() - { - Pi::service('authentication')->requireLogin(); - $messageIds = _get('ids', 'regexp', array('regexp' => '/^[0-9,]+$/')); - $page = _get('p', 'int'); - $page = $page ?: 1; - //current user id - $userId = Pi::user()->getUser()->id; - if (empty($messageIds)) { - $this->redirect()->toRoute('', array( - 'controller' => 'index', - 'action' => 'index', - 'p' => $page - )); - } - - if (strpos($messageIds, ',')) { - $messageIds = explode(',', $messageIds); - } - - $model = $this->getModel('message'); - $result = $model->update(array('is_read_to' => 1), array( - 'id' => $messageIds, - 'uid_to' => $userId - )); - - $this->redirect()->toRoute('', array( - 'controller' => 'index', - 'action' => 'index', - 'p' => $page - )); - } - - /** - * Delete messages - * - * @return void - */ - public function deleteAction() - { - Pi::service('authentication')->requireLogin(); - $messageIds = _get('ids', 'regexp', array('regexp' => '/^[0-9,]+$/')); - $toId = _get('tid', 'int'); - $page = _get('p', 'int'); - $page = $page ?: 1; - - if (strpos($messageIds, ',')) { - $messageIds = explode(',', $messageIds); - } - if (empty($messageIds)) { - $this->redirect()->toRoute('', array( - 'controller' => 'index', - 'action' => 'index', - 'p' => $page - )); - } - $userId = Pi::user()->getUser()->id; - $model = $this->getModel('message'); - - if ($toId) { - if ($userId == $toId) { - $model->update(array('is_deleted_to' => 1), array( - 'id' => $messageIds, - 'uid_to' => $userId - )); - } else { - $model->update(array('is_deleted_from' => 1), array( - 'id' => $messageIds, - 'uid_from' => $userId - )); - } - } else { - $model->update(array('is_deleted_from' => 1), array( - 'uid_from' => $userId, - 'id' => $messageIds - )); - $model->update(array('is_deleted_to' => 1), array( - 'uid_to' => $userId, - 'id' => $messageIds - )); - } - - $this->redirect()->toRoute('', array( - 'controller' => 'index', - 'action' => 'index', - 'p' => $page - )); - - return; - } -} \ No newline at end of file diff --git a/usr/module/message/src/Controller/Front/NotifyController.php b/usr/module/message/src/Controller/Front/NotifyController.php deleted file mode 100644 index a94c77bfcd..0000000000 --- a/usr/module/message/src/Controller/Front/NotifyController.php +++ /dev/null @@ -1,257 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Message\Controller\Front; - -use Module\Message\Service; -use Pi\Mvc\Controller\ActionController; -use Pi\Paginator\Paginator; -use Pi; - -/** - * System notification controller - * - * Feature list: - * - * - List of notifications - * - Show details of a notification - * - Mark the notifications as read - * - Delete one or more notifications - * - * @author Xingyu Ji <xingyu@eefocus.com> - */ -class NotifyController extends ActionController -{ - /** - * Render new message count of tab navigation - * - * @return void - */ - protected function renderNav() - { - //current user id - Pi::service('authentication')->requireLogin(); - $userId = Pi::user()->getUser()->id; - - $messageTitle = sprintf( - __('Private message ( <span class="label label-danger">%s</span> unread )'), - _number(Pi::api('api', 'message')->getUnread($userId, 'message')) - ); - $notificationTitle = sprintf( - __('Notification ( <span class="label label-danger">%s</span> unread )'), - _number(Pi::api('api', 'message')->getUnread($userId, 'notification')) - ); - $this->view()->assign('messageTitle', $messageTitle); - $this->view()->assign('notificationTitle', $notificationTitle); - } - - /** - * List notifications - * - * @return void - */ - public function indexAction() - { - $page = _get('p', 'int'); - $page = $page ?: 1; - $limit = Pi::config('list_number'); - $offset = (int)($page - 1) * $limit; - - //current user id - $userId = Pi::user()->getUser()->id; - - // dismiss alert - Pi::user()->message->dismissAlert($userId); - - $model = $this->getModel('notification'); - //get notification list count - /* - $select = $model->select() - ->columns(array( - 'count' => new \Zend\Db\Sql\Predicate\Expression( - 'count(*)' - ) - )) - ->where(array('uid' => $userId, 'is_deleted' => 0)); - $count = $model->selectWith($select)->current()->count; - */ - $count = $model->count(array('uid' => $userId, 'is_deleted' => 0)); - if ($count) { - //get notification list - $select = $model->select() - ->where(array( - 'uid' => $userId, - 'is_deleted' => 0 - )) - ->order('time_send DESC') - ->limit($limit) - ->offset($offset); - $rowset = $model->selectWith($select); - $notificationList = $rowset->toArray(); - //jump to last page - if (empty($notificationList) && $page > 1) { - $this->redirect()->toRoute('', array( - 'controller' => 'notify', - 'action' => 'index', - 'p' => ceil($count / $limit), - )); - - return; - } - - array_walk($notificationList, function (&$v, $k) { - //markup content - $v['content'] = Pi::service('markup')->compile( - $v['content'], - 'text', - array('nl2br' => false) - ); - }); - - $paginator = Paginator::factory(intval($count), array( - 'page' => $page, - 'limit' => $limit, - 'url_options' => array( - 'page_param' => 'p', - 'params' => array( - 'module' => $this->getModule(), - 'controller' => 'notify', - 'action' => 'index', - ), - ), - )); - $this->view()->assign('paginator', $paginator); - } else { - $notificationList = array(); - } - $this->renderNav(); - $this->view()->assign('notifications', $notificationList); - } - - /** - * Notification detail - * - * @return void - */ - public function detailAction() - { - $notificationId = _get('mid', 'int'); - $notificationId = $notificationId ?: 0; - //current user id - $userId = Pi::user()->getUser()->id; - - // dismiss alert - Pi::user()->message->dismissAlert($userId); - - $model = $this->getModel('notification'); - //get notification - $select = $model->select() - ->where(array( - 'id' => $notificationId, - 'uid' => $userId - )); - $rowset = $model->selectWith($select)->current(); - if (!$rowset) { - return; - } - $detail = $rowset->toArray(); - - //markup content - $detail['content'] = Pi::service('markup')->render($detail['content'], 'html', 'html'); - - if (!$detail['is_read']) { - //mark the notification as read - $model->update(array('is_read' => 1), - array('id' => $notificationId)); - } - - $this->view()->assign('notification', $detail); - $this->renderNav(); - - return; - } - - /** - * Mark the notification as read - * - * @return void - */ - public function markAction() - { - $notificationIds = _get('ids', - 'regexp', - array('regexp' => '/^[0-9,]+$/')); - $page = _get('p', 'int'); - $page = $page ?: 1; - //current user id - $userId = Pi::user()->getUser()->id; - if (empty($notificationIds)) { - $this->redirect()->toRoute('', array( - 'controller' => 'notify', - 'action' => 'index', - 'p' => $page - )); - } - - if (strpos($notificationIds, ',')) { - $notificationIds = explode(',', $notificationIds); - } - - $model = $this->getModel('notification'); - $model->update(array('is_read' => 1), array( - 'id' => $notificationIds, - 'uid' => $userId - )); - - $this->redirect()->toRoute('', array( - 'controller' => 'notify', - 'action' => 'index', - 'p' => $page - )); - } - - /** - * Delete notifications - * - * @return void - */ - public function deleteAction() - { - $notificationIds = _get('ids', - 'regexp', - array('regexp' => '/^[0-9,]+$/')); - $page = _get('p', 'int'); - $page = $page ?: 1; - - if (strpos($notificationIds, ',')) { - $notificationIds = explode(',', $notificationIds); - } - if (empty($notificationIds)) { - $this->redirect()->toRoute('', array( - 'controller' => 'notify', - 'action' => 'index', - 'p' => $page - )); - } - $userId = Pi::user()->getUser()->id; - $model = $this->getModel('notification'); - $model->update(array('is_deleted' => 1), array( - 'id' => $notificationIds, - 'uid' => $userId - )); - - $this->redirect()->toRoute('', array( - 'controller' => 'notify', - 'action' => 'index', - 'p' => $page - )); - - return; - } -} diff --git a/usr/module/message/src/Form/PruneForm.php b/usr/module/message/src/Form/PruneForm.php deleted file mode 100644 index 4361c9ee3f..0000000000 --- a/usr/module/message/src/Form/PruneForm.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt New BSD License - */ - -/** - * @author Hossein Azizabadi <azizabadi@faragostaresh.com> - */ -namespace Module\Message\Form; - -use Pi; -use Pi\Form\Form as BaseForm; - -class PruneForm extends BaseForm -{ - protected $options; - - public function __construct($name = null, $options = array()) - { - parent::__construct($name); - } - - public function init() - { - // date - $this->add(array( - 'name' => 'date', - 'type' => 'datepicker', - 'options' => array( - 'label' => __('All messages Before'), - 'datepicker' => array( - 'format' => 'yyyy-mm-dd', - ), - ), - 'attributes' => array( - 'id' => 'time-start', - 'required' => true, - 'value' => date('Y-m-d', strtotime("-3 Months")), - ) - )); - // read - $this->add(array( - 'name' => 'read', - 'type' => 'checkbox', - 'options' => array( - 'label' => __('Just read messages by user'), - ), - 'attributes' => array( - 'value' => 0, - 'description' => __('Remove read messages by user before selected time'), - ) - )); - // deleted - $this->add(array( - 'name' => 'deleted', - 'type' => 'checkbox', - 'options' => array( - 'label' => __('Just deleted messages by user'), - ), - 'attributes' => array( - 'value' => 0, - 'description' => __('Remove deleted messages by user before selected time'), - ) - )); - // Submit - $this->add(array( - 'name' => 'submit', - 'type' => 'submit', - 'attributes' => array( - 'value' => __('Prune'), - ) - )); - } -} \ No newline at end of file diff --git a/usr/module/message/src/Form/ReplyFilter.php b/usr/module/message/src/Form/ReplyFilter.php deleted file mode 100644 index 199ef3c22d..0000000000 --- a/usr/module/message/src/Form/ReplyFilter.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Message\Form; - -use Pi; -use Zend\InputFilter\InputFilter; - -/** - * Filter of reply message - * - * @author Xingyu Ji <xingyu@eefocus.com> - */ -class ReplyFilter extends InputFilter -{ - /** - * Constructor - */ - public function __construct() - { - $this->add(array( - 'name' => 'content', - 'filters' => array( - array( - 'name' => 'StringTrim', - ), - ), - )); - } -} diff --git a/usr/module/message/src/Form/ReplyForm.php b/usr/module/message/src/Form/ReplyForm.php deleted file mode 100644 index 80da16987d..0000000000 --- a/usr/module/message/src/Form/ReplyForm.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Message\Form; - -use Pi; -use Pi\Form\Form as BaseForm; -use Zend\Form\Form; -use Zend\Form\Element; - -/** - * Form of reply message - * - * @author Xingyu Ji <xingyu@eefocus.com> - */ -class ReplyForm extends BaseForm -{ - /** - * Editor type - * - * @var string - */ - protected $markup = 'text'; - - /** - * Constructor - * - * @param null|string|int $name Optional name for the element - * @param string $markup Page type: text, html, markdown - */ - public function __construct($name = null, $markup = null) - { - $this->markup = $markup ?: $this->markup; - parent::__construct($name); - } - - /** - * {@inheritdoc} - */ - public function init() - { - $set = ''; - switch ($this->markup) { - case 'html': - $editor = 'html'; - break; - case 'markdown': - $editor = 'markitup'; - $set = 'markdown'; - break; - case 'text': - default: - $editor = 'textarea'; - break; - } - - $this->add(array( - 'name' => 'content', - 'options' => array( - 'label' => __('Content'), - 'editor' => $editor, - 'set' => $set, - ), - 'attributes' => array( - 'type' => 'editor', - 'rows' => '5', - ), - )); - - $this->add(array( - 'name' => 'uid_to', - 'attributes' => array( - 'type' => 'hidden', - ), - )); - - $this->add(array( - 'name' => 'submit', - 'type' => 'submit', - 'attributes' => array( - 'class' => 'btn btn-primary', - 'value' => __('Send'), - ) - )); - } -} diff --git a/usr/module/message/src/Form/SendFilter.php b/usr/module/message/src/Form/SendFilter.php deleted file mode 100755 index dc3ba6af0d..0000000000 --- a/usr/module/message/src/Form/SendFilter.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Message\Form; - -use Pi; -use Zend\InputFilter\InputFilter; - -/** - * Filter of send message - * - * @author Xingyu Ji <xingyu@eefocus.com> - */ -class SendFilter extends InputFilter -{ - /** - * Constructor - */ - public function __construct() - { - $this->add(array( - 'name' => 'name', - 'required' => true, - 'filters' => array( - array( - 'name' => 'StringTrim', - ), - ), - )); - - $this->add(array( - 'name' => 'content', - 'filters' => array( - array( - 'name' => 'StringTrim', - ), - ), - )); - } -} diff --git a/usr/module/message/src/Form/SendForm.php b/usr/module/message/src/Form/SendForm.php deleted file mode 100755 index 835b84952e..0000000000 --- a/usr/module/message/src/Form/SendForm.php +++ /dev/null @@ -1,97 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Message\Form; - -use Pi; -use Pi\Form\Form as BaseForm; -use Zend\Form\Form; -use Zend\Form\Element; - -/** - * Form of send message - * - * @author Xingyu Ji <xingyu@eefocus.com> - */ -class SendForm extends BaseForm -{ - /** - * Editor type - * - * @var string - */ - protected $markup = 'text'; - - /** - * Constructor - * - * @param null|string|int $name Optional name for the element - * @param string $markup Page type: text, html, markdown - */ - public function __construct($name = null, $markup = null) - { - $this->markup = $markup ?: $this->markup; - parent::__construct($name); - } - - /** - * {@inheritdoc} - */ - public function init() - { - $this->add(array( - 'name' => 'name', - 'attributes' => array( - 'type' => 'text', - 'readonly' => 'true' - ), - 'options' => array( - 'label' => __('Recipient'), - ), - )); - - $set = ''; - switch ($this->markup) { - case 'html': - $editor = 'html'; - break; - case 'markdown': - $editor = 'markitup'; - $set = 'markdown'; - break; - case 'text': - default: - $editor = 'textarea'; - break; - } - - $this->add(array( - 'name' => 'content', - 'options' => array( - 'label' => __('Content'), - 'editor' => $editor, - 'set' => $set, - ), - 'attributes' => array( - 'type' => 'editor', - 'placeholder' => __('Message content'), - 'rows' => '5', - ), - )); - - $this->add(array( - 'name' => 'submit', - 'type' => 'submit', - 'attributes' => array( - 'class' => 'btn btn-primary', - 'value' => __('Send'), - ) - )); - } -} diff --git a/usr/module/message/src/Installer/Action/Update.php b/usr/module/message/src/Installer/Action/Update.php deleted file mode 100644 index 1f72a8a047..0000000000 --- a/usr/module/message/src/Installer/Action/Update.php +++ /dev/null @@ -1,154 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt New BSD License - */ - -/** - * @author Hossein Azizabadi <azizabadi@faragostaresh.com> - */ -namespace Module\Message\Installer\Action; - -use Pi; -use Pi\Application\Installer\Action\Update as BasicUpdate; -use Pi\Application\Installer\SqlSchema; -use Zend\EventManager\Event; - -class Update extends BasicUpdate -{ - /** - * {@inheritDoc} - */ - protected function attachDefaultListeners() - { - $events = $this->events; - $events->attach('update.pre', array($this, 'updateSchema')); - parent::attachDefaultListeners(); - - return $this; - } - - /** - * {@inheritDoc} - */ - public function updateSchema(Event $e) - { - $moduleVersion = $e->getParam('version'); - - // Set message model - $messageModel = Pi::model('message', $this->module); - $messageTable = $messageModel->getTable(); - $messageAdapter = $messageModel->getAdapter(); - - // Update to version 1.0.3 - if (version_compare($moduleVersion, '1.0.3', '<')) { - // Alter table : ADD conversation - $sql = sprintf("ALTER TABLE %s ADD `conversation` VARCHAR(32) NOT NULL DEFAULT '' , ADD INDEX (`conversation`)", $messageTable); - try { - $messageAdapter->query($sql, 'execute'); - } catch (\Exception $exception) { - $this->setResult('db', array( - 'status' => false, - 'message' => 'Table alter query failed: ' - . $exception->getMessage(), - )); - return false; - } - - // Add index - $sql = sprintf("ALTER TABLE %s ADD INDEX `uid_from` (`uid_from`)", $messageTable); - try { - $messageAdapter->query($sql, 'execute'); - } catch (\Exception $exception) { - $this->setResult('db', array( - 'status' => false, - 'message' => 'Table alter query failed: ' - . $exception->getMessage(), - )); - return false; - } - - // Add index - $sql = sprintf("ALTER TABLE %s ADD INDEX `uid_to` (`uid_to`)", $messageTable); - try { - $messageAdapter->query($sql, 'execute'); - } catch (\Exception $exception) { - $this->setResult('db', array( - 'status' => false, - 'message' => 'Table alter query failed: ' - . $exception->getMessage(), - )); - return false; - } - - // Add index - $sql = sprintf("ALTER TABLE %s ADD INDEX `time_send` (`time_send`)", $messageTable); - try { - $messageAdapter->query($sql, 'execute'); - } catch (\Exception $exception) { - $this->setResult('db', array( - 'status' => false, - 'message' => 'Table alter query failed: ' - . $exception->getMessage(), - )); - return false; - } - - // Add index - $sql = sprintf("ALTER TABLE %s ADD INDEX `select_1` (`uid_from`, `is_deleted_from`)", $messageTable); - try { - $messageAdapter->query($sql, 'execute'); - } catch (\Exception $exception) { - $this->setResult('db', array( - 'status' => false, - 'message' => 'Table alter query failed: ' - . $exception->getMessage(), - )); - return false; - } - - // Add index - $sql = sprintf("ALTER TABLE %s ADD INDEX `select_2` (`uid_to`, `is_deleted_to`)", $messageTable); - try { - $messageAdapter->query($sql, 'execute'); - } catch (\Exception $exception) { - $this->setResult('db', array( - 'status' => false, - 'message' => 'Table alter query failed: ' - . $exception->getMessage(), - )); - return false; - } - - // Add index - $sql = sprintf("ALTER TABLE %s ADD INDEX `unread` (`uid_to`, `is_deleted_to`, `is_read_to`)", $messageTable); - try { - $messageAdapter->query($sql, 'execute'); - } catch (\Exception $exception) { - $this->setResult('db', array( - 'status' => false, - 'message' => 'Table alter query failed: ' - . $exception->getMessage(), - )); - return false; - } - } - - // Update to version 1.0.4 - if (version_compare($moduleVersion, '1.0.4', '<')) { - // Update value - $select = $messageModel->select(); - $rowset = $messageModel->selectWith($select); - foreach ($rowset as $row) { - $conversation = Pi::api('api', 'message')->setConversation($row->time_send); - $row->conversation = $conversation; - $row->save(); - } - } - - return true; - } -} \ No newline at end of file diff --git a/usr/module/message/template/admin/list-index.phtml b/usr/module/message/template/admin/list-index.phtml deleted file mode 100644 index d15c02c2ee..0000000000 --- a/usr/module/message/template/admin/list-index.phtml +++ /dev/null @@ -1,91 +0,0 @@ -<?php $this->css($this->assetModule('script/admin.css')); ?> -<div class="clearfix"> - <?php if (isset($list) && !empty($list)) { ?> - <h3><?php _e('List of messages'); ?></h3> - <div class="message-list"> - <?php foreach ($list as $message) { ?> - <?php $class = ''; - if ($message['is_deleted_to'] == 1 || $message['is_deleted_from'] == 1) { - $class = 'bg-danger'; - } elseif ($message['is_read_to'] == 0) { - $class = 'bg-warning'; - } ?> - <div class="message-single clearfix <?php echo $class; ?>"> - <div class="col-md-1"> - <?php echo $message['userFrom']['avatar']; ?> - </div> - <div class="col-md-11"> - <ul class="list-inline small text-muted"> - <li><?php _e('From'); ?> : <?php echo $message['userFrom']['name']; ?></li> - <li class="message-divider">|</li> - <li><?php _e('To'); ?> : <?php echo $message['userTo']['name']; ?></li> - <li class="message-divider">|</li> - <li><?php _e('Send on'); ?> : <?php echo $message['time_send_view']; ?></li> - <li class="message-divider">|</li> - <li><?php _e('ID'); ?> : <?php echo $message['id']; ?></li> - </ul> - <div class="message-content"> - <?php echo $message['contentShort']; ?> - <!-- Button trigger modal --> - <button type="button" class="btn btn-success btn-xs" data-toggle="modal" data-target="#messageModal<?php echo $message['id']; ?>"> - <?php _e('Full details'); ?> - </button> - <!-- Modal --> - <div class="modal fade" id="messageModal<?php echo $message['id']; ?>" tabindex="-1" role="dialog" aria-labelledby="messageModalLabel<?php echo $message['id']; ?>"> - <div class="modal-dialog modal-lg" role="document"> - <div class="modal-content"> - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal" aria-label="<?php _e('Close'); ?>"><span aria-hidden="true">×</span></button> - <h4 class="modal-title" id="messageModalLabel<?php echo $message['id']; ?>"> - <?php _e('From'); ?> : <?php echo $message['userFrom']['name']; ?> - <?php _e('To'); ?> : <?php echo $message['userTo']['name']; ?> - <?php _e('Send on'); ?> : <?php echo $message['time_send_view']; ?> - </h4> - </div> - <div class="modal-body clearfix"> - <div class="col-md-6"> - <div class="well well-xs"> <h5><?php _e('From'); ?> : <?php echo $message['userFrom']['avatar']; ?> <?php echo $message['userFrom']['name']; ?></h5> - <ul class="list-unstyled"> - <li><?php _e('Name'); ?> : <?php echo $message['userFrom']['name']; ?></li> - <li><?php _e('Identity'); ?> : <?php echo $message['userFrom']['identity']; ?></li> - <li><?php _e('Email'); ?> : <?php echo $message['userFrom']['email']; ?></li> - <li><?php _e('Is read ?'); ?> : <?php $message['is_read_from'] ? $text = __('Yes') : $text = __('No'); ?><?php echo $text; ?></li> - <li><?php _e('Is deleted ?'); ?> : <?php $message['is_delete_from'] ? $text = __('Yes') : $text = __('No'); ?><?php echo $text; ?></li> - </ul> - </div> - </div> - <div class="col-md-6"> - <div class="well well-xs"> - <h5><?php _e('To'); ?> : <?php echo $message['userTo']['avatar']; ?> <?php echo $message['userTo']['name']; ?></h5> - <ul class="list-unstyled"> - <li><?php _e('Name'); ?> : <?php echo $message['userTo']['name']; ?></li> - <li><?php _e('Identity'); ?> : <?php echo $message['userTo']['identity']; ?></li> - <li><?php _e('Email'); ?> : <?php echo $message['userTo']['email']; ?></li> - <li><?php _e('Is read ?'); ?> : <?php $message['is_read_to'] ? $text = __('Yes') : $text = __('No'); ?><?php echo $text; ?></li> - <li><?php _e('Is deleted ?'); ?> : <?php $message['is_delete_to'] ? $text = __('Yes') : $text = __('No'); ?><?php echo $text; ?></li> - </ul> - </div> - </div> - <div class="col-md-12"> - <div class="well well-xs"> - <?php echo $message['content']; ?> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - <?php } ?> - </div> - <?php } else { ?> - <div class="alert alert-danger"> - <?php _e('Message list is empty !'); ?> - </div> - <?php } ?> - <div class="paginator"> - <?php echo $this->paginationControl($paginator, 'Sliding', 'paginator'); ?> - </div> -</div> \ No newline at end of file diff --git a/usr/module/message/template/admin/prune-index.phtml b/usr/module/message/template/admin/prune-index.phtml deleted file mode 100644 index c5ccd25005..0000000000 --- a/usr/module/message/template/admin/prune-index.phtml +++ /dev/null @@ -1,8 +0,0 @@ -<?php $this->css($this->assetModule('script/admin.css')); ?> -<div class="clearfix"> - <h3><?php echo $this->escape($title); ?></h3> - <div class="alert alert-success"> - <?php echo $this->escape($message); ?> - </div> - <?php echo $this->form($form); ?> -</div> \ No newline at end of file diff --git a/usr/module/message/template/front/_confirm-modal.phtml b/usr/module/message/template/front/_confirm-modal.phtml deleted file mode 100644 index 3093b12dcf..0000000000 --- a/usr/module/message/template/front/_confirm-modal.phtml +++ /dev/null @@ -1,18 +0,0 @@ -<div id="confirm-modal" class="modal fade" role="dialog" aria-labelledby="dataConfirmLabel" tabindex="-1"> - <div class="modal-dialog" role="document"> - <div class="modal-content"> - <div class="modal-header"> - <h4><?php _e('Delete this message?')?></h4> - </div> - <div class="modal-body"> - <?php _e('Once you delete this message, it cannot be undone.')?> - </div> - <div class="modal-footer"> - <a class="btn btn-primary confirm-ok"> - <?php _e('Delete message') ?> - </a> - <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Cancel')?></button> - </div> - </div> - </div> -</div> \ No newline at end of file diff --git a/usr/module/message/template/front/index-detail.phtml b/usr/module/message/template/front/index-detail.phtml deleted file mode 100755 index 72d1053aeb..0000000000 --- a/usr/module/message/template/front/index-detail.phtml +++ /dev/null @@ -1,70 +0,0 @@ -<?php $this->css($this->assetModule('script/front.css')); ?> -<div class="clearfix"> - <div class="col-md-3"> - <?php include $this->templateModule('front/user-profile-sidebar.phtml', 'user'); ?> - </div> - <div class="col-md-9"> - <ul class="nav nav-tabs message-nav-tabs"> - <li class="active"> - <a href="<?php echo $this->url('', array('controller' => 'index', 'action' => 'index')); ?>" - title="<?php _e('Private message'); ?>"><?php echo $messageTitle; ?></a> - </li> - <li> - <a href="<?php echo $this->url('', array('controller' => 'notify', 'action' => 'index')); ?>" - title="<?php _e('Notification'); ?>"><?php echo $notificationTitle; ?></a> - </li> - </ul> - <?php if (!empty($errMessage)) { $class = ' alert-error'; ?> - <div class="alert<?php echo $class; ?>"> - <?php echo $errMessage; ?> - </div> - <?php } ?> - <?php if (!empty($list)) { ?> - <?php foreach($list as $singleMessage) { ?> - <div class="messages" id="message-js"> - <div class="media message-detail"> - <div class="message-detail-head"> - <h4 class="media-heading pull-left message-head"> - <span><?php echo $uid == $singleMessage['uid_from'] ? __('To') : __('From'); ?></span> - <a href="<?php echo $singleMessage['profileUrl']; ?>"><?php echo $singleMessage['name']; ?></a> - </h4> - <p class="message-time text-right"> - <span class="muted"><?php echo _date($singleMessage['time_send']); ?></span> - </p> - </div> - <div class="media message-detail-primary"> - <a href="<?php echo $singleMessage['profileUrl']; ?>" class="pull-left"> - <?php echo $singleMessage['avatar']; ?> - </a> - <div class="media-body message-detail-con"> - <p><?php echo $singleMessage['content']; ?></p> - <div class="message-detail-hidden"> - <p class="pull-right"> - <a href="<?php echo $this->url('', array('action' => 'delete', 'ids' => $singleMessage['id'], 'tid' => $singleMessage['uid_to'])); ?>" - class="js-delete"> - <?php _e('Delete'); ?> - </a> - </p> - </div> - </div> - </div> - </div> - <?php } ?> - <div class="clearfix well"> - <?php echo $this->form($form, 'horizontal'); ?> - </div> - </div> - <?php } ?> - <?php include $this->template('./_confirm-modal.phtml'); ?> - </div> -</div> -<?php -$paginator = isset($paginator) ? $paginator->getCurrentPageNumber() : ''; -$host = $this->url('', array('module' => 'message')); -$confirm = __('Once you delete this message, it cannot be undone.'); -$script = "messageIndex({p: '%s', host: '%s', confirm: '%s'});"; -$script = sprintf($script, $paginator, $host, $confirm); - -$this->footScript()->appendFile($this->assetModule('script/index-detail.js')); -$this->footScript()->appendScript($script); -?> \ No newline at end of file diff --git a/usr/module/message/template/front/index-index.phtml b/usr/module/message/template/front/index-index.phtml deleted file mode 100755 index 9ed676709c..0000000000 --- a/usr/module/message/template/front/index-index.phtml +++ /dev/null @@ -1,118 +0,0 @@ -<?php $this->css($this->assetModule('script/front.css')); ?> - <div class="clearfix"> - <div class="col-md-3"> - <?php include $this->templateModule('front/user-profile-sidebar.phtml', 'user'); ?> - </div> - <div class="col-md-9"> - <div class="page-header"> - <h1><?php _e('Message'); ?></h1> - </div> - <ul class="nav nav-tabs message-nav-tabs"> - <li class="active"> - <a href="<?php echo $this->url('', array('controller' => 'index', 'action' => 'index')); ?>" - title="<?php _e('Private message'); ?>"><?php echo $messageTitle; ?></a> - </li> - <li> - <a href="<?php echo $this->url('', array('controller' => 'notify', 'action' => 'index')); ?>" - title="<?php _e('Notification'); ?>"><?php echo $notificationTitle; ?></a> - </li> - </ul> - <div class="messages" id="message-js"> - <?php if (!empty($messages)) { ?> - <?php foreach ($messages as $message) { ?> - <div class="clearfix message-item<?php if (!$message['is_read']) { echo ' message-item-read'; } ?>"> - <div class="pull-left text-center"> - <div class="pull-left message-checkbox"> - <input type="checkbox" class="message-js-check" data-id="<?php echo $message['id']; ?>"> - </div> - <div class="pull-left message-avatar"> - <a href="<?php echo $message['profileUrl']; ?>"> - <?php echo $message['avatar']; ?> - </a> - </div> - </div> - <div class="col-md-10"> - <ul class="list-inline small"> - <li class="message-time muted"><?php echo $uid == $message['uid_from'] ? __('To') : __('From'); ?></li> - <li> - <a href="<?php echo $message['profileUrl']; ?>" class="message-user-name"> - <?php echo $message['name']; ?> - </a> - </li> - <li class="message-divider">|</li> - <li class="message-time muted"><?php echo _date($message['time_send']); ?></li> - <li class="message-divider">|</li> - <li> - <a href="<?php if (isset($paginator)) { - echo $this->url('', array( - 'action' => 'delete', - 'ids' => $message['id'], - 'p' => $paginator->getCurrentPageNumber() - )); - } else { - echo $this->url('', array('action' => 'delete', 'ids' => $message['id'])); - } ?>" class="message-js-delete" - data-confirm="<?php _e('Once you delete this message, it cannot be undone.'); ?>"> - <?php _e('Delete'); ?> - </a> - </li> - <li class="message-divider">|</li> - <li class="message-mark"> - <a href="<?php if (isset($paginator)) { - echo $this->url('', array( - 'action' => 'mark', - 'ids' => $message['id'], - 'p' => $paginator->getCurrentPageNumber() - )); - } else { - echo $this->url('', array('action' => 'mark', 'ids' => $message['id'])); - } ?>"> - <?php _e('Mark as read'); ?> - </a> - </li> - <li class="message-divider">|</li> - <li class="message-mark"> - <a href="<?php echo $this->url('', array('action' => 'detail', 'mid' => $message['id'])); ?>"> - <?php _e('Read'); ?> - </a> - </li> - </ul> - <div class="message-content"> - <a href="<?php echo $this->url('', array('action' => 'detail', 'mid' => $message['id'])); ?>" - class="message-content-link"> <?php echo $message['content']; ?> - </a> - </div> - </div> - </div> - <?php } ?> - <?php } else { ?> - <div class="alert alert-info message-alert"><?php _e('No message for you!'); ?></div> - <?php } ?> - <?php if (isset($paginator)) { - echo $this->paginationControl($paginator, 'Sliding', 'paginator.phtml', array( - 'class' => 'pagination-right pull-right message-pagination' - )); - } ?> - <div class="clearfix"> - <form class="form-inline pull-left message-foot-form col-md-12" action=""> - <input type="checkbox" class="message-js-batch" title="<?php _e('Checked all'); ?>"> - <select class="message-batch-action"> - <option value=""><?php _e('Massive operation'); ?></option> - <option value="mark"><?php _e('Mark as read'); ?></option> - <option value="delete"><?php _e('Delete'); ?></option> - </select> - </form> - </div> - <?php include $this->template('./_confirm-modal.phtml'); ?> - </div> - </div> - </div> -<?php -$paginator = isset($paginator) ? $paginator->getCurrentPageNumber() : ''; -$host = $this->url('', array('module' => 'message')); -$confirm = __('Once you delete those message, it cannot be undone.'); -$script = "messageIndex({p: '%s', host: '%s', confirm: '%s'});"; -$script = sprintf($script, $paginator, $host, $confirm); -$this->footScript()->appendFile($this->assetModule('script/index-index.js')); -$this->footScript()->appendScript($script); -?> \ No newline at end of file diff --git a/usr/module/message/template/front/index-send.phtml b/usr/module/message/template/front/index-send.phtml deleted file mode 100755 index 8294305dd0..0000000000 --- a/usr/module/message/template/front/index-send.phtml +++ /dev/null @@ -1,15 +0,0 @@ -<div class="clearfix"> - <div class="col-md-3"> - <?php include $this->templateModule('front/user-profile-sidebar.phtml', 'user'); ?> - </div> - <div class="col-md-9"> - <div class="page-header"> - <a class="pull-right message-return" - href="<?php echo $this->url('', array('controller' => 'index', 'action' => 'index')); ?>"> - <?php _e('Return message list page'); ?> - </a> - <h3><?php _e('Write message'); ?></h3> - </div> - <?php echo $this->form($form); ?> - </div> -</div> \ No newline at end of file diff --git a/usr/module/message/template/front/notify-detail.phtml b/usr/module/message/template/front/notify-detail.phtml deleted file mode 100755 index 01d431303d..0000000000 --- a/usr/module/message/template/front/notify-detail.phtml +++ /dev/null @@ -1,72 +0,0 @@ -<?php $this->css($this->assetModule('script/front.css')); ?> - <div class="clearfix"> - <div class="col-md-3"> - <?php include $this->templateModule('front/user-profile-sidebar.phtml', 'user'); ?> - </div> - <div class="col-md-9"> - <ul class="nav nav-tabs message-nav-tabs"> - <li> - <a href="<?php echo $this->url('', array('controller' => 'index', 'action' => 'index')); ?>" - title="<?php _e('Private message'); ?>"><?php echo $messageTitle; ?></a> - </li> - <li class="active"> - <a href="<?php echo $this->url('', array('controller' => 'notify', 'action' => 'index')); ?>" - title="<?php _e('Notification'); ?>"><?php echo $notificationTitle; ?></a> - </li> - </ul> - <?php if (!empty($errMessage)) { ?> - <div class="alert alert-error"> - <button data-dismiss="alert" class="close" type="button"> - × - </button> - <?php echo $errMessage; ?> - </div> - <?php - $script = "$('.alert').alert();"; - $this->footScript()->appendScript($script); - ?> - <?php } ?> - <?php if (!empty($notification)) { ?> - <div class="messages" id="message-js"> - <div class="media message-detail"> - <div class="message-detail-head"> - <h4 class="media-heading pull-left message-head"> - <?php echo $notification['subject'] ?> - <?php if (!empty($notification['tag'])) { ?> - <span class="label label-info message-label-type"> - <?php echo $notification['tag']; ?> - </span> - <?php } ?> - </h4> - <p class="message-time text-right"> - <span class="muted"> - <?php echo _date($notification['time_send']); ?> - </span> - </p> - </div> - <div class="media message-detail-primary"> - <div class="media-body"> - <p class="message-body"><?php echo $notification['content']; ?></p> - <p class="pull-right"> - <a href="<?php echo $this->url('', array('action' => 'delete', 'ids' => $notification['id'])); ?>" - data-confirm="<?php _e('Once you delete this message, it cannot be undone.'); ?>"> - <?php _e('Delete'); ?> - </a> - </p> - </div> - </div> - </div> - </div> - <?php } ?> - <?php include $this->template('./_confirm-modal.phtml'); ?> - </div> - </div> -<?php -$paginator = isset($paginator) ? $paginator->getCurrentPageNumber() : ''; -$host = $this->url('', array('module' => 'message')); -$script = "messageIndex({p: '%s', host: '%s'});"; -$script = sprintf($script, $paginator, $host); - -$this->footScript()->appendFile($this->assetModule('script/notify-index.js')); -$this->footScript()->appendScript($script); -?> \ No newline at end of file diff --git a/usr/module/message/template/front/notify-index.phtml b/usr/module/message/template/front/notify-index.phtml deleted file mode 100755 index 29e3cca1ca..0000000000 --- a/usr/module/message/template/front/notify-index.phtml +++ /dev/null @@ -1,68 +0,0 @@ -<?php $this->css($this->assetModule('script/front.css')); ?> - <div class="clearfix"> - <div class="col-md-3"> - <?php include $this->templateModule('front/user-profile-sidebar.phtml', 'user'); ?> - </div> - <div class="col-md-9"> - <div class="page-header"> - <h1><?php _e('Notification'); ?></h1> - </div> - <ul class="nav nav-tabs message-nav-tabs"> - <li> - <a href="<?php echo $this->url('', array('controller' => 'index', 'action' => 'index')); ?>" - title="<?php _e('Private message'); ?>"><?php echo $messageTitle; ?></a> - </li> - <li class="active"> - <a href="<?php echo $this->url('', array('controller' => 'notify', 'action' => 'index')); ?>" - title="<?php _e('Notification'); ?>"><?php echo $notificationTitle; ?></a> - </li> - </ul> - <div class="messages" id="message-js"> - <?php if (!empty($notifications)) { ?> - <?php foreach ($notifications as $notification) { ?> - <div class="media message-item<?php if (!$notification['is_read']) { echo ' message-item-read';} ?>"> - <div class='pull-left'> - <input type="checkbox" class="message-js-check" data-id="<?php echo $notification['id']; ?>"> - <a class="message-content-link" href="<?php echo $this->url('', array('action' => 'detail', 'mid' => $notification['id'])); ?>"> - <?php echo _escape($notification['subject']); ?> - </a> - </div> - <div class="pull-right text-right message-media-right"> - <p class="message-time"> - <span class="muted"><?php echo _date($notification['time_send']); ?></span> - </p> - </div> - </div> - <?php } ?> - <?php } else { ?> - <div class="alert alert-info message-alert"><?php _e('No notification for you!'); ?></div> - <?php } ?> - <?php - if (isset($paginator)) { - echo $this->paginationControl($paginator, 'Sliding', 'paginator.phtml', array( - 'class' => 'pagination-right pull-right message-pagination' - )); - } - ?> - <div class="clearfix"> - <form class="form-inline message-foot-form col-md-12" action=""> - <input type="checkbox" class="message-js-batch" title="<?php _e('Checked all'); ?>"> - <select class="message-batch-action"> - <option value=""><?php _e('Massive operation'); ?></option> - <option value="mark"><?php _e('Mark as read'); ?></option> - <option value="delete"><?php _e('Delete'); ?></option> - </select> - </form> - </div> - <?php include $this->template('./_confirm-modal.phtml'); ?> - </div> - </div> - </div> -<?php -$paginator = isset($paginator) ? $paginator->getCurrentPageNumber() : ''; -$host = $this->url('', array('module' => 'message')); -$script = "messageIndex({p: '%s', host: '%s'});"; -$script = sprintf($script, $paginator, $host); -$this->footScript()->appendFile($this->assetModule('script/notify-index.js')); -$this->footScript()->appendScript($script); -?> \ No newline at end of file From 31c1468d1a71fd8bad087a072b5e9ab723d01f0d Mon Sep 17 00:00:00 2001 From: voltan <djvoltan@gmail.com> Date: Tue, 23 Aug 2016 11:29:44 +0430 Subject: [PATCH 03/10] Move comment and message to pi-module repo --- .gitmodules | 3 --- usr/module/message | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) create mode 160000 usr/module/message diff --git a/.gitmodules b/.gitmodules index 065285d500..457f497915 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,6 +13,3 @@ [submodule "usr/module/message"] path = usr/module/message url = https://github.com/pi-module/message -[submodule "usr/module/comment"] - path = usr/module/comment - url = https://github.com/pi-module/comment diff --git a/usr/module/message b/usr/module/message new file mode 160000 index 0000000000..c2ec7119e1 --- /dev/null +++ b/usr/module/message @@ -0,0 +1 @@ +Subproject commit c2ec7119e123761306d805e96dc9c9d347482bf7 From a2ad81e1caeac85d2d976553ac1206308ad2ce32 Mon Sep 17 00:00:00 2001 From: voltan <djvoltan@gmail.com> Date: Tue, 23 Aug 2016 11:31:11 +0430 Subject: [PATCH 04/10] Move comment and message to pi-module repo --- .gitmodules | 3 +++ usr/module/comment | 1 + 2 files changed, 4 insertions(+) create mode 160000 usr/module/comment diff --git a/.gitmodules b/.gitmodules index 457f497915..065285d500 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "usr/module/message"] path = usr/module/message url = https://github.com/pi-module/message +[submodule "usr/module/comment"] + path = usr/module/comment + url = https://github.com/pi-module/comment diff --git a/usr/module/comment b/usr/module/comment new file mode 160000 index 0000000000..92f2ef62fb --- /dev/null +++ b/usr/module/comment @@ -0,0 +1 @@ +Subproject commit 92f2ef62fbeec8e5b63c5bef14e7f97b03a3de8e From ff5d3beb5f4466532cab9c77a3062022cdc9f518 Mon Sep 17 00:00:00 2001 From: voltan <djvoltan@gmail.com> Date: Tue, 23 Aug 2016 11:32:46 +0430 Subject: [PATCH 05/10] Remove wrong folder --- .idea/sqldialects.xml | 7 ------- .idea/vcs.xml | 6 ------ 2 files changed, 13 deletions(-) delete mode 100644 .idea/sqldialects.xml delete mode 100644 .idea/vcs.xml diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml deleted file mode 100644 index 10eb429213..0000000000 --- a/.idea/sqldialects.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="SqlDialectMappings"> - <file url="file://$PROJECT_DIR$/usr/module/system/sql/mysql.sql" dialect="MySQL" /> - <file url="file://$PROJECT_DIR$/usr/module/system/sql/mysql.system.sql" dialect="MySQL" /> - </component> -</project> \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7f4c..0000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="VcsDirectoryMappings"> - <mapping directory="$PROJECT_DIR$" vcs="Git" /> - </component> -</project> \ No newline at end of file From 88b631d29edb624810eb5f3f11593235e109f0d4 Mon Sep 17 00:00:00 2001 From: voltan <djvoltan@gmail.com> Date: Tue, 23 Aug 2016 11:46:02 +0430 Subject: [PATCH 06/10] Fix template --- usr/module/widget/template/block/media/image-list.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/module/widget/template/block/media/image-list.phtml b/usr/module/widget/template/block/media/image-list.phtml index 4363a4d03e..158c582050 100644 --- a/usr/module/widget/template/block/media/image-list.phtml +++ b/usr/module/widget/template/block/media/image-list.phtml @@ -32,7 +32,7 @@ switch ($options['max_rows']) { break; } ?> -<div class="widget-media-list text-center"> +<div class="widget-media-list"> <div class="row clearfix"> <?php foreach($items as $item) { ?> <div class="<?php echo $rows; ?> widget-media-list-image"> From 5414e93f5872d5ec2dfe82fd664e992bbc13a953 Mon Sep 17 00:00:00 2001 From: voltan <djvoltan@gmail.com> Date: Tue, 23 Aug 2016 11:47:12 +0430 Subject: [PATCH 07/10] Move search to pi-module repo --- .gitmodules | 3 + usr/module/search | 1 + usr/module/search/asset/front/front.css | 42 -- usr/module/search/asset/front/search-tabs.js | 41 -- usr/module/search/config/block.php | 40 -- usr/module/search/config/config.php | 89 ---- usr/module/search/config/module.php | 32 -- usr/module/search/config/route.php | 25 - usr/module/search/doc/README.md | 40 -- usr/module/search/locale/en/admin.mo | Bin 463 -> 0 bytes usr/module/search/locale/en/admin.po | 137 ------ usr/module/search/locale/en/block.mo | Bin 503 -> 0 bytes usr/module/search/locale/en/block.po | 29 -- usr/module/search/locale/en/default.mo | Bin 463 -> 0 bytes usr/module/search/locale/en/default.po | 85 ---- usr/module/search/locale/fa/admin.mo | Bin 3399 -> 0 bytes usr/module/search/locale/fa/admin.po | 142 ------ usr/module/search/locale/fa/block.mo | Bin 632 -> 0 bytes usr/module/search/locale/fa/block.po | 35 -- usr/module/search/locale/fa/default.mo | Bin 1466 -> 0 bytes usr/module/search/locale/fa/default.po | 100 ---- usr/module/search/locale/fr/admin.mo | Bin 2965 -> 0 bytes usr/module/search/locale/fr/admin.po | 138 ------ usr/module/search/locale/fr/block.mo | Bin 605 -> 0 bytes usr/module/search/locale/fr/block.po | 36 -- usr/module/search/locale/fr/default.mo | Bin 1372 -> 0 bytes usr/module/search/locale/fr/default.po | 97 ---- usr/module/search/locale/zh-cn/admin.mo | Bin 514 -> 0 bytes usr/module/search/locale/zh-cn/admin.po | 123 ----- usr/module/search/locale/zh-cn/block.mo | Bin 671 -> 0 bytes usr/module/search/locale/zh-cn/block.po | 36 -- usr/module/search/locale/zh-cn/default.mo | Bin 1114 -> 0 bytes usr/module/search/locale/zh-cn/default.po | 86 ---- usr/module/search/sql/mysql.sql | 28 -- usr/module/search/src/Api/Breadcrumbs.php | 72 --- usr/module/search/src/Block/Block.php | 38 -- .../src/Controller/Front/IndexController.php | 456 ------------------ usr/module/search/src/Form/Element/Module.php | 33 -- usr/module/search/src/Route/Search.php | 172 ------- usr/module/search/template/block/search.phtml | 46 -- .../search/template/front/search-form.phtml | 56 --- .../search/template/front/search-google.phtml | 113 ----- .../search/template/front/search-home.phtml | 54 --- .../template/front/search-module-result.phtml | 51 -- .../search/template/front/search-result.phtml | 63 --- 45 files changed, 4 insertions(+), 2535 deletions(-) create mode 160000 usr/module/search delete mode 100644 usr/module/search/asset/front/front.css delete mode 100644 usr/module/search/asset/front/search-tabs.js delete mode 100644 usr/module/search/config/block.php delete mode 100644 usr/module/search/config/config.php delete mode 100644 usr/module/search/config/module.php delete mode 100644 usr/module/search/config/route.php delete mode 100644 usr/module/search/doc/README.md delete mode 100644 usr/module/search/locale/en/admin.mo delete mode 100644 usr/module/search/locale/en/admin.po delete mode 100644 usr/module/search/locale/en/block.mo delete mode 100644 usr/module/search/locale/en/block.po delete mode 100644 usr/module/search/locale/en/default.mo delete mode 100644 usr/module/search/locale/en/default.po delete mode 100644 usr/module/search/locale/fa/admin.mo delete mode 100644 usr/module/search/locale/fa/admin.po delete mode 100644 usr/module/search/locale/fa/block.mo delete mode 100644 usr/module/search/locale/fa/block.po delete mode 100644 usr/module/search/locale/fa/default.mo delete mode 100644 usr/module/search/locale/fa/default.po delete mode 100644 usr/module/search/locale/fr/admin.mo delete mode 100644 usr/module/search/locale/fr/admin.po delete mode 100644 usr/module/search/locale/fr/block.mo delete mode 100644 usr/module/search/locale/fr/block.po delete mode 100644 usr/module/search/locale/fr/default.mo delete mode 100644 usr/module/search/locale/fr/default.po delete mode 100644 usr/module/search/locale/zh-cn/admin.mo delete mode 100644 usr/module/search/locale/zh-cn/admin.po delete mode 100644 usr/module/search/locale/zh-cn/block.mo delete mode 100644 usr/module/search/locale/zh-cn/block.po delete mode 100644 usr/module/search/locale/zh-cn/default.mo delete mode 100644 usr/module/search/locale/zh-cn/default.po delete mode 100644 usr/module/search/sql/mysql.sql delete mode 100644 usr/module/search/src/Api/Breadcrumbs.php delete mode 100644 usr/module/search/src/Block/Block.php delete mode 100644 usr/module/search/src/Controller/Front/IndexController.php delete mode 100644 usr/module/search/src/Form/Element/Module.php delete mode 100644 usr/module/search/src/Route/Search.php delete mode 100644 usr/module/search/template/block/search.phtml delete mode 100644 usr/module/search/template/front/search-form.phtml delete mode 100644 usr/module/search/template/front/search-google.phtml delete mode 100644 usr/module/search/template/front/search-home.phtml delete mode 100644 usr/module/search/template/front/search-module-result.phtml delete mode 100644 usr/module/search/template/front/search-result.phtml diff --git a/.gitmodules b/.gitmodules index 065285d500..ac3bae6c24 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "usr/module/comment"] path = usr/module/comment url = https://github.com/pi-module/comment +[submodule "usr/module/search"] + path = usr/module/search + url = https://github.com/pi-module/search diff --git a/usr/module/search b/usr/module/search new file mode 160000 index 0000000000..ec5dd608a6 --- /dev/null +++ b/usr/module/search @@ -0,0 +1 @@ +Subproject commit ec5dd608a6a65f506d12c93641b8822505035b84 diff --git a/usr/module/search/asset/front/front.css b/usr/module/search/asset/front/front.css deleted file mode 100644 index 8878b4e1f8..0000000000 --- a/usr/module/search/asset/front/front.css +++ /dev/null @@ -1,42 +0,0 @@ -.search-tabs { - margin: 0 auto 10px; -} - -.search-tabs a { - padding: 0 10px 0 8px; - color: #333; -} - -.search-tabs .active { - font-weight: bold; - color: #428BCA; -} - -.search-service { - margin: 10px 0; -} - -.search-service a { - padding: 0 20px 0 8px; -} - -.search-result-item { - margin-bottom: 20px; -} - -.search-logo { - font-size: 24px; - font-weight: bold; - margin-top: 30px; - text-align: right; - display: block; -} - -.google-result { - margin: 30px 0; -} - -.search-tabs, -.search-service { - text-align: center; -} \ No newline at end of file diff --git a/usr/module/search/asset/front/search-tabs.js b/usr/module/search/asset/front/search-tabs.js deleted file mode 100644 index 9c5691f769..0000000000 --- a/usr/module/search/asset/front/search-tabs.js +++ /dev/null @@ -1,41 +0,0 @@ -(function($) { - var form = $('#js-search-form'); - var moduleUrl = form.data('module-url'); - var serviceUrl = form.data('service-url'); - - form.on('click', '.js-search-global', function(e) { - e.preventDefault(); - form.attr({ - 'action': form.data('url'), - 'target': '' - }); - form[0].submit(); - }).on('click', '.js-search-module', function(e) { - var name = $(this).data('name'); - e.preventDefault(); - form.attr({ - 'action': moduleUrl.replace('_NAME', name), - 'target': '' - }); - form[0].submit(); - }).on('click', '.js-search-service', function(e) { - var name = $(this).data('name'); - e.preventDefault(); - form.attr({ - 'action': serviceUrl.replace('_NAME', name), - 'target': '_blank' - }); - form[0].submit(); - }).submit(function() { - var module = form.data('module'); - if (module) { - form.attr({ - 'action': moduleUrl.replace('_NAME', module), - 'target': '' - }); - } else { - form.find('.js-search-global').trigger('click'); - } - }); - -})(jQuery) \ No newline at end of file diff --git a/usr/module/search/config/block.php b/usr/module/search/config/block.php deleted file mode 100644 index b6fe371d9b..0000000000 --- a/usr/module/search/config/block.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ -return array( - 'search' => array( - 'name' => 'search', - 'title' => _a('Search'), - 'description' => _a('Search box.'), - 'render' => array('block', 'search'), - 'template' => 'search', - 'config' => array( - 'target' => array( - 'title' => _a('Target'), - 'edit' => array( - 'type' => 'select', - 'options' => array( - 'options' => array( - '_self' => _a('_self'), - '_blank' => _a('_blank'), - ), - ), - ), - 'value' => '_self', - ), - 'module' => array( - 'title' => _a('Module'), - 'description' => _a('Module for search'), - 'edit' => array( - 'type' => 'Module\Search\Form\Element\Module', - ), - 'value' => 'all', - ) - ) - ), -); \ No newline at end of file diff --git a/usr/module/search/config/config.php b/usr/module/search/config/config.php deleted file mode 100644 index b027efd0da..0000000000 --- a/usr/module/search/config/config.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -$config = array( - 'leading_limit' => array( - 'title' => _t('Leading search result limit'), - 'description' => _t('Number of found items on leading page.'), - 'value' => 5, - 'filter' => 'int', - ), - - 'list_limit' => array( - 'title' => _t('List search result limit'), - 'description' => _t('Number of found items on list page.'), - 'value' => 20, - 'filter' => 'int', - ), - - 'min_length' => array( - 'title' => _t('Minimum query'), - 'description' => _t('Minimum length for query term.'), - 'value' => 3, - 'filter' => 'int', - ), - - 'search_interval' => array( - 'title' => _t('Search interval limit'), - 'description' => _t('Limit for search time interval.'), - 'value' => 0, - 'filter' => 'int', - ), - - 'search_interval_anonymous' => array( - 'title' => _t('Anonymous interval limit'), - 'description' => _t('Limit for anonymous search time interval.'), - 'value' => 3, - 'filter' => 'int', - ), - - 'logging' => array( - 'title' => _t('Log search terms'), - 'edit' => 'checkbox', - 'value' => 1, - 'filter' => 'int', - ), - - 'cache' => array( - 'title' => _t('Search result cache'), - 'edit' => 'cache_ttl', - 'value' => 0, - ), - - 'hot' => array( - 'title' => _t('Hot search'), - 'description' => _t('Hot words for global auto-complete, separated by comma `,`.'), - 'edit' => 'textarea', - 'value' => 'pi engine, zend framework, php, search', - ), - - 'google_host' => array( - 'title' => _t('Google local host'), - 'description' => _t('Specify a google local host if it is not https://www.google.com'), - 'value' => 'https://www.google.com', - ), - - 'google_code' => array( - 'title' => _t('Google custom search code'), - 'description' => _t('Google CSE provided at https://www.google.com/cse/'), - 'value' => '012766098119240378914:a6l0fuirq4a', - ), - - 'baidu_code' => array( - 'title' => _t('Baidu custom search code'), - 'description' => _t('Custom search provided by Baidu at http://zhanzhang.baidu.com/search/'), - ), - - 'search_in' => array( - 'title' => _t('Modules to search'), - 'description' => _t('Only specified modules are allowed to search, separated by ",".'), - ), -); - -return $config; \ No newline at end of file diff --git a/usr/module/search/config/module.php b/usr/module/search/config/module.php deleted file mode 100644 index f3f47e5eb3..0000000000 --- a/usr/module/search/config/module.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -return array( - 'meta' => array( - 'title' => _a('Search'), - 'description' => _a('Search service applications.'), - 'version' => '1.1.0', - 'license' => 'New BSD', - 'icon' => 'fa-search', - ), - 'author' => array( - 'Name' => 'Taiwen Jiang', - 'Email' => 'taiwenjiang@tsinghua.org.cn', - 'Dev' => '@lavenderli', - 'UI/UE' => '@zhangsimon, @loidco', - ), - 'resource' => array( - 'database' => array( - 'sqlfile' => 'sql/mysql.sql', - ), - 'config' => 'config.php', - 'block' => 'block.php', - 'route' => 'route.php', - ), -); diff --git a/usr/module/search/config/route.php b/usr/module/search/config/route.php deleted file mode 100644 index 7ee929b828..0000000000 --- a/usr/module/search/config/route.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -/** - * Route specs - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -return array( - // Search route - 'search' => array( - 'name' => 'search', - 'type' => 'Module\Search\Route\Search', - 'priority' => 5, - 'options' => array( - 'route' => '/search', - ), - ), -); diff --git a/usr/module/search/doc/README.md b/usr/module/search/doc/README.md deleted file mode 100644 index 8eb901db6f..0000000000 --- a/usr/module/search/doc/README.md +++ /dev/null @@ -1,40 +0,0 @@ -Search module -============= - -Entry and aggregator for module search. - -Two modes: -* Built-in function with module callback -* Use third-party search service like google API - - -How to implement built-in search in a module -============================================ - -Step 1. Set up search specification in module meta configuration, optional - -- Code - - In `config/module.php` - ``` - 'resource' => array( - ... - 'search' => 'Module\<ModuleName>\Api\SearchClass', - ), - ``` - -Step 2. Build callback for search query - -- The callback is required to extend `Pi\Search\AbstractSearch` -- The callback is recommended to locate in module api folder -- Check `Module\Article\Api\Search` and `Module\Demo\Api\Search` for example - -Step 3. Increase module version number and update - - -How to implement Google Custom Search Engine -============================================ - -Step 1. Apply for Google Custom Search service from `https://www.google.com/cse` - -Step 2. Copy your `Search engine ID` and paste to search module config `Google Search Code` \ No newline at end of file diff --git a/usr/module/search/locale/en/admin.mo b/usr/module/search/locale/en/admin.mo deleted file mode 100644 index 7a5fc1d30b232db7ede97f47501a9803032247d5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 463 zcmaJ-!A`?43>|_~kDNK=zzy8A+YnnOE{uUDHc>%A+@{c)HK<FfBwN{s?DzN<TsARI zJmtx<{a$SO>-cEXA{-D;h^NFu;yJNFkGP>`pJJo=MPkhdW*){lyr6Z;Xu%Q%4yDbC zAbCh(Xi<8q!;SPPSUZZl5cMH$vp5#<<yq9}L?nbqT&c$YuWllphtx{#O6iRiESN|= zU&=W`igNKM7YubU9ZyI5z2YzmhDLkT^vAlQWjua*UX@bm0m}+$9r~;1^cH%1T{G() zEsS(#a;4{j_1=^ZUf~Wk+U*jF!CZM3hZkX&I@=WPaa|jmyNPmMu$dgp8r!aUEge?U z7lMWR;?vL75-LL^7+*=t>$>KJUzEHwnJjsw=z+x&$q#KB81bdEd|~osiF|kV);CRx Bg|h$v diff --git a/usr/module/search/locale/en/admin.po b/usr/module/search/locale/en/admin.po deleted file mode 100644 index f2f5c1ebb4..0000000000 --- a/usr/module/search/locale/en/admin.po +++ /dev/null @@ -1,137 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-search\n" -"POT-Creation-Date: 2014-09-12 11:17+0330\n" -"PO-Revision-Date: 2014-09-12 11:17+0330\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.4\n" -"X-Poedit-KeywordsList: _a;_t\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: /var/www/html/local/pi/pi-release-2.5.0/usr/module/" -"search\n" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/block.php:12 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/module.php:12 -msgid "Search" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/block.php:13 -msgid "Search box." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/block.php:18 -msgid "Target" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/block.php:23 -msgid "_self" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/block.php:24 -msgid "_blank" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/block.php:31 -msgid "Module" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/block.php:32 -msgid "Module for search" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/module.php:13 -msgid "Search service applications." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:12 -msgid "Leading search result limit" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:13 -msgid "Number of found items on leading page." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:19 -msgid "List search result limit" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:20 -msgid "Number of found items on list page." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:26 -msgid "Minimum query" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:27 -msgid "Minimum length for query term." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:33 -msgid "Search interval limit" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:34 -msgid "Limit for search time interval." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:40 -msgid "Anonymous interval limit" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:41 -msgid "Limit for anonymous search time interval." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:47 -msgid "Log search terms" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:54 -msgid "Search result cache" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:60 -msgid "Hot search" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:61 -msgid "Hot words for global auto-complete, separated by comma `,`." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:67 -msgid "Google local host" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:68 -msgid "Specify a google local host if it is not https://www.google.com" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:73 -msgid "Google custom search code" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:74 -msgid "Google CSE provided at https://www.google.com/cse/" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:79 -msgid "Baidu custom search code" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:80 -msgid "Custom search provided by Baidu at http://zhanzhang.baidu.com/search/" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:84 -msgid "Modules to search" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:85 -msgid "Only specified modules are allowed to search, separated by \",\"." -msgstr "" diff --git a/usr/module/search/locale/en/block.mo b/usr/module/search/locale/en/block.mo deleted file mode 100644 index 7b0beaaf98c6e25ca2d43a445233d6e65152ba9c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 503 zcmaJ;!A=4(5Y^~ukDfi$#Dhj>y9*ehgo_A<2yvrmyqU5)LQQEmZ2|cZKgVD3TO7cM zCntTGPT!m9OZ#=O|FJ`{OE@GP6ZQz_gjLiDpF}n&uQb1rIs1lrfL;Ml=)AH<uuOqR z>GDaG-3_7bPzE}OYZ*|mN|M$fX+T<GX)4mov!q&0NC@{hSF8Sib$#gr44pJy%V3>g zQD2(zOpXzTD5rmF!O%p5-k`JfmBvZbwkDvV8OxH)1bh#?)KZxy%O}!#46Vmu7wTKx z>aJIG&@s6!lo<<FAE^*M!wnjA8xxtuLIsw_7jcc4O$k@hV=2Q#usF)}%t;Mh>!w~X zQ?5(jsx;YV+d47qsKwIL=C=P9mka9(-&Z~e_A=Ts59`;>Xf`B*@ws$-u~_g)m};(V dE;TO|EpVujOhAQ<C4A-`pW0%kk^g+p&Nn5vlBWOw diff --git a/usr/module/search/locale/en/block.po b/usr/module/search/locale/en/block.po deleted file mode 100644 index 513c3236b9..0000000000 --- a/usr/module/search/locale/en/block.po +++ /dev/null @@ -1,29 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-search\n" -"POT-Creation-Date: 2014-09-12 11:17+0330\n" -"PO-Revision-Date: 2014-09-12 11:17+0330\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.4\n" -"X-Poedit-Basepath: .\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Poedit-KeywordsList: _b\n" -"X-Poedit-SearchPath-0: /var/www/html/local/pi/pi-release-2.5.0/usr/module/" -"search\n" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/src/Block/Block.php:26 -msgid "Global" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/src/Block/Block.php:27 -msgid "Current module" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/block/search.phtml:4 -msgid "Search" -msgstr "" diff --git a/usr/module/search/locale/en/default.mo b/usr/module/search/locale/en/default.mo deleted file mode 100644 index a195b7b16e1dade92e3f2552c01dc5c3a148eef7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 463 zcmaJ-!A`?43>|_~kDNK=zzy8A8;C6v7sfyno2Z~5Zc}K@8q_6KlCA7R_IrE_E<=<P zPkFNZ{2W{UJUrNT2z$gM;xTcbcuH*0CvK@YpxAhRky!JNnTJUZ&uE=8TChZcLus=j zNbXY@S(Ki1xRxFT>qhYzL<5MsERIEdaT4`<5gFkD*Q)9N*Ef~ULu#dVrS!%M7EGmH ztmFbAMY;Tw3x+zFO=jbEuQ-f?k<lJC{jsTN8IK>HSEW>X$g)COhyL;@y@7t~Yi7Nn zg|W^|uJl5%{;TrA3*4ecyIUeLm@CiX@H{-D$}WXF+|<VAZmOIYY(5{(u`OOnhn4h& zU|}mheqSvi86v^>T3TM$H81?K<fX}E$ty(<ES5<9(4~P9UpdQ{CSR4vf6m_d0!E94 Aq5uE@ diff --git a/usr/module/search/locale/en/default.po b/usr/module/search/locale/en/default.po deleted file mode 100644 index 518b477246..0000000000 --- a/usr/module/search/locale/en/default.po +++ /dev/null @@ -1,85 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-search\n" -"POT-Creation-Date: 2014-09-12 11:17+0330\n" -"PO-Revision-Date: 2014-09-12 11:17+0330\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.4\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: /var/www/html/local/pi/pi-release-2.5.0/usr/module/" -"search\n" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/src/Form/Element/Module.php:25 -msgid "All modules" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/src/Controller/Front/IndexController.php:406 -msgid "Google" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/src/Controller/Front/IndexController.php:414 -msgid "Baidu" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-form.phtml:5 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-google.phtml:42 -msgid "Go to home page" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-form.phtml:17 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-home.phtml:22 -msgid "Global" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-form.phtml:33 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-home.phtml:38 -msgid "Keywords" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-form.phtml:36 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-home.phtml:41 -msgid "Search" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-google.phtml:8 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-google.phtml:88 -#, php-format -msgid "Google search for %s" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-google.phtml:28 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-google.phtml:78 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-google.phtml:90 -msgid "Loading ..." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-google.phtml:53 -msgid "Google search" -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-module-result.phtml:30 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-result.phtml:8 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-result.phtml:42 -#, php-format -msgid "%d found." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-module-result.phtml:35 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-result.phtml:12 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-result.phtml:52 -msgid "No result found." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-result.phtml:10 -msgid "Submission flood detected, please wait for a while." -msgstr "" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-result.phtml:46 -msgid "All result »" -msgstr "" diff --git a/usr/module/search/locale/fa/admin.mo b/usr/module/search/locale/fa/admin.mo deleted file mode 100644 index 6d53c2fd32b2de207b07450aeb2d337892f48f1f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3399 zcmb7_%WoS+9LI-JUZ%WC%cH!8B0v>c+euVWTmfoAC>2Q?+7y8VO2_utUb+u=cbzmG zK$RNDLJ_J|RYIaCB<fJ57&i^29D3jem)_8Bf_muz2{<7B0=~c5_1dlzL|0yayfeS~ zJ-+js_4Umg&oEri;C>SKmfINH0dCrWFI?Y&kAcmIzknlnz5xz^J8oy}aqt81A#e&z zfHiP8cp7{HyatlrKS7GMbz|svC-@+q_k&M^li+>eC*YmnJV<^|NBkOm0neAg=fLaW z>)?hvLi-``UOevuw}OYkhry#D)%Ph#_Gdxz|69ZxAU^C5e4T*?e}gGJSMOr%dGLF% zMD`%9AGw>cXTe!;8(0S^&QIVe@K<m<SiFZZ0e%J!fq#L!z!XI4154m5;2H2y@EV8@ z`yF2|g8zV2=Qb4e4)_{K>ra6-@Mn<h4{i$Me+ZJ!$3Uw0OOS&<fbW9=NOccFWMT%S zy7z!6JHE&#&C`Wa*cSB*I)kJuU7K-34)zFc+B3S44toGM?J32l-k^)LxgR(65?x4x zp%qkbP<+~BY^Bl?P`v=DlqOHn050kqw#Txq8Pl$~T(>;wObLS<x~Y3?Na*<r&sAK{ zHn}T>lPmF@otJF5YpCqlQ+i(Jd3J_}ON7Tuo>$JKQXiLuMRzfoC1=T;ZKgs`DYn<P zi-zRGhemkpB3kKU>Gbq;vZzeds+=q1C2OP<IWz1W(l6Pr$KJBNC~5U`+II3TFW3$* z8g>>&qT<;a@+lkAlYKBP3rBci85lMNKhk$3$wsBf>sGN<za!m>;Y9+Cl1$2{h&7CK z@^n+idcsR=x!%0n%9eMBu;b9!8`EWDx}}>HlN-`1dL<S7SVcNBoTiiUv>Ib$cD`cB z2+B4LAC0)&vs)VNub5fsaJvArik0WOCry{z76OF=ltob{+4^QWDhO>3SjG%@%QB}I zbm(cSBwQ{W$%SFq(-@26-X#3?zU@hNNVQr7p0$s+hGIb@{X@f+U^$U1$<`_tjjZPo zuv|9uobYtpa^XfLHNyoDJBzpbh3f^>%ypMrXdG(a-X>%d!YN9RO=b;Y9c7cQGzx6o zu|JYIPurK*-j$AvKp8%+YoXAI@dFduup?Ch+8gMv3?E4M@6^%*+CZB34`lk&FQo?u z(=gNy$|;@J|EJxka6N6p5teHR&vr6AF^c0=!RBZaQkWgj8D0>Hv3+AB?Y#Pv>BO*& zQ*Ob>Oc}{|^0=2O8$!2s^IS<duJm3#Jn^Qst8GWI3ewR=EF69ug$&=7)xE@f+Fof% z92rVt+?IK$*PnbjIf$9?QF~j?sAD&Z-pKGtv3ru1MUz8<j+|G@@ML>1+|h9iYv~M6 zO$mqI1F4c{8Y#6`sj`lb=18=qE46{-&SW}Oah+7yWzowe!Gc-;g5L;geq(jsKhOO| zf5|`ZF9tQf@{M2joBo2|<iTt(2g7<$WquuYi<oJUL8D{A>OA)^`QQ4>tMhFADXyH> z{d2(_nKuaM5q`<P%n^&cBOC5F5cYq(8&_bA`=ok1uHm}nrng5^>P2}|qHzVh<(T<j zQ7--xMDQ;JCsAd4Di(`sZy@}Ss604HQjwNwgsN&%T{lU!M58FXNiz#1!!l%O(mE^- zY8pJv23IK}jggUGr#b9TZ~|1))%}ZVqbMZ3hbaicVl1eVlt~s`1utPw$uy|a4-71J zWYg0F7sI`7XRhKcqcCK-usR=9Q5$ViTz`8H*X|n9j+V5#?A9anB)N>FE+C<xO4(A4 z>r}VW@GqkHCJdAYojcS~fa*oszFA0wO`#$$2Q{=-yn*3LiaD#cs<ZpMSHiO9pCdPv zcYWmxa@6sYJXGQLO51r`%r3h*Y-XH5hYgavq8hA0zG|w#28RrF=z@NUju!Pl8Y`3v zM%YB^H`NPs>SV{+-Gaw}mbTn7^kWqxbtKYq#_1V>Frr=waX!6gAw23Rh2A^roXx2g zucCRW^0j*&|9`!$-YE|jq7|1qdX!}CY{Jf_?(SyV%g@*CCy2KYb`+=M8`L0rSDf|V k7@W>L)JIE(Z@1pp5}KI&VGCpJkWK3>&*2cA=>A*%7m%xtzyJUM diff --git a/usr/module/search/locale/fa/admin.po b/usr/module/search/locale/fa/admin.po deleted file mode 100644 index e54d397e2e..0000000000 --- a/usr/module/search/locale/fa/admin.po +++ /dev/null @@ -1,142 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-search\n" -"POT-Creation-Date: 2015-02-20 12:10+0330\n" -"PO-Revision-Date: 2015-02-20 12:10+0330\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: fa\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.7.3\n" -"X-Poedit-KeywordsList: _a;_t\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: /var/www/html/local/pi/pi-release-2.5.0/usr/module/" -"search\n" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/block.php:12 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/module.php:12 -msgid "Search" -msgstr "جستجو" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/block.php:13 -msgid "Search box." -msgstr "باکس جستجو" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/block.php:18 -msgid "Target" -msgstr "هدف" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/block.php:23 -msgid "_self" -msgstr "_self" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/block.php:24 -msgid "_blank" -msgstr "_blank" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/block.php:31 -msgid "Module" -msgstr "ماژول" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/block.php:32 -msgid "Module for search" -msgstr "ماژول منبع برای جستجو" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:12 -msgid "Leading search result limit" -msgstr "پیشتاز نتایج جستجو" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:13 -msgid "Number of found items on leading page." -msgstr "تعداد موارد یافت شده در صفحه اصلی از هر ماژول" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:19 -msgid "List search result limit" -msgstr "محدودیت صفحه نمایش نتایج جستجو" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:20 -msgid "Number of found items on list page." -msgstr "تعداد موارد یافت شده در هر صفحه" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:26 -msgid "Minimum query" -msgstr "کمترین کوئری" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:27 -msgid "Minimum length for query term." -msgstr "کمترین طول برای کلمه مورد جستجو" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:33 -msgid "Search interval limit" -msgstr "محدودیت فاصله دو جستجو" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:34 -msgid "Limit for search time interval." -msgstr "محدودیت زمان برای فاصله بین دو جستجو" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:40 -msgid "Anonymous interval limit" -msgstr "محدودیت جستجو کاربر مهمان" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:41 -msgid "Limit for anonymous search time interval." -msgstr "محدودیت زمان برای فاصله بین دو جستجو توسط کاربر مهمان" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:47 -msgid "Log search terms" -msgstr "گزارش از کلمات جستجو شده" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:54 -msgid "Search result cache" -msgstr "کَش نتایج جستجو" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:60 -msgid "Hot search" -msgstr "جستجوی داغ" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:61 -msgid "Hot words for global auto-complete, separated by comma `,`." -msgstr "" -"کلمات داغ برای جستجوی سراسری به صورت اتو-کمپلیت ، با استفاده از کاما `,` جدا " -"کنید." - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:67 -msgid "Google local host" -msgstr "آدرس محلی گوگل" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:68 -msgid "Specify a google local host if it is not https://www.google.com" -msgstr "آدرس محلی گوگل را اگر https://www.google.com نیست مشخص کنید." - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:73 -msgid "Google custom search code" -msgstr "کد جستجو شخصی گوگل" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:74 -msgid "Google CSE provided at https://www.google.com/cse/" -msgstr "گوگل CSE ارائه شده در https://www.google.com/cse/" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:79 -msgid "Baidu custom search code" -msgstr "ایجاد کد جستجوی شخصی" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:80 -msgid "Custom search provided by Baidu at http://zhanzhang.baidu.com/search/" -msgstr "" -"کد جستجوی شخصی ارائه شده توسط بایدو در http://zhanzhang.baidu.com/search/" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:84 -msgid "Modules to search" -msgstr "ماژول ها برای جستجو" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/config.php:85 -msgid "Only specified modules are allowed to search, separated by \",\"." -msgstr "" -"تنها ماژول های مشخص شده برای جستجو در دسترس هستند. با استفاده از \",\" جدا " -"کنید." - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/config/module.php:13 -msgid "Search service applications." -msgstr "ابزار سرویس جستجو" diff --git a/usr/module/search/locale/fa/block.mo b/usr/module/search/locale/fa/block.mo deleted file mode 100644 index 389a3013344df52fc9f9dad2cc2b84a01368d1d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 632 zcmaKp&2H2%5XTJ^4iVx2R}SVzRXJa)iptAgSlX&$D<TMp0}^<X>28o?2ixh=8%Ra; zfVd&?29;1Rh!Y3iBLRtLVX~>ToEYVo|BPoQp4fk`uYD$HYsgLHE^--pj&xQb*O1r9 z73A%?en9<sfsjwAH;~CiLaw5|MD<WhR7@`oU2+NO_8{Zh7*LLuI<F;=U8$!+lE)xS zHYbVEuOM@5FK17|*g`8#lY-f0)=M6yY-~U{Txa)%15V>G+GJtO;*dr$kHU>`FbJ`b zJ%Yoc>;G@vL|DgCBb1fGX~U^E5o%V88L$*Y`A^L0f$;YC_P1AaMSkdwwQ~3~EIq1l z7zb}$P)Sj!A<gE(Sa72!=?>dk)pdIvfMMGz(|Mt0oNi4E=RIS)puqG)BpUL<(a68! z4=~e*?4Gbt2{-4|_YzqfA=!>LrR7vr%g~PEA?@AKZAEX5XtX|D^*?~4g*LgJ6xMP2 zV!F!oXP@A=S;%Q{C`_<eEP}Z!WgvAXWKb3OFar{B2p0RBei+o&1pOTb=hs8p_s!|A iFYQTtOxt(OkM{WYN78(6zBQ-ay9>_H`P!VdC*&_YGri9M diff --git a/usr/module/search/locale/fa/block.po b/usr/module/search/locale/fa/block.po deleted file mode 100644 index f6edf60e35..0000000000 --- a/usr/module/search/locale/fa/block.po +++ /dev/null @@ -1,35 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-search\n" -"POT-Creation-Date: 2015-02-20 12:10+0330\n" -"PO-Revision-Date: 2015-02-20 12:10+0330\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: fa\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.7.3\n" -"X-Poedit-Basepath: .\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Poedit-KeywordsList: _b\n" -"X-Poedit-SearchPath-0: /var/www/html/local/pi/pi-release-2.5.0/usr/module/" -"search\n" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/src/Block/Block.php:26 -msgid "Global" -msgstr "سراسری" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/src/Block/Block.php:27 -msgid "Current module" -msgstr "ماژول فعلی" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/block/search.phtml:4 -msgid "Search" -msgstr "جستجو" - -#~ msgid "Search box." -#~ msgstr "باکس جستجو" - -#~ msgid "Keywords" -#~ msgstr "کلمات کلیدی" diff --git a/usr/module/search/locale/fa/default.mo b/usr/module/search/locale/fa/default.mo deleted file mode 100644 index f3484ea96fc3b5235d6f3d729a668f766b3fd3a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1466 zcmaKq&u<$=6vwBf{HTEfp+CeAsqc~qiS7^Ety*owp)DmuO~KF<aX^YD-f_HWz2ok# zYbtR;N@62fTu>!$Tq-$@QkfL0a^v0$H#F-=hy(uwH@<JZse@E8^7u3F&71eW^LGB6 zIdVr}yoUKU=3UHFm}d^*52Ftr1-}Jf1iuGoz#qY9!3W@T;IH5-;BSTfJNPo}KfvSQ z-{1@2KOpBhd{~HA!DAqwKMivH9QZnT7Oa9Ff_HG{>tcWAh!7{?C-4pMJXiuh0bc^Y z0N(-wkn3%LC&2H(S@3RQKL!c*U*H^g2$$hJ?|>X%1>Xc0!5g3tLPoCrd5{N=3dqX) z!`h$0<h$_TUhrTIIGSr?oA10oj$y$yx%Xn$r-trCzAY|>A+@yM300D>W0iEml;&c2 zv!mz5B^me~u@LH28Hxo>sivlGDQe3#1zWF$`=CV0xZW(Bg@r0H%_iciy4}^WpNJ(b z{UBN++qT6=nu=<Lmg|!Y6BK*mKNjf*r@P)+Z3RgZ=!hDj);{?vRrOT)XQ&-2nJDVY zAkB+Q>NbN=*`gNfFA-xc`qpPE=CdBv0&AkWRQq_@x*RK+!f(AVQ{_>`EuXX8idAu` zT=B~8yKc4WBGCF&-3s{p|HduJB(;`f86}}ib?i}TNk(fOw9Q&pvUR}rs3A+&7O!2I z>MGlA>9USe6(Ps%HpHartJG<SGKl7>-js2o()VsGe_&mh#&NBNimfYAU2~5;y099g zrO&Me6{&b4qNbIP#+2>zb`?7l)7t+!OF@!)w6Ze4qNbad(9X6@n;zLy=j5Z*;I>?k zoLe$>y4|kROk1H7>beY_c7UH1tNe3V75kj+I-MkTCU4Ct+RhI#+cevI1GAI$MApkT zvL0m{W;p&K>u2kf^~~^z8-ZrXp--Nt*~%TGtS`*ZX4ee)e{Ue*-_81Dwvf#{%)T-A zc`@XaVvK0abzyc8y^X^Cy#YPldoU@oaRtQU1&;4!>nzi36E7iZ#AQcjm&|<>TIcAY z*&UC}PfVQRC!h892II{GSB5BT;rI|Dw|V0iGdiG5aCh=M?$A{4)4daAQ1yrfm@U}m o0jFkd(;8eM??!(60U`7eiVwLzn`Sh=$LAjMW%+8Gd^KDA3r8&bHUIzs diff --git a/usr/module/search/locale/fa/default.po b/usr/module/search/locale/fa/default.po deleted file mode 100644 index 57c6564469..0000000000 --- a/usr/module/search/locale/fa/default.po +++ /dev/null @@ -1,100 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-search\n" -"POT-Creation-Date: 2015-02-20 12:10+0330\n" -"PO-Revision-Date: 2015-02-20 12:10+0330\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: fa\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.7.3\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: /var/www/html/local/pi/pi-release-2.5.0/usr/module/" -"search\n" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/src/Controller/Front/IndexController.php:406 -msgid "Google" -msgstr "گوگل" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/src/Controller/Front/IndexController.php:414 -msgid "Baidu" -msgstr "بایدو" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/src/Form/Element/Module.php:25 -msgid "All modules" -msgstr "همه ماژول ها" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-form.phtml:5 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-google.phtml:42 -msgid "Go to home page" -msgstr "برو به صفحه اول" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-form.phtml:17 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-home.phtml:17 -msgid "Global" -msgstr "سراسری" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-form.phtml:33 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-home.phtml:33 -msgid "Keywords" -msgstr "کلمات کلیدی" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-form.phtml:36 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-home.phtml:5 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-home.phtml:36 -msgid "Search" -msgstr "جستجو" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-google.phtml:8 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-google.phtml:88 -#, php-format -msgid "Google search for %s" -msgstr "جستجوی سراسری برای %s" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-google.phtml:28 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-google.phtml:78 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-google.phtml:90 -msgid "Loading ..." -msgstr "در حال بارگذاری ..." - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-google.phtml:53 -msgid "Google search" -msgstr "جستجوی گوگل" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-module-result.phtml:7 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-result.phtml:22 -#, php-format -msgid "Search result of %s" -msgstr "نتایج جستجوی %s" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-module-result.phtml:9 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-result.phtml:24 -msgid "Search result" -msgstr "نتایج جستجو" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-module-result.phtml:35 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-result.phtml:8 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-result.phtml:47 -#, php-format -msgid "%d found." -msgstr "%d نتیجه" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-module-result.phtml:40 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-result.phtml:12 -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-result.phtml:57 -msgid "No result found." -msgstr "هیچ نتیجه ای یافت نشد" - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-result.phtml:10 -msgid "Submission flood detected, please wait for a while." -msgstr "مطالبی زیادی یافت شده است، لطفا اندکی صبر کنید." - -#: /var/www/html/local/pi/pi-release-2.5.0/usr/module/search/template/front/search-result.phtml:51 -msgid "All result »" -msgstr "همه نتایج »" - -#~ msgid "Bing" -#~ msgstr "بینگ" diff --git a/usr/module/search/locale/fr/admin.mo b/usr/module/search/locale/fr/admin.mo deleted file mode 100644 index b2f25ceaa113f9ccb531dc7503c649a515bbceff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2965 zcmbW3&u`pB6vwAfesn3n3Y1?hOjAUth`pQeqhX`8qT8fIBx$q>h+8`Ao!uR3d)yg2 z$#US*8%PML;$Du+3Bdu00~{7^s23zoh(jd~{0T@L_`b2dn>1}D7{&YX*l%Xuy!Yno z{Bh*q7YywMT*q)7KET*1@E?%c^?Mk52K=(%_uvBhzk)O1v-jcxm%+!u4p;$qz&Y?L zNb~&&z6kyW(tL*wGWHla0n*y9fe(XC@P6<TNb_|I_Q99Y{}en4egmEbe*?+>=zWYm z1Re*U0#AWYfM-G4*E&e{2}t%|7yJ&yANv76H?ZfQz$*IJ9?1P1g6Gly9jt*T9?bXK z1j)Y;d=mT^Tm`RzZ-F<#<KVGF`M5ebf&OLiCGazl#(xWvKR<&MmtR2g`%iEl{2Qb= zo<>kFf)=Fs4)H^FH$aNtP4EPG06};TJPDHDXF!_&DoFeM1VqT#=U|ay^zue_)Zn_C zo9>Zjw?Dcke-Q>3-^26(jeL0o*Q2<e$3=Ufb_5sY^J(g!VL67>JKx9;%02l(wL^_! zg{`uqxF}!LXkYB@SjYWHXO^otm1awXJXDcN**T%w84og>>WEt@Owi+jZcEnK^C&TT zOSNU2xB5IEB2wN<)1+Rle$*2&U0uILllg&;s`*S+c0ucID0yRjfsdvrMp_Kr-rn}R z&cuxhtQ-xwjZ4L3p$_1FPurBeqtn7^ce|}k+wzV!yc_Bkj6{}d5B?;fOyv|z6JbP} zZv&4b!7oi+^4T(l!i^K7I2Ex-RU}6-+iiKL_qOzi8)>sJE#kbayJdJ0|H!fx6{{$V zcqrp;+H;Fv$)xFXdhL&1yJu`gx3f?daJKpK#S_a@UB+QGi(1lf-GNyax4BAXWVw#9 zkZ7y8%M;O+KD)D-!VYqqi*eZJHj#nqD8wvsPFOCC<RT39HlB^vy(PF4QxiU0cjZ)o zxAac=XcW*QIJsdNus{SoS&p(ORuy2uBned@Ql(>yX`EAiE_hx&d|VS;b+BiyERRtf zRHFL}jco|il_}e7g(AMpHmwXhY|ZEoWsrJHZSQ?)EEcNsHRa`juB=_$@ES%s2fXvB zp*o+bO~2{YUiW5Zaa(_*_G)dWR)e9}lv|3%-_>qe*wouFBDSGOwW;$JoIQSCT7y%H zMYEmCGR{<nY<U|}M0Yc&^N!hEY*tp5Ru;z2Py4k>L*ux|Sg4=C<5cdX)g%-up5sAJ z7%S8H_cj*2*|8lt)RD$ph@k=~mpY$qskHKecR|JyXNNpp)3S{aPy4g}X}rn1-n+8z z&fhW$sLnUV+$IexUY-+l_R?OR`+n8;D{En9MCdJQ9ECcM6W6u#Gjlw@oqr|fXZZA~ zx$zY1Ix~T6<Zjn_?)PYcyoA=Ugjd5N6}D999MlH^K*`RazED^YIB9u;$#5bp&xKK1 z)_~|0(pE@cK4mF{d5;d2i4_irDU65L|Dz5TGZf?Y7iZO}pmV2G&s>TNfA*_jv)mV7 zG{XTD16zkOq>#e0U+#Evtcb$_9i~DlNgRg*>}oiGDK?kIl5Z)~h3xRjsma~pM4X^0 ziOmnMEMh6f;pOe!fxT-Ya_Jq<5u$jc8&94<J_UAx1xKl43$c-1SQ&^MC6MG2C=D=* zEo+<`i3CT5#^MX-%ywC^ro563zrte9NQ~6A6xqB&cI~QsvB#TL9kozf?aARF91bEx z9v<NYZ&4gYr=x-%-C3$O;baxxK@|rop%wqfXsqsH1bxgxqySqlb=fAv0ZFx65a-@~ z{ft6hEl0JL5t8QCTsyHI6_H`*pr)7iMBU$=fA^0AC5ey5um)+i%Ucu6jq^6P$Uk8m qWl5RYGk7U(EBel%=x(FuR&nTmJSp9G$<k>{_n(?l(sM<3g8na|mtvy; diff --git a/usr/module/search/locale/fr/admin.po b/usr/module/search/locale/fr/admin.po deleted file mode 100644 index f97dacd5b2..0000000000 --- a/usr/module/search/locale/fr/admin.po +++ /dev/null @@ -1,138 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-search\n" -"POT-Creation-Date: 2016-04-28 20:50+0200\n" -"PO-Revision-Date: 2016-04-28 20:50+0200\n" -"Last-Translator: Marc Desrousseaux\n" -"Language-Team: Marc Desrousseaux\n" -"Language: fr_FR\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.7\n" -"X-Poedit-KeywordsList: _a;_t\n" -"X-Poedit-Basepath: ../..\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-SearchPath-0: .\n" - -#: config/block.php:12 config/module.php:12 -msgid "Search" -msgstr "Rechercher" - -#: config/block.php:13 -msgid "Search box." -msgstr "Block de recherche." - -#: config/block.php:18 -msgid "Target" -msgstr "Target" - -#: config/block.php:23 -msgid "_self" -msgstr "self" - -#: config/block.php:24 -msgid "_blank" -msgstr "blank" - -#: config/block.php:31 -msgid "Module" -msgstr "Module" - -#: config/block.php:32 -msgid "Module for search" -msgstr "Module pour la recherche" - -#: config/config.php:12 -#, fuzzy -msgid "Leading search result limit" -msgstr "Limite de recherche sur la page de Résultats" - -#: config/config.php:13 -msgid "Number of found items on leading page." -msgstr "Nombre d'éléments trouvés affichés sur la page principale" - -#: config/config.php:19 -msgid "List search result limit" -msgstr "Limite pour la liste des résultats de recherche" - -#: config/config.php:20 -msgid "Number of found items on list page." -msgstr "Nombre d'éléments trouvés affichés sur la page de liste" - -#: config/config.php:26 -msgid "Minimum query" -msgstr "Requête minimale" - -#: config/config.php:27 -msgid "Minimum length for query term." -msgstr "Longueur minimum du terme recherché" - -#: config/config.php:33 -msgid "Search interval limit" -msgstr "Intervalle limite de Recherche" - -#: config/config.php:34 -msgid "Limit for search time interval." -msgstr "Intervalle entre 2 recherches" - -#: config/config.php:40 -msgid "Anonymous interval limit" -msgstr "Intervalle entre 2 recherches pour les Anonymes" - -#: config/config.php:41 -msgid "Limit for anonymous search time interval." -msgstr "Intervalle de temps limite pour la recherche des Anonymes" - -#: config/config.php:47 -msgid "Log search terms" -msgstr "Enregistrer les termes recherchés" - -#: config/config.php:54 -msgid "Search result cache" -msgstr "Cache des Résultats de Recherche" - -#: config/config.php:60 -msgid "Hot search" -msgstr "Recherche Fréquente" - -#: config/config.php:61 -msgid "Hot words for global auto-complete, separated by comma `,`." -msgstr "Mots fréquents pour l'auto-complétion globale, séparés par une virgule ','" - -#: config/config.php:67 -msgid "Google local host" -msgstr "Google local host" - -#: config/config.php:68 -msgid "Specify a google local host if it is not https://www.google.com" -msgstr "Indiquer un google local host si ce n'est pas httts://www.google.com" - -#: config/config.php:73 -msgid "Google custom search code" -msgstr "Code Google Custom Search" - -#: config/config.php:74 -msgid "Google CSE provided at https://www.google.com/cse/" -msgstr "Google CSE fourni à https://www.google.com/cse/" - -#: config/config.php:79 -msgid "Baidu custom search code" -msgstr "Code Baidu Custom Search" - -#: config/config.php:80 -msgid "Custom search provided by Baidu at http://zhanzhang.baidu.com/search/" -msgstr "Custom Search fourni par Baidu à http://zhanzhang.baidu.com/search/" - -#: config/config.php:84 -msgid "Modules to search" -msgstr "Module de recherche" - -#: config/config.php:85 -msgid "Only specified modules are allowed to search, separated by \",\"." -msgstr "Seuls les modules spécifiés sont autorisés à rechercher, séparés par \",\"." - -#: config/module.php:13 -msgid "Search service applications." -msgstr "Module Moteur de Recherche" diff --git a/usr/module/search/locale/fr/block.mo b/usr/module/search/locale/fr/block.mo deleted file mode 100644 index 25731e20e451514430eb701b40839828db9e30c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 605 zcmaKp%}(1u5XZNL_TU2t&K&00sv6@&&_)}jhZ<5L5@7{{dZUXyB(9uYYj(}YgY>C* z2cCtAEs+}|{WLQ>vpfIQyzKA(S7JNDfp8>z5@y22{tA175k3oz@ccok2l1Qp^rKRd z_=R{m?o7h&y)H>xX0id+u54>kmt?qDsf^t}DgvIBcunjpXEkIM`mP#f7dfU(CdfIS zm_Qna$>2LCM>rfwsE?Cx$uLQz5f^k{ZSKF@H#0t9&c^!M1jicYq5@9HvunK!Z6BkV zvCGyh33D>*_Zl?Z@y&D*&ClkiTk(T9iBe~Sd=>MjMid8n42Ml^Dm#W^W!O`gT;)?7 zZTmKY?uhZ!7Ot%9Qp4!B3eg|@O_sP<nmH<~0E2iG|By<b;xFT=F=3@4jt}EF%IcO) zjZ?>KufaB5>L<f7^x@=-g`Y6^I^I5UPEQYxOFyf8&~S6Rtz5d63rc&<8hX)hqx%hJ aG8_{bAE|k_St#U|u|X}USdr|QSiJ%=u&X2h diff --git a/usr/module/search/locale/fr/block.po b/usr/module/search/locale/fr/block.po deleted file mode 100644 index c94052daf9..0000000000 --- a/usr/module/search/locale/fr/block.po +++ /dev/null @@ -1,36 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-search\n" -"POT-Creation-Date: 2016-04-28 20:50+0200\n" -"PO-Revision-Date: 2016-04-28 20:50+0200\n" -"Last-Translator: Marc Desrousseaux\n" -"Language-Team: Marc Desrousseaux\n" -"Language: fr_FR\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.7\n" -"X-Poedit-Basepath: ../..\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Poedit-KeywordsList: _b\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-SearchPath-0: .\n" - -#: src/Block/Block.php:26 -#, fuzzy -msgid "Global" -msgstr "Globale" - -#: src/Block/Block.php:27 -msgid "Current module" -msgstr "Module courant" - -#: template/block/search.phtml:4 -msgid "Search" -msgstr "Rechercher" - -#~ msgid "Search box." -#~ msgstr "Boite de Recherche" - -#~ msgid "Keywords" -#~ msgstr "Mots-Clefs" diff --git a/usr/module/search/locale/fr/default.mo b/usr/module/search/locale/fr/default.mo deleted file mode 100644 index aad07fb087353fc67ae10b804a355137f30ef1fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1372 zcmaKrzi$*r6vu}^0$fP=sU$)XdW{t$nB~qS!CK3az}OCo4JZ3RP+8;McXx~Sb~ZD! z*siHkrJ|!i=`2B&k_ug)DoPptfcybzQsnz?@6NIWj5PPzH}mGb@4R{U_qk)w6vi3M zuQ8uvektEa@Pn}no&@*6Pr;|)$KbEvC*U*iH28dMzXU&n{X2L8d;^{U{{rRwTTpWS z1IqdTK=D8Nky7Wuv*2}b2K)nikHF7i&mODK-2f&3kKl3eE_e}q07|@{L5aT$eg*yl zHo)IN$@6Nw{(8LrCn)!Q3tj^M1((4ukOb*RXC<x-sRQJU?sEz}iYZ!Th(;Nr2_dFK zYBL#<Uuq!w)J#fUTNP=fZss`+Y+B{))h&~ym0Hd1w#n71rC_OV2TY~uF>Kq*Cm_$p zCH?W@*g{B0GhY3~dpp*pUaeV^W<`&pC{lMVIrdc^CW$xe2sOrg>X1dYE8#Y)?Lp>! zW((@()~1wl;3RN*mCBrrXWB8Dgmq+Sr=R5<skXC^;iK=Q`T;vR8&f;ewdzLuUPmuE zHUaDUwh0{5T(kAPZhouh=J6SS*SgZ2Yc}DiH~2{==RfGTW_-{cX9}O2U|me>s1Ds` z?`-9fwAyW~nW9&rj=IBU@F9nox^8P_qp^NxefdCqD{3~DY!SFXqP-G|1Mh}wWp1)! zfs(#)p2On(&WfHt@Do8@c6zx;tUN?a^V?ZyJk+aPu&b4}EvKknE1HjPV5c_q<O$a@ zA7a|tTG--)&0DB>X+l57!(NM`Mmw*Z$@PkL10PdSj!eHew}AJNoyFOLexTOng@X{A zwsHwC)v{x%bx*U`UC>4f-9(axv}-^qpA7eB{pCn?P*p<1zO!*zTACdVUr=sFtxM@Q zCP^yJq^U<uyunGI(Z5XZS)dXErTNxv@Omldu2-VA#{;~8^z+RssS0w#ed%cvCi)^Z zjqTLNc((}XS+w{#>2&?@@-*lDLZX$_!~3OF*ul2rLjgRc!+rS=4EL|n02j&RiUG}$ K!V|JeuGIg*6ly8} diff --git a/usr/module/search/locale/fr/default.po b/usr/module/search/locale/fr/default.po deleted file mode 100644 index 389e4898d4..0000000000 --- a/usr/module/search/locale/fr/default.po +++ /dev/null @@ -1,97 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-search\n" -"POT-Creation-Date: 2016-04-28 20:51+0200\n" -"PO-Revision-Date: 2016-04-28 20:51+0200\n" -"Last-Translator: Marc Desrousseaux\n" -"Language-Team: Marc Desrousseaux\n" -"Language: fr_FR\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.7\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: ../..\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-SearchPath-0: .\n" - -#: src/Controller/Front/IndexController.php:406 -msgid "Google" -msgstr "Google" - -#: src/Controller/Front/IndexController.php:414 -msgid "Baidu" -msgstr "Baidu" - -#: src/Form/Element/Module.php:25 -msgid "All modules" -msgstr "Tous les modules" - -#: template/front/search-form.phtml:6 template/front/search-google.phtml:43 -msgid "Go to home page" -msgstr "Aller à la page d'accueil" - -#: template/front/search-form.phtml:18 template/front/search-home.phtml:18 -msgid "Global" -msgstr "Globale" - -#: template/front/search-form.phtml:34 template/front/search-home.phtml:34 -msgid "Keywords" -msgstr "Mots-Clefs" - -#: template/front/search-form.phtml:37 template/front/search-home.phtml:6 -#: template/front/search-home.phtml:37 -msgid "Search" -msgstr "Rechercher" - -#: template/front/search-google.phtml:9 template/front/search-google.phtml:89 -#, php-format -msgid "Google search for %s" -msgstr "Recherche Google pour %s" - -#: template/front/search-google.phtml:29 template/front/search-google.phtml:79 -#: template/front/search-google.phtml:91 -msgid "Loading ..." -msgstr "Chargement..." - -#: template/front/search-google.phtml:54 -msgid "Google search" -msgstr "Recherche Google" - -#: template/front/search-module-result.phtml:8 -#: template/front/search-result.phtml:23 -#, php-format -msgid "Search result of %s" -msgstr "Résultat de recherche pour %s" - -#: template/front/search-module-result.phtml:10 -#: template/front/search-result.phtml:25 -msgid "Search result" -msgstr "Résultant de recherche" - -#: template/front/search-module-result.phtml:36 -#: template/front/search-result.phtml:9 template/front/search-result.phtml:48 -#, php-format -msgid "%d found." -msgstr "%d trouvé(s)." - -#: template/front/search-module-result.phtml:41 -#: template/front/search-result.phtml:13 template/front/search-result.phtml:58 -msgid "No result found." -msgstr "Aucun résultat trouvé." - -#: template/front/search-result.phtml:11 -msgid "Submission flood detected, please wait for a while." -msgstr "Un trop grand nombre de recherches détecté, merci d'attendre un peu" - -#: template/front/search-result.phtml:52 -#, fuzzy -msgid "All result »" -msgstr "Tous les résultats »" - -#~ msgid "Bing" -#~ msgstr "Bing" - -#~ msgid "Sogou" -#~ msgstr "Sogou" diff --git a/usr/module/search/locale/zh-cn/admin.mo b/usr/module/search/locale/zh-cn/admin.mo deleted file mode 100644 index f99697d5ae4d8e7e682eeda02fa12d675ab19d76..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 514 zcmaJ;Jx{|h5Df?zGBPuG2ZxleR&GIvQc$540Rrj}sWQotxN7alb}9WAENo2u4g4NP z_z^5z+N#}nx+nR)yVITRug$f02eFFWLhc~fku_w20J(v@MNU>6r!&{Tc*a<u=%3;q zxQ;U?(5eTqrOkvsf;K`)Mgl?2H0uU8A+2lR7JYioEikg@mky|3!62nF+dtg)E546~ z^bTG`(f@B<iyKQr&86vct284a7bB45N^qHynw_d%Ax^CkGR=nEQ#$oxdE&Ov9r6@t z2z<cELNfx=Z8zJE<qb-n@79&HAaU9_$F(iI+TFa*g{+b|<Jy2deh4pUWm#8j^$eOe zWULaL%}C`*ShqtjL4uyG8z@MGB_;33D`RFR={1Z;N++fzjAf+DtKFh)o;>3Qa&9w5 nyrnsN{Qzz1GZM21M?#c~XlQgaP|2_l(fkjb@3)Vi&x!K~U|W>R diff --git a/usr/module/search/locale/zh-cn/admin.po b/usr/module/search/locale/zh-cn/admin.po deleted file mode 100644 index 76cbb58950..0000000000 --- a/usr/module/search/locale/zh-cn/admin.po +++ /dev/null @@ -1,123 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-search\n" -"POT-Creation-Date: 2014-08-08 17:35+0800\n" -"PO-Revision-Date: 2014-08-08 17:35+0800\n" -"Last-Translator: Taiwen Jiang <taiwenjiang@tsinghua.org.cn>\n" -"Language-Team: \n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.6.7\n" -"X-Poedit-KeywordsList: _a;_t\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: c:\\code\\pi\\usr\\module\\search\n" - -#: c:\code\pi\usr\module\search/config/block.php:18 -msgid "Target" -msgstr "" - -#: c:\code\pi\usr\module\search/config/block.php:23 -msgid "_self" -msgstr "" - -#: c:\code\pi\usr\module\search/config/block.php:24 -msgid "_blank" -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:12 -msgid "Leading search result limit" -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:13 -msgid "Number of found items on leading page." -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:19 -msgid "List search result limit" -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:20 -msgid "Number of found items on list page." -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:26 -msgid "Minimum query" -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:27 -msgid "Minimum length for query term." -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:33 -msgid "Search interval limit" -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:34 -msgid "Limit for search time interval." -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:40 -msgid "Anonymous interval limit" -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:41 -msgid "Limit for anonymous search time interval." -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:47 -msgid "Log search terms" -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:54 -msgid "Search result cache" -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:60 -msgid "Hot search" -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:61 -msgid "Hot words for global auto-complete, separated by comma `,`." -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:67 -msgid "Google local host" -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:68 -msgid "Specify a google local host if it is not https://www.google.com" -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:73 -msgid "Google custom search code" -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:74 -msgid "Google CSE provided at https://www.google.com/cse/" -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:79 -msgid "Baidu custom search code" -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:80 -msgid "Custom search provided by Baidu at http://zhanzhang.baidu.com/search/" -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:84 -msgid "Modules to search" -msgstr "" - -#: c:\code\pi\usr\module\search/config/config.php:85 -msgid "Only specified modules are allowed to search, separated by \",\"." -msgstr "" - -#: c:\code\pi\usr\module\search/config/module.php:12 -msgid "Search" -msgstr "搜索" - -#: c:\code\pi\usr\module\search/config/module.php:13 -msgid "Search service applications." -msgstr "" diff --git a/usr/module/search/locale/zh-cn/block.mo b/usr/module/search/locale/zh-cn/block.mo deleted file mode 100644 index d0733a6df1057e26dba7e04d2aa1d956795a90a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 671 zcmaKp&ubJh6vw01UxRq?>>=J1$v9J`U9xT|ZhuhS;-I5=7?AADb2nu+8Ip{(-aLr* zpeR+WAP7AbL_O%$f51P&+gkR&@XgNZ-hAZ4%lEyP<c0U^%*<PYb`&{_EFs5{9I5O% zavIr2jv>3q3FPBM@1y^Dh>)-7Pa%&F*LBa(pG5s~qIc0_8JR&UJAz<n{BEU5yEF!r zqXV6lIgr&{cSTNaz}BWVnI*SDn6ytKqc<RRY%ODV!C0vkr;%iKob{rcF>4zT4&!V| zIN)?P2(Pf9fs2Oo{PNtzpb-RE$Zo+yS)KoHT}N2QVk4Bzh0})9SjbIK^tu$PN3XiE z+Ni{$vr_f?rSP@s`Kem)Iv6cQ4_FLh!0A8DDJXA!ZGCzAgU}DWwpI@R&*H5D+jj8C zT`F=RRg<QDVJx`Top^;crgc?U55TZxmFf)N=Csk3&b!A}L4m2;jWlG^(a@js=P^@D zc1>6)gzIzadr@8*k+T(T29{G*jHPYOHfg<Womcc+i-s4P)AN6a(vjA2dcQl()KiM^ zZWeHw@&sFhq>xEzO;S%bnaqj|f9wpmUySx%kDlz1;nV$tPw&xv8@>55{QQpme)Zwt H`yTlN1((E9 diff --git a/usr/module/search/locale/zh-cn/block.po b/usr/module/search/locale/zh-cn/block.po deleted file mode 100644 index 71bf7fbfab..0000000000 --- a/usr/module/search/locale/zh-cn/block.po +++ /dev/null @@ -1,36 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-search\n" -"POT-Creation-Date: 2014-08-08 17:36+0800\n" -"PO-Revision-Date: 2014-08-08 17:36+0800\n" -"Last-Translator: Taiwen Jiang <taiwenjiang@tsinghua.org.cn>\n" -"Language-Team: \n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.6.7\n" -"X-Poedit-Basepath: .\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Poedit-KeywordsList: _b\n" -"X-Poedit-SearchPath-0: c:\\code\\pi\\usr\\module\\search\n" - -#: c:\code\pi\usr\module\search/config/block.php:12 -msgid "Search" -msgstr "搜索" - -#: c:\code\pi\usr\module\search/config/block.php:13 -msgid "Search box." -msgstr "" - -#: c:\code\pi\usr\module\search/src/Block/Block.php:24 -msgid "Global" -msgstr "全站" - -#: c:\code\pi\usr\module\search/src/Block/Block.php:25 -msgid "Current module" -msgstr "当前频道" - -#: c:\code\pi\usr\module\search/template/block/search.phtml:5 -msgid "Keywords" -msgstr "关键字" diff --git a/usr/module/search/locale/zh-cn/default.mo b/usr/module/search/locale/zh-cn/default.mo deleted file mode 100644 index a99937bdefc0096d423e8dd65dfefde8fe2947ee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1114 zcmaKq&r1|x7{}krer-Ropo@q1qL-R!%}^ODOf$2zmfWJlg1qj$x+CMf+sr$ex2Pl# z4WZ2ZftZ9yVHR0RVTaD$I@KY9++FP-=+dF@yEChG>0ur|Jinj!o%dUD(J+DRg_b}E zpa-D8p-RqeB4j7n1Qvs>;8w5$+y>g<KF|y8JK!GJ{oq0HF}MSq19yRM!TsPzP}P41 zE5NVdG<5IgAn(<dV5enpH{zc_mH!1)`+N`mKSTZk55Zql6vRtFRaX|W0#x<2pgKn* zh;jK{RUXFX_f$I;M4fXxRNajdl#mEi^(hF(=Jz3`ChZWuW9sCzZBv(fzAb5)%dY#P zhSV|3^hu*F+L=un1(kxPL^r2t*2!UuPP+i=apopdp)<75*`=i(xxjmSgll@FSuoRb zI;pPf<f14{3+J~69a{bNZp-s5;m{6S2$Pyz@}%VE5t_C+^EmBcmdv+iv?pcRTqiMC zbRkD;GPSGRRka3<Sz54DBz7sT)w`TY__Z@ka)Ta=mLJ!m)%a+6l~GZ7I9eTzB2l}{ zZ&<4Szj@8flUm$mj%PC|T!Y4$)x#Zn-eNf137NOLlu;`^oHyk&UAUck(m54rhS$gS zX>rcF4Z3a{lsl1@rj~|{6O`-GNWE|*cQCCtjkP7eDUYUYW;r!9nPRTT<;g4Yvs(2= zp4zH|yIO;j6zZ-GTHS8R$Th8zJKPP{jR|hz3d{9My$X@Q)Czy8+47`8+uCZ{_(re} z7oTP_Wl(*?8T_#r+*;J2Nh5)gJdw5%zUL;oh3VTo5&i?bvz4W1x%UsUlM^I6zL0r3 zw*Ja;qaQNwX0k&QxrJ$x>6^_xA0?Ub$+ekBYfs*g)t8Iexq&eHk5TI7#_s;@3EOA- yUaviTk(nDInf|HO<>i&7IrZSOBU3@bk6X7%q2K&sZgwy;bbsyM;OhLaiu?h==t_S8 diff --git a/usr/module/search/locale/zh-cn/default.po b/usr/module/search/locale/zh-cn/default.po deleted file mode 100644 index bdfd11129c..0000000000 --- a/usr/module/search/locale/zh-cn/default.po +++ /dev/null @@ -1,86 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pi-search\n" -"POT-Creation-Date: 2014-08-08 17:36+0800\n" -"PO-Revision-Date: 2014-08-08 17:36+0800\n" -"Last-Translator: Taiwen Jiang <taiwenjiang@tsinghua.org.cn>\n" -"Language-Team: \n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.6.7\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: c:\\code\\pi\\usr\\module\\search\n" - -#: c:\code\pi\usr\module\search/src/Controller/Front/IndexController.php:406 -msgid "Google" -msgstr "谷歌搜索" - -#: c:\code\pi\usr\module\search/src/Controller/Front/IndexController.php:414 -msgid "Baidu" -msgstr "百度搜索" - -#: c:\code\pi\usr\module\search/template/front/search-form.phtml:5 -#: c:\code\pi\usr\module\search/template/front/search-google.phtml:42 -msgid "Go to home page" -msgstr "回首页" - -#: c:\code\pi\usr\module\search/template/front/search-form.phtml:17 -#: c:\code\pi\usr\module\search/template/front/search-home.phtml:22 -msgid "Global" -msgstr "全站" - -#: c:\code\pi\usr\module\search/template/front/search-form.phtml:33 -#: c:\code\pi\usr\module\search/template/front/search-home.phtml:38 -msgid "Keywords" -msgstr "关键字" - -#: c:\code\pi\usr\module\search/template/front/search-form.phtml:36 -#: c:\code\pi\usr\module\search/template/front/search-home.phtml:41 -msgid "Search" -msgstr "搜索" - -#: c:\code\pi\usr\module\search/template/front/search-google.phtml:8 -#: c:\code\pi\usr\module\search/template/front/search-google.phtml:88 -#, php-format -msgid "Google search for %s" -msgstr "%s的谷歌搜索结果" - -#: c:\code\pi\usr\module\search/template/front/search-google.phtml:28 -#: c:\code\pi\usr\module\search/template/front/search-google.phtml:78 -#: c:\code\pi\usr\module\search/template/front/search-google.phtml:90 -msgid "Loading ..." -msgstr "加载中..." - -#: c:\code\pi\usr\module\search/template/front/search-google.phtml:53 -msgid "Google search" -msgstr "谷歌搜索" - -#: c:\code\pi\usr\module\search/template/front/search-module-result.phtml:30 -#: c:\code\pi\usr\module\search/template/front/search-result.phtml:8 -#: c:\code\pi\usr\module\search/template/front/search-result.phtml:42 -#, php-format -msgid "%d found." -msgstr "%d个结果" - -#: c:\code\pi\usr\module\search/template/front/search-module-result.phtml:35 -#: c:\code\pi\usr\module\search/template/front/search-result.phtml:12 -#: c:\code\pi\usr\module\search/template/front/search-result.phtml:52 -msgid "No result found." -msgstr "无结果。" - -#: c:\code\pi\usr\module\search/template/front/search-result.phtml:10 -msgid "Submission flood detected, please wait for a while." -msgstr "请稍后重试。" - -#: c:\code\pi\usr\module\search/template/front/search-result.phtml:46 -msgid "All result »" -msgstr "更多 »" - -#~ msgid "Bing" -#~ msgstr "必应" - -#~ msgid "Sogou" -#~ msgstr "搜狗" diff --git a/usr/module/search/sql/mysql.sql b/usr/module/search/sql/mysql.sql deleted file mode 100644 index 3be7ca2ece..0000000000 --- a/usr/module/search/sql/mysql.sql +++ /dev/null @@ -1,28 +0,0 @@ -# Pi Engine schema -# http://pialog.org -# Author: Taiwen Jiang <taiwenjiang@tsinghua.org.cn> -# -------------------------------------------------------- - -# ------------------------------------------------------ -# Search -# >>>> - -# Search log -CREATE TABLE `{log}` ( - `id` int(10) unsigned NOT NULL auto_increment, - `term` varchar(255) NOT NULL default '', - `uid` int(10) unsigned NOT NULL default '0', - `time` int(10) unsigned NOT NULL default '0', - - PRIMARY KEY (`id`) -); - -# Search auto complete -CREATE TABLE `{dictionary}` ( - `id` int(10) unsigned NOT NULL auto_increment, - `term` varchar(255) NOT NULL default '', - `weight` int(10) unsigned NOT NULL default '0', - - PRIMARY KEY (`id`), - KEY `weight` (`weight`) -); diff --git a/usr/module/search/src/Api/Breadcrumbs.php b/usr/module/search/src/Api/Breadcrumbs.php deleted file mode 100644 index bde55c05f2..0000000000 --- a/usr/module/search/src/Api/Breadcrumbs.php +++ /dev/null @@ -1,72 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Search\Api; - -use Pi; -use Pi\Application\Api\AbstractBreadcrumbs; - -class Breadcrumbs extends AbstractBreadcrumbs -{ - /** - * {@inheritDoc} - */ - public function load() - { - // Get params - $params = Pi::service('url')->getRouteMatch()->getParams(); - - // Set module link - $moduleData = Pi::registry('module')->read($this->getModule()); - $result = array( - array( - 'label' => $moduleData['title'], - 'href' => Pi::url(Pi::service('url')->assemble('search', array( - 'module' => $this->getModule(), - ))), - ), - ); - - switch ($params['action']) { - case 'service': - $result[] = array( - 'label' => __(ucfirst($params['service'])), - 'href' => Pi::url(Pi::service('url')->assemble('search', array( - 'module' => $this->getModule(), - 'service' => $params['service'], - ))), - ); - break; - - case 'module': - $moduleData = Pi::registry('module')->read($params['m']); - $result[] = array( - 'label' => $moduleData['title'], - 'href' => Pi::url(Pi::service('url')->assemble('search', array( - 'module' => $this->getModule(), - 'm' => $moduleData['name'], - ))), - ); - break; - } - - $query = _get('q'); - if (empty($query)) { - end($result); - $key = key($result); - unset($result[$key]['href']); - } else { - $result[] = array( - 'label' => $query, - ); - } - - return $result; - } -} \ No newline at end of file diff --git a/usr/module/search/src/Block/Block.php b/usr/module/search/src/Block/Block.php deleted file mode 100644 index 167c19230e..0000000000 --- a/usr/module/search/src/Block/Block.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ -namespace Module\Search\Block; - -use Pi; - -class Block -{ - public static function search($options) - { - $formAction = Pi::service('url')->assemble('search'); - - $list = array(); - - if ($options['module'] == 'all') { - $module = Pi::service('module')->current(); - $modules = Pi::registry('search')->read(); - if ($module && isset($modules[$module])) { - $list = array( - '' => _b('Global'), - $module => _b('Current module'), - ); - } - } - - return array( - 'options' => $options, - 'action' => $formAction, - 'list' => $list - ); - } -} \ No newline at end of file diff --git a/usr/module/search/src/Controller/Front/IndexController.php b/usr/module/search/src/Controller/Front/IndexController.php deleted file mode 100644 index dce3aec59d..0000000000 --- a/usr/module/search/src/Controller/Front/IndexController.php +++ /dev/null @@ -1,456 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Search\Controller\Front; - -use Pi; -use Pi\Mvc\Controller\ActionController; -use Pi\Paginator\Paginator; - -/** - * Search controller - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class IndexController extends ActionController -{ - /** - * Search in available modules - * - * @return void - */ - public function indexAction() - { - $module = $this->params('m'); - $service = $this->params('s'); - if ($module) { - $this->searchModule($module); - } elseif ($service) { - $this->searchService($service); - } else { - $this->searchGlobal(); - } - } - - /** - * Search in a specific module - */ - public function moduleAction() - { - $this->searchModule(); - } - - /** - * Search by external service - */ - public function serviceAction() - { - $this->searchService(); - } - - /** - * Perform global search - * - * @return void - */ - protected function searchGlobal() - { - $query = $this->params('q'); - $modules = $this->getModules($query); - - if ($query) { - $total = 0; - $terms = array(); - $flood = false; - if (!$this->checkFlood()) { - $flood = true; - } else { - $terms = $this->parseQuery($query); - } - if ($terms) { - $limit = $this->config('leading_limit'); - $result = $this->query($terms, $limit); - } else { - $result = array(); - } - foreach ($result as $name => $data) { - $total += $data->getTotal(); - } - $this->view()->assign(array( - 'query' => $query, - 'result' => $result, - 'total' => $total, - 'flood' => $flood, - )); - $this->view()->setTemplate('search-result'); - } else { - $this->view()->assign(array( - 'query' => '' - )); - $this->view()->setTemplate('search-home'); - } - - $this->view()->assign(array( - 'modules' => $modules, - 'service' => $this->getService(), - 'searchModule' => '' - )); - } - - /** - * Perform module search - * - * @param string $module - * - * @return void - */ - protected function searchModule($module = '') - { - $query = $this->params('q'); - $page = $this->params('page') ?: 1; - $module = $module ?: $this->params('m'); - - $modules = $this->getModules($query); - if (!isset($modules[$module])) { - $this->redirect()->toRoute('search', array('q' => $query)); - return; - } - - if ($query) { - $result = array(); - $terms = array(); - $total = 0; - $limit = 0; - $flood = false; - if (!$this->checkFlood()) { - $flood = true; - } else { - $terms = $this->parseQuery($query); - } - if ($terms) { - $limit = $this->config('list_limit'); - $offset = $limit * ($page - 1); - $result = $this->query($terms, $limit, $offset, $module); - $total = $result ? $result->getTotal() : 0; - } - if ($total && $total > $limit) { - $paginator = Paginator::factory($total, array( - 'limit' => $limit, - 'page' => $page, - 'url_options' => array( - 'params' => array( - 'm' => $module, - ), - 'options' => array( - 'query' => array( - 'q' => $query, - ), - ), - ), - )); - } else { - $paginator = null; - } - $this->view()->assign(array( - 'query' => $query, - 'result' => $result, - 'total' => $total, - 'flood' => $flood, - 'paginator' => $paginator, - )); - $this->view()->setTemplate('search-module-result'); - } else { - $this->view()->setTemplate('search-home'); - } - $this->view()->assign(array( - 'modules' => $modules, - 'searchModule' => $module, - 'service' => $this->getService(), - )); - } - - /** - * Perform external search - * - * @param string $service - * - * @return void - */ - protected function searchService($service = '') - { - $query = $this->params('q'); - $service = $service ?: $this->params('service'); - if (!$service) { - $this->redirect()->toRoute('search', array('q' => $query)); - return; - } - - if ('google' == $service && $code = $this->config('google_code')) { - $host = $this->config('google_host'); - if (!$host) { - $host = 'www.google.com'; - } else { - $host = preg_replace('|^(http[s]?:\/\/)|i', '', $host); - $host = trim($host, '/'); - } - $this->view()->assign('google', array( - 'code' => $code, - 'host' => $host, - 'q' => $query, - )); - $this->view()->setTemplate('search-google'); - - return; - } - - $data = $this->getService($service); - if (!$data) { - $this->redirect()->toRoute('search', array('q' => $query)); - return; - } - $url = call_user_func($data['url'], $query); - header('location: ' . $url); - - exit(); - } - - /** - * Parse search terms from query string - * - * @param string $query - * - * @return array - */ - protected function parseQuery($query = '') - { - $result = array(); - - // Text quoted by `"` or `'` should be matched exactly - $pattern = '`(?:(?:"(?:\\"|[^"])+")|(?:\'(?:\\\'|[^\'])+\'))`is'; - $length = $this->config('min_length'); - - $terms = array(); - $callback = function ($match) use (&$terms) { - $terms[] = substr($match[0], 1, -1); - return ' '; - }; - $string = preg_replace_callback($pattern, $callback, $query); - $terms = array_merge($terms, explode(' ', $string)); - - array_walk($terms, function ($term) use (&$result, $length) { - $term = trim($term); - if (!$length || strlen($term) >= $length) { - $result[] = $term; - } - }); - $result = array_filter(array_unique($result)); - - return $result; - } - - /** - * Do search query - * - * @param array $terms - * @param int $limit - * @param int $offset - * @param string|array $in - * - * @return array - */ - protected function query(array $terms, $limit = 0, $offset = 0, $in = array()) - { - $moduleSearch = Pi::registry('search')->read(); - $moduleList = Pi::registry('modulelist')->read(); - $modules = (array) $in; - $result = array(); - - if ($this->config('search_in')) { - $modulesSpecified = explode(',', $this->config('search_in')); - $modulesSpecified = array_map('trim', $modulesSpecified); - $list = array(); - foreach ($modulesSpecified as $name) { - if (isset($moduleSearch[$name])) { - $list[$name] = $moduleSearch[$name]; - } - } - $moduleSearch = $list; - } - - foreach ($moduleSearch as $name => $callback) { - if ($modules && !in_array($name, $modules)) { - continue; - } - if (!isset($moduleList[$name])) { - continue; - } - $searchHandler = new $callback($name); - $result[$name] = $searchHandler->query($terms, $limit, $offset); - } - - if (is_scalar($in)) { - $result = isset($result[$in]) ? $result[$in] : array(); - } - - return $result; - } - - /** - * Get modules available for search - * - * @param string $query - * - * @return array - */ - protected function getModules($query = '') - { - $moduleSearch = Pi::registry('search')->read(); - $moduleList = Pi::registry('modulelist')->read(); - $modules = array(); - - if ($this->config('search_in')) { - $modulesSpecified = explode(',', $this->config('search_in')); - $modulesSpecified = array_map('trim', $modulesSpecified); - $list = array(); - foreach ($modulesSpecified as $name) { - if (isset($moduleSearch[$name])) { - $list[$name] = $moduleSearch[$name]; - } - } - $moduleSearch = $list; - } - - foreach (array_keys($moduleSearch) as $name) { - if (!isset($moduleList[$name])) { - continue; - } - $node = $moduleList[$name]; - $url = $this->url( - '', - array( - 'action' => 'module', - 'm' => $name - ), - array( - 'query' => array ( - 'q' => $query, - ), - ) - ); - $modules[$name] = array( - 'id' => $node['id'], - 'title' => $node['title'], - 'icon' => $node['icon'], - 'url' => $url, - ); - }; - - return $modules; - } - - /** - * Get third-party search service list - * - * @param string $service - * - * @return array - */ - protected function getService($service = '') - { - $home = parse_url(Pi::url('www'), PHP_URL_HOST); - //$home = 'pialog.org'; // For localhost test - - $googleQuery = function ($query) use ($home) { - $home = preg_replace('/^(http[s]?:\/\/)/i', '', $home); - $pattern = 'http://google.com?#newwindow=1&q=site:%s+%s'; - $link = sprintf($pattern, urlencode($home), urlencode($query)); - - return $link; - }; - $bingQuery = function ($query) use ($home) { - $home = preg_replace('/^(http[s]?:\/\/)/i', '', $home); - $pattern = 'http://bing.com?q=site:%s+%s'; - $link = sprintf($pattern, urlencode($home), urlencode($query)); - - return $link; - }; - $baiduQuery = function ($query) use ($home) { - $code = $this->config('baidu_code'); - if ($code) { - $pattern = 'http://zhannei.baidu.com/cse/search?s=%s&q=%s'; - $link = sprintf($pattern, urlencode($code), urlencode($query)); - } else { - $pattern = 'http://www.baidu.com/s?wd=site:(%s)+%s'; - $link = sprintf($pattern, urlencode($home), urlencode($query)); - - } - - return $link; - }; - $sogouQuery = function ($query) use ($home) { - $home = preg_replace('/^(http[s]?:\/\/)/i', '', $home); - $pattern = 'http://sogou.com/web?query=site:%s+%s'; - $link = sprintf($pattern, urlencode($home), urlencode($query)); - - return $link; - }; - - $list = array( - 'google' => array( - 'title' => __('Google'), - 'url' => $googleQuery, - ), -/* 'bing' => array( - 'title' => __('Bing'), - 'url' => $bingQuery, - ),*/ - 'baidu' => array( - 'title' => __('Baidu'), - 'url' => $baiduQuery, - ), -/* 'sogou' => array( - 'title' => __('Sogou'), - 'url' => $sogouQuery, - ),*/ - ); - - if ($service) { - $result = isset($list[$service]) ? $list[$service] : null; - } else { - $result = $list; - } - - return $result; - } - - /** - * Check against submission flood - * - * @return bool - */ - protected function checkFlood() - { - $result = true; - $interval = $this->config('search_interval'); - $uid = Pi::service('user')->getId(); - if (!$uid) { - $interval = $interval ?: $this->config('search_interval_anonymous'); - } - - if ($interval) { - $lastSearch = $_SESSION['SEARCH_LAST_QUERY']; - $_SESSION['SEARCH_LAST_QUERY'] = time(); - if ($lastSearch + $interval > time()) { - $result = false; - } - } - - return $result; - } -} diff --git a/usr/module/search/src/Form/Element/Module.php b/usr/module/search/src/Form/Element/Module.php deleted file mode 100644 index 6dfce610ff..0000000000 --- a/usr/module/search/src/Form/Element/Module.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Search\Form\Element; - -use Pi; -use Zend\Form\Element\Select; - -class Module extends Select -{ - /** - * @return array - */ - public function getValueOptions() - { - if (empty($this->valueOptions)) { - $modules = Pi::registry('search')->read(); - $list = array(); - $list['all'] = __('All modules'); - foreach ($modules as $key => $value) { - $list[$key] = $key; - } - $this->valueOptions = $list; - } - return $this->valueOptions; - } -} \ No newline at end of file diff --git a/usr/module/search/src/Route/Search.php b/usr/module/search/src/Route/Search.php deleted file mode 100644 index dc8f3f4802..0000000000 --- a/usr/module/search/src/Route/Search.php +++ /dev/null @@ -1,172 +0,0 @@ -<?php -/** - * Pi Engine (http://pialog.org) - * - * @link http://code.pialog.org for the Pi Engine source repository - * @copyright Copyright (c) Pi Engine http://pialog.org - * @license http://pialog.org/license.txt BSD 3-Clause License - */ - -namespace Module\Search\Route; - -use Pi\Mvc\Router\Http\Standard; - -/** - * Search route - * - * Use cases - * - * - Normal query - * - /search?q=<query> - * - * - Module query - * - /search?m=<module>&q=<query> - * - /search/<module>?q=<query> - * - * - External query - * - /search?s=<service>&q=<query> - * - /search/service/<service>?q=<query> - * - * - * @author Taiwen Jiang <taiwenjiang@tsinghua.org.cn> - */ -class Search extends Standard -{ - /** - * Default values. - * @var array - */ - protected $defaults = array( - 'module' => 'search', - 'controller' => 'index', - 'action' => 'index' - ); - - /** - * {@inheritDoc} - */ - protected function parse($path) - { - $matches = null; - - $parts = array(); - if ($path) { - $parts = array_filter(explode($this->structureDelimiter, $path)); - } - if ($parts) { - $matches = array(); - $matches['controller'] = 'index'; - $term = array_shift($parts); - if ('service' == $term) { - $matches['controller'] = 'index'; - $matches['action'] = 'service'; - if ($parts) { - $matches['service'] = $parts[0]; - } - } else { - $matches['action'] = 'module'; - $matches['m'] = $term; - } - - if ($parts) { - $matches = array_merge( - (array) $matches, - $this->parseParams($parts) - ); - } - } - - if (null !== $matches) { - $matches = array_merge($this->defaults, $matches); - } else { - //$path = $this->defaults['module'] . $this->structureDelimiter . $path; - $path = $this->prefix . $this->structureDelimiter . $path; - $matches = parent::parse($path); - } - - return $matches; - } - - /** - * {@inheritDoc} - */ - protected function assembleParams(array $params) - { - $url = ''; - if ($this->defaults['controller'] != $params['controller']) { - foreach ($params as $key => $value) { - if (in_array($key, array('module', 'controller', 'action'))) { - continue; - } - if (null === $value || '' === $value) { - continue; - } - $url .= $this->paramDelimiter . $this->encode($key) - . $this->keyValueDelimiter . $this->encode($value); - } - $url = ltrim($url, $this->paramDelimiter); - } - - return $url; - } - - /** - * {@inheritDoc} - */ - protected function assembleStructure(array $params, $url = '') - { - $mca = array(); - foreach (array('controller', 'action') as $key) { - if (!empty($params[$key])) { - $mca[$key] = $this->encode($params[$key]); - } - } - $query = array(); - if ($this->defaults['controller'] == $params['controller']) { - if (!empty($params['m'])) { - $mca['controller'] = $params['m']; - $mca['action'] = $this->defaults['action']; - } elseif (!empty($params['s']) || !empty($params['service'])) { - $service = !empty($params['s']) ? $params['s'] : $params['service']; - $mca['controller'] = 'service'; - $mca['action'] = $service; - } - if (!empty($params['q'])) { - $query['q'] = $params['q']; - } elseif (!empty($params['query'])) { - $query['q'] = $params['query']; - } - } - - if ($this->paramDelimiter === $this->structureDelimiter) { - foreach(array('action', 'controller') as $key) { - if (!empty($url) || $mca[$key] !== $this->defaults[$key]) { - $url = $this->encode($mca[$key]) . $this->paramDelimiter - . $url; - } - } - } else { - $structure = ''; - if ($mca['controller'] !== $this->defaults['controller']) { - $structure .= $this->structureDelimiter - . $this->encode($mca['controller']); - if ($mca['action'] !== $this->defaults['action']) { - $structure .= $this->structureDelimiter - . $this->encode($mca['action']); - } - } elseif ($mca['action'] !== $this->defaults['action']) { - $structure .= $this->structureDelimiter - . $this->encode($mca['controller']); - $structure .= $this->structureDelimiter - . $this->encode($mca['action']); - } - $url = $structure . ($url ? $this->paramDelimiter . $url : ''); - } - if ($query) { - $url .= '?' . http_build_query($query); - } - - return $url; - } - -} \ No newline at end of file diff --git a/usr/module/search/template/block/search.phtml b/usr/module/search/template/block/search.phtml deleted file mode 100644 index 845107f6df..0000000000 --- a/usr/module/search/template/block/search.phtml +++ /dev/null @@ -1,46 +0,0 @@ -<form method="get" action="<?php echo $block['action']; ?>" - <?php if (!empty($block['options']['target'])) { echo ' target="' . $block['options']['target'] . '"'; } ?>> - <div class="input-group"> - <input type="text" class="form-control" name="q" placeholder="<?php echo _b('Search'); ?>"> - <div class="input-group-btn"> - <?php if (!empty($block['list'])) { ?> - <a class="btn btn-default dropdown-toggle" data-toggle="dropdown"> - <i class="fa fa-search"></i> - <span class="caret"></span> - </a> - <ul class="dropdown-menu pull-right" id="js-search-menu"> - <?php foreach ($block['list'] as $name => $label) { ?> - <li> - <a href="#" data-value="<?php echo _escape($name); ?>"> - <?php echo _escape($label); ?> - </a> - </li> - <?php } ?> - </ul> - <input type="hidden" name="m"> - <?php } else { ?> - <?php if ($block['options']['module'] != 'all') { ?> - <input type="hidden" name="m" value="<?php echo $block['options']['module']; ?>"> - <?php } ?> - <button class="btn btn-default"> - <i class="fa fa-search"></i> - </button> - <?php } ?> - </div> - </div> -</form> -<?php if (!empty($block['list'])) { - $script = <<<'EOT' - $('#js-search-menu').on('click', 'a', function(e) { - var $this = $(this); - var val = $this.data('value'); - var form = $this.parents('form'); - var m = form.find('[name=m]'); - - e.preventDefault(); - m.val(val); - form[0].submit(); -}); -EOT; - $this->footScript()->appendScript($script); -} ?> \ No newline at end of file diff --git a/usr/module/search/template/front/search-form.phtml b/usr/module/search/template/front/search-form.phtml deleted file mode 100644 index e039de9a91..0000000000 --- a/usr/module/search/template/front/search-form.phtml +++ /dev/null @@ -1,56 +0,0 @@ -<?php $this->headMeta('noindex', 'robots'); ?> -<div class="row"> - <div class="col-md-2"> - <!-- You can define logo in theme --> - <a class="search-logo" href="<?php echo $this->url('home'); ?>" - title="<?php _e('Go to home page'); ?>"> - <?php echo _escape(Pi::config('sitename')); ?> - </a> - </div> - <div class="col-md-6"> - <form method="get" id="js-search-form" - data-url="<?php echo $this->url('search'); ?>" - data-module-url="<?php echo $this->url('search', array('m' => '_NAME')); ?>" - data-service-url="<?php echo $this->url('search', array('service' => '_NAME')); ?>" - data-module="<?php echo $searchModule; ?>"> - <div class="search-tabs"> - <a href="#" class="js-search-global<?php if (!$searchModule) { echo ' active'; } ?>"> - <?php _e('Global'); ?> - </a> - <?php - foreach ($modules as $name => $data) { - echo sprintf( - ' <a data-name="%s" href="#" class="js-search-module%s">%s</a> ', - $name, - $name == $searchModule ? ' active' : '', - _escape($data['title']) - ); - } - ?> - </div> - <div class="input-group"> - <input type="text" name="q" class="form-control" - value="<?php echo _escape($query); ?>" - placeholder="<?php _e('Keywords'); ?>"> - <div class="input-group-btn"> - <button type="submit" class="btn btn-primary"> - <span class="fa fa-search"></span> <?php _e('Search'); ?> - </button> - </div> - </div> - <div class="search-service"> - <?php - foreach ($service as $name => $data) { - echo sprintf( - ' <a data-name="%s" href="#" class="js-search-service">%s</a> ', - $name, - _escape($data['title']) - ); - } - ?> - </div> - </form> - </div> -</div> -<hr> -<?php $this->footScript()->appendFile($this->assetModule('front/search-tabs.js')); ?> \ No newline at end of file diff --git a/usr/module/search/template/front/search-google.phtml b/usr/module/search/template/front/search-google.phtml deleted file mode 100644 index e7b22cace4..0000000000 --- a/usr/module/search/template/front/search-google.phtml +++ /dev/null @@ -1,113 +0,0 @@ -<?php -$this->css($this->assetModule('front/front.css')); -$this->headMeta('noindex', 'robots'); -$mode = 'resultonly'; // 'resultonly', 'custom' -?> -<?php if ('default' == $mode) { ?> - <div class="panel panel-primary"> - <div class="panel-heading"> - <h1 class="panel-title"><?php echo sprintf(__('Google search for %s'), _escape(Pi::config('sitename'))); ?></h1> - </div> - <div class="panel-body"> - <script> - (function() { - var cx = '<?php echo $google['code']; ?>'; - var gcse = document.createElement('script'); - gcse.type = 'text/javascript'; - gcse.async = true; - gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + - '//<?php echo $google['host']; ?>/cse/cse.js?cx=' + cx; - var s = document.getElementsByTagName('script')[0]; - s.parentNode.insertBefore(gcse, s); - })(); - </script> - <gcse:search> - <div class="row" style="margin-top: 20px;"> - <div class="col-md-offset-2 col-md-8"> - <div class="well well-lg"> - <h4> - <?php _e('Loading ...'); ?> - </h4> - </div> - </div> - </div> - </gcse:search> - </div> - </div> - -<?php } elseif ('resultonly' == $mode) { ?> -<div class="row"> - <div class="col-md-2"> - <!-- You can define logo in theme --> - <a class="search-logo" href="<?php echo $this->url('home'); ?>" - title="<?php _e('Go to home page'); ?>" style="margin-top: 5px;"> - <?php echo _escape(Pi::config('sitename')); ?> - </a> - </div> - <div class="col-md-6"> - <form id="pi-gcse-search-box"> - <div class="input-group"> - <input type="text" name="q" value="<?php echo _escape($google['q']); ?>" class="form-control"> - <div class="input-group-btn"> - <button type="submit" class="btn btn-primary"> - <span class="fa fa-search"></span> - <?php _e('Google search'); ?> - </button> - </div> - </div> - </form> - </div> -</div> -<div class="google-result"> - <script> - (function() { - var cx = '<?php echo $google['code']; ?>'; - var gcse = document.createElement('script'); - gcse.type = 'text/javascript'; - gcse.async = true; - gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + - '//<?php echo $google['host']; ?>/cse/cse.js?cx=' + cx; - var s = document.getElementsByTagName('script')[0]; - s.parentNode.insertBefore(gcse, s); - })(); - </script> - <gcse:searchresults-only> - <div class="row" style="margin-top: 20px;"> - <div class="col-md-offset-2 col-md-8"> - <div class="well well-lg"> - <h4> - <?php _e('Loading ...'); ?> - </h4> - </div> - </div> - </div> - </gcse:searchresults-only> -</div> -<?php } else { ?> -<div class="panel panel-primary"> - <div class="panel-heading"> - <h3 class="panel-title"><?php echo sprintf(__('Google search for %s'), _escape(Pi::config('sitename'))); ?></h3> - </div> - <div class="panel-body" id="cse" style='width: 100%;'><?php _e('Loading ...'); ?></div> - - <script src="https://<?php echo $google['host']; ?>/jsapi" type="text/javascript"></script> - <script type="text/javascript"> - google.load('search', '1', {language: '<?php echo Pi::config('locale'); ?>'}); - google.setOnLoadCallback(function(){ - var customSearchControl = new google.search.CustomSearchControl('<?php echo $google['code']; ?>'); - //customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET); - customSearchControl.draw('cse'); - - // Preload query - var match = location.search.match(/q=([^&]*)(&|$)/); - if(match && match[1]){ - var search = decodeURIComponent(match[1]); - customSearchControl.execute(search); - } - - }); - </script> - -</div> - -<?php } ?> \ No newline at end of file diff --git a/usr/module/search/template/front/search-home.phtml b/usr/module/search/template/front/search-home.phtml deleted file mode 100644 index 98a743dad2..0000000000 --- a/usr/module/search/template/front/search-home.phtml +++ /dev/null @@ -1,54 +0,0 @@ -<?php -$this->css($this->assetModule('front/front.css')); -$this->headMeta('noindex', 'robots'); -?> -<div class="row"> - <h1><?php _e('Search'); ?></h1> - <form method="get" class="col-md-6 col-md-offset-3" id="js-search-form" - data-url="<?php echo $this->url('search'); ?>" - data-module-url="<?php echo $this->url('search', array('m' => '_NAME')); ?>" - data-service-url="<?php echo $this->url('search', array('service' => '_NAME')); ?>" - data-module="<?php echo $searchModule; ?>"> - <!-- You can define logo in theme --> - <a class="text-hide search-index-logo" href="<?php echo $this->url('home'); ?>"> - <?php echo _escape(Pi::config('sitename')); ?> - </a> - <div class="search-tabs"> - <a href="#" class="js-search-global<?php if (!$searchModule) { echo ' active'; } ?>"> - <?php _e('Global'); ?> - </a> - <?php - foreach ($modules as $name => $data) { - echo sprintf( - ' <a data-name="%s" href="#" class="js-search-module%s">%s</a> ', - $name, - $name == $searchModule ? ' active' : '', - _escape($data['title']) - ); - } - ?> - </div> - <div class="input-group"> - <input type="text" name="q" class="form-control" - value="<?php echo !empty($query) ? _escape($query) : ''; ?>" - placeholder="<?php _e('Keywords'); ?>"> - <div class="input-group-btn"> - <button type="submit" class="btn btn-primary"> - <span class="fa fa-search"></span> <?php _e('Search'); ?> - </button> - </div> - </div> - <div class="search-service"> - <?php - foreach ($service as $name => $data) { - echo sprintf( - ' <a data-name="%s" href="#" class="js-search-service">%s</a> ', - $name, - _escape($data['title']) - ); - } - ?> - </div> - </form> -</div> -<?php $this->footScript()->appendFile($this->assetModule('front/search-tabs.js')); ?> \ No newline at end of file diff --git a/usr/module/search/template/front/search-module-result.phtml b/usr/module/search/template/front/search-module-result.phtml deleted file mode 100644 index d1f7c6831d..0000000000 --- a/usr/module/search/template/front/search-module-result.phtml +++ /dev/null @@ -1,51 +0,0 @@ -<?php -$this->css($this->assetModule('front/front.css')); -$this->headMeta('noindex', 'robots'); -?> -<?php include $this->template('./search-form.phtml'); ?> -<div class="row"> - <?php if (isset($query) && !empty($query)) { ?> - <h1><?php echo sprintf(__('Search result of %s'), _escape($query)); ?></h1> - <?php } else { ?> - <h1><?php _e('Search result'); ?></h1> - <?php } ?> - <div class="col-md-2"> - <h4 class="text-muted text-right" style="margin-top: 10px;"> - <?php echo _escape($modules[$searchModule]['title']); ?> - </h4> - </div> - <div class="col-md-10"> - <?php - if ($total >= 1) { - foreach ($result as $item) { - ?> - <div class="search-result-item"> - <h4> - <a href="<?php echo $item['url']; ?>"> - <?php echo _escape($item['title']); ?> - </a> - </h4> - <p> - <?php echo _escape($item['content']); ?> - <p class="text-muted"> - <?php echo _date($item['time']); ?> - </div> - <?php } ?> - <div class="clearfix"> - <span class="pull-right text-muted"> - <?php echo sprintf(__('%d found.'), $total); ?> - </span> - </div> - <?php } else { ?> - <div class="text-muted" style="margin-top: 10px;"> - <?php _e('No result found.'); ?> - </div> - <?php } ?> - <hr> - <?php - if ($paginator) { - echo $this->pagination($paginator); - } - ?> - </div> -</div> \ No newline at end of file diff --git a/usr/module/search/template/front/search-result.phtml b/usr/module/search/template/front/search-result.phtml deleted file mode 100644 index 8ab5b1547c..0000000000 --- a/usr/module/search/template/front/search-result.phtml +++ /dev/null @@ -1,63 +0,0 @@ -<?php -$this->css($this->assetModule('front/front.css')); -$this->headMeta('noindex', 'robots'); -?> -<?php include $this->template('./search-form.phtml'); ?> -<p class="text-right text-muted"> - <?php - if (0 < $total) { - echo sprintf(__('%d found.'), $total); - } elseif (!empty($flood)) { - echo __('Submission flood detected, please wait for a while.'); - } else { - _e('No result found.'); - } - ?> -</p> -<?php -foreach ($result as $name => $data) { - $total = $data->getTotal(); -?> -<div class="row"> - <?php if (isset($query) && !empty($query)) { ?> - <h1><?php echo sprintf(__('Search result of %s'), _escape($query)); ?></h1> - <?php } else { ?> - <h1><?php _e('Search result'); ?></h1> - <?php } ?> - <div class="col-md-2"> - <h4 class="text-muted text-right" style="margin-top: 10px;"> - <?php echo _escape($modules[$name]['title']); ?> - </h4> - </div> - <div class="col-md-10"> - <?php if ($total >= 1) { foreach ($data as $item) { ?> - <div class="search-result-item"> - <h4> - <a href="<?php echo $item['url']; ?>"> - <?php echo _escape($item['title']); ?> - </a> - </h4> - <p> - <?php echo _escape($item['content']); ?> - <p class="text-muted"> - <?php echo _date($item['time']); ?> - </div> - <?php } ?> - <div class="clearfix"> - <span class="pull-right text-muted"> - <?php echo sprintf(__('%d found.'), $total); ?> - </span> - <?php if ($total > Pi::config('leading_limit', 'search')) { ?> - <a href="<?php echo $modules[$name]['url']; ?>"> - <?php echo __('All result »'); ?> - </a> - <?php } ?> - </div> - <?php } else { ?> - <p class="text-muted" style="margin-top: 10px;"> - <?php _e('No result found.'); ?> - <?php } ?> - <hr> - </div> -</div> -<?php } ?> \ No newline at end of file From 99ed8c3c3fdf21d0dd544a4c6fc284cfd58bf9b5 Mon Sep 17 00:00:00 2001 From: voltan <djvoltan@gmail.com> Date: Tue, 23 Aug 2016 12:05:26 +0430 Subject: [PATCH 08/10] Move comment and message to pi-module repo --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index ac3bae6c24..f082ea4743 100644 --- a/.gitmodules +++ b/.gitmodules @@ -18,4 +18,4 @@ url = https://github.com/pi-module/comment [submodule "usr/module/search"] path = usr/module/search - url = https://github.com/pi-module/search + url = https://github.com/pi-module/search \ No newline at end of file From cd44a74a62580ca0f2fd40302fef09d7e8a63995 Mon Sep 17 00:00:00 2001 From: voltan <djvoltan@gmail.com> Date: Tue, 23 Aug 2016 13:13:01 +0430 Subject: [PATCH 09/10] Add button from type --- .idea/vcs.xml | 6 ++++++ lib/Pi/Form/View/Helper/Form.php | 11 +++++++++++ 2 files changed, 17 insertions(+) create mode 100644 .idea/vcs.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..94a25f7f4c --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="VcsDirectoryMappings"> + <mapping directory="$PROJECT_DIR$" vcs="Git" /> + </component> +</project> \ No newline at end of file diff --git a/lib/Pi/Form/View/Helper/Form.php b/lib/Pi/Form/View/Helper/Form.php index e2c7cea57a..aae55ac6c2 100644 --- a/lib/Pi/Form/View/Helper/Form.php +++ b/lib/Pi/Form/View/Helper/Form.php @@ -217,6 +217,17 @@ public function render(FormInterface $form, $options = array()) </div> </div> <div class="%error_size% help-block">%error_content%</div> +EOT; + break; + + case 'button': + $labelPattern = ''; + $elementPattern =<<<EOT +<div class="%element_size% js-form-element"> + %element_content% + %desc_html% +</div> +<div class="%error_size% help-block">%error_content%</div> EOT; break; From 7818debf3e8c92d6bec9f9d237b4619ea12922e9 Mon Sep 17 00:00:00 2001 From: voltan <djvoltan@gmail.com> Date: Fri, 16 Sep 2016 12:08:42 +0430 Subject: [PATCH 10/10] Fix head title --- lib/Pi/View/Helper/ThemeAssemble.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/Pi/View/Helper/ThemeAssemble.php b/lib/Pi/View/Helper/ThemeAssemble.php index c1131aa102..3c3da46aa2 100644 --- a/lib/Pi/View/Helper/ThemeAssemble.php +++ b/lib/Pi/View/Helper/ThemeAssemble.php @@ -261,11 +261,15 @@ public function renderStrategy($module) $moduleMeta = Pi::registry('module')->read($module); $headTitleStr = $moduleMeta['title']; } - if ($headTitleStr && $headTitleStr != $sitename) { - $headTitle->set($headTitleStr); - } else { - $headTitle->set(Pi::config('slogan')); + if ($headTitleStr && $headTitleStr == $sitename) { + $headTitle->setPrefix(''); + $headTitle->setPostfix(''); + } + if (!empty($slogan)) { + $slogan = $separator . $slogan; + $headTitle->setPostfix($slogan); } + $headTitle->set($headTitleStr); } }