Hi,
I have just embedded serendipity into the following site using the wrapper method:
www.invidion.co.uk/financial_monkey.php
While everything seems to be working smoothly, I noticed a problem with the Archives.
I set the index page to show the last 3 entries.
However, if I click on the archive from a previous day or from the Archives sidebar entry, it just brings up the lastest three entries.
If I click on 'next page', it still shows the last 3 entries.
What I did notice when I clicked the 'next page' links was that the URL kept growing: i.e.
http://www.invidion.co.uk/financial_mon ... P2/P2.html
click another couple of times and it is:
http://www.invidion.co.uk/financial_mon ... P2/P2.html
But it shows the same three entries.
I've tried to figure this out and look at other posts, but I'm slowly getting nowhere.
Any suggestions ?
Thanks
Neil.
Archive not showing previous entries
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Archive not showing previous entries
Hi!
This can happen if you configured the "HTTP path to serendipity" with a "" instead of "/". Can you check your path config?
Regards,
Garvin
This can happen if you configured the "HTTP path to serendipity" with a "" instead of "/". Can you check your path config?
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/
# 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/
Hi,
I can't see anything entitled "HTTP path to serendipity"
What I have set are:
Relative Path: /financial_monkey.php?page=
Url to Blog: http://www.invidion.co.uk/financial_monkey.php?page=
Index File: wrapper.php
Are these correct ?
Rgds
Neil
I can't see anything entitled "HTTP path to serendipity"
What I have set are:
Relative Path: /financial_monkey.php?page=
Url to Blog: http://www.invidion.co.uk/financial_monkey.php?page=
Index File: wrapper.php
Are these correct ?
Rgds
Neil
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
That is wrong, the relative path must be "/".
The URL to blog must be "http://www.invidion.co.uk/"
I don't know what your "financial_monkey.php" file does, but usually you should put the name of your wrapper file into the indexFile directive, and your wrapper file must call your financial_monkey.php script.
Regards,
Garvin
That is wrong, the relative path must be "/".
The URL to blog must be "http://www.invidion.co.uk/"
I don't know what your "financial_monkey.php" file does, but usually you should put the name of your wrapper file into the indexFile directive, and your wrapper file must call your financial_monkey.php script.
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/
# 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/
The only way I could get this to work was to include the following line:
<? include("serendipity/wrapper.php");?>
in the file financial_monkey.php in root directory
The file wrapper.php is per your code in the main site. It includes the index.php in the serendipity directory, and passes it to a variable ($blog) via output buffering, and the $blog variable is echoed in the file financial_monkey.php
I probably have got this the wrong way round. I'll investigate when I get home later tonight.
<? include("serendipity/wrapper.php");?>
in the file financial_monkey.php in root directory
The file wrapper.php is per your code in the main site. It includes the index.php in the serendipity directory, and passes it to a variable ($blog) via output buffering, and the $blog variable is echoed in the file financial_monkey.php
I probably have got this the wrong way round. I'll investigate when I get home later tonight.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Okay, then basically you should do this:
1. Make your wrapper.php file contain this:
2. Now change your financial_monkey.php script to something like this:
HTH,
Garvin
Okay, then basically you should do this:
1. Make your wrapper.php file contain this:
Code: Select all
<?php
chdir('..');
$_REQUEST['page'] = 'blog';
require 'financial_monkey.php';
?>
Code: Select all
<?php
if ($_REQUEST['page'] == 'blog') {
chdir('serendipity');
ob_start();
require 'index.php';
$blog = ob_get_contents();
ob_end_clean;
chdir('..');
}
// ... the rest of your page flow. Put $blog where you need it
?>
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/
# 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/
OK, I'm getting lost again.
If I set the relative path to '/' and the url to 'http://www.invidion.co.uk' and using your code above, all the links are to:
http://www.invidion.co.uk/archives..... and similar urls
If I set the relative path to '/serendipity/' all the links take me to the main serendipity directory, so it is then not embedded..
Aaagghhhh.
Someone must have been through this before. Are there any specific posts that are similar, as I can't seem to find them.
Rgds
Neil
If I set the relative path to '/' and the url to 'http://www.invidion.co.uk' and using your code above, all the links are to:
http://www.invidion.co.uk/archives..... and similar urls
If I set the relative path to '/serendipity/' all the links take me to the main serendipity directory, so it is then not embedded..
Aaagghhhh.
Someone must have been through this before. Are there any specific posts that are similar, as I can't seem to find them.
Rgds
Neil
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
I'm sorry, I think I forgot the issue that serendipity was in a "serendipity" path of your install. The "URL to blog" directive needs to point to the path where serendipity is actually installed in.
I have not tested using the embed mode of Serendipity by leaving out the real serendipity path reference; so I guess it's just not supported and you'll need to have the /serendipity/ link in your follow up pages. You can use your main url as entry point though, if you directly call your wrapper file in the main directory; that's why I suggested to put that identical file into both directories.
If you'd edit the index.tpl file, you could omit all the wrapper problems - but you'd still need to address serendipity on the path it is installed in.
Best regards,
Garvin
I'm sorry, I think I forgot the issue that serendipity was in a "serendipity" path of your install. The "URL to blog" directive needs to point to the path where serendipity is actually installed in.
I have not tested using the embed mode of Serendipity by leaving out the real serendipity path reference; so I guess it's just not supported and you'll need to have the /serendipity/ link in your follow up pages. You can use your main url as entry point though, if you directly call your wrapper file in the main directory; that's why I suggested to put that identical file into both directories.
If you'd edit the index.tpl file, you could omit all the wrapper problems - but you'd still need to address serendipity on the path it is installed in.
Best 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/
# 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/
OK, figured this out. (Seems to be working OK now - it is showing archived entries and displaying the XML feed output correctly).
I had to disable url-rewriting and made a couple of changes.
Because I want to run the blog as effectively just another page / section in my site (the url is a file called financial_monkey.php), I changed the financial_monkey.php file to:
<?
chdir('serendipity');
ob_start();
require ('wrapper.php');
$blog = ob_get_contents();
ob_end_clean();
chdir('..');
?>
<!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><TITLE>Financial Monkey</TITLE>
<? include("scripts/toptemplate.php");?> // My header template
<? echo $blog;?>
<? include("scripts/footer.php");?> // My footer template
and all I include in wrapper.php is:
<?
require ('index.php');
?>
Despite your previous suggestions, I can only get this working if I set the relative URL to:
/financial_monkey.php?
and the URL to blog as:
http://www.invidion.co.uk/financial_monkey.php?
Have a look - it seems perfectly workable now.
I had to disable url-rewriting and made a couple of changes.
Because I want to run the blog as effectively just another page / section in my site (the url is a file called financial_monkey.php), I changed the financial_monkey.php file to:
<?
chdir('serendipity');
ob_start();
require ('wrapper.php');
$blog = ob_get_contents();
ob_end_clean();
chdir('..');
?>
<!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><TITLE>Financial Monkey</TITLE>
<? include("scripts/toptemplate.php");?> // My header template
<? echo $blog;?>
<? include("scripts/footer.php");?> // My footer template
and all I include in wrapper.php is:
<?
require ('index.php');
?>
Despite your previous suggestions, I can only get this working if I set the relative URL to:
/financial_monkey.php?
and the URL to blog as:
http://www.invidion.co.uk/financial_monkey.php?
Have a look - it seems perfectly workable now.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Hm, you might get problems with this way of embedding a different path and "?" query mark in the path, as several paths are constructed with the value $serendipityHTTPPath . indexFile . ?param1¶m2 etc. So take a close look if everything really works. If it does, it's a great and tricky use of the config directive.
)
Best regards,
Garvin
Hm, you might get problems with this way of embedding a different path and "?" query mark in the path, as several paths are constructed with the value $serendipityHTTPPath . indexFile . ?param1¶m2 etc. So take a close look if everything really works. If it does, it's a great and tricky use of the config directive.
Best 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/
# 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/
I guess only time will tell if this is workable.
At the moment, all I need to do is post articles, allow comments and allow syndication of articles.
All of this works OK, so my inclination is to leave it be and get on with other projects.
If it does break, then I guess I'll have to go down the smarty templating route.
Anyway, many thanks for all your help on this subject.
Rgds
Neil.
At the moment, all I need to do is post articles, allow comments and allow syndication of articles.
All of this works OK, so my inclination is to leave it be and get on with other projects.
If it does break, then I guess I'll have to go down the smarty templating route.
Anyway, many thanks for all your help on this subject.
Rgds
Neil.