Advertisement:

Author Topic: Basic SSI FAQ  (Read 155397 times)

Offline Secret

  • Semi-Newbie
  • *
  • Posts: 42
  • Gender: Male
  • SG Admin
    • Secret Gaming
Re: Basic SSI FAQ
« Reply #20 on: July 14, 2004, 05:48:18 PM »
hey, is there a way where you can include the login boxes right there so they dont have to go to the forum to log in. Then if they log in show them the downloads

Secret Gaming (My Site)

Offline Tomer

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,652
  • Gender: Male
    • Aromazing
Re: Basic SSI FAQ
« Reply #21 on: July 15, 2004, 06:44:22 AM »
hey, is there a way where you can include the login boxes right there so they dont have to go to the forum to log in. Then if they log in show them the downloads

Code: [Select]
<?php

if ($context[&#39;user&#39;][&#39;is_guest&#39;])
   
{
      
ssi_Login();
   }
else
   {
      echo 
"Downloads section!";
   }

?>


Offline smarechal

  • Semi-Newbie
  • *
  • Posts: 10
    • Webnature
Re: Basic SSI FAQ
« Reply #22 on: July 27, 2004, 11:12:55 AM »
Hi,

i tried SSI, but i've got this message

Quote
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/webnatur/www/index.php:6) in /home/webnatur/www/yabbse/SSI.php on line 93

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/webnatur/www/index.php:6) in /home/webnatur/www/yabbse/SSI.php on line 93

Warning: Cannot modify header information - headers already sent by (output started at /home/webnatur/www/index.php:6) in /home/webnatur/www/yabbse/SSI.php on line 96
Salut, smarechal, vous avez 0 messages, 0 sont nouveaux.



Do you know what is it?

thanks

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,628
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: Basic SSI FAQ
« Reply #23 on: July 27, 2004, 11:24:44 AM »
Is your include on the1st line? It must be in first, before anything.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Offline smarechal

  • Semi-Newbie
  • *
  • Posts: 10
    • Webnature
Re: Basic SSI FAQ
« Reply #24 on: July 28, 2004, 05:02:12 AM »
Thanks!  :D

I've got another question.

(i try to speak english well   lol)

I want to put on my index page (http://www.webnature.net/index.php?page=accueil [nofollow]) some news i post in special topic (http://www.webnature.net/yabbse/index.php?topic=24.0 [nofollow]).

Can i write a fonction to show the last topic on a define board with SSI?

Thanks a lot for your help

Offline PsyKo BoY

  • Semi-Newbie
  • *
  • Posts: 35
  • Gender: Male
  • I'm a llama!
Re: Basic SSI FAQ
« Reply #25 on: July 28, 2004, 08:23:05 AM »
hello

hum I try this little help but for some reasons it doesn't work...on my forum all is ok, I'm considerated as loggued but on this script I'm considerated like a guest !
Here is my code
Code: [Select]

<?php

require("SSI.php");

if (
$context[&#39;user&#39;][&#39;is_guest&#39;])

   echo 
   
&#39;<h5>Access Denied</h5>
   We are sorry guestit seems you dont have premission to view these downloads.&#39;;

else

   echo
   
&#39;<h5>Welcome &#39;, $context[&#39;user&#39;][&#39;name&#39;], &#39;!</h5>
   Here are your downloads:&#39;;

?>


Exactly the same as posted before...this file and the SSI one are in the same folder.

++Edit++
Ok no more porbleme
I wasn't using the adress specified in the forum script options...
++
« Last Edit: July 28, 2004, 08:44:25 AM by PsyKo BoY »

Offline Redeye

  • Jr. Member
  • **
  • Posts: 182
  • Gender: Male
    • RAM's
Re: Basic SSI FAQ
« Reply #26 on: October 17, 2004, 03:46:03 AM »
I've put the ssi_recentposts function on my web site page and it's working corrctly.

The problem seems to be that when members go to the forum the "Show unread posts since last visit" function shows no new when there are new posts.

Any idea why?

TIA

Offline umiya

  • Jr. Member
  • **
  • Posts: 237
  • Gender: Male
Re: Basic SSI FAQ
« Reply #27 on: October 17, 2004, 06:49:42 AM »
any way to make it so that the pool fucntion is visible no matter what....and you can even vote??

i wa u sing my own poll script but thought hey why not use the ssi stuff....but iv come to find out that u cant see the poll if ur not logged in

Offline Anguz

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,430
  • Gender: Male
    • cristianlavaque.com
Re: Basic SSI FAQ
« Reply #28 on: October 17, 2004, 08:04:41 AM »
It should be shown to guest visitors if that permission is set in your admin area.
Cristián Lávaque http://cristianlavaque.com

Offline umiya

  • Jr. Member
  • **
  • Posts: 237
  • Gender: Male
Re: Basic SSI FAQ
« Reply #29 on: October 17, 2004, 08:35:00 AM »
wher is this part in admin panel...only thing i saw was to diable/enable it  and to show old polls as topics

edit-i found it and it is set for guest to view polls.......

« Last Edit: October 17, 2004, 08:37:39 AM by umiya »

Offline quake101

  • Jr. Member
  • **
  • Posts: 189
  • Gender: Male
    • Badass Mustangs
Re: Basic SSI FAQ
« Reply #30 on: October 19, 2004, 11:55:58 AM »
I'm using SSI (I use ssi_welcome)on my site already, but I'm having problems with this:
Code: [Select]
<?php
require("forums/ssi.php");

if (
$context[&#39;user&#39;][&#39;is_guest&#39;])
{
   echo
   &
#39;<h5>Access Denied</h5>
   
We are sorry guestit seems you dont have premission to view these downloads.&#39;;
}
else
{
   echo
   &
#39;<h5>Welcome &#39;, $context[&#39;user&#39;][&#39;name&#39;], &#39;!</h5>
   
Here are your downloads:&#39;;
}
?>

This code only give me "Welcome ! Here are your downloads:", it doesn't matter if i'm loged in or not I still get that. Does this not work with 1.0 RC1?

Offline Elissen

  • Full Member
  • ***
  • Posts: 466
  • Gender: Male
    • ICSC
Re: Basic SSI FAQ
« Reply #31 on: October 19, 2004, 01:45:26 PM »
Strange, that script does work for me on RC2 (don't have a RC1 running anymore, but it should also work on RC1).

Put
Code: [Select]
error_reporting(E_ALL); right below the <?php before the require to see if anything goes wrong and your server hides it. I had to change ssi.php to SSI.php tough (Linux server, case sensitive)

Offline quake101

  • Jr. Member
  • **
  • Posts: 189
  • Gender: Male
    • Badass Mustangs
Re: Basic SSI FAQ
« Reply #32 on: October 20, 2004, 11:27:53 AM »
Strange, that script does work for me on RC2 (don't have a RC1 running anymore, but it should also work on RC1).

Put
Code: [Select]
error_reporting(E_ALL); right below the <?php before the require to see if anything goes wrong and your server hides it. I had to change ssi.php to SSI.php tough (Linux server, case sensitive)

I upgraded to RC2 last night to see if that helped and it didn't. :( I also made sure I was using SSI.php and it looks like I am. What I don't get is all the other ssi functions work, I tested almost all of them with no errors. When I use "error_reporting(E_ALL);" I get....

Notice: Undefined variable: context in /home/quake101/public_html/bad/downloads.php on line 15
Welcome
Notice: Undefined variable: context in /home/quake101/public_html/bad/downloads.php on line 24
!

Offline Elissen

  • Full Member
  • ***
  • Posts: 466
  • Gender: Male
    • ICSC
Re: Basic SSI FAQ
« Reply #33 on: October 20, 2004, 02:26:07 PM »
Then it doesn't see the context var. Try this:
Code: [Select]
<?php
require("forums/SSI.php");

global 
$context;

if (
$context[&#39;user&#39;][&#39;is_guest&#39;])
{
 echo
 &
#39;<h5>Access Denied</h5>
 
We are sorry guestit seems you dont have premission to view these downloads.&#39;;
}
else
{
 echo
 &
#39;<h5>Welcome &#39;, $context[&#39;user&#39;][&#39;name&#39;], &#39;!</h5>
 
Here are your downloads:&#39;;
}
?>

What PHP version is running on your server btw?

Offline quake101

  • Jr. Member
  • **
  • Posts: 189
  • Gender: Male
    • Badass Mustangs
Re: Basic SSI FAQ
« Reply #34 on: October 20, 2004, 03:59:03 PM »
Woah, It works when you global $context. I didn't think of that one. :)
btw, the server is running PHP Version 4.3.4

Offline Elissen

  • Full Member
  • ***
  • Posts: 466
  • Gender: Male
    • ICSC
Re: Basic SSI FAQ
« Reply #35 on: October 20, 2004, 07:10:16 PM »
Hmm, mine is running 4.3.9-1. Probaly some configuration difference then. Anyway, it works :)

Offline Kender

  • Jr. Member
  • **
  • Posts: 294
  • Gender: Male
  • I am Kender
Re: Basic SSI FAQ
« Reply #36 on: November 10, 2004, 08:31:43 PM »
how would i get it to say,,

Welcome: {username}

without the you haev X messages X unread messages

« Last Edit: November 10, 2004, 09:11:39 PM by Kender »
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

Offline Kender

  • Jr. Member
  • **
  • Posts: 294
  • Gender: Male
  • I am Kender
Re: Basic SSI FAQ
« Reply #37 on: November 10, 2004, 10:47:19 PM »
resolved, needed to global $context;
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

Offline ebsq

  • Newbie
  • *
  • Posts: 3
Re: Basic SSI FAQ
« Reply #38 on: November 29, 2004, 05:53:55 AM »
I think this is a relavant question (and I tried to find the answer elsewhere...)...

What about the other way around... I see how you can use SSI to manage access to your site - but what if you already have an extensive database with user information and want to use it's data to manage logins (that doesn't make sense... I want to grant access to SMF via my data/login/etc...  is this a common need and has anyone addressed it?)  Currently we are using YABB and we have to manage two sets of logins/passwords - not to mention how confusing it is to our members.  (Obviously this is my problem, not YABB/SMFs... but it would be nice if there were a simple solution... I can think of a few difficult ones)

Thanks...  love what is going on here... am holding out for the final release of version 1!

bill

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Basic SSI FAQ
« Reply #39 on: November 29, 2004, 07:48:20 AM »
Obviously, you can't use SSI.php to do what you're asking.  It's a separate topic all together.

There aren't many files you need to modify to change authentication, but I would suggest either:
  - mirroring the login information in the members table SMF uses, and when the password is changed in SMF update it on your side.
  - just using SMF's authentication and porting over the username and password data.

This is because the members table information is used for a lot more than simply the username and password.

-[Unknown]