Embedded /archives Link Args Ignored

Having trouble installing serendipity?
Post Reply
queej
Regular
Posts: 6
Joined: Thu Aug 16, 2007 10:15 pm

Embedded /archives Link Args Ignored

Post by queej »

I have successfully embedded Serendipity in our web site, except for archives links. The dates seem to be ignored. I am using the wrapper code shown in the documentation, and all other links work fine.

The URL blog.php/?archive works, but the URL blog.php?/archives/2007/08/15.html does not.

I have the most recent Beta copy (Aug 8th).

Thanks in advance for any help you can provide.
Cheers,
-queej
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Embedded /archives Link Args Ignored

Post by garvinhicking »

Hi!

So you did configure the s9y "indexFile" option to 'blog.php', yes? How does your blog.php look? Does it mangle with the $_SERVER['REQUEST_URI']?

Regards,
Garvin
# 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/
queej
Regular
Posts: 6
Joined: Thu Aug 16, 2007 10:15 pm

Post by queej »

Thank you. I am using "../blog.php" for my indexFile. My main site has a subdirectory "blogs", which is the serendipity installation.

This is my blog.php:

Code: Select all

<?php
if ( !strstr( $_SERVER["REQUEST_URI"], "blog" ) ) {
	$_SERVER["REQUEST_URI"] = GR_BASE_URL."blogs/index.php?/categories/1-Featured-Graphs";
 }
ob_start();
chdir( "./blogs" );
if ( !strstr( $_SERVER["REQUEST_URI"], "/feeds/" ) ) { // do not include styles for RSS feeds and other XML pages
	echo '<style>';
	include_once( 'serendipity.css.php' );
	echo '</style>';
 }
require_once( "index.php" );
chdir( ".." );
$blog_contents = ob_get_contents();
ob_end_clean();
?>
I am also using require_once('blog_wrapper.php') in my main index.page. Here is my blog_wrapper.php:

Code: Select all

<?php
if ( strstr( $_SERVER["REQUEST_URI"], "/feeds/" ) ) { // handle RSS feeds
	require_once( "blog_wrapper.php" );
	echo $blog_contents;
 }
 else {	 // all "normal" pages
	include( 'includes.php' );
	require_once( "blog_wrapper.php" );
	include( 'header.php' );
	echo $blog_contents;
	require_once( './footer.php' );
 }
?
Cheers,
-queej
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

That won't work. Your blog.php needs to be in the same directory.

Regards,
Garvin
# 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/
queej
Regular
Posts: 6
Joined: Thu Aug 16, 2007 10:15 pm

Thanks! That did it.

Post by queej »

Thanks very much. I moved my blog.php and blog_wrapper.php into my ./blogs directory, then did a conditional chdir if I am not already in that directory, and everything seems to work well.
Cheers,
-queej
Post Reply