Giter Site home page Giter Site logo

iiyii / getyii Goto Github PK

View Code? Open in Web Editor NEW
438.0 438.0 164.0 73.4 MB

Yii2 community 请访问

Home Page: http://www.getyii.com/

License: Other

PHP 92.96% CSS 3.74% JavaScript 2.69% Batchfile 0.27% Shell 0.13% Dockerfile 0.20% Hack 0.01%
bbs getyii php yii yii2

getyii's People

Contributors

104260033 avatar asjmtz avatar dcb9 avatar dependabot[bot] avatar fancyecommerce avatar forecho avatar grutabow avatar gugoan avatar icehillsx avatar lichunqiang avatar onyony avatar qiansen1386 avatar ruyi1024 avatar successgo avatar zhenghaicaidd01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

getyii's Issues

本地安装生成测试数据报错

生成测试数据报错提示:
*** applying m190908_055507_init_data
是否生成测试问题数据? (yes|no) [yes]:
[> ] 0% (0/100) ETA: n/a > execute SQL: INSERT INTO {{%merit_template}} (id, type, title, unique_id, method, event, action_type, rule_key, rule_value, increment, status, created_at, updated_at) VALUES
(1, 1, '登录', 'site/login', 2, 0, 2, 1, 1, 2, 1, 1458657160, 1458823425),
(2, 1, '发帖', 'topic/default/create', 2, 0, 2, 0, NULL, 6, 1, 1458657218, 1458657218),
(3, 1, '回复', 'topic/comment/create', 2, 0, 2, 0, NULL, 4, 1, 1458657251, 1458657251),
(4, 1, '发动弹', 'tweet/default/create', 2, 0, 2, 0, NULL, 4, 1, 1458657296, 1468647701);
... done (time: 0.001s)
Exception 'yii\base\InvalidConfigException' with message 'Please configure UrlManager::hostInfo correctly as you are running a console application.'

composer install 出现问题

E:\project_me\php\getyii>composer install

[RuntimeException]
require.bower-asset/PACE is invalid, it should not contain uppercase characters. Please use bower-asset/pace instead.

@username 功能失效

@username 位于最后一行,且没有多余的空格,这个功能是失效的。我想这应该可以算是 bug。

edited:
经过一番测试:在行尾和最后的末尾都是失效的。

composer update warning

Deprecation warning: require.bower-asset/PACE is invalid, it should not contain uppercase characters. Please use bower-asset/pace instead. Make sure you fix this as Composer 2.0 will error.
Deprecation warning: require.bower-asset/At.js is invalid, it should not contain uppercase characters. Please use bower-asset/at.js instead. Make sure you fix this as Composer 2.0 will error.

安装完成之后访问首页会出现 RuntimeException

看错误是 assetsAutoCompress 这个组件在压缩的过程中抛出了异常。
RuntimeException
Unclosed string at position: 305386

vendor/tedivm/jshrink/src/JShrink/Minifier.php 第 476 行
throw new \RuntimeException('Unclosed string at position: ' . $startpos );

php yii install 最后一步生成测试数据的时候报错

*** applying m190908_055507_init_data
是否生成测试问题数据? (yes|no) [yes]:
[>                                                                                                                ] 0% (0/100) ETA: n/a    > execute SQL: INSERT INTO {{%merit_template}} (`id`, `type`, `title`, `unique_id`, `method`, `event`, `action_type`, `rule_key`, `rule_value`, `increment`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, '登录', 'site/login', 2, 0, 2, 1, 1, 2, 1, 1458657160, 1458823425),
(2, 1, '发帖', 'topic/default/create', 2, 0, 2, 0, NULL, 6, 1, 1458657218, 1458657218),
(3, 1, '回复', 'topic/comment/create', 2, 0, 2, 0, NULL, 4, 1, 1458657251, 1458657251),
(4, 1, '发动弹', 'tweet/default/create', 2, 0, 2, 0, NULL, 4, 1, 1458657296, 1468647701);
 ... done (time: 0.001s)
Exception 'yii\base\InvalidConfigException' with message 'Please configure UrlManager::hostInfo correctly as you are running a console application.'

in /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/web/UrlManager.php:633

Stack trace:
#0 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/helpers/BaseUrl.php(228): yii\web\UrlManager->getHostInfo()
#1 /data/coding/php/do-test/getyii/frontend/modules/topic/models/Topic.php(128): yii\helpers\BaseUrl::to('/member/admin', true)
#2 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/db/ActiveRecord.php(596): frontend\modules\topic\models\Topic->beforeSave(true)
#3 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/db/ActiveRecord.php(566): yii\db\ActiveRecord->insertInternal(NULL)
#4 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/db/BaseActiveRecord.php(678): yii\db\ActiveRecord->insert(true, NULL)
#5 /data/coding/php/do-test/getyii/console/migrations/m190908_055507_init_data.php(71): yii\db\BaseActiveRecord->save()
#6 /data/coding/php/do-test/getyii/console/migrations/m190908_055507_init_data.php(17): m190908_055507_init_data->generateFakeData(64)
#7 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(725): m190908_055507_init_data->up()
#8 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(199): yii\console\controllers\BaseMigrateController->migrateUp('m190908_055507_...')
#9 [internal function]: yii\console\controllers\BaseMigrateController->actionUp(0)
#10 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#11 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#12 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/console/Controller.php(148): yii\base\Controller->runAction('up', Array)
#13 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction('up', Array)
#14 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('migrate/up', Array)
#15 /data/coding/php/do-test/getyii/console/controllers/InstallController.php(163): yii\console\Application->runAction('migrate/up', Array)
#16 [internal function]: console\controllers\InstallController->actionMigrate()
#17 /data/coding/php/do-test/getyii/console/controllers/InstallController.php(55): call_user_func_array(Array, Array)
#18 /data/coding/php/do-test/getyii/console/controllers/InstallController.php(34): console\controllers\InstallController->runSteps(Array)
#19 [internal function]: console\controllers\InstallController->actionIndex()
#20 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#21 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#22 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/console/Controller.php(148): yii\base\Controller->runAction('', Array)
#23 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction('', Array)
#24 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('install', Array)
#25 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction('install', Array)
#26 /data/coding/php/do-test/getyii/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(yii\console\Request))
#27 /data/coding/php/do-test/getyii/yii(31): yii\base\Application->run()
#28 {main}

创建一个 Bot

  • 管理员操作话题(比如:加精华)的时候 Bot 自动插入一条记录

【求助】composet install exceptin

问题在于 unson86/yii2-setting

[RuntimeException]
  Failed to clone https://github.com/funson86/yii2-setting.git via https, ssh protocols, aborting.

  - https://github.com/funson86/yii2-setting.git
    Cloning into '/path/to/getyii/vendor/funson86/yii2-setting'...
    remote: Invalid username or password.
    fatal: Authentication failed for 'https://github.com/funson86/yii2-setting.git/'

  - [email protected]:funson86/yii2-setting.git
    Cloning into '/path/to/getyii/vendor/funson86/yii2-setting'...
    ERROR: Repository not found.
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

优化建议:点击图片,图片的放大功能

想法来源:

看技术贴子时,如果上传的图片很较大,放在一个较小的区块里,图片内的内容展示看得不清楚。

添加一个放大功能或许不错。

通常我是 Open image in new tab

采用 basic 结构的模板,打包 vendor 发布,增加安装程序

目前 getyii 使用 advanced 的模板,区分 backend frontend,需要为前后台指定不同域名,考虑到虚拟主机以及初级用户的使用习惯,如果能使用 basic 模板的代码结构,做到直接将所有代码上传到服务器web根目录就可以运行。针对此场景,后期可以考虑出打包的版本直接包含 vendor 目录,第一次打开站点出现安装提示,在浏览器界面直接安装。

编辑器单独出来写成一个 widget

发布和评论都使用一个编辑器 widget

  • 上传图片功能
  • @ 某人功能
  • : emoji 标签功能
  • 考虑不使用 AceEditor
  • 单独写成 Widget,发帖、回复和动弹统一使用

未定义$nodes

测试时报错:
frontend\widgets\Node.php 第28行未定义$nodes
解决方法:
在第25行上面定义一个空数组
$nodes=[];

用户头像设置的问题

用户自定义头像

如果用户将上传文件的后缀名修改为jpg或者png,会通过验证上传成功,这样会导致所有用到这个用户头像的地方出现服务器内部错误。

发现一个bug

namespace frontend\modules\topic\controllers;
=>DefaultController=>actionView
//登录才能访问的节点内容
if (\Yii::$app->user->isGuest && in_array($model->category->alias, params('loginNode'))) {
$this->flash('查看本主题需要登录!', 'warning');
//return $this->redirect('/login'); 应该改为return $this->redirect(['/login']);
}

不然在一些没做url rewrite的服务器上会出404.

3 Nov pakage installation error

after import database and click a topic show the following error :
PHP Strict Warning – yii\base\ErrorException

Non-static method frontend\modules\topic\models\Topic::findModel() should not be called statically

增加可选的富文本编辑器

出了 coding 圈,学术圈,大部分人是不会使用 markdown 的,getyii 默认只有 markdown 编辑器,必然使得程序的用户面会比较窄。

发现一个bug

namespace frontend\modules\topic\controllers;
=>DefaultController=>actionView
//登录才能访问的节点内容
if (\Yii::$app->user->isGuest && in_array($model->category->alias, params('loginNode'))) {
$this->flash('查看本主题需要登录!', 'warning');
//return $this->redirect('/login'); 应该改为return $this->redirect(['/login']);
}

不然在一些没做url rewrite的服务器上会出404.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.