artkost / yii2-qa Goto Github PK
View Code? Open in Web Editor NEW[DEPRECATED] The Questions and Answers module inspired by Stack Overflow
Home Page: http://yii2-qa.artkost.ru/
License: MIT License
[DEPRECATED] The Questions and Answers module inspired by Stack Overflow
Home Page: http://yii2-qa.artkost.ru/
License: MIT License
Thank you for writing this module. It gives me a great example for my own project. I am learning a lot of it.
However, I do have problem.
If I lookup an answer I get the error:
Call to undefined method app\models\User::find()
Everything else is working fine.
On http://www.yiiframework.com/forum/index.php/topic/58356-call-to-undefined-method-appmodelsuserfind/
the answer is to: Try extending from yii\db\ActiveRecord instead.
That do I have to change in the code to solve this problem?
My config is:
'qa' => 'artkost\qa\Module',
'userClass' => 'dektrium\user\Module',
'userNameFormatter' => 'getUserName'
That is I am using the dektrium user class.
Hi,
When clicking on active question title - it giving error say "Cannot instantiate interface artkost\qa\models\QuestionInterface".
Where is the issued, I could not figure out. Need help here.
Thanks
my config is
'modules' => [
'qa' => [
'class' => 'artkost\qa\Module',
'userNameFormatter' => 'getUserName'
],
],
error report as title.
error raised in this $answerDataProvider->models [vendor/artkost/yii2-qa/views/default/view.php]
Can you add possibility to use tags from qa-tags
table only? Without adding by user
Provide top question page with tabs
Кнопка есть но ведет на редактирование вопроса.
Maybe change in
actionDelete($id)
{ $model = $this->findQuestionModel($id);
$model = $this->findModel($id);
Может добавить возможность отправку email, если произошел ответ на вопрос из "My" и "Favourites"? Какой-нибудь aftersave с поиском в my и/или в favourites
I'm working with postgres database and when I try to migrate to any of the following lines :
php yii migrate/up --migrationPath=@vendor/artkost/yii2-qa/migrations
yii migrate/up --migrationPath=@vendor/artkost/yii2-qa/migrations
./yii migrate/up --migrationPath=@vendor/artkost/yii2-qa/migrations
I get the following error:
Exception 'yii\base\UnknownPropertyException' with message 'Getting unknown property: yii\console\ErrorHandler::errorAction'
When i push on vote arrow is nothing happens.
In chrome console - Failed to load resource: the server responded with a status of 500 (Internal Server Error). Where can i find a error?
php environments/local/console/yii migrate --migrationPath=@vendor/artkost/yii2-qa/migrations
Сейчас заметил что в теги проходят XSS, может еще где, не смотрел.
Steps to replicate:
You'll notice that:
I haven't upgraded your extenstion for a long time. After upgrading I'm getting an error in backend application, but there is no app configured in it:
Missing required parameter "id" when instantiating "artkost\qa\Module".
In frontend's config I've got:
'modules' => [
'qa' => [
'class' => 'artkost\qa\Module',
'userClass' => 'common\models\User',
'userNameFormatter' => 'getUsername'
],
],
using the installation guide in README,an error occurs! When i intend to Install Migrations using the command an follows:
php yii migrate --migrationPath=@artkost/qa/migrations
I got an error message:
***applying m140314_120441_create_qa_answer_tablea
PHP Strict Warning 'yii\base\ErrorException' with message 'Declaration of arkost\qa\models\Answer::afterSave() should be compatible with yii\db\BaseActiveRecord::afterSave($insert,$changedAttributes)'
in E:\application\apache\htdocs\qa\vendor\artkost\yii2-qa\models\Answer.php
User points support, widgets classes.
Currently it's not really possible to provide your own models to store questions, answers or tags. It could be useful, for example, to be able to use markdown or bbcode for writing text there or for deeper integration with the application.
I'd suggest coding to interface i.e.
See https://github.com/samdark/Yeeki/tree/master/app/modules/wiki/components/auth
if you compare form-answer and form-question, you will see the reason why the client side validation doesn't work in form-question.php on the last line.
to fix it change to
Hi,
Can you allow HTML code on content?
Thanks
Provide ability to define filter methods for filtering content before save.
In DefaultController
Old :
use yii\web\AccessControl;
use yii\web\VerbFilter;
New:
use yii\filters\AccessControl;
use yii\filters\VerbFilter;
Просьба добавить поддержку PostgreSQL. В pg отсутствуют типы enum и tinyint, а также атрибут UNSIGNED.
Got the following error when applying migration.
Apply the above migrations? (yes|no) [no]:yes
*** applying m140314_120159_create_qa_question_table
PHP Strict Warning 'yii\base\ErrorException' with message 'Declaration of artkost\qa\models\Question::afterSave() should be compatible with yii\db\BaseActiveRecord::afterSave($insert, $changedAttributes)'
Simply adding '$changedAttributes' to the afterSave function in both Question and Answer Models, allowed the migration to succeed.
Hi,
why you do not use explode()
in https://github.com/artkost/yii2-qa/blob/master/models/Tag.php#L47 ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.