Code Monkey home page Code Monkey logo

xenforobridge's Introduction

XenforoBridge

Simple to use XenForo bridge library. The goal of this package is to allow developer to easily integrate their existing/new application with XenForo Forum Platfrom. This package is still heavily underdevelopment so use with caution. I have also included a ServiceProvider to use within a Laravel application.

If you would like to see this package in action we are currently using for AstronomyConnect.com - ItemHub Database. This is a Laravel 5 app with Xenforo sitting within the public folder. Templates have been designed and implemented in Xenforo and are being rendered by this bridge instead of using Blade.

Installation

Install the XenforoBridge package with Composer by adding the folowing to your composer.json file.

{
    "require": {
        "urb/xenforobridge": "dev-master"
    }
}

Or by using the composer require command

composer require urb/xenforobridge:dev-master

To install XenforoBridge into Laravel 5 simple add the following service provider to your 'config/app.php' in the 'providers' array:

'providers' => array(
		'Urb\XenforoBridge\XenforoBridgeServiceProvider::class',
)

Then publish the config file with

php artisan vendor:publish

This will add the file 'config/xenforobridge.php'. This is where you will place the needed configurations to use the Xenforo Bridge.

Within this config file you will need to supply the full directory path to your XenForo installation and the base url path like the example below

return array(
		'xenforo_directory_path' => '/var/www/html/public/forums',
		'xenforo_base_url_path'  => '//example.com/forums/', //Default '/'
	);

Installing Middleware

To install Middleware you wil need to open up the app\Http\Kernel.php and the following middleware to either global middleware array or the routeMiddleware array.

Here is an example adding to the routeMiddleware array

protected $routeMiddleware = [
		'xen.auth' => 'Urb\XenforoBridge\Middleware\XenAuthMiddleware',
		'xen.auth.admin' => 'Urb\XenforoBridge\Middleware\XenAuthAdminMiddleware',
	];

You can then use them in your routes like so

Route::get('/example', ['middleware' => 'xen.auth',function(){
	//Do stuff
}]);

or you can use them in your controllers themselves

class SampleController extends Controller {


    function __construct()
    {

        $this->middleware('xen.auth');
    }

}

For more information on Middleware development an installation check out Laravel Docs - Middleware

Credits

Special thanks to VinceG, the idea and much of my work is based on his package xenforo-sdk which was previously integrated within an ongoing project.

xenforobridge's People

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xenforobridge's Issues

PTF

Greetings! I'm Mykyta , a developer with over a year of experience specializing in XenForo. Let me share a bit more about my journey:

  1. Crafting Unique Themes:

    • Bringing to life bespoke themes that capture the essence of corporate identity and cater to the community's specific needs.
  2. Fine-Tuning the Forum Environment:

    • Delving into the intricacies of XenForo settings to optimize performance and enhance user engagement.
  3. Extensions and Plugins Expertise:

    • Developing and integrating various extensions to augment forum functionality, ensuring a seamless experience for users.
  4. User-Centric Design:

    • Elevating the user interface and experience, making interfaces intuitive and functionality-rich for an engaging user journey.
  5. Technical Support:

    • Providing responsive technical support to the community, swiftly resolving issues, and continually refining the forum based on user feedback.

Through this experience, I've grown adept at navigating the dynamic world of web development, and I'm eager to take on new challenges. If you're looking for someone passionate about enhancing XenForo forums, feel free to reach out for further details or to discuss potential collaborations.

Thanks for stopping by!

TG:

@mdmdmdmdmdmdmdmdmdmdmdmdmdmdmd

Intengration with [BD] API

I have been playing around with the idea of create an remote implementation of XenforoBridge using [BD] API as an interface. Will investigate on how to integrate their remote API without having to roll out my own implementation.

XenForo_Upload

When using XenForo_Upload via the bridge you'd have to pass in the fileName and tempFile, as per :

        XenForo_Upload
        ....
        ....
    /**
     * Constructor.
     *
     * @param string $fileName User-supplied file name
     * @param string $tempFile Upload temporary file name; this can be an empty string to account for uploads that are too large
     */
    public function __construct($fileName, $tempFile)
    {

How does XF::getXenforoModel('XenForo_Upload') deal with that ?

Or as it's not technically a model, how would it be access via the bridge ?

Other admin panels?

Is this just for Backpack Admin Panel?

Can this be used with other Admin Panels?

Call Function Inside File User.php

how to call a function name that is in the user file / User.php
I already do $ this-> xenforo-> adduser (param); then appear Call to undefined method, if there is something wrong

Create Facade

It has been requested that a Laravel Facade be created for interacting with the XenforoBridge.

I believe I may strip out all Laravel implementations from this XenforoBridge Package and create a wrapper package specifically implementing XenforoBridge as a Laravel package complete with Service Provider and Facade. This way keeping XenforoBridge itself framework agnostic.

Start Session for an Authenticated User

Hi,

Any plans to add a facade. I'm trying to figure out how to use this with in Laravel to access and manipulate xF users, though can't find any example or demo code any where.

Thanks
J

Instructions

You have :

'providers' => array(
		'XenforoBridge\XenforoBridgeServiceProvider::class',
)

Because you changed the name space, shouldn't that be :

'providers' => array(
		'Urb\XenforoBridge\XenforoBridgeServiceProvider::class',
)

?

laravel 5.5

Hello!

composer require urb/xenforobridge:dev-master

in config/app.php
` 'providers' => [

    /*
     * Laravel Framework Service Providers...
     */
    Illuminate\Auth\AuthServiceProvider::class,
    Illuminate\Broadcasting\BroadcastServiceProvider::class,
    Illuminate\Bus\BusServiceProvider::class,
    Illuminate\Cache\CacheServiceProvider::class,
    Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
    Illuminate\Cookie\CookieServiceProvider::class,
    Illuminate\Database\DatabaseServiceProvider::class,
    Illuminate\Encryption\EncryptionServiceProvider::class,
    Illuminate\Filesystem\FilesystemServiceProvider::class,
    Illuminate\Foundation\Providers\FoundationServiceProvider::class,
    Illuminate\Hashing\HashServiceProvider::class,
    Illuminate\Mail\MailServiceProvider::class,
    Illuminate\Notifications\NotificationServiceProvider::class,
    Illuminate\Pagination\PaginationServiceProvider::class,
    Illuminate\Pipeline\PipelineServiceProvider::class,
    Illuminate\Queue\QueueServiceProvider::class,
    Illuminate\Redis\RedisServiceProvider::class,
    Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
    Illuminate\Session\SessionServiceProvider::class,
    Illuminate\Translation\TranslationServiceProvider::class,
    Illuminate\Validation\ValidationServiceProvider::class,
    Illuminate\View\ViewServiceProvider::class,

    /*
     * Package Service Providers...
     */
    XenforoBridge\XenforoBridgeServiceProvider::class,

    /*
     * Application Service Providers...
     */
    App\Providers\AppServiceProvider::class,
    App\Providers\AuthServiceProvider::class,
    // App\Providers\BroadcastServiceProvider::class,
    App\Providers\EventServiceProvider::class,
    App\Providers\RouteServiceProvider::class,

],`

php artisan vendor:publish

In ProviderRepository.php line 208:
Class 'XenforoBridge\XenforoBridgeServiceProvider::class' not found

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.