incorporating serendipity into my webpage

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
jimmi8
Posts: 2
Joined: Thu Oct 20, 2005 9:17 pm

incorporating serendipity into my webpage

Post by jimmi8 »

Hi there,

Im sure you've heard this one many times before...

Ive got serendipity up and running on my machine. Its great-so easy to use.

The thing is i have an existing webpage with its own styles.

I want to incorporate the blog in to it.

Whats the best way to do it. Ive tried viewing the css for the template im using to see how it all works but i cant view it.

Can someone point me in the right direction??

Thanks for any help!!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: incorporating serendipity into my webpage

Post by garvinhicking »

You might want to search the forum for "embed" and read http://www.s9y.org/44.html and http://www.s9y.org/55.html.

The easiest way for embedding is to make your framework use Smarty and then just use the Smarty templates from Serendipity.

The other way is to just throw in a simple PHP include with a wrapper.php. Search this forum for "wrapper.php" and/or read the docs above.

With all that information, it should get you started :)

Have fun,
Garvni
# 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/
jimmi8
Posts: 2
Joined: Thu Oct 20, 2005 9:17 pm

Post by jimmi8 »

Hey,

thanks for the links, everythings a little clearer now but in some ways , just as hazy!!

Im about to take the following steps...Could you tell me if im going in the right direction???

1...customise the css-using the subdirectories in the templates- to make the blog look like my homepage.

2...use embed to put the blog in to my site.

Im not sure- am i aiming to create a seperate page for my blog that can then be slipped in as a link on my websote or am i aiming to style the blog so i can insert it in to an existing page??
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi Jimmi!

You wrote down 2 possibilites that differ frmo each other. Possibility 1 is the easiest way, because you just duplicate the look of your homepage into serendipity. But then you have to maintain two templates if you change your look.

Possibility 2 is the one using embed. This instructs serendipity to not output sidebars, headers and footers and leaves that up to your homepage. This includes the serendipity index.php file and offers its own wrapper.php which you call via http://yourblog/blog/wrapper.php. That wrapper file takes care that your old framework is called and gets a $blog_data variable which contains all of s9y output and that you can simple put in your homepage where you want it.

Then you only need to maintain your own homepage frameowkr/templates and s9y just integrates into it. The links I gave you show you how to get that index.php/wrapper.php stuff going, I hope.

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/
Guest

Post by Guest »

Thanks for clearing that up...Stupid me!!

I think i'll use the embed option-if i can work it out!!

Thanks for your help
Guest

Post by Guest »

Hi,

Sorry about the extra post-

Ive read the documentation on the embed option and just about grasped it. Im not very well versed in php, more a html/css designer.

The page that i want to embed the blog in is a html page not a php. The info tells you how to embed it into a php code.

Can you embed the blog in to normal html??
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Embedding via HTML only works when you use an iframe:

Code: Select all

<iframe src="http://yourhost/yourblog/" />
But every HTML page can also be a PHP page if you just change the extension to .php or configure your webserver to parse HTML pages.

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/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

.htaccess for parsing HTML

Post by judebert »

You can make Apache parse the HTML files in any directory (and all its subdirectories) by creating/modifying its .htaccess file and adding the following lines:

Code: Select all

Options +Includes
AddHandler server-parsed .html
The first line may not be necessary, but it's what I'm running on my server, so I figured I should mention it just in case.

Judebert
Post Reply