News:

Join the Facebook Fan Page.

Main Menu

Basic SSI FAQ

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

Previous topic - Next topic

bunkfilms

I seem to be having an odd issue with this, or maybe my php knowledge (the require statement). I know the absolute path to my SSI.php file, but I can only get the functions to work if my file for instance, testssi.php is in the same directory of my SSI.php file, regardless if I know my require statement is pointing to the corret path. If I move my test file out of that director, it fails on the require, giving me a blank page. I'm stumped.
T.Marquez Jr.
Bunk Films
Amateur Films - Professional Services - Independent Thinkers
www.bunkfilms.com

[Unknown]

#41
Quote from: bunkfilms on December 08, 2004, 10:14:09 PM
I seem to be having an odd issue with this, or maybe my php knowledge (the require statement). I know the absolute path to my SSI.php file, but I can only get the functions to work if my file for instance, testssi.php is in the same directory of my SSI.php file, regardless if I know my require statement is pointing to the corret path. If I move my test file out of that director, it fails on the require, giving me a blank page. I'm stumped.

There's nothing we can really do without knowing the path you're trying to use...

It's possible your other paths are incorrect - you can check and fix them by using repair_settings.php.  What is repair_settings.php?

-[Unknown]

bunkfilms

The path is this:

<?php require("/home/business/public_html/forums/SSI.php");  ?>

Which is correct, and works on the same file, if I copy it to the forums directory and access it from there.  I realize it is more of a php issue than SMF, but appreciate any thoughts as to why the require would not be working with the correct path
T.Marquez Jr.
Bunk Films
Amateur Films - Professional Services - Independent Thinkers
www.bunkfilms.com

[Unknown]

If the path is correct, I can almost be certain it's *other* paths - perhaps starting with "./".  Did you check repair_settings.php?

-[Unknown]

GiNi3D

@bunkfilms
Did you try your domain name>>  <?php include ('http://www.yourdomainname.com/forums/SSI.php'); ?>

[Unknown]

Quote from: GiNi3D on December 09, 2004, 11:49:51 PM
@bunkfilms
Did you try your domain name>>  <?php include ('http://www.yourdomainname.com/forums/SSI.php'); ?>


That is the wrong way to do it, I'm afraid.... unless you just want to load certain SSI functions without being able to access the other benefits of SSI.php.

-[Unknown]

GiNi3D

Quote from: [Unknown] on December 10, 2004, 01:25:25 AM
That is the wrong way to do it, I'm afraid.... unless you just want to load certain SSI functions without being able to access the other benefits of SSI.php.

-[Unknown]
I guess you are right, I actually never tried the SSI functions; I guess I will pass these kinds of questions until I know more...  ;)

bunkfilms

Just wanted to thank you for correcting me. The solution you provided did work and got me to fix all the variables to the recommended settings! 

Now I begin the difficult task of making the SSI.php work with my Geeklog (geeklog.net) CMS system.  I have read several places on here where users strongly encourage NOT to modify the SSI.php code.  The problem with using SMF with my geeklog site is some of the variables cross over (have the same names) and you can't redeclare a function, such as db_query which both systems use.

Yes, yes, I know geeklog has it's own itegrated forums, but I was raised on YabbSE and have stuck with it through SMF because it is the BEST forums package out there. The best.  So I rather use it than having something totally integrated.  But having some of the SSI.php tools work on the main site would be nice. I will post back if I get anything to work.

Thanks again for your time and help.
T.Marquez Jr.
Bunk Films
Amateur Films - Professional Services - Independent Thinkers
www.bunkfilms.com

Elissen

If you conflicting variable/function names you might be interested in using smf_api.php

Quote from: [Unknown] on September 12, 2004, 07:39:35 PM
The purpose of this tool is to facilitate easy integration of SMF into other scripts and software. Previously, this was done with SSI.php, but that pulls in most of SMF and can become very bloated for general usage inside another large software. It also meant the possibility of naming conflicts, the two softwares fighting over output buffering, and many other problems. Even past that, there have been licensing problems.

[...]

sirdavid23

Hi, I´d like to do this:



But I can´t figure out the coding part. I try to work it on this web page.
http://www.turismopeninsular.com [nofollow]

But I can´t.  I´ve been working with the ssi.php samples but I only need the login box exactly as there is in that graphic. How could I do this?

Help me please.

Elissen

Quote from: sirdavid23 on March 16, 2005, 01:41:29 PM
Hi, I´d like to do this:



But I can´t figure out the coding part. I try to work it on this web page.
http://www.turismopeninsular.com

But I can´t.  I´ve been working with the ssi.php samples but I only need the login box exactly as there is in that graphic. How could I do this?

Help me please.

I get "Error 404 page. Change it on /errors/404.html Add more on the .htaccess file" when accesing the picture

Cypher7

did you mean this... ;)

http://www.davidr.boxesmedia.com/allpics/foro.jpg

Are you sure you put in   <?php require("SSI.php"); ?>   on the page!?  It should go in BEFORE the <html> tag...

then put in this tag on your page where ever you want the login box to be...

<?php ssi_login(); ?>


sirdavid23

Wel... yes, It´s working now. Now that I included the index.PHP part. I had it working as index.htm.

On to the next question:
Could I manipulate the ssi login function so that It would display in arial 9 points:

USR___________
PSW___________  O <- button made in flash that says: YES! to log in.

Is this possible? even a GIF pic will do. But how do I work this?

[Unknown]

Yes, just use the .ssi_table css class....

http://www.w3schools.com/css/

-[Unknown]

cellDamage

If you 'is_guest' etc.

How can you find out if the user is a global mod?
Probably easy as hell but i wanna ask :)

Owdy

#55
I use this:

<?php


if (in_array(2$user_info['groups']) || $context['user']['is_admin'])
   {
       echo 
'Hello moderator!      ';
   }
else
   {
       echo 
'You dont have permission to be here!.';
   }

?>
Change that '2' to moderators membergroup id. This allows them and admin.
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

cellDamage

#56
Thank you Owdy, this place rocks :D

Just completely incorporated SMF into my website & my gallery, its just so much easier than my original user system, thanks for creating such great software :D

My gallery is even better now!  ;D

SO if to edit my global mods group i use this:
http://ftmb.net/forum/index.php?action=membergroups;sa=edit;id=2

then the id is 2? :)

Owdy

Yes, that should be it.
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

cellDamage

Worked like a dream  :D

Thankyou so much.

AnimeHungry.com

#59
how do i make a login that once loged in, you get redirected to the homepage????

Advertisement: