Revision history for WikkaWithSMF


Revision [23106]

Last edited on 2016-05-20 07:38:46 by MyTreo [Replaces old-style internal links with new pipe-split links.]
Additions:
This mod uses the SMF API (smf_api.php) available from [[http://www.simplemachines.org/download/?converters | SMF]] which is a tool to facilitate clean integration of SMF into other scripts.
1) Replace the Wikka registration/login system with a bridge to the [[http://www.simplemachines.org | SMF forum]] membership system.
Deletions:
This mod uses the SMF API (smf_api.php) available from [[http://www.simplemachines.org/download/?converters SMF]] which is a tool to facilitate clean integration of SMF into other scripts.
1) Replace the Wikka registration/login system with a bridge to the [[http://www.simplemachines.org SMF forum]] membership system.


Revision [18850]

Edited on 2008-01-28 00:13:00 by MyTreo [Modified links pointing to docs server]

No Differences

Revision [14170]

Edited on 2006-05-08 07:10:41 by MyTreo [Modified links pointing to docs server]
Additions:
This mod uses the SMF API (smf_api.php) available from [[http://www.simplemachines.org/download/?converters SMF]] which is a tool to facilitate clean integration of SMF into other scripts.
Deletions:
This mod uses the SMF API (smf_api.php) that is supplied with SMF which allows us to call some standard routines like checking whether a user is logged in and return their username.
I have finally had time to revisit this and managed to get a nice bridge working. I will document the changes shortly (there are very few changes actually!)


Revision [14169]

Edited on 2006-05-08 07:05:29 by MyTreo [Modified links pointing to docs server]
Additions:
This modification is now in testing and development. I'm a novice coder so all help appreciated!
This mod uses the SMF API (smf_api.php) that is supplied with SMF which allows us to call some standard routines like checking whether a user is logged in and return their username.
I have finally had time to revisit this and managed to get a nice bridge working. I will document the changes shortly (there are very few changes actually!)
I also added a new ACL "smf registered users" for which I used the symbol "^". This checks that the user is logged in to SMF but doesn't check whether they have a Wikka account.
Deletions:
This is now in testing and development.
I'm a novice coder so all help appreciated!
Possible ways of acheiving this:
1) Either using a similar hack to WikkaWithphpBB, or
1) use the API (smf_api.php) that is supplied with SMF that allows us to call some standard routines like checking whether a user is logged in and return their username.
I am currently favouring method 2, which will probably be slightly more difficult but I think it will offer greater flexibility and tighter integration, we'll see...
Update (8 May 2006)
I have finally had time to revisit this and managed to get some kind of bridge working as per 2) above. I will document the changes shortly (there are very few changes actually!)
I also added a new ACL "smf registered users" for which I used the symbol "^". This checks that the user is logged in to SMF but doesn't check whether they have a Wikka account.


Revision [14168]

Edited on 2006-05-08 07:01:17 by MyTreo [Modified links pointing to docs server]
Additions:
This is now in testing and development.
I'm a novice coder so all help appreciated!
Deletions:
This is still in the idea stage, although I am already testing some hacks on my local machine.
All help appreciated!


Revision [14167]

Edited on 2006-05-08 06:59:52 by MyTreo [Modified links pointing to docs server]
Additions:
I have finally had time to revisit this and managed to get some kind of bridge working as per 2) above. I will document the changes shortly (there are very few changes actually!)
Here's the basics of how it works:
Is user logged in to SMF?
Yes >
Does ""WikkaUsername"" exist?
No > User is a guest and can register for the wiki using the registration code (requires registration code mod)
Yes > User logged in to wiki automatically
No >
User is a guest and can't register to edit the Wiki until they are logged in to SMF.
Note: the ""WikkaUsername"" is created automatically by taking the SMF username, changing the first letter to uppercase and prefixing with "Wikka", thus making it CamelCase and WikiName friendly.
I also added a new ACL "smf registered users" for which I used the symbol "^". This checks that the user is logged in to SMF but doesn't check whether they have a Wikka account.
TonZijlstra has also created a bridge between Wikka and SMF which works the other way around - i.e. people login to Wikka and this automatically logs them into SMF, see below. (For ease of reading this page I wonder whether these two mods should be seperated onto different pages, as they do slightly different things too).
Deletions:
I have finally had time to revisit this and managed to get some kind of bridge working as per 2) above. I will document the changes shortly (there is very few changes actually!)
TonZijlstra has also created a bridge between Wikka and SMF which works the other way around - i.e. people login to Wikka and this automatically logs them into SMF, see below.


Revision [14162]

Edited on 2006-05-08 04:19:26 by MyTreo [Modified links pointing to docs server]
Additions:
Update (8 May 2006)
I have finally had time to revisit this and managed to get some kind of bridge working as per 2) above. I will document the changes shortly (there is very few changes actually!)
TonZijlstra has also created a bridge between Wikka and SMF which works the other way around - i.e. people login to Wikka and this automatically logs them into SMF, see below.


Revision [11155]

Edited on 2005-09-22 15:25:12 by TonZijlstra [Modified links pointing to docs server]
Additions:
Also the only reason I go through the forum here is because setting the cookies for the forum from the wiki was to tedious and it was easier the other way around. I only wanted to give the users the impression of single sign on.
Next step is deleting all cookies that were set on log-out which is easily done from within wikka itself. Changing passwords is another matter, but as I said, in my case not a big problem, given the closed user group of only a few individuals.


Revision [11154]

Edited on 2005-09-22 15:22:14 by TonZijlstra [Modified links pointing to docs server]
Additions:
UPDATE:
I've hacked together an extremely crude attempt of making the Wikka Login procedure run through SMF.
I am using it in a platform that is a combination of Wikka, SMF and two Wordpress blogs one of which is only accessible for logged on users. The user tables of these 4 modules already contain the same list of users and pw's. As no-one can register on the platform freely, the number of users is limited to around 20, and only the admin creates accounts it is easy to maintain those tables.
I have altered the login script of SMF Loginout.php after where it says
%%
// Bam! Cookie set. A session too, just incase.
setLoginCookie(60 * $modSettings['cookieTime'], $user_settings['ID_MEMBER'], $md5_passwrd);
%%
by adding
%%
// setting cookies for both blogs as well for editing rights and the wiki
// first some variables
$passwordwp=md5(md5($_REQUEST['passwrd']));
$usernamewp=$_REQUEST[user];
$homewp1="http://www.weblogdomain1.com";
$homewp2="http://www.weblogdomain2.com";
$cookiepathwp1= preg_replace('|https?://[^/]+|i', '', $homewp1 . '/' );
$cookiepathwp2= preg_replace('|https?://[^/]+|i', '', $homewp2 . '/' );
$siteurlwp1=$homewp1;
$siteurlwp2=$homewp2;
$cookiehashwp1 = md5($siteurlwp1);
$cookiehashwp2 = md5($siteurlwp2);
// setting the cookies for two wordpress blogs
setcookie('wordpressuser_'. $cookiehashwp1, $usernamewp, time() + 31536000, $cookiepathwp1);
setcookie('wordpresspass_'. $cookiehashwp1, $passwordwp, time() + 31536000, $cookiepathwp1);
setcookie('wordpressuser_'. $cookiehashwp2, $usernamewp, time() + 31536000, $cookiepathwp2);
setcookie('wordpresspass_'. $cookiehashwp2, $passwordwp, time() + 31536000, $cookiepathwp2);
//variables for the wiki-cookies
$name1="wikka_user_name";
$name2="wikka_pass";
$wikiname=$_REQUEST['user'];
$wikipass= md5($_REQUEST['passwrd']);
// setting wikicookies
setcookie($name1, $wikiname, time() + 90 * 24 * 60 * 60, "/");
setcookie($name2, $wikipass, time() + 90 * 24 * 60 * 60, "/");
%%
And a bit further down in the same file I added:
%%
// redirect to wiki if that is where you came from
if (isset($_REQUEST[refer]))
redirectexit('http://yourdomain.com/yourwikipage', false);
%%
before where it says
%%
// Just log you back out if it's in maintenance mode and you AREN'T an admin.
%%
Next I altered usersettings.php in the Wikka actions:
replacing
%%
// check password
if ($existingUser["password"] == md5($_POST["password"]))
{


$this->SetUser($existingUser);
$this->Redirect($this->href());
}
%%
with
%%
// check password
if ($existingUser["password"] == md5($_POST["password"]))
{


$this->SetUser($existingUser);
// lets go through the forum
$forumurl = "http://yourdomain.com/forum/index.php?action=login2&user=".$_POST['name']."&passwrd=".$_POST['password']."&refer=wiki ";
$this->Redirect($forumurl);
//$this->Redirect($this->href());
}
%%


Revision [10921]

Edited on 2005-09-03 19:04:48 by TonZijlstra [Modified links pointing to docs server]
Additions:
(TonZijlstra)


Revision [10920]

Edited on 2005-09-03 19:04:04 by TonZijlstra [a second approach to combining Wikka and SMF, and a third way of doing that.]

No Differences

Revision [10919]

Edited on 2005-09-03 19:03:25 by TonZijlstra [a second approach to combining Wikka and SMF, and a third way of doing that.]
Additions:
We could work the other way around as well:
1) Replace the SMF registration page with a bridge from wikka registration page
1) Allow registered and logged-in wikka users to use the forum (and none else)
I use a wikkasite where I want to include a SMF forum. So I'd like SMF to use the usernames and pw's from Wikka, and have Wikka log them into the forum when they log into the wiki. (same goes for editing rights in Wordpress weblog admintool)
Possible ways of achieving this:
1) the two routes as stated above
1) have Wikka set a cookie for SMF as well, as both rely on cookies for determining logged-in status.


Revision [9616]

Edited on 2005-06-25 13:35:43 by JavaWoman [category added]
Additions:
----
CategoryUserContributions


Revision [9615]

Edited on 2005-06-25 13:30:49 by MyTreo [category added]
Additions:
All help appreciated!


Revision [9612]

Edited on 2005-06-25 13:24:44 by MyTreo [category added]
Additions:
I am currently favouring method 2, which will probably be slightly more difficult but I think it will offer greater flexibility and tighter integration, we'll see...
Deletions:
I am favouring method 2.


Revision [9611]

Edited on 2005-06-25 13:23:33 by MyTreo [category added]
Additions:
1) Replace the Wikka registration/login system with a bridge to the [[http://www.simplemachines.org SMF forum]] membership system.
Deletions:
1) Replace the Wikka registration/login system with a bridge to the [[http://www.simplemachines.org SMF forum]] membership.


Revision [9610]

Edited on 2005-06-25 13:23:20 by MyTreo [category added]
Additions:
1) Replace the Wikka registration/login system with a bridge to the [[http://www.simplemachines.org SMF forum]] membership.
Deletions:
1) Replace the Wikka registration/login system with a bridge to the SMF forum membership.


Revision [9609]

Edited on 2005-06-25 13:22:51 by MyTreo [category added]
Additions:
This is still in the idea stage, although I am already testing some hacks on my local machine.
Deletions:
I am using WikkaWithphpBB as a basis for this mod. This is still in the idea stage, although I am already testing some hacks on my local machine.


Revision [9608]

The oldest known version of this page was created on 2005-06-25 13:22:28 by MyTreo [category added]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki