Would anyone be willing to show me how to embed my blog?
Would anyone be willing to show me how to embed my blog?
Hi
I am new to CSS and PHP and I'm trying to install my blog so that it is embedded into a page. My site is currently built with messy html and very simple use of php with no CSS to be seen. Each page of the site calls a header.html and footer.html which contain my menu, banner and such like. For example page1.php would contain <?php include("visitorheader.html"); ?> at the top and <?php include("visitorfooter.html"); ?> at the bottom. So, now I'm adding a new page for the blog but I want it to contain the same header and footer. I have messed about but I cant get it to work properly and thus I'm asking for help here as it will take me weeks of learning before I'm competent enough to do it on my own.
Many thanks
Sandie
I am new to CSS and PHP and I'm trying to install my blog so that it is embedded into a page. My site is currently built with messy html and very simple use of php with no CSS to be seen. Each page of the site calls a header.html and footer.html which contain my menu, banner and such like. For example page1.php would contain <?php include("visitorheader.html"); ?> at the top and <?php include("visitorfooter.html"); ?> at the bottom. So, now I'm adding a new page for the blog but I want it to contain the same header and footer. I have messed about but I cant get it to work properly and thus I'm asking for help here as it will take me weeks of learning before I'm competent enough to do it on my own.
Many thanks
Sandie
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Would anyone be willing to show me how to embed my blog?
Actually the easiest method is to edit the file "index.tpl" of your selected template. If your template doesn't have that file, copy it over from the default/ directory.
Then you can place these calls at the places you want to include:
By default, Serendipity's template Engine (Smarty, http://smarty.php.net) has security mode activated which does not allow inclusion of PHP calls. You need to disable this in your case, because you want to include PHP code.
For that, create a file "config.inc.php" inside your config dir. Put this code in it:
That is much easier than using the deprecated serendipity embed directive. 
Best regards,
Garvin
Then you can place these calls at the places you want to include:
Code: Select all
{include_php file="/path/to/visitorheader.html"}
For that, create a file "config.inc.php" inside your config dir. Put this code in it:
Code: Select all
<?php
$serendipity['smarty']->security = false;
?>
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/
-
Guest
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
You must put that config.inc.php file in the directory of your template. I'm sorry that I just wrote "in the config dir", I wasn't clear on that. 
Best regards,
Garvin
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/
-
Guest
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Actually this is more a thing of your CSS stylesheet than in HTML; but you could fix it in both places 
Best regards,
Garvin
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/
-
Guest
Garvin
I can't figure it out, no matter what I try the serendipty banner is on the left of the screen and not in the center. Here is the portion of the css I am messing with
#serendipity_banner {
font-family: Arial, 'Times New Roman', serif;
color: #FFFFFF;
background-color: #B503B5;
text-align: left;
border-bottom: 0px solid #FFFFFF;
border-left: 4px solid #FFFFFF;
border-right: 4px solid #FFFFFF;
width: 649px;
height: 76px;
margin: auto;
Can you shed some light?
Much appreciated
Sandie
I can't figure it out, no matter what I try the serendipty banner is on the left of the screen and not in the center. Here is the portion of the css I am messing with
#serendipity_banner {
font-family: Arial, 'Times New Roman', serif;
color: #FFFFFF;
background-color: #B503B5;
text-align: left;
border-bottom: 0px solid #FFFFFF;
border-left: 4px solid #FFFFFF;
border-right: 4px solid #FFFFFF;
width: 649px;
height: 76px;
margin: auto;
Can you shed some light?
Much appreciated
Sandie
-
Guest
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: SSI
muligruber: You might need to try it. I don't know when Apache parses SSI.
You should use smarty or PHP includes instead, though. They're faster and integrate more smoothly.
Regards,
Garvin
You should use smarty or PHP includes instead, though. They're faster and integrate more smoothly.
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
I thought it was all looking cool but now I discover that I can only view entries when Im logged in to the admin and no one else can see them, any ideas?
sandie
www.hornytimes.com/blog
please dont look if adult topics offend you
sandie
www.hornytimes.com/blog
please dont look if adult topics offend you
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Sandy: Did you look at the category permissions? You need to set the "read" permission to Everyone for all people to be able to read entries.
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/
-
Guest
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
I'm glad I could help you! Hope you'll have fun blogging with Serendipity and your "adventures"
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/