PHPHub is a Forum project written in Laravel

Overview


 创造不息,交付不止

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.

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

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

    感觉现在 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 老爸的书里面也有提到。

    opened by bcho 5
  • File does not exist at path D:\www\laravel\phphub/asset_manifest.json

    File does not exist at path D:\www\laravel\phphub/asset_manifest.json

    ErrorException (E_UNKNOWN) File does not exist at path D:\www\laravel\phphub/asset_manifest.json (View: D:\www\laravel\phphub\app\views\layouts\default.blade.php) (View: D:\www\laravel\phphub\app\views\layouts\default.blade.php)

    I don't know why is that?

    opened by bithaolee 4
  • No default en-US setting

    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',
    
    opened by damko 4
  • events.js:72 throw er; // Unhandled 'error' event

    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

    opened by damko 4
  • [Request] 增加一个?的快捷键功能

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

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

    chrome.jpg

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

    opened by lifesign 4
  • lastReplyUser return a wrong user

    lastReplyUser return a wrong user

    Look at this: file

    But the last reply user is me: file

    Reference: https://github.com/summerblue/phphub/blob/master/app/views/topics/partials/meta.blade.php#L14-L21

    This information should be useful: User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36

    opened by Aufree 3
  • the search can't work and another problem

    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.

    opened by johnlui 3
  • 点击超链接访问 不刷新页面

    点击超链接访问 不刷新页面

    最近在使用phphub 二次开发自己的小社区。 发现了一个问题,无法解决。

    当点击 a标签的超链接,新的页面js 是没有加载的。会在head 标签内部显示成

    script type="undefined" src="https://dn-phphub.qbox.me/assets/js/scripts-6484ddb8.js"></script

    当你刷新后 该js 就会正确的出现在body标签中。

    一直以为是自己新作的页面导致的问题。 现在发现官网也是这样 。求大神们给我说说 这是什么原理。

    @summer

    1 2

    图1为点击超链接效果 图2为刷新后的效果

    opened by fcode520 2
  • 提一个 bug,要是github帐号改名的话,将无法更新缓存

    提一个 bug,要是github帐号改名的话,将无法更新缓存

    public function refreshCache($id)
    {
            $user =  User::findOrFail($id);
            $user_info = (new GithubUserDataReader())->getDataFromUserName($user->github_name);
            ...
    }
    

    主要是这里根据 name 拿到用户信息,使用 id 会不会好一点

    opened by rrylee 2
  • 启动的时候一直报500

    启动的时候一直报500

    操作系统:Mac PHP版本:php 7 Mysql版本:mysql 5.7.11

    已经设置了项目和storage目录的权限,数据库也弄好了,启动的时候一直是500错误,下面是错误信息:

    Redefinition of parameter $_ in /Users/xxx/Desktop/wwwroot/www.xxx.com/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php on line 313

    opened by code-artisan 1
  • 执行php artisan migrate --seed的时候报错

    执行php artisan migrate --seed的时候报错

    [Illuminate\Database\QueryException] SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default val ue for 'created_at' (SQL: create table site_statuses (id int unsigned n ot null auto_increment primary key, day varchar(255) not null, created_a t timestamp default 0 not null, updated_at timestamp default 0 not null) default character set utf8 collate utf8_unicode_ci)

    [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default val ue for 'created_at'

    opened by calcyu 1
  • 部署本地PHPhub时出现问题

    部署本地PHPhub时出现问题

    database.php中配置好了数据库连接 使用 php artisan migrate --seed 处理数据库的时候出错

    $ php artisan migrate --seed


    • Application In Production!     *
      

    Do you really wish to run this command? yes Migration table created successfully. Migrated: 2014_01_03_011552_create_site_statuses_table Migrated: 2014_08_08_234417_create_users_table Migrated: 2014_08_10_085349_create_topics_table Migrated: 2014_08_10_091306_create_nodes_table Migrated: 2014_08_12_124425_create_replies_table Migrated: 2014_08_13_130603_entrust_setup_tables Migrated: 2014_08_14_221225_create_tips_table Migrated: 2014_08_15_163951_create_links_table Migrated: 2014_08_16_200848_create_favorites_table Migrated: 2014_08_19_080606_create_notifications_table Migrated: 2014_08_19_083110_add_notifications_field_to_user_table Migrated: 2014_08_19_162628_create_attention_table Migrated: 2014_08_20_130447_create_votes_table Migrated: 2014_08_22_112136_add_order_field_to_topic_table Migrated: 2014_08_24_080733_add_body_original_field_to_topics_table Migrated: 2014_08_24_102913_add_excerpt_field_to_topics_table Migrated: 2014_08_27_092832_add_github_name_filed_to_users_table Migrated: 2014_08_27_210652_add_body_original_filed_to_replies_table Migrated: 2014_10_12_080007_add_cover_field_to_links_table Migrated: 2015_03_02_102317_create_appends_table Migrated: 2015_03_25_115359_add_avatar_to_users 303 pic (错误信息)

    数据库里表都迁移好了,数据填充没有填充进去,怎么解决呢?

    opened by BarryGibb 3
Owner
Summer
A man seeking for Wisdom.
Summer
Laravel Forum

No taking care of this package anymore. Socieboy Forum Package for Laravel 5.2 Features Create conversations. Reply existing conversations. Support fo

Frank Sepulveda 71 Oct 2, 2020
A slim, lean forum package designed for quick and easy integration in Laravel projects

Complete documentation is available on teamteatime.net. Installation Requires Laravel 6+ and PHP 7.4+. Step 1: Install the package Install the package

TeamTeaTime 486 Dec 31, 2022
A forum created with Laravel, Socket.io, and Tailwind CSS.

A forum created with Laravel, Socket.io, and Tailwind CSS.

Steven Lei 164 Nov 21, 2022
This is a Laravel based Blog post forum.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Hossain Mohammad Shahidullah Jaber 4 Nov 17, 2022
Forum Diskusi Mahasiswa Informatika Berbasis Web menggunakan Framework Laravel & Bootstrap

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Aliffathur Risqi Hidayat 2 Oct 6, 2022
A discussion forum for coders

CodeQuery CodeQuery CODE WANTS TO BE SIMPLE is the place to find help with your coding and programming queries. Steps To Configurate Project Clone thi

Aman Sharma 1 Nov 3, 2021
Discussion (forum) and Q&A platform. Community based on PHP Micro-Framework HLEB.

Agouti Discussion (forum) and Q&A platform. Community based on PHP Micro-Framework HLEB. Ideas We like the classification system based on labels (tags

AgoutiDev 59 Dec 22, 2022
ECNU Forum based on Flarum.

ECNU Forum ECNU Forum based on Flarum. Welcome to ECNU Forum, where every ECNU student can speak freely. Note that this is not an official forum of EC

null 54 Dec 13, 2022
This is a blog. A project was written in Laravel 8

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Vladimir Kryazhev 1 Oct 23, 2021
:panda_face: Jitamin is a free software written in PHP, intended to handle the project management over the web. QQ群: 656868

Jitamin Jitamin (pronounced /ˈdʒɪtəmɪn/) is a free software written in PHP, intended to handle the project management over the web. Jitamin is inspire

jitamin 916 Dec 14, 2022
Frontend repository of libreoupas project, mostly written in PHP and JavaScript, using Bootstrap for responsivity.

libreoupas Description libreoupas est un site Internet permettant aux étudiant de la Faculté des Sciences et Technologies de Vandoeuvre-Lès-Nancy d'av

Clément Colné 4 Jan 6, 2022
A php sample project written from scratch

A simple web app using php Jackson's 12 hour sample project using PHP Requirements PHP >= 7.3 Composer >= 2.1.8 Tech Stack PHP Dependency Manager Comp

Jackson Zhang 1 Oct 29, 2021
A php sample project written from scratch

A simple web app using php Jackson's 12 hour sample project using PHP Requirements PHP >= 7.3 Composer >= 2.1.8 Tech Stack PHP Dependency Manager Comp

Jackson Zhang 1 Oct 29, 2021
mini Project in Laravel and vue js. Real World Laravel 8x + vue js Dashboard.Task management and project management system

mini Project in Laravel and vue js. Real World Laravel 8x + vue js Dashboard.Task management and project management system. Dashboard features such as: Complete Dashboard, Custom Authentication, Email Verification, custom-login-register-forgot password (without jetstream).

Hasmukh Dharajiya 2 Sep 20, 2022
DooTask is a lightweight open source online project task management tool that provides various document collaboration tools, online mind mapping, online flowcharting, project management, task distribution, instant IM, file management and other tools.

DooTask is a lightweight open source online project task management tool that provides various document collaboration tools, online mind mapping, online flowcharting, project management, task distribution, instant IM, file management and other tools.

kuaifan 3k Jan 5, 2023
Laravel-Blog is a blog application written in Laravel 4.2.

创造不息,交付不止 Introduction Laravel-Blog is a blog project written in Laravel 4.2. Screenshots Article List Page Article composing page Single post page Ad

Summer 192 Dec 15, 2022
Koel is a simple web-based personal audio streaming service written in Vue and Laravel

Koel (also stylized as koel, with a lowercase k) is a simple web-based personal audio streaming service written in Vue on the client side and Laravel on the server side. Targeting web developers, Koel embraces some of the more modern web technologies – CSS grid, audio, and drag-and-drop API to name a few – to do its job.

Koel 14.3k Jan 4, 2023
Mibew Messenger - open-source live support application written in PHP and MySQL

Mibew Messenger is an open-source live support application written in PHP and MySQL. It enables one-on-one chat assistance in real-time directly from your website.

Mibew Messenger 443 Dec 13, 2022
An ultra-lightweight blogging engine, written in PHP.

简体中文, Italiano. ?? Translations wanted! Go to the wiki to find out more about translating Chyrp Lite into your language. What can Chyrp Lite do for me

Daniel Pimley 202 Jan 2, 2023