News:

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

Main Menu

With SSI user is not recognized

Started by Drug Mile, December 09, 2019, 06:10:20 PM

Previous topic - Next topic

Drug Mile

I am working on integration of blog built on Wordpress and forum on SMF.
Blog: http://www.perforum.info/
Forum: http://www.perforum.info/forum/index.php

I want forum statistics on Wordpress homepage. It works quite good using SSI.php functions. As explaned here: https://simplemachines.org/community/ssi_examples.php, I pasted "require..." part to Wordpress header and then created few widgets on homepage that are requesting content i.e. ssi_recentTopics().

The problem is with functions that work depending on if user is logged in or not.
<?php ssi_welcome(); ?>

This should show my name and private messages if there is any. Other functions that I want to use would offer me to login or logout, or display latest posts that are hidden from guests. But even though I keep logging in to Forum, my homepage always treat me as a guest. I have opened both blog and forum at the same time. On forum I am loged in as administrator and checkbox is set to remember me permanently, but on blog at the same time I see "welcome Guest, please login or register". On forum I see all topics including the ones that are hidden from guests, and on homepage I see only what guests can see.

Any idea what might be the problem?

Kindred

Where is wordpress installed (directory,  subdomain, etc?)
Where is forum installed?

What are your smf cookie settings?
Сл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."

Drug Mile

Wordpress is installed in the root, smf is in folder /forum.

Cookie settings are probably default, I can't remember I changed them. Hope attachment will help.

Drug Mile

Also, I tried with enabling subdomain cookies, but it did not change anything, still I am treated as a guest.

Kindred

turn on subdomain independent cookies.
Clear your cookies and browser cache
try it then...

might also try turning off database driven sessions.
Сл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."

Drug Mile

Did all of your advices but still the same. Anything else I could try?

Drug Mile

I found the solution, I believe. As described here:

https://www.simplemachines.org/community/index.php?topic=551723.0

I modified my SSI.php like shown on attached picture. I refreshed Wordpress page and there I am, well recognized.

Kindred

excellent...

sorry I missed that and glad you found it...

Wordpress is a pain in the butt when it comes to playing nicely with other softwares.
Сл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: