Author Topic: cmsms + smf  (Read 1107 times)

0 Members and 1 Guest are viewing this topic.

Offline wakewatcher

  • New Member
  • *
  • Posts: 17
  • Karma: 1
  • Gender: Male
  • Why doesn't this work?
  • SMF Version: 2RC1.2
cmsms + smf
« on: April 05, 2010, 10:25:40 AM »
I'm trying to loosely integrate cmsms with an instance of smf.  I've already used cmsms for the landing page as does this site but want to use smf sign-in to control access to cmsms content pages.  I'm not smart enough to make a 'bridge' to consolidate usernames and passwords so my idea was to use a user defined tag in a page template to make sure that a user is logged in to SMF (via SSI.php) before allowing viewing of some cmsms pages. If they are not logged in then the idea is to provide a login prompt for them again via SSI.php.  So far I've got this which sorta works. It has (at least) two problems. 1) is that for some reason the redirection doesn't work and 2) I haven't figured out how to block the cmsms content for that page if not logged in.  That is now I get the login prompt if not logged in as expected but if not logged in then the content is still showing.  I tried putting 'exit;' but of course that doesn't work as it kills all the remaining html output.  So ultimately in addition to figuring out why the redirect is not working (It sends me to the forum rather than back to the current page) I will need to learn about setting up for conditional content but one thing at a time.

:
//UDF my_ssi to be placed in page template as {my_ssi}
require_once('./smf/SSI.php');
$Referrer = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$_SESSION['login_url'] = $Referrer;
$_SESSION['logout_url'] = $Referrer;
if ($context['user']['is_guest'])
  ssi_login();
else
  echo "<br>already logged in: $Referrer";

cmsms 1.6.6
smf 2RC1.2

Offline bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13222
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: cmsms + smf
« Reply #1 on: April 05, 2010, 02:43:35 PM »
Are you really using smf 2b4 ??? If so upgrading this would be the first step.

Offline wakewatcher

  • New Member
  • *
  • Posts: 17
  • Karma: 1
  • Gender: Male
  • Why doesn't this work?
  • SMF Version: 2RC1.2
Re: cmsms + smf
« Reply #2 on: April 06, 2010, 04:26:54 PM »
ooops.  Updated my forum profile.   :ntme   I've had good luck using SSI and redirects with 2RC1.2 within my application but doesn't seem to work within the cmsms application.

p.s. From some reason I didn't get notified of your reply.  I just checked back and saw it.  Is notification working?
« Last Edit: April 06, 2010, 04:29:37 PM by wakewatcher »
cmsms 1.6.6
smf 2RC1.2

Offline bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13222
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: cmsms + smf
« Reply #3 on: April 06, 2010, 09:11:46 PM »
Notification should be working but maybe not for your membergroup. You should update to SMF 2.0 RC3. I do believe there was an old bridge created for cmsms and SMF maybe ideas could be gotten from that.

Offline wakewatcher

  • New Member
  • *
  • Posts: 17
  • Karma: 1
  • Gender: Male
  • Why doesn't this work?
  • SMF Version: 2RC1.2
Re: cmsms + smf
« Reply #4 on: April 07, 2010, 12:46:17 PM »
Thanks.  I couldn't find anything on any bridge.  If you have a link that would be great.

How do I change my membergroup so I get notifications from this site?

(I would have thought if I didn't have notification privileges then it would not let me set 'notify' but it does.)

cmsms 1.6.6
smf 2RC1.2

Offline bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13222
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: cmsms + smf
« Reply #5 on: April 08, 2010, 08:55:03 AM »
I will take a look at your permissions today and see if there is any problems. Have you been to their site and searched for SMF or bridge to SMF. ??? I know there was one over there.

Offline wakewatcher

  • New Member
  • *
  • Posts: 17
  • Karma: 1
  • Gender: Male
  • Why doesn't this work?
  • SMF Version: 2RC1.2
Re: cmsms + smf
« Reply #6 on: April 08, 2010, 01:00:26 PM »
Got the notification this time.  Yes I did a search but didn't find anything on a cmsms bridge.
cmsms 1.6.6
smf 2RC1.2

Offline bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13222
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: cmsms + smf
« Reply #7 on: April 08, 2010, 02:34:52 PM »
I will look for you when I get back then. I know I saw something there somewhere. :)

Offline wakewatcher

  • New Member
  • *
  • Posts: 17
  • Karma: 1
  • Gender: Male
  • Why doesn't this work?
  • SMF Version: 2RC1.2
Re: cmsms + smf
« Reply #8 on: April 08, 2010, 02:41:51 PM »
Thanks.  I appreciate it!
cmsms 1.6.6
smf 2RC1.2

Offline bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13222
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: cmsms + smf
« Reply #9 on: April 08, 2010, 05:04:25 PM »
Just on a quick search there is something here:

http://forum.cmsmadesimple.org/index.php?topic=42977.0

and here:

http://forum.cmsmadesimple.org/index.php?topic=26185.msg126938

These are probably old but they will give you an idea of what is going on.

Offline wakewatcher

  • New Member
  • *
  • Posts: 17
  • Karma: 1
  • Gender: Male
  • Why doesn't this work?
  • SMF Version: 2RC1.2
Re: cmsms + smf
« Reply #10 on: April 08, 2010, 05:23:50 PM »
Well the first one's new as it is mine (wakewatcher) posted last week.   :)

I also had found the other one which basically says there isn't one.  Sigh....

cmsms 1.6.6
smf 2RC1.2

Offline bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13222
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: cmsms + smf
« Reply #11 on: April 08, 2010, 06:33:17 PM »
Lmao, I didn't even look at the name. damn it, lol. Sorry that was just a quick search as well. I have posted a bit on their site and thought that I had come across what you were looking for. Very sorry about that. Let do a bit more searching.