diff --git a/config/config.php b/config/config.php index ececb56..345a806 100644 --- a/config/config.php +++ b/config/config.php @@ -52,6 +52,14 @@ 'filter' => 'number_int', 'value' => 10 ), + 'show_info' => array( + 'category' => 'show', + 'title' => _a('Show information'), + 'description' => '', + 'edit' => 'checkbox', + 'filter' => 'number_int', + 'value' => 1 + ), 'show_tags' => array( 'category' => 'show', 'title' => _a('Tags'), @@ -69,6 +77,14 @@ 'value' => 1 ), // Question + 'question_ask' => array( + 'category' => 'question', + 'title' => _a('Can ask'), + 'description' => '', + 'edit' => 'checkbox', + 'filter' => 'number_int', + 'value' => 1 + ), 'question_answer' => array( 'category' => 'question', 'title' => _a('Can answer'), diff --git a/config/module.php b/config/module.php index 7d190aa..1f0583f 100644 --- a/config/module.php +++ b/config/module.php @@ -14,7 +14,7 @@ 'meta' => array( 'title' => _a('Ask'), 'description' => _a('Ask and Answer'), - 'version' => '0.1.0', + 'version' => '0.1.3', 'license' => 'New BSD', 'logo' => 'image/logo.png', 'readme' => 'docs/readme.txt', diff --git a/config/permission.php b/config/permission.php index 7c13039..36667d2 100755 --- a/config/permission.php +++ b/config/permission.php @@ -20,15 +20,14 @@ 'member', ), ), - 'author' => array( - 'title' => _a('Authors'), + 'submit' => array( + 'title' => _a('Submit'), 'access' => array( - 'guest', 'member', ), ), - 'favourite' => array( - 'title' => _a('Favourite'), + 'answer' => array( + 'title' => _a('Answer'), 'access' => array( 'member', ), @@ -36,38 +35,8 @@ ), // Admin section 'admin' => array( - 'attach' => array( - 'title' => _a('Attach'), - 'access' => array( - //'admin', - ), - ), - 'author' => array( - 'title' => _a('Authors'), - 'access' => array( - //'admin', - ), - ), - 'extra' => array( - 'title' => _a('Extra'), - 'access' => array( - //'admin', - ), - ), - 'spotlight' => array( - 'title' => _a('Spotlight'), - 'access' => array( - //'admin', - ), - ), - 'story' => array( - 'title' => _a('Story'), - 'access' => array( - //'admin', - ), - ), - 'topic' => array( - 'title' => _a('Topic'), + 'question' => array( + 'title' => _a('List of Questions'), 'access' => array( //'admin', ), diff --git a/locale/fa/admin.mo b/locale/fa/admin.mo index a148f79..790b0c8 100644 Binary files a/locale/fa/admin.mo and b/locale/fa/admin.mo differ diff --git a/locale/fa/admin.po b/locale/fa/admin.po index 317c54f..b25f5cc 100644 --- a/locale/fa/admin.po +++ b/locale/fa/admin.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2014-02-27 12:00+0330\n" +"POT-Creation-Date: 2015-03-30 11:04+0330\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -15,257 +15,230 @@ msgstr "" "X-Poedit-Basepath: .\n" "X-Poedit-SearchPath-0: /var/www/html/local/pi/pi-2.5.0/usr/module/ask\n" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/AnswerForm.php:48 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:31 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/front/question_index.phtml:28 -msgid "Answer" -msgstr "پاسخ" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/AnswerForm.php:62 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/AskForm.php:80 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/UpdateForm.php:80 -msgid "Submit" -msgstr "ارسال" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:16 +msgid "Admin" +msgstr "مدیریت" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/AskForm.php:42 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/UpdateForm.php:42 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:14 -msgid "Title" -msgstr "عنوان" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:20 +msgid "Show" +msgstr "نمایش" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/AskForm.php:53 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/UpdateForm.php:53 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:28 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:24 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/page.php:42 msgid "Question" msgstr "سوال" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/AskForm.php:67 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/UpdateForm.php:67 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:54 -msgid "Tags" -msgstr "برچسب ها" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:28 +msgid "Feed" +msgstr "خوراک" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Feed/IndexController.php:25 -msgid "Ask feed" -msgstr "خوراک سوالات" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:32 +msgid "Vote" +msgstr "رای" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Feed/IndexController.php:26 -msgid "Recent Questions." -msgstr "آخرین سوالات ارسال شده" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:40 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:49 +msgid "Perpage" +msgstr "تعداد هر هر صفحه" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Admin/QuestionController.php:102 -#, php-format -msgid "%s question accept successfully" -msgstr "%s با موفقیت تایید شد" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:50 +msgid "Number of questions in each page" +msgstr "تعداد سوالات در هر صفحه" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Admin/QuestionController.php:107 -#, php-format -msgid "Error in accept %s question" -msgstr "خطا در تایید %s" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:57 +msgid "Show information" +msgstr "نمایش اطلاعات" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Admin/QuestionController.php:113 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Admin/QuestionController.php:176 -msgid "Please select question" -msgstr "لطفا یک سوال انتخاب کنید" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:65 +msgid "Tags" +msgstr "برچسب ها" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Admin/QuestionController.php:153 -msgid "Your selected item edit successfully" -msgstr "آیتم انتخابی شما با موفقیت ویرایش شد" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:66 +msgid "Number of tags in tag controller" +msgstr "تعداد برچسب ها" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Admin/QuestionController.php:174 -msgid "Your selected question deleted" -msgstr "سوال انتخابی شما حذف شد" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:73 +msgid "Show breadcrumbs" +msgstr "نمایش ناوبری" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/IndexController.php:69 -msgid "Ask index seo title" -msgstr "فهرست پرسش و پاسخ های ارسالی" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:82 +msgid "Can ask" +msgstr "امکان پرسیدن سوال" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/IndexController.php:70 -msgid "ask index seo description" -msgstr "فهرست پرسش و پاسخ های ارسالی" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:90 +msgid "Can answer" +msgstr "امکان پاسخ به سوال" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/IndexController.php:71 -msgid "ask index seo keywords" -msgstr "فهرست,پرسش,پاسخ,سوال,جواب" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:97 +msgid "Automatic approval" +msgstr "تایید خودکار" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/SubmitController.php:64 -msgid "Your ask new question successfully, Other users can view and answer it" -msgstr "" -"پرسش شما با موفقیت ارسال شد، کاربران دیگر می توانند آن را بخوانند و پاسخ دهند" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:103 +msgid "All questions and answers need admin review before publish" +msgstr "تمام سوالات و پاسخ خا به تایید مدیر برای انتشار نیاز دارند" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/SubmitController.php:66 -msgid "" -"Your ask new question successfully, But it need review and publish by " -"website admin" -msgstr "" -"پرسش شما با موفقیت ارسال شد، بعد از بررسی و تایید مدیر در وب سایت منتشر می " -"شود" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/SubmitController.php:73 -msgid "Ask a new Question" -msgstr "پرسیدن سوال جدید" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/TagController.php:37 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/TagController.php:54 -msgid "The tag not found." -msgstr "برچسب یافت نشد" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/TagController.php:96 -msgid "Back to question list" -msgstr "برگشت به فهرست سوالات" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/QuestionController.php:33 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/AnswerController.php:42 -msgid "The question not found." -msgstr "سوال یافت نشد" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/AnswerController.php:65 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/AnswerController.php:95 -#, php-format -msgid "Answer to %s" -msgstr "پاسخ به %s" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/AnswerController.php:83 -msgid "" -"Your new answer to this question save successfully, and show under question" -msgstr "پاسخ شما به این پرسش با موفقیت ثبت شد، و در زیر سوال نمایش داده می شود" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:104 +msgid "Automatic approval all questions and answers" +msgstr "تایید خودکار پرسش و پاسخ های ارسالی" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/AnswerController.php:85 -msgid "" -"Your new answer to this question save successfully, But it need review and " -"publish by website admin" -msgstr "" -"پاسخ شما به این پرسش با موفقیت ثبت شد، بعد از بررسی و تایید مدیر نمایش داده " -"می شود" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:115 +msgid "Show feed icon" +msgstr "نمایش آیکن خوارک" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/navigation.php:16 -msgid "List of Question" -msgstr "فهرست سوالات" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:123 +msgid "Feed number" +msgstr "تعداد خوراک" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/navigation.php:23 -msgid "Tools" -msgstr "ابزار" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/config.php:132 +msgid "Use vote system" +msgstr "استفاده از سیستم رای" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/module.php:15 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/module.php:15 msgid "Ask" msgstr "پرسش و پاسخ" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/module.php:16 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/module.php:16 msgid "Ask and Answer" msgstr "سیستم ارسال پرسش و درج پاسخ" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:17 -msgid "Admin" -msgstr "مدیریت" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/navigation.php:16 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/page.php:17 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/permission.php:39 +msgid "List of Questions" +msgstr "فهرست سوالات" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:21 -msgid "Front" -msgstr "کاربر" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/navigation.php:26 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/page.php:22 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/permission.php:45 +msgid "Tools" +msgstr "ابزار" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:25 -msgid "Feed" -msgstr "خوراک" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/page.php:30 +msgid "Index page" +msgstr "صفحه اول" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:29 -msgid "Vote" -msgstr "رای" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/page.php:36 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/permission.php:30 +msgid "Answer" +msgstr "پاسخ" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:37 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:46 -msgid "Perpage" -msgstr "تعداد هر هر صفحه" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/page.php:48 +msgid "Submit question" +msgstr "ارسال سوال" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:47 -msgid "Number of questions in each page" -msgstr "تعداد سوالات در هر صفحه" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/page.php:54 +msgid "Tag" +msgstr "برچسب" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:55 -msgid "Number of tags in tag controller" -msgstr "تعداد برچسب ها" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/permission.php:17 +msgid "Global public resource" +msgstr "دسترسی های عمومی" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:61 -msgid "Automatic approval" -msgstr "تایید خودکار" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/config/permission.php:24 +msgid "Submit" +msgstr "ارسال" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:67 -msgid "All questions and answers need admin review before publish" -msgstr "تمام سوالات و پاسخ خا به تایید مدیر برای انتشار نیاز دارند" +#~ msgid "Title" +#~ msgstr "عنوان" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:68 -msgid "Automatic approval all questions and answers" -msgstr "تایید خودکار پرسش و پاسخ های ارسالی" +#~ msgid "Ask feed" +#~ msgstr "خوراک سوالات" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:79 -msgid "Show feed icon" -msgstr "نمایش آیکن خوارک" +#~ msgid "Recent Questions." +#~ msgstr "آخرین سوالات ارسال شده" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:87 -msgid "Feed number" -msgstr "تعداد خوراک" +#~ msgid "%s question accept successfully" +#~ msgstr "%s با موفقیت تایید شد" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:96 -msgid "Use vote system" -msgstr "استفاده از سیستم رای" +#~ msgid "Error in accept %s question" +#~ msgstr "خطا در تایید %s" + +#~ msgid "Please select question" +#~ msgstr "لطفا یک سوال انتخاب کنید" + +#~ msgid "Your selected item edit successfully" +#~ msgstr "آیتم انتخابی شما با موفقیت ویرایش شد" + +#~ msgid "Your selected question deleted" +#~ msgstr "سوال انتخابی شما حذف شد" + +#~ msgid "Ask index seo title" +#~ msgstr "فهرست پرسش و پاسخ های ارسالی" + +#~ msgid "ask index seo description" +#~ msgstr "فهرست پرسش و پاسخ های ارسالی" + +#~ msgid "ask index seo keywords" +#~ msgstr "فهرست,پرسش,پاسخ,سوال,جواب" + +#~ msgid "Your ask new question successfully, Other users can view and answer it" +#~ msgstr "پرسش شما با موفقیت ارسال شد، کاربران دیگر می توانند آن را بخوانند و پاسخ دهند" + +#~ msgid "Your ask new question successfully, But it need review and publish by website admin" +#~ msgstr "پرسش شما با موفقیت ارسال شد، بعد از بررسی و تایید مدیر در وب سایت منتشر می شود" + +#~ msgid "Ask a new Question" +#~ msgstr "پرسیدن سوال جدید" + +#~ msgid "The tag not found." +#~ msgstr "برچسب یافت نشد" + +#~ msgid "Back to question list" +#~ msgstr "برگشت به فهرست سوالات" + +#~ msgid "The question not found." +#~ msgstr "سوال یافت نشد" + +#~ msgid "Answer to %s" +#~ msgstr "پاسخ به %s" + +#~ msgid "Your new answer to this question save successfully, and show under question" +#~ msgstr "پاسخ شما به این پرسش با موفقیت ثبت شد، و در زیر سوال نمایش داده می شود" + +#~ msgid "Your new answer to this question save successfully, But it need review and publish by website admin" +#~ msgstr "پاسخ شما به این پرسش با موفقیت ثبت شد، بعد از بررسی و تایید مدیر نمایش داده می شود" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_update.phtml:4 -msgid "Content" -msgstr "متن" +#~ msgid "Front" +#~ msgstr "کاربر" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_update.phtml:5 -msgid "Slug" -msgstr "اسلاگ" +#~ msgid "Content" +#~ msgstr "متن" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_update.phtml:6 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:16 -msgid "Create" -msgstr "ایجاد" +#~ msgid "Slug" +#~ msgstr "اسلاگ" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:10 -msgid "List of questions and answers" -msgstr "فهرست سوالات و پاسخ ها" +#~ msgid "Create" +#~ msgstr "ایجاد" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:13 -msgid "ID" -msgstr "شناسه" +#~ msgid "List of questions and answers" +#~ msgstr "فهرست سوالات و پاسخ ها" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:15 -msgid "Type" -msgstr "نوع" +#~ msgid "ID" +#~ msgstr "شناسه" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:17 -msgid "Action" -msgstr "عملکرد" +#~ msgid "Type" +#~ msgstr "نوع" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:49 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:74 -msgid "Reject" -msgstr "رد کردن" +#~ msgid "Action" +#~ msgstr "عملکرد" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:51 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:79 -msgid "Accept" -msgstr "تایید" +#~ msgid "Reject" +#~ msgstr "رد کردن" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:53 -msgid "Edit" -msgstr "ویرایش" +#~ msgid "Accept" +#~ msgstr "تایید" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:54 -msgid "Delete" -msgstr "حذف" +#~ msgid "Edit" +#~ msgstr "ویرایش" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:61 -msgid "Published" -msgstr "منتشر شده" +#~ msgid "Delete" +#~ msgstr "حذف" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:62 -msgid "Pending review" -msgstr "در انتظار تایید" +#~ msgid "Published" +#~ msgstr "منتشر شده" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:68 -msgid "Accept in process" -msgstr "تایید در حال انجام است" +#~ msgid "Pending review" +#~ msgstr "در انتظار تایید" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/front/question_list.phtml:3 -msgid "Ask question" -msgstr "پرسیدن سوال" +#~ msgid "Accept in process" +#~ msgstr "تایید در حال انجام است" diff --git a/locale/fa/default.mo b/locale/fa/default.mo index a148f79..ac708da 100644 Binary files a/locale/fa/default.mo and b/locale/fa/default.mo differ diff --git a/locale/fa/default.po b/locale/fa/default.po index 4ce6f6f..91cb987 100644 --- a/locale/fa/default.po +++ b/locale/fa/default.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2014-02-27 12:00+0330\n" +"POT-Creation-Date: 2015-03-30 11:09+0330\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -15,122 +15,73 @@ msgstr "" "X-Poedit-Basepath: .\n" "X-Poedit-SearchPath-0: /var/www/html/local/pi/pi-2.5.0/usr/module/ask\n" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/AnswerForm.php:48 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:31 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/front/question_index.phtml:28 -msgid "Answer" -msgstr "پاسخ" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/AnswerForm.php:62 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/AskForm.php:80 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/UpdateForm.php:80 -msgid "Submit" -msgstr "ارسال" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/AskForm.php:42 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/UpdateForm.php:42 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:14 -msgid "Title" -msgstr "عنوان" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/AskForm.php:53 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/UpdateForm.php:53 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:28 -msgid "Question" -msgstr "سوال" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/AskForm.php:67 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Form/UpdateForm.php:67 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:54 -msgid "Tags" -msgstr "برچسب ها" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Api/Breadcrumbs.php:55 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Api/Breadcrumbs.php:66 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/front/tag_list.phtml:4 +msgid "Tag list" +msgstr "فهرست برچسب ها" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Feed/IndexController.php:25 -msgid "Ask feed" -msgstr "خوراک سوالات" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Api/Breadcrumbs.php:93 +msgid "Answer to question" +msgstr "پاسخ به سوال" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Feed/IndexController.php:26 -msgid "Recent Questions." -msgstr "آخرین سوالات ارسال شده" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Api/Breadcrumbs.php:103 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Front/SubmitController.php:91 +msgid "Ask a new Question" +msgstr "پرسیدن سوال جدید" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Admin/QuestionController.php:102 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Admin/QuestionController.php:86 #, php-format msgid "%s question accept successfully" msgstr "%s با موفقیت تایید شد" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Admin/QuestionController.php:107 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Admin/QuestionController.php:91 #, php-format msgid "Error in accept %s question" msgstr "خطا در تایید %s" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Admin/QuestionController.php:113 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Admin/QuestionController.php:176 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Admin/QuestionController.php:97 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Admin/QuestionController.php:186 msgid "Please select question" msgstr "لطفا یک سوال انتخاب کنید" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Admin/QuestionController.php:153 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Admin/QuestionController.php:155 msgid "Your selected item edit successfully" msgstr "آیتم انتخابی شما با موفقیت ویرایش شد" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Admin/QuestionController.php:174 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Admin/QuestionController.php:184 msgid "Your selected question deleted" msgstr "سوال انتخابی شما حذف شد" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/IndexController.php:69 -msgid "Ask index seo title" -msgstr "فهرست پرسش و پاسخ های ارسالی" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/IndexController.php:70 -msgid "ask index seo description" -msgstr "فهرست پرسش و پاسخ های ارسالی" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/IndexController.php:71 -msgid "ask index seo keywords" -msgstr "فهرست,پرسش,پاسخ,سوال,جواب" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/SubmitController.php:64 -msgid "Your ask new question successfully, Other users can view and answer it" -msgstr "" -"پرسش شما با موفقیت ارسال شد، کاربران دیگر می توانند آن را بخوانند و پاسخ دهند" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/SubmitController.php:66 -msgid "" -"Your ask new question successfully, But it need review and publish by " -"website admin" -msgstr "" -"پرسش شما با موفقیت ارسال شد، بعد از بررسی و تایید مدیر در وب سایت منتشر می " -"شود" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/SubmitController.php:73 -msgid "Ask a new Question" -msgstr "پرسیدن سوال جدید" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Feed/IndexController.php:25 +msgid "Ask feed" +msgstr "خوراک سوالات" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/TagController.php:37 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/TagController.php:54 -msgid "The tag not found." -msgstr "برچسب یافت نشد" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Feed/IndexController.php:26 +msgid "Recent Questions." +msgstr "آخرین سوالات ارسال شده" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/TagController.php:96 -msgid "Back to question list" -msgstr "برگشت به فهرست سوالات" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Front/AnswerController.php:33 +msgid "Answer question not active" +msgstr "امکان پاسخ به سوال فعال نیست" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/QuestionController.php:33 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/AnswerController.php:42 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Front/AnswerController.php:41 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Front/QuestionController.php:33 msgid "The question not found." msgstr "سوال یافت نشد" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/AnswerController.php:65 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/AnswerController.php:95 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Front/AnswerController.php:54 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Front/AnswerController.php:97 #, php-format msgid "Answer to %s" msgstr "پاسخ به %s" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/AnswerController.php:83 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Front/AnswerController.php:85 msgid "" "Your new answer to this question save successfully, and show under question" msgstr "پاسخ شما به این پرسش با موفقیت ثبت شد، و در زیر سوال نمایش داده می شود" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/src/Controller/Front/AnswerController.php:85 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Front/AnswerController.php:87 msgid "" "Your new answer to this question save successfully, But it need review and " "publish by website admin" @@ -138,134 +89,223 @@ msgstr "" "پاسخ شما به این پرسش با موفقیت ثبت شد، بعد از بررسی و تایید مدیر نمایش داده " "می شود" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/navigation.php:16 -msgid "List of Question" -msgstr "فهرست سوالات" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Front/IndexController.php:44 +msgid "List of all questions" +msgstr "فهرست تمام سوالات" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/navigation.php:23 -msgid "Tools" -msgstr "ابزار" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Front/SubmitController.php:33 +msgid "Ask question not active" +msgstr "امکان پرسیدن سوال فعال نیست" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/module.php:15 -msgid "Ask" -msgstr "پرسش و پاسخ" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/module.php:16 -msgid "Ask and Answer" -msgstr "سیستم ارسال پرسش و درج پاسخ" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:17 -msgid "Admin" -msgstr "مدیریت" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:21 -msgid "Front" -msgstr "کاربر" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:25 -msgid "Feed" -msgstr "خوراک" - -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:29 -msgid "Vote" -msgstr "رای" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Front/SubmitController.php:82 +msgid "Your ask new question successfully, Other users can view and answer it" +msgstr "" +"پرسش شما با موفقیت ارسال شد، کاربران دیگر می توانند آن را بخوانند و پاسخ دهند" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:37 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:46 -msgid "Perpage" -msgstr "تعداد هر هر صفحه" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Front/SubmitController.php:84 +msgid "" +"Your ask new question successfully, But it need review and publish by " +"website admin" +msgstr "" +"پرسش شما با موفقیت ارسال شد، بعد از بررسی و تایید مدیر در وب سایت منتشر می " +"شود" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:47 -msgid "Number of questions in each page" -msgstr "تعداد سوالات در هر صفحه" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Front/TagController.php:29 +msgid "Tag module not installed." +msgstr "ماژول برچسب نصب نشده است" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:55 -msgid "Number of tags in tag controller" -msgstr "تعداد برچسب ها" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Front/TagController.php:36 +msgid "The tag not set." +msgstr "برچسب یافت نشد" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:61 -msgid "Automatic approval" -msgstr "تایید خودکار" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Front/TagController.php:47 +msgid "The tag not found." +msgstr "برچسب یافت نشد" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:67 -msgid "All questions and answers need admin review before publish" -msgstr "تمام سوالات و پاسخ خا به تایید مدیر برای انتشار نیاز دارند" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Front/TagController.php:61 +#, php-format +msgid "All questions from %s" +msgstr "همه سوالات در مورد %s" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:68 -msgid "Automatic approval all questions and answers" -msgstr "تایید خودکار پرسش و پاسخ های ارسالی" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Controller/Front/TagController.php:102 +msgid "List of all used tags" +msgstr "فهرست تمام برچسب های استفاده شده" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:79 -msgid "Show feed icon" -msgstr "نمایش آیکن خوارک" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Form/AnswerForm.php:48 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:32 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/front/question_index.phtml:44 +msgid "Answer" +msgstr "پاسخ" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:87 -msgid "Feed number" -msgstr "تعداد خوراک" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Form/AnswerForm.php:62 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Form/AskForm.php:81 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Form/UpdateForm.php:81 +msgid "Submit" +msgstr "ارسال" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/config/config.php:96 -msgid "Use vote system" -msgstr "استفاده از سیستم رای" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Form/AskForm.php:42 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Form/UpdateForm.php:42 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:15 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_update.phtml:3 +msgid "Title" +msgstr "عنوان" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_update.phtml:4 -msgid "Content" -msgstr "متن" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Form/AskForm.php:53 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Form/UpdateForm.php:53 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:29 +msgid "Question" +msgstr "سوال" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_update.phtml:5 -msgid "Slug" -msgstr "اسلاگ" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Form/AskForm.php:68 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Form/UpdateForm.php:68 +msgid "Tags" +msgstr "برچسب ها" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_update.phtml:6 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:16 -msgid "Create" -msgstr "ایجاد" +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Form/AskForm.php:72 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/src/Form/UpdateForm.php:72 +msgid "Use `|` as delimiter to separate tag terms" +msgstr "با استفاده از `|` کلمات را از هم جدا کنید" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:10 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:11 msgid "List of questions and answers" msgstr "فهرست سوالات و پاسخ ها" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:13 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:14 msgid "ID" msgstr "شناسه" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:15 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:16 msgid "Type" msgstr "نوع" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:17 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:17 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_update.phtml:6 +msgid "Create" +msgstr "ایجاد" + +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:18 msgid "Action" msgstr "عملکرد" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:49 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:74 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:50 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:78 msgid "Reject" msgstr "رد کردن" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:51 -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:79 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:52 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:83 msgid "Accept" msgstr "تایید" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:53 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:54 msgid "Edit" msgstr "ویرایش" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:54 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:55 msgid "Delete" msgstr "حذف" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:61 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:62 msgid "Published" msgstr "منتشر شده" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:62 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:63 msgid "Pending review" msgstr "در انتظار تایید" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/admin/question_index.phtml:68 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:66 +msgid "No question submit yet" +msgstr "هنوز هیچ سوالی ارسال نشده است" + +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_index.phtml:72 msgid "Accept in process" msgstr "تایید در حال انجام است" -#: /var/www/html/local/pi/pi-develop/usr/module/ask/template/front/question_list.phtml:3 +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_update.phtml:4 +msgid "Slug" +msgstr "اسلاگ" + +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/admin/question_update.phtml:5 +msgid "Content" +msgstr "متن" + +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/front/question_index.phtml:10 +msgid "Time" +msgstr "زمان ارسال" + +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/front/question_index.phtml:11 +msgid "Read" +msgstr "نمایش" + +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/front/question_index.phtml:11 +msgid "Times" +msgstr "بار" + +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/front/question_list.phtml:7 msgid "Ask question" msgstr "پرسیدن سوال" + +#: /var/www/html/local/pi/pi-2.5.0/usr/module/ask/template/front/tag_list.phtml:18 +msgid "" +"No keyword has been used as tag on this part yet. please check this page " +"later" +msgstr "" +"هیچ اطلاعاتی از کلمات کلیدی به عنوان برچسب هنوز در سیستم درج نشده است. لطفا " +"بعدا از این صفحه را بررسی فرمایید. " + +#~ msgid "Ask index seo title" +#~ msgstr "فهرست پرسش و پاسخ های ارسالی" + +#~ msgid "ask index seo description" +#~ msgstr "فهرست پرسش و پاسخ های ارسالی" + +#~ msgid "ask index seo keywords" +#~ msgstr "فهرست,پرسش,پاسخ,سوال,جواب" + +#~ msgid "Tools" +#~ msgstr "ابزار" + +#~ msgid "Ask" +#~ msgstr "پرسش و پاسخ" + +#~ msgid "Ask and Answer" +#~ msgstr "سیستم ارسال پرسش و درج پاسخ" + +#~ msgid "Admin" +#~ msgstr "مدیریت" + +#~ msgid "Front" +#~ msgstr "کاربر" + +#~ msgid "Feed" +#~ msgstr "خوراک" + +#~ msgid "Vote" +#~ msgstr "رای" + +#~ msgid "Perpage" +#~ msgstr "تعداد هر هر صفحه" + +#~ msgid "Number of questions in each page" +#~ msgstr "تعداد سوالات در هر صفحه" + +#~ msgid "Number of tags in tag controller" +#~ msgstr "تعداد برچسب ها" + +#~ msgid "Automatic approval" +#~ msgstr "تایید خودکار" + +#~ msgid "All questions and answers need admin review before publish" +#~ msgstr "تمام سوالات و پاسخ خا به تایید مدیر برای انتشار نیاز دارند" + +#~ msgid "Automatic approval all questions and answers" +#~ msgstr "تایید خودکار پرسش و پاسخ های ارسالی" + +#~ msgid "Show feed icon" +#~ msgstr "نمایش آیکن خوارک" + +#~ msgid "Feed number" +#~ msgstr "تعداد خوراک" + +#~ msgid "Use vote system" +#~ msgstr "استفاده از سیستم رای" diff --git a/sql/mysql.sql b/sql/mysql.sql index 00b9def..d38f08e 100644 --- a/sql/mysql.sql +++ b/sql/mysql.sql @@ -14,7 +14,7 @@ CREATE TABLE `{question}` ( `title` varchar(255) NOT NULL default '', `slug` varchar(255) NOT NULL default '', `content` text, - `tags` varchar(255) NOT NULL default '', + `tag` varchar(255) NOT NULL default '', `seo_title` varchar(255) NOT NULL default '', `seo_keywords` varchar(255) NOT NULL default '', `seo_description` varchar(255) NOT NULL default '', diff --git a/src/Api/Breadcrumbs.php b/src/Api/Breadcrumbs.php index 17077d0..295e382 100644 --- a/src/Api/Breadcrumbs.php +++ b/src/Api/Breadcrumbs.php @@ -49,9 +49,23 @@ public function load() 'href' => $moduleData['moduleUrl'], 'label' => $moduleData['title'], ); - $result[] = array( - 'label' => $params['slug'], - ); + + if (!empty($params['slug'])) { + $result[] = array( + 'label' => __('Tag list'), + 'href' => Pi::url(Pi::service('url')->assemble('ask', array( + 'controller' => 'tag', + 'action' => 'list', + ))), + ); + $result[] = array( + 'label' => $params['slug'], + ); + } else { + $result[] = array( + 'label' => __('Tag list'), + ); + } break; case 'question': diff --git a/src/Api/Question.php b/src/Api/Question.php index 8776e81..69e67f1 100644 --- a/src/Api/Question.php +++ b/src/Api/Question.php @@ -58,7 +58,21 @@ public function canonizeQuestion($question) $question['time_create_view'] = _date($question['time_create']); $question['time_update_view'] = _date($question['time_update']); // Set tags - $question['tags'] = Json::decode($question['tags']); + if (!empty($question['tag'])) { + $tags = Json::decode($question['tag']); + foreach ($tags as $tag) { + $tagList[] = array( + 'term' => $tag, + 'url' => Pi::url(Pi::service('url')->assemble('ask', array( + 'module' => $this->getModule(), + 'controller' => 'tag', + 'action' => 'term', + 'slug' => urlencode($tag), + ))), + ); + } + $question['tag'] = $tagList; + } // Set info for Q and A switch ($question['type']) { case 'Q': diff --git a/src/Controller/Admin/QuestionController.php b/src/Controller/Admin/QuestionController.php index 9d6219e..9b114e4 100644 --- a/src/Controller/Admin/QuestionController.php +++ b/src/Controller/Admin/QuestionController.php @@ -108,8 +108,7 @@ public function updateAction() $id = $this->params('id'); $module = $this->params('module'); // find item - $question = $this->getModel('question')->find($id)->toArray(); - $question['time_create'] = _date($question['time_create']); + $question = Pi::api('question', 'ask')->getQuestion($id); $form = new UpdateForm('question'); if ($this->request->isPost()) { $data = $this->request->getPost(); @@ -117,6 +116,11 @@ public function updateAction() $form->setData($data); if ($form->isValid()) { $values = $form->getData(); + // Tag + if (!empty($values['tag'])) { + $tag = explode('|', $values['tag']); + $values['tag'] = json::encode($tag); + } // Set slug $slug = ($values['slug']) ? $values['slug'] : $values['title']; $slug = $slug . ' ' . $question['time_create']; @@ -143,12 +147,24 @@ public function updateAction() $row = $this->getModel('question')->find($values['id']); $row->assign($values); $row->save(); + // Tag + if (isset($tag) && is_array($tag) && Pi::service('module')->isActive('tag')) { + Pi::service('tag')->update($module, $row->id, '', $tag); + } // Check it save or not $message = __('Your selected item edit successfully'); $url = array('', 'module' => $module, 'controller' => 'question', 'action' => 'index'); $this->jump($url, $message); } } else { + // Get tag list + if (Pi::service('module')->isActive('tag')) { + $tag = Pi::service('tag')->get($module, $question['id'], ''); + if (is_array($tag)) { + $question['tag'] = implode('|', $tag); + } + } + // Set to form $form->setData($question); } // Set view diff --git a/src/Controller/Front/AnswerController.php b/src/Controller/Front/AnswerController.php index bc55351..c4b1e9d 100644 --- a/src/Controller/Front/AnswerController.php +++ b/src/Controller/Front/AnswerController.php @@ -22,13 +22,18 @@ class AnswerController extends ActionController { public function indexAction() { - // Check user is login or not - Pi::service('authentication')->requireLogin(); // Get info from url $slug = $this->params('slug'); $module = $this->params('module'); // Get config $config = Pi::service('registry')->config->read($module); + // Check ask + if (!$config['question_answer']) { + $url = array('', 'module' => $module, 'controller' => 'index', 'action' => 'index'); + $this->jump($url, __('Answer question not active'), 'error'); + } + // Check user is login or not + Pi::service('authentication')->requireLogin(); // Find story $question = Pi::api('question', 'ask')->getQuestion($slug, 'slug'); // Check page diff --git a/src/Controller/Front/IndexController.php b/src/Controller/Front/IndexController.php index 4552997..9a3d5e6 100644 --- a/src/Controller/Front/IndexController.php +++ b/src/Controller/Front/IndexController.php @@ -25,50 +25,23 @@ public function indexAction() $module = $this->params('module'); // Get config $config = Pi::service('registry')->config->read($module); - // Set product info + // Set question info $where = array('status' => 1, 'type' => 'Q'); // Set paginator info $template = array( 'controller' => 'index', 'action' => 'index', ); - // Get product List + // Get question List $questions = $this->askList($where); // Get paginator $paginator = $this->askPaginator($template, $where); - // Set order link - $orderLink = array(); - $orderLink['answer'] = $this->url('', array( - 'module' => $module, - 'controller' => 'index', - 'action' => 'index', - 'order' => 'answer' - )); - $orderLink['hits'] = $this->url('', array( - 'module' => $module, - 'controller' => 'index', - 'action' => 'index', - 'order' => 'hits' - )); - $orderLink['point'] = $this->url('', array( - 'module' => $module, - 'controller' => 'index', - 'action' => 'index', - 'order' => 'point' - )); - $orderLink['create'] = $this->url('', array( - 'module' => $module, - 'controller' => 'index', - 'action' => 'index', - 'order' => 'create' - )); - $orderLink['active'] = $this->params('order', 'create'); // Set view $this->view()->setTemplate('question_list'); $this->view()->assign('questions', $questions); $this->view()->assign('paginator', $paginator); $this->view()->assign('config', $config); - $this->view()->assign('orderLink', $orderLink); + $this->view()->assign('title', __('List of all questions')); } public function askList($where) @@ -87,7 +60,7 @@ public function askList($where) foreach ($rowset as $row) { $question[$row->id] = Pi::api('question', 'ask')->canonizeQuestion($row); } - // return product + // return question return $question; } diff --git a/src/Controller/Front/SubmitController.php b/src/Controller/Front/SubmitController.php index 3fd9528..336485d 100644 --- a/src/Controller/Front/SubmitController.php +++ b/src/Controller/Front/SubmitController.php @@ -23,6 +23,15 @@ class SubmitController extends ActionController { public function indexAction() { + // Get info from url + $module = $this->params('module'); + // Get config + $config = Pi::service('registry')->config->read($module); + // Check ask + if (!$config['question_ask']) { + $url = array('', 'module' => $module, 'controller' => 'index', 'action' => 'index'); + $this->jump($url, __('Ask question not active'), 'error'); + } // Check user is login or not Pi::service('authentication')->requireLogin(); // Set form @@ -33,6 +42,11 @@ public function indexAction() $form->setData($data); if ($form->isValid()) { $values = $form->getData(); + // Tag + if (!empty($values['tag'])) { + $tag = explode('|', $values['tag']); + $values['tag'] = json::encode($tag); + } // Set time $values['time_create'] = time(); $values['time_update'] = time(); @@ -59,6 +73,10 @@ public function indexAction() $row = $this->getModel('question')->createRow(); $row->assign($values); $row->save(); + // Tag + if (isset($tag) && is_array($tag) && Pi::service('module')->isActive('tag')) { + Pi::service('tag')->add($this->params('module'), $row->id, '', $tag); + } // Check it save or not if ($this->config('auto_approval')) { $message = __('Your ask new question successfully, Other users can view and answer it'); @@ -84,8 +102,6 @@ public function indexAction() $this->view()->setTemplate('submit_index'); $this->view()->assign('form', $form); $this->view()->assign('title', $title); - $this->view()->assign('message', $message); - $this->view()->assign('class', $class); } public function searchAction() diff --git a/src/Controller/Front/TagController.php b/src/Controller/Front/TagController.php index 87cbb9f..4914609 100644 --- a/src/Controller/Front/TagController.php +++ b/src/Controller/Front/TagController.php @@ -30,72 +30,88 @@ public function termAction() } // Get config $config = Pi::service('registry')->config->read($module); - // Get order - $selectOrder = $this->params('order', 'create'); - if (!in_array($selectOrder, array('create', 'hits', 'point', 'answer'))) { - $selectOrder = 'create'; - } - // Set offset - $offset = (int)($page - 1) * $config['show_perpage']; - // Get photo Id from tag module - $tags = Pi::service('tag')->getList($module, $slug, null, $config['show_tags'], $offset); // Check slug - if (empty($tags)) { - $this->jump(array('', 'module' => $module, 'controller' => 'index'), __('The tag not found.')); + if (!isset($slug) || empty($slug)) { + $url = array('', 'module' => $module, 'controller' => 'index', 'action' => 'index'); + $this->jump($url, __('The tag not set.'), 'error'); } + // Get id from tag module + $tagId = array(); + $tags = Pi::service('tag')->getList($slug, $module); foreach ($tags as $tag) { $tagId[] = $tag['item']; } - // Set info - $order = array($selectOrder . ' DESC', 'id DESC'); - $columns = array('id', 'answer', 'author', 'point', 'count', 'hits', 'create', 'title', 'slug', 'tags'); - $where = array('status' => 1, 'type' => 'Q', 'id' => $tagId); - $limit = intval($config['show_index']); - // Get list of story - $select = $this->getModel('question')->select()->columns($columns)->where($where)->order($order)->offset($offset)->limit($limit); - $rowset = $this->getModel('question')->selectWith($select); - foreach ($rowset as $row) { - $question[$row->id] = $row->toArray(); - $question[$row->id]['create'] = date('Y/m/d', $question[$row->id]['create']); - $question[$row->id]['tags'] = Json::decode($question[$row->id]['tags']); - $question[$row->id]['url'] = $this->url('.ask', array('module' => $module, 'controller' => 'question', 'slug' => $question[$row->id]['slug'])); - $writer = Pi::model('user_account')->find($question[$row->id]['author'])->toArray(); - $question[$row->id]['identity'] = $writer['identity']; - $question[$row->id]['labelpoint'] = HtmlClass::TabLabel($question[$row->id]['point']); - $question[$row->id]['labelanswer'] = HtmlClass::TabLabel($question[$row->id]['answer']); - $question[$row->id]['labelhits'] = HtmlClass::TabLabel($question[$row->id]['hits']); + // Check slug + if (empty($tagId)) { + $url = array('', 'module' => $module, 'controller' => 'index', 'action' => 'index'); + $this->jump($url, __('The tag not found.'), 'error'); } - // Set paginator - $select = $this->getModel('question')->select()->columns(array('count' => new \Zend\Db\Sql\Predicate\Expression('count(*)')))->where($where); - $count = $this->getModel('question')->selectWith($select)->current()->count; - $paginator = \Pi\Paginator\Paginator::factory(intval($count)); - $paginator->setItemCountPerPage($config['show_perpage']); - $paginator->setCurrentPageNumber($page); - $paginator->setUrlOptions(array( - 'template' => $this->url('.ask', array('module' => $module, 'controller' => 'tag', 'slug' => urlencode($slug), 'order' => $selectOrder, 'page' => '%page%')), - )); - // Tab urls - $url = array( - 'create' => $this->url('.ask', array('module' => $module, 'controller' => 'tag', 'slug' => urlencode($slug), 'order' => 'create')), - 'vote' => $this->url('.ask', array('module' => $module, 'controller' => 'tag', 'slug' => urlencode($slug), 'order' => 'point')), - 'hits' => $this->url('.ask', array('module' => $module, 'controller' => 'tag', 'slug' => urlencode($slug), 'order' => 'hits')), - 'answer' => $this->url('.ask', array('module' => $module, 'controller' => 'tag', 'slug' => urlencode($slug), 'order' => 'answer')), - ); - // Main url - $mainurl = array( - 'title' => __('Back to question list'), - 'url' => $this->url('.ask', array('module' => $module, 'controller' => 'index')), + // Set question info + $where = array('status' => 1, 'type' => 'Q', 'id' => $tagId); + // Set paginator info + $template = array( + 'controller' => 'tag', + 'action' => 'term', ); + // Get question List + $questions = $this->askList($where); + // Get paginator + $paginator = $this->askPaginator($template, $where); + // Set header and title + $title = sprintf(__('All questions from %s'), $slug); + // Set seo_keywords + $filter = new Filter\HeadKeywords; + $filter->setOptions(array( + 'force_replace_space' => true + )); + $seoKeywords = $filter($title); // Set view - $this->view()->headTitle($slug); - $this->view()->headDescription($slug, 'set'); - $this->view()->headKeywords($slug, 'set'); + $this->view()->headTitle($title); + $this->view()->headDescription($title, 'set'); + $this->view()->headKeywords($seoKeywords, 'set'); $this->view()->setTemplate('question_list'); - $this->view()->assign('questions', $question); + $this->view()->assign('questions', $questions); $this->view()->assign('paginator', $paginator); $this->view()->assign('config', $config); - $this->view()->assign('url', $url); - $this->view()->assign('mainurl', $mainurl); - $this->view()->assign('tabclass', HtmlClass::TabClass($selectOrder)); + $this->view()->assign('title', $title); + } + + public function listAction() + { + // Get info from url + $module = $this->params('module'); + $tagList = array(); + // Check tag module install or not + if (Pi::service('module')->isActive('tag')) { + $where = array('module' => $module); + $order = array('count DESC', 'id DESC'); + $select = Pi::model('stats', 'tag')->select()->where($where)->order($order); + $rowset = Pi::model('stats', 'tag')->selectWith($select); + foreach ($rowset as $row) { + $tag = Pi::model('tag', 'tag')->find($row->term, 'term'); + $tagList[$row->id] = $row->toArray(); + $tagList[$row->id]['term'] = $tag['term']; + $tagList[$row->id]['url'] = Pi::url($this->url('', array( + 'controller' => 'tag', + 'action' => 'term', + 'slug' => urldecode($tag['term']) + ))); + } + } + // Set header and title + $title = __('List of all used tags'); + // Set seo_keywords + $filter = new Filter\HeadKeywords; + $filter->setOptions(array( + 'force_replace_space' => true + )); + $seoKeywords = $filter($title); + // Set view + $this->view()->headTitle($title); + $this->view()->headDescription($title, 'set'); + $this->view()->headKeywords($seoKeywords, 'set'); + $this->view()->setTemplate('tag_list'); + $this->view()->assign('title', $title); + $this->view()->assign('tagList', $tagList); } } \ No newline at end of file diff --git a/src/Form/AskForm.php b/src/Form/AskForm.php index 1837d02..f109649 100644 --- a/src/Form/AskForm.php +++ b/src/Form/AskForm.php @@ -46,7 +46,7 @@ public function init() 'description' => '', ) )); - // text_description + // content $this->add(array( 'name' => 'content', 'options' => array( @@ -63,12 +63,13 @@ public function init() if (Pi::service('module')->isActive('tag')) { $this->add(array( 'name' => 'tag', + 'type' => 'tag', 'options' => array( 'label' => __('Tags'), ), 'attributes' => array( - 'type' => 'text', - 'description' => '', + 'id' => 'tag', + 'description' => __('Use `|` as delimiter to separate tag terms'), ) )); } diff --git a/src/Form/UpdateForm.php b/src/Form/UpdateForm.php index 6a8f7a7..6a4d378 100644 --- a/src/Form/UpdateForm.php +++ b/src/Form/UpdateForm.php @@ -46,16 +46,16 @@ public function init() 'description' => '', ) )); - // content + // content $this->add(array( 'name' => 'content', 'options' => array( - 'label' => __('Content'), + 'label' => __('Question'), + 'editor' => 'html', + 'set' => '', ), 'attributes' => array( - 'type' => 'textarea', - 'rows' => '5', - 'cols' => '40', + 'type' => 'editor', 'description' => '', ) )); @@ -63,12 +63,13 @@ public function init() if (Pi::service('module')->isActive('tag')) { $this->add(array( 'name' => 'tag', + 'type' => 'tag', 'options' => array( 'label' => __('Tags'), ), 'attributes' => array( - 'type' => 'text', - 'description' => '', + 'id' => 'tag', + 'description' => __('Use `|` as delimiter to separate tag terms'), ) )); } diff --git a/src/Model/Question.php b/src/Model/Question.php index 43dd29d..0f0bd6f 100644 --- a/src/Model/Question.php +++ b/src/Model/Question.php @@ -22,7 +22,7 @@ class Question extends Model */ protected $columns = array( 'id', 'type', 'pid', 'answer', 'uid', 'point', 'count', 'favorite', 'hits', 'status', - 'time_create', 'time_update', 'title', 'slug', 'content', 'tags', 'seo_title', + 'time_create', 'time_update', 'title', 'slug', 'content', 'tag', 'seo_title', 'seo_keywords','seo_description' ); } diff --git a/src/Route/Ask.php b/src/Route/Ask.php index a9f9aac..c96e3a6 100644 --- a/src/Route/Ask.php +++ b/src/Route/Ask.php @@ -28,7 +28,7 @@ class Ask extends Standard ); protected $controllerList = array( - 'answer', 'index', 'question', 'submit' + 'answer', 'index', 'question', 'submit', 'tag' ); /** @@ -70,6 +70,22 @@ protected function parse($path) $matches['slug'] = $this->decode($parts[1]); } break; + + case 'tag': + switch ($parts[1]) { + case 'term': + $matches['action'] = 'term'; + if (!empty($parts[2])) { + $matches['slug'] = urldecode($parts[2]); + } + break; + + case 'list': + $matches['action'] = 'list'; + break; + } + + break; } } diff --git a/template/admin/question_index.phtml b/template/admin/question_index.phtml index afcc9e5..5cb9f85 100644 --- a/template/admin/question_index.phtml +++ b/template/admin/question_index.phtml @@ -44,7 +44,7 @@ - escape($question['time_create']); ?> + escape($question['time_create_view']); ?> diff --git a/template/front/question_index.phtml b/template/front/question_index.phtml index e1a8c31..e5f2ab3 100644 --- a/template/front/question_index.phtml +++ b/template/front/question_index.phtml @@ -1,14 +1,28 @@
-
-
-

escape($question['title']); ?>

+ +
+
+ +
+
    +
  • : escape($question['time_create_view']); ?>
  • +
  • : escape($question['hits'])); ?>
  • +
-
- -
-
escape($question['time_create_view']); ?>
-
+ + + +
@@ -18,12 +32,16 @@
-
escape($answer['time_create_view']); ?>
+
escape($answer['time_create_view']); ?>
-

+ +

+ +

+
\ No newline at end of file diff --git a/template/front/question_list.phtml b/template/front/question_list.phtml index 9ca7db2..0fc0268 100644 --- a/template/front/question_list.phtml +++ b/template/front/question_list.phtml @@ -1,6 +1,13 @@
+ + +

+ +

+
-

escape($question['title']); ?> diff --git a/template/front/tag_list.phtml b/template/front/tag_list.phtml new file mode 100644 index 0000000..826a3d4 --- /dev/null +++ b/template/front/tag_list.phtml @@ -0,0 +1,21 @@ +css($this->assetModule('css/front.css')); ?> + \ No newline at end of file