News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

How do I log into SMF from my application?

Started by CoderLanie, April 08, 2021, 08:32:32 PM

Previous topic - Next topic

CoderLanie

I saw a lot of posts in late 2019 addressing this but I also saw that a lot of updates were going to fix it. I'm still having issues with this. I use these programs on Site Ground. Can someone help?

I am trying to integrate my website and the forum. I want to do all the login/logout/registration from my website. Can I still do this with these deprecations or are they critical?

SpacePhoenix

You might want to consider upgrading to a newer version of SMF as you're just a few versions behind (2.0.18 is the current version of the 2.0.x branch). I can't remember off-hand if you can upgrade straight to 2.0.18 or if you have to upgrade to each version in turn until you get to 2.0.18

vbgamer45

Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

CoderLanie


vbgamer45

Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

CoderLanie

Where can I get the latest?

I thought SiteGround automatically updated the PHP but I manually set it to php 7.4 so now I have to get the updated API.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

CoderLanie

Two people in this thread has said the API has not been updated and neither person pointed to where the updated one is, nor directed me on how to solve my problem.

CoderLanie

Can someone point me to the files and guide on how to log into SMF from my third party application?

I have tried the API files from 2011 to no avail and no one has given me links or resources on to an updated one so I will ask directly:

how do I do the above?

Illori

we dont have a more updated version of the API beyond what is in that topic.

CoderLanie

Okay, that's unfortunate. I made a separate thread but how do I login into SMF from my application without an updated API? Are these functions available in the updated versions without having to add files?

shadav

that would probably depend on what applications

did you looked into the Bridges and Integrations board?

or posting into the Help Wanted (not for support) board if it is something that you need custom made

CoderLanie

That first board has the 2011 file which I was told was outdated by two people.

And I would like to learn how to code this myself.

I just need to a tutorial or something.

I am honestly confused (and frustrated) why i'm not getting direct answers.

CoderLanie

This is the third thread in which I am simply asking:

how do I register/login/logout from my third party application?

The file from 2011 is outdated.

Where is the newest file?

shadav

you do realise by creating all of these different topics, you are actually making it more difficult for anyone to answer you....and well you'd more than likely get the same answers that were already posted in your other threads....

(and on that note, I'm going to merge all 3 together so that you do not get repeat answers)

that being said, again that would probably depend on what applications....and since you already said you are wanting to learn how to do it yourself, then we would really need to know what applications so that others could point you into the right directions

Ninja ZX-10RR

Posting 3 times the same thing is only going to annoy whoever reads them, historically speaking. People here devote their free time to answer you, if you post 3 times impatiently it drastically reduces any willingness to reply :)
That said, you don't just "hurr durr login", you update the software entirely in order to work with the new functions. It's like a puzzle, you can't simply throw pieces from another puzzle in and expect it to work. Update to 2.0.18 via
Large Upgrade (removing mods in the process) or by Patching (keep mods but have to install each version progressively.

EDIT: partially ninja'd, as you can see.
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

CoderLanie

Posting once and getting vague answers such as "that code is outdated" with no one pointing directions is equally as annoying.

If I need to updated software entirely, I need directions on what information I need.
If the API from 2011 is outdated, then what are people using?
If SMF has been updated where the functions are available, what information do I need to pass through?

If I have to update my entire application, I need to know the info

shadav



Kindred

To be clear... the answers weren't vague.

You asked "why does this not work?"
You were told "the API is not designed to work with newer versions of php"
You asked "where is the updated api?"
You were told "there is no update available."

How is that in the least bit vague??
It might not be what you wanted to hear, but it is definitely not vague.

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

CoderLanie

If someone asks, "Is 1111 Ave Street where the library is?" would you answer, "No" or would you answer, "No, it's at 2123 Boulevard"?

Saying "no" is technically helpful, but how does that help the person searching for the library? All it does it makes them have to search for a new address instead of heading towards the direction. Even a "No, but it's on that boulevard somewhere" would have been more helpful than just simply telling me a file is outdated.

I did not ask "why doesn't this work?" I already know. It's deprecated functions. I asked if I could still use the file without it and update it as necessary.
Simply telling me it's outdated and simply telling me there are no updates doesn't help me solve any problems.

The answers are vague in a way that they don't tell me which direction to go.

My apologies if "vague" is used incorrectly but it took way too much effort to be pointed in a reliable direction.

Kindred

Except, if we follow your analogy in this case, the answer was "no. The library closed and they did not open another one"
(Which was the full and complete answer)

Just because you did not like that answer, does not change anything.
you kept asking the same question in the hopes of getting a different answer, but kept getting the same answer - because the answer was full and accurate,  as much as could be, given the facts.


Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

CoderLanie

Fair enough, but I would also answer as "No, the library closed.. but there's a book store at.." Maybe I just answer things different.. I dunno, but I'll consider this experience a lesson learned.

m4z

The replies weren't vague, but missing context that somebody new to SMF wouldn't know: The API was a contribution by somebody outside of the SMF team, so "the API wasn't updated" means "this is the most recent version there is; nothing more recent exists, and if that person (or another volunteer) doesn't update it, you're out of luck". Also, since it is not part of the software and so outdated, probably nobody knows the code.

You said from the start you had problems with it, but didn't explain specifics, so probably nobody here was motivated enough to try it out for themselves. (If you don't invest the effort to even explain, in detail, where or what your problems are, why would I read that other thread, build a test forum and try to get the API to work myself? If I ran into problems, I wouldn't even know if those are the same problems that you're having.)
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

CoderLanie

Alright. Let me reask the question with a more open mind and a little bit more experience.

How do I set the credentials for the forum using my own custom website login?

I looked at the ssi_login() feature. That allows the forums login into be on my website but not what I'm looking for. I want to submit my information (userid/email, password) and then pass it through SMF's login stuff and get them logged in.

I am okay setting the credentials (which from my naive understanding: that means setting the cookies for the forum) from my login, but not sure exactly what they are.

I was considering having my login form -> on submit, would go to form page -> the ssi_login() would be altered so it's auto filled out by the information submitted -> javascript to submit it automatically. As someone who is new (and struggles with javascript), do you think this is reasonable?

I am not looking for someone to make the code, I just need the logic behind it.

Kindred

cache:

if you want to use SMF's permissions system and login, you can use ssi_login with a target page on completion, instead of the default of the boardindex

function ssi_login($redirect_to = '', $output_method = 'echo')

CoderLanie:
As noted, there is no currently functional API between external pages to pass the login info through to SMF.   The API and bridges previously designed will not work on current php versions.
That being said, I *THINK* someone made a WordPress bridge with SMF which *MIGHT* be a place to start looking...    but IIRC, that bridge goes the other way (using SMF's login in WordPress, not the WordPress login passed to SMF)



And no. You do NOT want a javascript like that...   that's a potentially HUGE security hole.
You would want to pass through the login info directly in database/php -- probably using the Hooks system, since, IIRC, there IS a pass-through hook somewhere in the login process... I just don't remember where it is or what parameters it takes.

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Ninja ZX-10RR

There's both bridges in fact, but that's a good idea, so I'll expand upon that and link you to the "reversed" bridge: https://github.com/xchwarze/WP2SMFBridge
And yes it should work with current versions.
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

CoderLanie

Unfortunately, I coded my website from scratch and didn't use any Word Press or anything like that so the github link won't help me out.


Alright, I really don't want to code my entire forum so I will have to use the SMF login. I am okay with this; but where in the file do I set the credentials? I don't want to set my cookies all willy nilly anywhere.


Wait.. this also means I have to adjust the registration and everything.. ugh..

Kindred

coderlanie...


no, you missed my point.    LOOK at how it was done in the WP bridge, then use THAT as a baseline for how it COULD BE done for your site with some tweaks.

However... as I also said... there are HOOKS for registration and login which allow the hook of additional functions (to run additional actions IN the SMF functions...like cookie setting...    or possibly to accept a un/pw combination...)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


Advertisement: