How to embed Serendipity into an existing site?
How to embed Serendipity into an existing site?
Can someone help me find (or produce) a step-by-step way to get Serendipity embedded into an already existing site? Here is my design.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: How to embed Serendipity into an existing site?
We have that covered in our Technical Documentation on our wiki http://www.s9y.org/pezastic wrote:Can someone help me find (or produce) a step-by-step way to get Serendipity embedded into an already existing site? Here is my design.
Basic idea is: Turn on the embed option in s9y configuration. Then go to one of the template directories and edit layout.php - there you can put in all your header/footer/extra layout information that will wrap the blog. That is the easy way.
The other, complete, way is to create a wrapper file like 'wrapper.php' and use that as indexfile. This wrapper.php will output all your own code and then insert the s9y call by using output buffering and inclusion. This is exactly described in the Wiki documentation...
Good luck and come back for questions, if any.
# 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/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Some information can be found here: http://www.s9y.org/37.html#A6 - I agree that it's somewhat wrongly inserted. Hope you'll still be able to sort everything out with that description and what I wrote in this thread.
Regards,
Garvin.
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/
Why not use absolute paths in s9y???
Is there a way to pull only a certain category into an embedded page? So for example, if I wanted to pull the "news" category to my main page, and a "journal" category into another page on my site...
I have tested another blog script that allowed you to include one simple line of php in your site where you wanted to pull blog entries and you could specify how many posts and from what categories. It was great. But unfortunately it was lacking the image uploading/management functionality that s9y has, and my client needs that part cause it is an art gallery website.
I have read about how to embed s9y in these threads and the readme and install files, and it seems very complicated, and I am an experienced web dev. I understand the instructions, it just seems that they are hard to get working if followed exactly when s9y is installed in it's own folder. I have been running into the problem mentioned in another thread where I get "Serendipity is not yet installed" when I try to embed it from a subdirectory installation. I really don't want to crowd my root web folder with all those s9y files if at all possible.
I have a site that uses several different scripts to power different areas of the site, and s9y is only one of those, so I would rather maintain my directory structure than be forced to install s9y in the web root to aviod all these headaches of actually getting at the blog information itself. Why can't this problem be fixed in an update by using an ABSOLUTE PATH string/constant everywhere in the s9y code so when you include it in scripts sitting in other folders, it always knows where to find the s9y files it needs?
????
s9y's ability to play nice with other scripts/pages is the only drawback I am hung up on, otherwise I love it and so do my clients. I need it to be a tad more flexible tho or I might have to go elsewhere.
Sad, cause I really like it otherwise....
I am willing to help/contribute however I can to help the s9y community gain the benefit of greater flexibility in s9y, so please let me know how this can be solved or if you need beta testing, or what not.
Thanks,
Chillz Media
I have tested another blog script that allowed you to include one simple line of php in your site where you wanted to pull blog entries and you could specify how many posts and from what categories. It was great. But unfortunately it was lacking the image uploading/management functionality that s9y has, and my client needs that part cause it is an art gallery website.
I have read about how to embed s9y in these threads and the readme and install files, and it seems very complicated, and I am an experienced web dev. I understand the instructions, it just seems that they are hard to get working if followed exactly when s9y is installed in it's own folder. I have been running into the problem mentioned in another thread where I get "Serendipity is not yet installed" when I try to embed it from a subdirectory installation. I really don't want to crowd my root web folder with all those s9y files if at all possible.
I have a site that uses several different scripts to power different areas of the site, and s9y is only one of those, so I would rather maintain my directory structure than be forced to install s9y in the web root to aviod all these headaches of actually getting at the blog information itself. Why can't this problem be fixed in an update by using an ABSOLUTE PATH string/constant everywhere in the s9y code so when you include it in scripts sitting in other folders, it always knows where to find the s9y files it needs?
????
s9y's ability to play nice with other scripts/pages is the only drawback I am hung up on, otherwise I love it and so do my clients. I need it to be a tad more flexible tho or I might have to go elsewhere.
I am willing to help/contribute however I can to help the s9y community gain the benefit of greater flexibility in s9y, so please let me know how this can be solved or if you need beta testing, or what not.
Thanks,
Chillz Media
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Why not use absolute paths in s9y???
Hi Chillz!
My page http://garv.info/ (and blog.garv.info) uses a common header/footer for all my subpages, and all those core files are scattered in about 20-25 directory throughout the page. All that is just with 12 lines of inclusion code to display embedded s9y. So it can be done, it's just a matter of how cleverly your application is designed, which should embed s9y.
If you can give some clear details of your setup, I may be able to advise on how to deal with the path structure?
The ABSOLUTE PATH reference is already inside s9y, it's the S9Y_INCLUDE_PATH constant.
Regarding your offer for support: That would be great! We need Quality Assurance and beta testers, and also skilled designers or usability gurus, who could help us make s9y easier.
Thanks,
Gavin.
Yes, that can be done. Look at the templates/default/layout.php file and see how the categories are passed to the serendipity_printEntries() function. You can use your custom layout.php file and use any PHP-code you like to specify categories to the serendipity_fetchEntries() function. If you want to bypass printEntries() you can build a function yourself which uses the output of fetchEntries() quite easily.CHiLLZ wrote:Is there a way to pull only a certain category into an embedded page? So for example, if I wanted to pull the "news" category to my main page, and a "journal" category into another page on my site...
Well, as an experienced web dev, you shouldn't find that complicated at all. It's just 5-10 lines of code at all!I have read about how to embed s9y in these threads and the readme and install files, and it seems very complicated, and I am an experienced web dev.
That's why a chdir() call is necessary to the s9y path, if you use an embed-file outside of the s9y path.I understand the instructions, it just seems that they are hard to get working if followed exactly when s9y is installed in it's own folder. I have been running into the problem mentioned in another thread where I get "Serendipity is not yet installed" when I try to embed it from a subdirectory installation. I really don't want to crowd my root web folder with all those s9y files if at all possible.
My page http://garv.info/ (and blog.garv.info) uses a common header/footer for all my subpages, and all those core files are scattered in about 20-25 directory throughout the page. All that is just with 12 lines of inclusion code to display embedded s9y. So it can be done, it's just a matter of how cleverly your application is designed, which should embed s9y.
If you can give some clear details of your setup, I may be able to advise on how to deal with the path structure?
The ABSOLUTE PATH reference is already inside s9y, it's the S9Y_INCLUDE_PATH constant.
Regarding your offer for support: That would be great! We need Quality Assurance and beta testers, and also skilled designers or usability gurus, who could help us make s9y easier.
Thanks,
Gavin.
# 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/
-
blsilks
Now I use php nuke and in order to make a new page you have to create a module. Normally I can create a module by going into the modules directory for nuke and making a folder called (Example:)Serendipity and in that folder I can create an index.php file that contains a reference to the php nuke header and footer. Example:
<?php
if (!eregi("modules.php", $_SERVER['PHP_SELF])) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include ("header.php");
?>
!!!Enter my code or content here!!!
<?php
include ("footer.php");
?>
Now with this information, might somebody tell me how to properly embed serendipity into this module?
<?php
if (!eregi("modules.php", $_SERVER['PHP_SELF])) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include ("header.php");
?>
!!!Enter my code or content here!!!
<?php
include ("footer.php");
?>
Now with this information, might somebody tell me how to properly embed serendipity into this module?
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Maybe you can use my instructions I posted on the forums for integrating Gallery into Serendipity to get your PHPNuke-Stuff to work.
I don't know anything about PHPNuke and how it handles it modules, and I sadly don't have the time to investigate Nuke...
Regards,
Garvin.
I don't know anything about PHPNuke and how it handles it modules, and I sadly don't have the time to investigate Nuke...
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/
-
Guest