thirtywest Posted January 4, 2022 Share Posted January 4, 2022 Greetings, 1st time posting. Quite new with php. I've been managing an SMF forums for about 6 months now. I have a few static pages in wordpress I'd like to make visible only to members. I'm trying to use SSI to validate they're logged in before showing the pages. But, 1. I'm having a tough time of that :), and 2. I can't seem to make it work from inside wordpress, and 3. If i have to build the pages from scratch I don't know if i'll have the features that I'm looking for; and 4. I just need a simple way to prevent folks from entering the URLs directly--only having access from being logged into SMF first. I intend to build a button on the forum menu to take them to this expanded content page. Am I asking too much? ANY guidance would be greatly appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/314384-can-someone-help-me-use-ssiphp-to-let-users-access-a-web-page/ Share on other sites More sharing options...
gizmola Posted January 6, 2022 Share Posted January 6, 2022 A little googling tells me there is nothing simple that will let you do this SMF Wordpress integration. SMF and Wordpress don't play well together, just looking at a few posts asking for something similar to what you want. There are bridge hacks for SMF that will "pump" user accounts into wordpress. These types of bridges are notoriously brittle, as changes to either side of the equation break them. There's also the matter of lots and lots of wordpress accounts, when typically you only want a few for you to author with. Another possible solution would be to protect the wordpress pages with a plugin like this one: https://wordpress.org/support/plugin/password-protect-page/ although it does some hacking with the wordpress user system that might be problematic. Using that plugin you could possibly integrate with it, or you could hack your own solution. In either case, it looks like the way to do it would be to write your own standalone php script that would utilize smf's SSI.php stuff to check authentication and grant access. You could think of this as your own primitive SMF REST api. You could call this from ajax you have in the wordpress page to allow or deny rendering of the wordpress content body. This would get you around a lot of complexity issues. While we do have a lot of PHP experts here, PHPFreaks hasn't personally used SMF in many years, although we did use it for a while, so I don't know that there is anyone active in the community that has much recent experience. I'd suggest focusing your efforts over at the SMF forum. Just be really clear about what you want to do, and how you intend to implement it. Quote Link to comment https://forums.phpfreaks.com/topic/314384-can-someone-help-me-use-ssiphp-to-let-users-access-a-web-page/#findComment-1593204 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.