DokuWiki and SMF integration

Started by shinji257, December 29, 2005, 10:31:09 AM

Previous topic - Next topic

my evil twin


ms_ukyankee

The plugin is currently manual login. I may have a go at doing the auto-login soon as I'm going to want it for a personal project.
SMF since 2004 <3

Dannii

I'm working on an auto-login, but it's not working yet. Not sure why, and don't have enough time now. I'll get to it soon though.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Dannii

I'll do it directly through SMF's SSI.php. There won't be a way to log into DW.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

ms_ukyankee

Quote from: Thee Hacker on August 05, 2006, 09:11:51 AM
But, is it a 1-time manual login if you use "Remember Me"?

(Great work by the way leah ;))

Yup, it's once if you use the the "Remember Me".  ( Thank you. :) )
SMF since 2004 <3

ms_ukyankee

#45
Are they ticking the Remember Me box logging in to Dokuwiki?

Sorry, hadn't looked at the code in a while, it does set the SMF cookie to expire. I'll see if that can be changed.
SMF since 2004 <3

Menpower

Thanks for the integration mod
i have a question maybe off topic but you are proffesional about dokuwiki

www.portakalyolu.com/dokuwiki

whenever you want to write a something to search box then forbidden message apeared from below
any idea?

ms_ukyankee

It also says beneath, "You don't have permission to access /dokuwiki/lib/exe/ajax.php on this server."

My guess is that it's server/permissions related, make sure ajax.php has execute permissions, and for the /exe/ directory as well.
SMF since 2004 <3

Grayside

DokuWiki-specific questions can also be asked here: http://forum.splitbrain.org/

ms_ukyankee

For those of you with Dokuwiki installations, there was a Security Alert earlier in the week. See http://bugs.splitbrain.org/?do=details&id=906 for instructions how to secure your wiki. You may also want to subscribe to the Dokuwiki forum Announcements board to keep updated.

I'm currently working on updating the module to fully use the SMF cookie instead of setting two separate cookies, and noticed why users would be logged out of the forum on later return even though "Remember Me" is ticked. My fault, sorry, I've learned so much since writing the module that in hindsight it was a big "DOH".  :-[

For those who'd like an easy update, I've attached the update smf.class.php here to replace the other. I'll be updating the original download files shortly. Let me know if there's any odd behaviour.

I'll also note that the integration does work on the Dokuwiki Dev versions too.
SMF since 2004 <3

ms_ukyankee

#50
Is there anyone that wants to test and give feedback on this version I'm attaching. It's 100% SMF authentication now, so if you're logged in on SMF, no need to login again. It's also got a trigger to add a wiki action to Who's Online.

Backup your old smf.class.php just in case before overwriting.

Also, you can see it in action on my site wiki, though you would have to register on the forum before being able to edit.
SMF since 2004 <3

Dannii

How much work would it be to change from using smf_api to SSI.php?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

ms_ukyankee

Quote from: eldʌkaː on September 16, 2006, 10:16:55 AM
How much work would it be to change from using smf_api to SSI.php?

Not sure. Why do you want to use SSI?
SMF since 2004 <3

ms_ukyankee

Thanks, glad it's working. I still have to tidy it up before I put it in the downloads, expect to have time to do that tomorrow. There's a tip for adding the wiki action to who's online on my wiki. I'd like to have it say specifically if someone's editing the wiki or just browsing it.
SMF since 2004 <3

Dannii

I'd prefer to use SSI.php so that I can use the features it gives, and also so I can get my themes to be integrated.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

ms_ukyankee

Oh okay, I understand. I've used SSI and the api together successfully in other places (despite what they say about it not working), so I will be having a go at getting it working together in this too. Hopefully that before the end of the month, it's a project with a deadline and why I'm up at 3:51am. ::)
SMF since 2004 <3

Dannii

No pressure at all. I'd do it myself but I have no time, and I also don't have much experience with dokuwiki. I tried getting started with it, but got nowhere. ;)

Would you necessarily have to use both? AFAIK smf_api is just a very lightweight file, and I thought everything it could do was already covered in SSI.php
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Valodim

#57
there's a small mistake in the code. this line


if(isset($user)){

should be

if(!empty($user)){


since that function gets $user as a parameter, it is always set, even though it's an empty string if no new login request was made. that way, the function always checks if there's a new login request, and unsets the cookie if it's wrong (which is the case for every called page except the real login, which effectively logs out the user for every called page)

logout is also broken. replace

smf_setLoginCookie(time()-600000, $smf_user_info['id']);

with

smf_setLoginCookie(-3600, 0);

the login cookie time is relative to the current time, and time()+time()-600000 is a positive integer, plus after logout you're a guest so the userid is zero. the logout does work, but only for the dokuwiki, smf will stay logged in if you log out like this (assuming you use the same cookie)

\\ edit

okay for SOME weird reason, smf_setLoginCookie breaks if userid = 0. it works with smf_setLoginCookie(-3600, 1); but that's rather inconsistent... >_>

quake101

After upgrading to 1.1.2 DokuWiki no longer lets my smf users login

is there anything I should change?

quake101


Advertisement: