Giter VIP home page Giter VIP logo

summerblue / phphub Goto Github PK

View Code? Open in Web Editor NEW
1.8K 1.8K 512.0 5.44 MB

(Deprecated See - https://github.com/summerblue/phphub5 ) PHPHub is a Forum project written in Laravel 4.2, and it is also the project build up PHP & Laravel China community - http://phphub.org.

License: MIT License

JavaScript 16.91% PHP 63.77% CSS 4.66% ApacheConf 0.06% HTML 14.60%
laravel laravel-china-community php phphub

phphub's Introduction


 创造不息,交付不止

Deprecated (放弃维护)

Please note that is project is deprecated, Laravel5.1 Version is at https://github.com/summerblue/phphub5

此项目已放弃维护,请前往下载最新版 https://github.com/summerblue/phphub5

PHPHub related projects

You can checkout the others open source projects of PHPHub in the following list.

Introduction

PHPHub is a Forum project written in Laravel4.2, and it is also the project build up PHP & Laravel China community.

The phphub.org site is entirely open source, and community involvement is not only encouraged, but required in order to ensure the future success of the project.

If you have any questions please don't hesitate to ask them in an issue or email me at cj [at] estgroupe.com

Build Status

Screen Shots

Requirements and Environment

  • PHP 5.4+
  • Laravel 4.2+

We use Laravel Homestead for local development. Please review the Homestead documentation to install it.

中文版本的本地环境部署见这里 见 wiki

Step by Step Guide to Setting up the PHPHub Development Environment

Thanks

Contributors

On the Project Contributors Page

Contributing

Please see CONTRIBUTING for details.

License

Copyright (c) 2014 PHPHub.org

The MIT License (MIT). Please see Opensource MIT License for more information.

phphub's People

Contributors

appleboy avatar aufree avatar brainexport avatar calinou avatar cycloneaxe avatar grahamcampbell avatar heimonsy avatar hutushen222 avatar imjma avatar jayin avatar jeroenherczeg avatar lifesign avatar menglr avatar nauxliu avatar overtrue avatar summerblue avatar xtrees avatar zhuzhichao 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  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

phphub's Issues

能不能出一个真实环境安装的教程

能不能出一个真实环境安装的教程?
看到wiki上是虚拟机安装的教程,真实环境不需要设置虚拟机的那些东西
不知道是不是稳定了,可以直接使用了,先做一个开发类的论坛

感谢提供好的开源项目

一种更好的代码组织方案(?)

感觉现在 phphub 的代码组织不算特别 laravel 风啊。

现在的代码是直接在 present 层里面使用 model,但这样的话其实不太好做测试和保持代码松耦合的。

我建议可以采用 repository 的方式来重新组织一下 p 和 m 的部分:

topic model (我省略了 interface 的定义):

<?php namespace Phphub/Topic;

class TopicRepository extends \Eloquent implements TopicRepositoryInterface
{
    // 和你现在的 topic model 差不多
}

topic presenter (同样省略了 interface 的定义):

<?php namespace Phphub/Topic;

class TopicPresenter extends \Presenter implements TopicPresenterInterface
{
    public function __construct(TopicRepositoryInterface $topicRepository)
    {
        $this->topicRepository = $topicRepository;
    }

    // 接下来和原来的 presenter 差不多,但都用 $this->topicRepository 来获取具体数据
}

然后需要使用一个 service provider 来注册 TopicRepositoryInterface / TopicPresenterInterface 这些接口。

这样做的好处就是各个层之间只是针对接口来通信,而不是要关系到你具体的实现。在测试的时候直接 mock 掉要使用的 interface 即可。

不过不好的地方就是会写起来有点像 java XD

不知道你觉得这样的写法怎样?(要写测试噢……)

ref: http://culttt.com/2013/07/08/creating-flexible-controllers-in-laravel-4-using-repositories/

另外这种 SOLID 原则在 laravel 老爸的书里面也有提到。

phphub的部署

请问,phphub的代码同步,远程部署是如何做的呢?用的webhooks么?

[Request] 增加一个?的快捷键功能

希望增加一个按?键 弹出一个提示面板的功能。
类似 chrome 打开开发者工具时 按?键弹出快捷键帮助一样。

chrome.jpg

我觉得可以提示的东西 可以是 markdown 语法帮助 或者 emoji .
虽然发帖的时候右边有markdown提示 回复帖子的时候其实是没有的。 对于一些新手朋友可能不友好。
另外 emoji 我自己也就记得常打的几个 要是想打别的表情 也得去翻。 也许这个问题可以通过浏览器插件解决 但是原生支持应该更好一些

帖子预览问题

点击预览 会有一次跳转到新页面 应该是main.js里面统一加了a标签的跳转处理造成的。。
之后才会显示预览

github 获取 email 的问题

不知道是不是 github 的问题, 我绑定了3个 email, github 通过验证后, 不是拿的的我的 primary email, 而是得到的第一个 email

百度统计

界面最下面 百度统计图标 忒不美观了

为什么不使用 Scope的方式来实现??



class Reply extends \Eloquent {

    protected $fillable = [
        'body', 
        'user_id', 
        'topic_id'
    ];

    public function user()
    {
        return $this->belongsTo('User');
    }

    public function topic()
    {
        return $this->belongsTo('Topic');
    }

    public static function userRecentReplies($user_id, $limit = 10)
    {
        return Reply::where('user_id', '=', $user_id)->with('topic')->limit($limit)->get();
    }

    public static function userRepliesWithPagination($user_id, $limit = 20)
    {
        return Reply::where('user_id', '=', $user_id)
                        ->orderBy('created_at', 'desc')
                        ->with('topic')
                        ->paginate($limit);
    }

}

这里的 userRecentReplies和 userRepliesWithPagination 为什么不适用 Scope 的方式
改成


    public function scopeWhose($query,$user_id){
        return $query->where('user_id','=',$user_id)->with('topic'); 
    }
    public function scopeRecent($query){
        return $query->orderBy('create_at','desc');
    }

这样调用的时候可以使用类似下面的代码.这样更加的灵活.


    Reply::Whose($id)->Recent()->limit(10)

如果是为了代码提示.其实可以使用ide-helper 这个包来生成的

搜索功能无法使用

image

在搜索框输入内容,然后点击提交搜索,会弹出如图显示页面
浏览器:CHROME

节点

节点有点多啊..刚开始 就尽量多围绕PHP laravel 吧 数据库 web也都可以 其它不相关的其实可以先去掉 比如 ruby python iphone Android 移民之类的 个人感觉 把php社区真正做起来 就应该精准一点定位

Suggestion:Support Draft

发布帖子的时候能不能有个保存到草稿的功能呢?这样我就可以直接在网站上编辑文章了

Proposal Issue: Modify Search UI

有点强迫症,受不了首页搜索的UI样式,把它修改成了github 和 gitlab 的风格。

pull

浏览器兼容性和移动设备测试已完成,这个可以通过吗? 😄

the search can't work and another problem

I run phphub on my local env and found the reason:
vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache
this folder isn't 777.

and another problem:
the search key-word will be weapped by <p></p> after this function Purifier::clean(Input::get('q')), sorry i can't fix that, maybe you guys can.

No default en-US setting

I don't know if this is an issue, it's more an advise for foreign.

Anyway I do expect applications to be in English out of the box but phphub comes with zh-CN as default locale.

So if you don't know Chinese and you want to set it to English go in app/config/app.php and set

'locale' => getenv('locale') ?: 'en-US',

希望用户登录或者退出时能停留在当前页面

如题

我本来在浏览帖子时看到了一篇很好的文章,准备登录回复内容

结果登录完成之后返回到了首页,导致我还得去列表页或者浏览器历史记录找帖子,这个用户体验很不OK

界面BUG

貌似用的 bootstrap
在宽度768px下会错位
感觉搜索栏激活的时候应该覆盖最右侧
想github似的

Please try https://phphub.org/nodes

In the browser, I get the following result.

/home/vagrant/phphub/app/views/nodes/index.blade.php

I do not think this is intended. Would any anyone please fit it?

events.js:72 throw er; // Unhandled 'error' event

This is my first time using laravel, phphub and gulp. I followed the step by step guide using the homestead vm

I've got several problems running gulp

[01:17:57] Starting 'css'...
[01:17:57] Finished 'css' after 14 ms
events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, chmod '/home/vagrant/phphub/public/assets/css/styles-447ba8fc.css'

In that situation, the tests didn't pass and by hitting http://phphub.app:8000 it would throw an error in file /home/vagrant/phphub/vendor/summerblue/asset-manager/src/Modbase/AssetManager/Manager.php lines 45 and 67 (index not found).

Changing rights on the folder didn't help.

I temporary skipped the problem with this

   if(isset($this->data[$bundle.'.styles'][0])){
        return $this->data[$bundle.'.styles'][0];
    }
    return false;

After this the tests passed but the assets weren't loaded (because missing)

Then I found out that the gulp command was failing in the watch part, which runs by default so I launched it like this

gulp build

This solved the problem and all the assets look in place now.

So to clarify I'm just reporting a misbehavior with the gulp command, maybe you want to update the install guide or to fix the issue

Can local search be added?

People in mainland China do not have access to Google search. Can the local search functionality be added? So user may choose the local search in case Google service is not available.

The search function can be based on database text search, Lucence or Lemur.

Thanks,

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.