News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Doing Sign-in, Calendar and News via SMF from out side SMF

Started by CERT, September 23, 2004, 10:40:50 AM

Previous topic - Next topic

CERT

1.
    I would like to know how I can create a register/login on my website that I can have displayed on all my non SMF pages for my website.

1a. I would like to know what i would need to have my pages read to have the user as "logged in"

1b. What column or columns are used to refer to an individual user... that is stored when a user is "logged in"

2.
   I know I have seen these two questions before so if you could either explain it again or post a link i would be greatful...

   How  can I have the calendar appear either on the page itself or appear as a link to it?

3.
   How can I create news items from smf to appear on my main page? Where the users will be able to reply to it (by clicking a link and logging in if they have not done so)

[Unknown]

Quote from: CERT on September 23, 2004, 10:40:50 AM
1.
    I would like to know how I can create a register/login on my website that I can have displayed on all my non SMF pages for my website.

If you just want links, you can use the links.  For login, you can use SSI.  Register is a bit more complicated.

Quote
1a. I would like to know what i would need to have my pages read to have the user as "logged in"

1b. What column or columns are used to refer to an individual user... that is stored when a user is "logged in"

2.
   I know I have seen these two questions before so if you could either explain it again or post a link i would be greatful...

   How  can I have the calendar appear either on the page itself or appear as a link to it?

3.
   How can I create news items from smf to appear on my main page? Where the users will be able to reply to it (by clicking a link and logging in if they have not done so)

Look at ssi_examples.php and search for "SSI".

-[Unknown]

CERT

Quote from: [Unknown] on September 23, 2004, 06:56:05 PM
Quote from: CERT on September 23, 2004, 10:40:50 AM
1.
    I would like to know how I can create a register/login on my website that I can have displayed on all my non SMF pages for my website.

If you just want links, you can use the links.  For login, you can use SSI.  Register is a bit more complicated.

Login Form... Register to be a link...

Quote from: [Unknown] on September 23, 2004, 06:56:05 PM
Quote from: CERT on September 23, 2004, 10:40:50 AM

1a. I would like to know what i would need to have my pages read to have the user as "logged in"

1b. What column or columns are used to refer to an individual user... that is stored when a user is "logged in"

2.
   I know I have seen these two questions before so if you could either explain it again or post a link i would be greatful...

   How  can I have the calendar appear either on the page itself or appear as a link to it?

3.
   How can I create news items from smf to appear on my main page? Where the users will be able to reply to it (by clicking a link and logging in if they have not done so)

Look at ssi_examples.php and search for "SSI".

-[Unknown]

Can I get a little more detail on 1a/b?

Metho

Did you go to http://www.yourdomain.com/forum/ssi_examples.php ? Read the top part...
QuoteTo use SSI.php in your page add at the very top of your page before the <html> tag on line 1:
<?php require("/home/fourjwa/public_html/forum/SSI.php"); ?>

And then to include one of those functions in your page, such as a login box, you'd put <?php ssi_login(); ?> where ever you want the login box to appear. Look at <?php ssi_boardNews(); ?> for displaying news on a non-SMF page. For calendar/event things, look at <?php ssi_todaysBirthdays(); ?>, <?php ssi_todaysHolidays(); ?>, <?php ssi_todaysEvents(); ?>, <?php ssi_todaysCalendar(); ?>, and <?php ssi_recentEvents(); ?> .

- Methonis
Joshua "Methonis" Frazer
Support Specialist
The Simple Machines Team

spikeswife

I have a question about this.  I've tried several times to put the recommended code <?php require("/var/www/html/forum/SSI.php"); ?> into an html page but every time I try to save, it moves it into the body and turns it into regular text.  Is this a problem with Frontpage?  Or am I doing it wrong?

[Unknown]

Yes, PHP does not work in front page.  That is not meant to be used in a "regular" html document, but rather a php one.

Frontpage does not like PHP; PHP is not a Microsoft technology.

-[Unknown]

Metho

Quote from: [Unknown] on September 25, 2004, 02:54:10 AM
Frontpage does not like PHP; PHP is not a Microsoft technology.

-[Unknown]

That's ok, though. No one likes frontpage, either! :P

- Methonis
Joshua "Methonis" Frazer
Support Specialist
The Simple Machines Team

CERT

Quote from: [Unknown] on September 25, 2004, 02:54:10 AM
Yes, PHP does not work in front page.  That is not meant to be used in a "regular" html document, but rather a php one.

Frontpage does not like PHP; PHP is not a Microsoft technology.

-[Unknown]

I left Microsoft for most except office...

I use Dreamweaver on Windows and BuleFish (i think) under linux
Apache as my server


moving away from MSAccess as my primary database

FRONTPAGE SUCKS... Left that about 3-4 years ago

Oldiesmann

Michael Eshom
Christian Metal Fans

CERT

Quote from: Oldiesmann on September 27, 2004, 09:27:51 AM
Dreamweaver is a lot better than Frontpage :)

I actually mostly use it for its HTML code completeion and syntax highlighting.... the other way I use it is to help me create a structured table and make sure they are properly done

spikeswife

So does that mean that the includes aren't meant to be "included" in a regular html page?  Do you have to create your site in php to have includes on a page other than your forum?  Or is it only a problem with Frontpage?  I tried doing it in Notepad and it just shifted it again when I happened to re-open the file in Frontpage.

Anyone know how to get Dreamweaver CHEAP?

Metho

If you include ssi.php you'll need to call your page a php page so the server knows to parse it. But it can be just that include and then the function and the entire rest of the code in html....example:

<?php require("/home/monkey/public_html/forum/SSI.php"); ?>
<html>
<head>Blah</head>
<body>
This is my html I am <b>SO</b> cool. Look at me go.
Want to log in? Here it is: <?php ssi_login(); ?>
PHP just parsed that, and now we're back to html. Tralalala.
</body>
</html>


So just rename the file to .php, but as long as you close up your php, html is fine.

- Methonis
Joshua "Methonis" Frazer
Support Specialist
The Simple Machines Team

[Unknown]

You can also use a file with server-side includes (shtml).

The problem is, plain old html simply can't get things from other sources very well :/.  Maybe with JavaScript..... hmmm...

See what you've done now, you've given me ideas.  Bad spikeswife :P!

-[Unknown]

williammc

Exactly what I was looking for, and this saves me the trouble of searching for this, what can I say I am lazy. :D

Free HTML editor http://www.chami.com/html-kit/ (Windows)
PHP as an plugin, easy install.

Advertisement: