News:

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

Main Menu

HomePage

Started by SychO, August 27, 2015, 01:17:29 PM

Previous topic - Next topic

SychO

hello everyone,

so i'm working on a homepage for my forum and i want to put a recent topics block

and I've seen that its possible from here

http://www.simplemachines.org/community/ssi_examples.php#

the problem is when i put

<?php require("SSI.php"); ?>

on the 1st line of my index.php I get a blank page so what i'm i messing

TY
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

Kindred

I would assume that your "homepage" is not actually in the same directory as your forum files...

in which case...


<?php require_once("/absolute/path/to/SSI.php"); ?>

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SychO

Quote from: Kindred on August 27, 2015, 01:49:49 PM
I would assume that your "homepage" is not actually in the same directory as your forum files...

in which case...


<?php require_once("/absolute/path/to/SSI.php"); ?>



i changed it and it still gives me a blank page :/
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

anonymous001

please show us your code.

SychO

Is it possible to put the homepage inside the forum Dir and make it work fine ?

i mean i'm pretty sure that can work but
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

Kindred

Did you put the ACTUAL path in there, in place of the words?

and no... you can not have an index page insid ehte ofum directory -- which already HAS its own index page
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SychO

Quote from: jaheller on August 27, 2015, 01:57:54 PM
please show us your code.


<?php require_once("/forum/SSI.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >

<head>
...etc


Quote from: Kindred on August 27, 2015, 02:02:28 PM
Did you put the ACTUAL path in there, in place of the words?

and no... you can not have an index page insid ehte ofum directory -- which already HAS its own index page

as you can see up
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

Kindred

That is not the ABSOLUTE path....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SychO

Quote from: Kindred on August 27, 2015, 02:06:52 PM
That is not the ABSOLUTE path....

what is the ABSOLUTE path ?
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

JBlaze

Your absolute path would be something like this: /var/www/example.com/public_html/forum/SSI.php

However, if your homepage is located in the directory above your forum, remove the beginning "/" so it looks like this:
<?php require_once('forum/SSI.php'); ?>

Adding the beginning "/" means it will look from the base directory, and that is not what you want :)
Jason Clemons
Former Team Member 2009 - 2012

Kindred

while the relative path usually works, the absolute path is almost always preferable. :)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SychO

Quote from: JBlaze on August 27, 2015, 02:10:49 PM
Your absolute path would be something like this: /var/www/example.com/public_html/forum/SSI.php

However, if your homepage is located in the directory above your forum, remove the beginning "/" so it looks like this:
<?php require_once('forum/SSI.php'); ?>

Adding the beginning "/" means it will look from the base directory, and that is not what you want :)

OMG thanks i just removed the "/" :D  and it worked

thanks all of you for your time really appreciate it !

Peace.
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

Advertisement: