static page inside s9y

Having trouble installing serendipity?
Post Reply
keithstric
Regular
Posts: 10
Joined: Sat Jul 03, 2004 5:40 pm
Location: Douglasville, GA
Contact:

static page inside s9y

Post by keithstric »

OK, hopefully this will be my last set of questions. I'm attempting to include static html pages within the content area of serendipity. In other words I want the serendipity styles, sidebars, header and footer I defined in layout.php but I want another page to be displayed where the entries are usually displayed. Does that make sense? So, if I put that static page within the s9y folder, all is well. If it is not in the s9y folder I'm informed that I need to install s9y. Any help you can provide would be great.

Here are the links:

http://www.keithstric.com/aboutme.php
http://www.keithstric.com/blog/aboutme.php

The first one doesn't work, the last one does, kinda. I included some of the code from the layout.php file in the 1st link and changed the paths of the includes to point to the appropriate path. Here is the text of the static html/php file:
<html>
<head>
<title>keithstric.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Powered-By" content="Serendipity v.0.6-pl2" />
<meta NAME="Author" content="Keith Strickland">
<meta NAME="Copyright" content="Keith Strickland 2003">
<meta NAME="DC.Title" content="keithstric.com Dom Blog">
<meta NAME="Revisit-After" content="1 Days">
<link rel="stylesheet" type="text/css" href="/blog/serendipity.css.php" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.keithstric.com/blog/index.ph ... index.rss2" />
<link rel="alternate" type="application/x.atom+xml" title="Atom" href="http://www.keithstric.com/blog/index.ph ... s/atom.xml" />
<style type="text/css">@import "www.keithstric.com/blog/templates/keith ... s";</style>

</head>
<body>
<?php
include_once('blog/serendipity_config.inc.php');
include_once(S9Y_INCLUDE_PATH . 'blog/serendipity_plugin_api.php');
include_once(S9Y_INCLUDE_PATH . 'blog/serendipity_sidebar_items.php');
?>

<div id="serendipity_banner">
<h1><a class="homelink1" href="<?php echo $serendipity['baseURL']; ?>"><?php echo htmlspecialchars($serendipity['blogTitle']) ?></a></h1>
<?php
$sub = isset($serendipity['blogSubTitle']) ? $serendipity['blogSubTitle'] : $serendipity['blogDescription'];
if (strlen($sub)) {
?>
<h2><a class="homelink2" href="<?php echo $serendipity['baseURL']; ?>"><?php echo $sub ?></a></h2>
<?php
}
?>
</div>

<table id="mainpane">
<tr>

<?php
if (!$serendipity['embed'] || $serendipity['embed'] === 'false' || $serendipity['embed'] === false) {
serendipity_plugin_api::generate_plugins('left', 'td');
}else{
serendipity_plugin_api::generate_plugins('left','td');
}
?>
<td id="content" valign="top">
My content here
</td>
<td>
<?php
/* Find any plugins for the RHS */
if (!$serendipity['embed'] || $serendipity['embed'] === 'false' || $serendipity['embed'] === false) {
serendipity_plugin_api::generate_plugins('right', 'td');
}else{
serendipity_plugin_api::generate_plugins('right', 'td');
}
?>
</tr>
</table>
</body>
</html>
I also tried copying the files to the www root dir and got the same results. I need to figure out how to get this to work from directories other than the installation dir of s9y so that I can wrap s9y around my photo gallery also in the near future. Thanks for all the help ya'll have provided thus far.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: static page inside s9y

Post by garvinhicking »

If you include s9y files from a directory outside of the s9y-install dir, that won't work.

If you have a file '/aboutme.php' you need to do this:

Code: Select all

<?php
chdir('./blog/');
require 'serendipity_config.inc.php';
require 'layout.php';
...or whatever else code you currently have inside aboutme.php...
?>
This means, when you include the config-file, you always need to be inside the /blog directory, which is done via chdir().

Hope that helps! :)
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
keithstric
Regular
Posts: 10
Joined: Sat Jul 03, 2004 5:40 pm
Location: Douglasville, GA
Contact:

Post by keithstric »

8) Thank you very much for all your help. I don't think I would have gotten all this working without it.

Since I've been messing with s9y for a few days now it seems that I really like it. I am migrating from a Lotus Domino based blog to s9y I think as I'm wanting to get away from Domino. I've looked at several php based blog software packages and believe that s9y has the biggest potential and I look forward to see what people come up with.

Thanks again. 8)
apc
Regular
Posts: 7
Joined: Tue Jul 20, 2004 2:38 am
Location: Brasil
Contact:

menu and links

Post by apc »

http://www.s9y.org/forums/viewtopic.php?t=305

How create menu and links inside s9y? (kind same your s9y)

Thanks advance,
apc
Post Reply