1
atmoloq
getting parse errors
  • 2004/5/2 18:42

  • atmoloq

  • Just popping in

  • Posts: 44

  • Since: 2004/1/3 1


while trying to create an index on the front page of my XOOPS site I get parse errors, I am trying to do this using :
<?php
include('mainfile.php');
include('header.php');
$xoopsOption['show_rblock'] = 1;

$page = $_GET['page'];
$ext = ".php";
$email = "your email addy for 404";
$includepath = "contents/";
$filepath = $includepath.$page.$ext;

if(file_exists($filepath))
{
include($filepath);
} else {
print ("<br><b>404</b><br>Sorry but this page does not exist. Click <a href=\"url to your main site">here</a> to go back to the main page. If you have any question email the webmaster <a href=\"mailto:$email\">here</a>.");
}

include('footer.php');
?>
I followed evrything to the letter but still geting errors?
any help solving this would be greately appreciated

Atmoloq

2
phppp
Re: getting parse errors
  • 2004/5/2 18:53

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


<a href=\"url to your main site\">here</a>

3
atmoloq
Re: getting parse errors
  • 2004/5/2 19:12

  • atmoloq

  • Just popping in

  • Posts: 44

  • Since: 2004/1/3 1


Thank you Phppp
can now seek a hair transplant specialist and have him replace the ones I pulled out.

Atmoloq

4
atmoloq
Re: getting parse errors
  • 2004/5/3 16:15

  • atmoloq

  • Just popping in

  • Posts: 44

  • Since: 2004/1/3 1


created folder "contents" and also created a block to act as index to the pages I want displayed in the midle section of my XOOPS site, however, I'm at a loss on how to script the href to access the pages .
I have this <a href = {X_SITEURL}main.php?page=loft.html>LOFT</a>

can someone give me he correct syntax?

Atmoloq

5
phppp
Re: getting parse errors
  • 2004/5/3 16:54

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


not sure but perhaps this is what you want?

<a href = "<{X_SITEURL}>main.php?page='loft.html'">LOFT</a>

6
Mithrandir
Re: getting parse errors

X_SITEURL is a template variable.

In php files, use the constant XOOPS_URL

<a href = "'.XOOPS_URL.'/main.php?page=loft.html">LOFT</a>

7
atmoloq
Re: getting parse errors
  • 2004/5/4 23:37

  • atmoloq

  • Just popping in

  • Posts: 44

  • Since: 2004/1/3 1


I guess I better explain what I am trying to do.
The code in the first post is taken from the wiki in xoops, I am trying to display pages on the middle section of my XOOPS site.
the pages have embedded Atmosphere worlds, I was sucessful before in dispaying an atmosphere world inside XOOPS using a custom block.
However I would like to be able to dispay the web pages or the worlds from links the main menu.

would appreciate any further ideas and or help

Atmoloq

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits