Simple Machines Community Forum

Customizing SMF => Bridges and Integrations => Topic started by: olekhabiter7 on September 02, 2020, 10:23:59 AM

Title: Integration of SMF script into laravel
Post by: olekhabiter7 on September 02, 2020, 10:23:59 AM
Hello,

i have one question. How or is possible to store data from SMF SSI (api) into Laravel Auth. Is there way to sync that two script or any other way to store data from SMF and use as Auth throw framework website beside forum script.

Thank you.
Title: Re: Integration of SMF script into laravel
Post by: Arantor on September 02, 2020, 11:04:49 AM
With huge difficulty. SMF is its own framework.

That said, there are integration hooks you can use so that SMF will not look up auth from its own cookies but from the ones from your Laravel app, but you’d have to write that yourself, no ones done it for Laravel AFAIK. (You’d still have to put users into SMF’s tables, that’s a hard requirement)
Title: Re: Integration of SMF script into laravel
Post by: AndrykVP on November 07, 2020, 06:08:15 PM
I am also trying to use hooks and the SSI from SMF in Laravel and I'm stumpt. I hope you can help.

I have the SMF forums and Laravel in the same server (local at the time), and when calling for the SSI file with require_once I get a few errors.

Function get_magic_quotes_runtime() is deprecated on SSI.php Line 30
I changed this bit:
Code: [Select]
$ssi_magic_quotes_runtime = function_exists('get_magic_quotes_gpc') && get_magic_quotes_runtime();
To:
Code: [Select]
$ssi_magic_quotes_runtime = true;
But then I get another error

Trying to access array offset on value of type null on Load.php Line 168

It seems like $modSettings variable is null, and I'm not sure what to do next.
Title: Re: Integration of SMF script into laravel
Post by: Kindred on November 08, 2020, 06:32:45 PM
What version of smf?   And what version of php are you running?
Title: Re: Integration of SMF script into laravel
Post by: Oldiesmann on November 17, 2020, 12:52:14 AM
The magic quotes stuff is deprecated as of PHP 7.4.0. I don't know if SMF 2.0.17 is officially compatible with 7.4 yet. 2.1 is, though it's still in development.
Title: Re: Integration of SMF script into laravel
Post by: Kindred on November 17, 2020, 01:00:44 PM
2.0.17 is NOT compatible with php 7.4