News:

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

Main Menu

DokuWiki and SMF integration

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

Previous topic - Next topic

goetzi

Wow, that's really great. The best board and wiki together  :)

Is it possible to integrate the wiki into the smf design? With an iframe or something?

ms_ukyankee

Quote from: goetzi on May 23, 2006, 02:32:41 PM

Is it possible to integrate the wiki into the smf design? With an iframe or something?

Perhaps, I haven't tried it that. I only felt the need to customise templates to make them the same layout. :)
SMF since 2004 <3

goetzi

Quote from: leah on May 23, 2006, 02:56:52 PM
Quote from: goetzi on May 23, 2006, 02:32:41 PM

Is it possible to integrate the wiki into the smf design? With an iframe or something?

Perhaps, I haven't tried it that. I only felt the need to customise templates to make them the same layout. :)

Have you made a wiki template for the SMF 1.1RC2 default theme?

Has anyone an idea how to integrate it into the smf "page"?

Mr. Jinx

Thank you, this integration works perfect!

One question: Is it possible to display the members alias, instead of login name?
"Last modified by [members alias]"

ms_ukyankee

Quote from: Mr. Jinx on June 16, 2006, 06:50:42 AM
One question: Is it possible to display the members alias, instead of login name?
"Last modified by [members alias]"

Possible maybe, but not simple I think. This is produced by the dokuwiki template function tpl_pageinfo(), and it only seems to use the username for the page editor. After a quick look, I think it might take some core hacks to dokuwiki to change it, but you could ask on the Dokuwiki user forum or the mailinglist (better chance of getting a good reply from the developers on the mailinglist).
SMF since 2004 <3

Blardov

Quote from: leah on May 19, 2006, 11:08:48 AM
The latest release of Dokuwiki required an update to the auth module. Up to date versions are available here:

hxxp:www.web-threads.com/downloads/dokuwiki-smf.php [nonactive]

I am using this version and experiencing the same problem.  Obviously I know the error is on my part but not sure where to look.  Could anyone offer any assistance?
Here is my acl.auth.php
# acl.auth.php
# <?php exit()?>
# Don't modify the lines above
#
# Access Control
#
# none   0
# read   1
# edit   2
# create 4
# upload 8
# delete 16

*               @ALL        1   #everyone can read
*               @1          16  #admin groups can do everything
*               @2          16  #global mod group
*               @4          4   #newbie group to edit and create
*               @5          4   #junior member group to edit and create



Here is my conf/dokuwiki.php
/* Authentication Options - read hxxp:www.splitbrain.org/dokuwiki/wiki:acl [nonactive] */
$conf['useacl']      = 1;                //Use Access Control Lists to restrict access?
$conf['openregister']= 0;                //Should users to be allowed to register?
$conf['autopasswd']  = 0;                //autogenerate passwords and email them to user
/*$conf['resendpasswd']= 0;                //allow resend password function?*/
$conf['authtype']    = 'smf';            //which authentication backend should be used
$conf['passcrypt']   = 'smf';            //Used crypt method (smd5,md5,sha1,ssha,crypt,mysql,my411)
$conf['defaultgroup']= 'user';           //Default groups new Users are added to
$conf['superuser']   = '@1';          //The admin can be user or @group
$conf['profileconfirm'] = '1';           //Require current password to confirm changes to user profile
$conf['pathofsmf'] = 'thisisthepathtosmf';
//<---this is an alias

I have the smf_api 1.0.5 installed in the smf directory that matches above

ms_ukyankee

Ok, for the March release of Dokuwiki, double check smf.class.php is uploaded to your dokuwiki/inc/auth/ directory, you can get the "Bad user authentication..." error if it's not there. If the api path is wrong you'd get a php error such as "No such file...". However, above you have $conf['pathofsmf'] when it should be $conf['pathtosmf'], maybe just a typo here.

Hope that helps.
SMF since 2004 <3

Blardov

Ok..I am thickheaded and I apologize.  Thank you for pointing out my typo...that was corrected.  I also realized I have the smf_api version of 1.0.5 when it should have been for 1.1.x .  I had both, but uploaded the wrong one.  That was corrected also.

I renamed the smf.php in the zip file to smf.class.php . Was that the proper thing to do?  I verified the api path was correct as I changed the directory to force the appropriate error.  The original error still exists.

Don't want to take up too much of anyones time, but is there a way to debug this?  Would it be a good idea to backtrack and check variable names from smf and dokuwiki?  Both work independently and I made no custom changes.

Again..thank you for any assistance.

ms_ukyankee

QuoteI renamed the smf.php in the zip file to smf.class.php . Was that the proper thing to do?  I verified the api path was correct as I changed the directory to force the appropriate error.  The original error still exists.

If the auth file in the download was smf.php, then I think you've downloaded the wrong zip. You'll want the top one on the page for the latest version of dokuwiki. I'll edit the page to try to make it more clear, I was probably in a rush. It should work with that smf.class.php right away when you upload it. *crosses fingers*

QuoteOk..I am thickheaded and I apologize.

Nah, it's no problem at all, happy to help. :)
SMF since 2004 <3

Blardov

#29
Ahh..Well that did it for me.  My fault for sure.  I saw the two versions but I saw the updated date on the non beta version and thought that was the correct one. 

Thank you so much for your help.

Grayside

The smf.class.php require() on smf_api.php crashes.  SMF 1.1RC2.  Is this api file not compatible?

ms_ukyankee

Not sure what you mean by "crashes"... do you have an error message?

There are two versions of the api, the correct one for SMF 1.1RC2 is in a topic here linked to in the readme.txt.
SMF since 2004 <3

Grayside

I uploaded a new DL of that version and noticed the one already there looked smaller.  I'd hoped it was a bad previous upload (same file version).  But I get the same error.

[error] PHP Fatal error:  main(): Failed opening required 'correct_path/smf_api.php' (include_path='.:/blah/php') in correct_path/smf.class.php on line 14

It looks like the require() is breaking on something.  When I switch it to an include() it loads fine, loads the login page fine, and crashes again when I try to login to an account.

I figured I'd ask before starting to check for missing semicolons.

ms_ukyankee

Strange, yeah it's breaking on something on the api require. The only reason I can think of it failing opening is file permissions or a problem with the line endings. I downloaded a fresh copy of the api from that thread yesterday for a new installation and it's working fine.
SMF since 2004 <3

Grayside

Tried it again twice.  Deleted existing file, uploaded with FileZilla, ssh'd in and checked everything.. and break.  Permissions set to 777 for an extreme test, still nothing.

Anyone recommend a command-line php debugger?

my evil twin

#35
i always get
QuoteSorry, username or password was wrong.

somehow, it just does not work. what do i do wrong?
it's smf rc 1.1 and the zip file with the smf.class.php, put in the right place.

nevermind, it works now.

i put the stuff from the dokuwiki.php to the local.php and it worked  :D

Grayside

Odd solution, hardcode the require line.  It works perfectly.  What do the group numbers correlate with?

ms_ukyankee

Quote from: Grayside on July 20, 2006, 01:53:43 PM
Odd solution, hardcode the require line.  It works perfectly.  What do the group numbers correlate with?

Glad you found a fix.

The groups numbers are for wiki ACL permissions, using the membergroups (by number) of SMF.
SMF since 2004 <3

my evil twin

Quote from: leah on July 20, 2006, 02:01:38 PM
Glad you found a fix.

The groups numbers are for wiki ACL permissions, using the membergroups (by number) of SMF.

could you please specify that a bit further?

i created a usergroup in smf named "wiki-team".
how can i add this group to dokuwiki?

ms_ukyankee

#39
Quote
could you please specify that a bit further?

i created a usergroup in smf named "wiki-team".
how can i add this group to dokuwiki?

In our acl.auth.php, we have:

# acl.auth.php
# <?php exit()?>
# Don't modify the lines above
#
# Access Control
#
# none   0
# read   1
# edit   2
# create 4
# upload 8
# delete 16

*               @ALL        1
*               @1          16  #admin group
*               @13          8   #wiki editor group
arthroplasty:*    @14    8   #wiki knee replacement editor in arthoplasty namespace


Group is specified by @, so @1 is the admin group. Our wiki editor group is smf membergroup 13. You can find the smf group number by going into SMF admin and the Membergroup management, and holding your cursor over the group edit link. Then in the browser status bar you'll see which group number it is.
SMF since 2004 <3

Advertisement: