• Welcome to Simple Machines Community Forum. Please login or sign up.
November 27, 2021, 07:47:18 PM

News:

Wondering if this will always be free?  See why free is better.


Basic SSI FAQ

Started by Tomer, June 23, 2004, 05:06:24 AM

Previous topic - Next topic

Secret

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)

Tomer

Quote from: Secret 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


<?php

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

?>


smarechal

Hi,

i tried SSI, but i've got this message

QuoteWarning: 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

Owdy

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

smarechal

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

PsyKo BoY

July 28, 2004, 08:23:05 AM #25 Last Edit: July 28, 2004, 08:44:25 AM by PsyKo BoY
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


<?php

require("SSI.php");

if (
$context['user']['is_guest'])

   echo 
   
'<h5>Access Denied</h5>
   We are sorry guest, it seems you dont have premission to view these downloads.'
;

else

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

?>



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...
++

Redeye

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

umiya

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

Anguz

It should be shown to guest visitors if that permission is set in your admin area.
Cristián Lávaque http://cristianlavaque.com

umiya

October 17, 2004, 08:35:00 AM #29 Last Edit: October 17, 2004, 08:37:39 AM by umiya
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.......


quake101

I'm using SSI (I use ssi_welcome)on my site already, but I'm having problems with this:
<?php
require("forums/ssi.php");

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


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?

Elissen

Strange, that script does work for me on RC2 (don't have a RC1 running anymore, but it should also work on RC1).

Put
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)

quake101

Quote from: Elissen 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
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
!

Elissen

Then it doesn't see the context var. Try this:
<?php
require("forums/SSI.php");

global 
$context;

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


What PHP version is running on your server btw?

quake101

Woah, It works when you global $context. I didn't think of that one. :)
btw, the server is running PHP Version 4.3.4

Elissen

Hmm, mine is running 4.3.9-1. Probaly some configuration difference then. Anyway, it works :)

Kender

November 10, 2004, 08:31:43 PM #36 Last Edit: November 10, 2004, 09:11:39 PM by Kender
how would i get it to say,,

Welcome: {username}

without the you haev X messages X unread messages

http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

Kender

resolved, needed to global $context;
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

ebsq

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

[Unknown]

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]

Advertisement: