truble intigrating into site

Having trouble installing serendipity?
Post Reply
StarF
Regular
Posts: 66
Joined: Thu Sep 29, 2005 4:53 pm
Location: Denmark
Contact:

truble intigrating into site

Post by StarF »

Hi

I am trying to intigrate this nice blog system into a site.
How ever i am having a problem, when you chose Next, to view the next page of articles, it just reloads the site, and dosent change the site..

i have intigrated it with a wrapper, that wraps the blog into my design, looking like this:

Code: Select all

<?php 
$_REQUEST['page'] = 'blog'; 

ob_start(); 
chdir('blog'); 
require 'blog/index.php'; 
$blog_data = ob_get_contents(); 
chdir('..'); 
ob_end_clean(); 

require 'index_main.php'; 
?>
you can view the site here:
http://www.perestrojka.dk/

even thought it danish you can just scrool down to the bottom, and press Næste side, (wich means next page), and see my problem..

does any know how to fix this?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: truble intigrating into site

Post by garvinhicking »

Hi!

This can happen if you did not properly specify the serendipityHTTPPath configuration directive. What exactly did you enter there? Did you change any of the permalink directives?

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/
StarF
Regular
Posts: 66
Joined: Thu Sep 29, 2005 4:53 pm
Location: Denmark
Contact:

Post by StarF »

under parth:

Relative path = /blog/
index file = ../index.php

i dident change any of the permalinks....
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

The indexFile option is not meant to contain an URL. You must enter "index.php" there. You cannot rid the serendipity URL by embeding, all follow-up pages (next link) must be called from the serendipity 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/
StarF
Regular
Posts: 66
Joined: Thu Sep 29, 2005 4:53 pm
Location: Denmark
Contact:

Post by StarF »

garvinhicking wrote:Hi!

The indexFile option is not meant to contain an URL. You must enter "index.php" there. You cannot rid the serendipity URL by embeding, all follow-up pages (next link) must be called from the serendipity directory.

Regards,
Garvin
hi

but if i do that, it dosent open the next page inside the design?

see for your self .. have made the change.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi! You must put your wrapper file into the s9y directory and call it "wrapper.php" for example, adn then enter thatname as directoryIndex

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/
StarF
Regular
Posts: 66
Joined: Thu Sep 29, 2005 4:53 pm
Location: Denmark
Contact:

Post by StarF »

alright if i do that i get a lots of missing files, i tryed to change a bit in the wrapper, so i loads the design index file from the dir under it.. my layout is:

/
/blog

where blog is the blog and / contains the rest of the site.

Code: Select all

<?php 
$_REQUEST['page'] = 'blog'; 

ob_start(); 
chdir('blog'); 
require 'index.php'; 
$blog_data = ob_get_contents(); 
chdir('..'); 
ob_end_clean(); 

require '../index_main.php'; 
?>
shouldent this code go one dir down, and load indes_main.php?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Please do this:

1. Create a wrapper.php file in your "blog" directory:

Code: Select all

<?php
$_REQUEST['page'] = 'blog';
chdir('..');
require 'index_main.php';
?>
2. Edit your index_main.php file in the root "/" dir:

Code: Select all

<?php
if ($_REQUEST['page'] == 'blog') {
  ob_start(); 
  chdir('blog'); 
  require 'index.php'; 
  $blog_data = ob_get_contents(); 
  chdir('..'); 
  ob_end_clean(); 
}

// ... here's the rest of your file!
// put $blog_data where you want it
echo $blog_data;
?>
3. In your s9y config, set the indexFile option to "wrapper.php".

HTH,
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/
StarF
Regular
Posts: 66
Joined: Thu Sep 29, 2005 4:53 pm
Location: Denmark
Contact:

Post by StarF »

alright seems i need to clarify somethings....

my index_main.php is my design
the index.php in "/" (root) is a wrapper

i did like you wrote, with a few changes.

i made the wrapper in "/blog"
with

Code: Select all

<?php 
$_REQUEST['page'] = 'blog'; 
chdir('..'); 
require 'index.php'; 
?> 
then i made a index.php in "/"

with the following code:

Code: Select all

<?php 
if ($_REQUEST['page'] == 'blog') { 
  ob_start(); 
  chdir('blog'); 
  require 'index_main.php'; 
  $blog_data = ob_get_contents(); 
  chdir('..'); 
  ob_end_clean(); 
} 

// ... here's the rest of your file! 
// put $blog_data where you want it 
echo $blog_data; 
?> 
then i changed the index.file in the path settings to wrapper.php

how ever all i get now i a blank page?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

When in your wrapper.php you remove the ob_end_clean() part, do you get output?

If yes, you're subject to the same output buffering problem that two other people are reporting, which I could not yet solve because they do not show up in my installation:

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

Could you try to look at your PHP error logs, make sure error_reporting is set and display_errors also?

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/
vinman
Regular
Posts: 16
Joined: Thu Apr 13, 2006 9:47 pm

Post by vinman »

I am still having the same problem.

I am using the code up above as you (Garvin) suggested.

I get a blank page....but maybe this is why:

if I type
www.mysite.com/serendipity

I get the blank page

if I type

www.mysite.com/serendipity/index.php

I get the blog.

Perhaps this is why it is showing up blank within the embedding.
I just don't know why if I don't put in index.php in the url i get nothing.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

vinman,

this can happen if your "DirectoryIndex" directive in either VHost or .htaccess does not point to the right file.

IF you only specify "serendipity" to your browser, your server will try to detect which file it shall open. For that it takes the file specified as "DirectoryIndex".

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/
Post Reply