Board index ‹ Installation ‹ embed at root level
18 posts
• Page 1 of 2 • 1, 2
embed at root levelHi, I need to embed at the root level of a web site. After looking at all the documentation, seems they call from a directory above. Question is this wrapper.php, how can it call index.php when I need index.php to be the home page?
Thanks in advance!
Re: embed at root levelWhat?
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/
Re: embed at root levelSorry to have not been clear. When viewing the embedding page tutorial it has:
<?php chdir("<serendipity_dir>"); require("index.php"); chdir("<original_dir>"); ?> which is used to create a "wrappper.php" My query is I only want the blog in the middle of the index page, where it says BLOG GOES HERE. The page I am working with is http://www.leeofsted.com/index.php
Re: embed at root levelHi!
The wrapper.php uses ob_start() to capture the "blog goes here" content. Then inside your index.php you only need to place that variable at the place where you want the blog outputs. Bear in mind that embedding is an advanced mechanism where you should know some PHP to understand the concept. If that is too hard, we recommend not to use Embedding, but instead create a custom smarty template and place all your custom header/footer things into the index.tpl template file to create a consistent layout... 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/
Re: embed at root levelThank you for the replies. I think I could handle the php but have been following other queries and found this onehttp://board.s9y.org/viewtopic.php?f=1&t=15923&p=91002&hilit=embedded+installs#p91002 which is clean. Seems like the best option all I need to do would be to alter the paths. Create the template folder, create: templates/ofsted/index.tbl, info.txt and styles.css then on index.php refer to these files. Am I seeing this correctly?
Thanks-Marc
Re: embed at root levelHi!
Yeah, exactly! Just have a try, if you've got specific problems, come bakc here, we'll try to help! 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/
Re: embed at root levelSorry I have just one more question before I go forward. Here is current head for index.php:
<!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> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="description" content="#" /> <meta name="keywords" content="#" /> <meta name="author" content="#" /> <link rel="stylesheet" type="text/css" href="css/lee_main.css" media="screen" /> <link rel="stylesheet" type="text/css" href="print.css" media="print" /> <title>Home of fictional pro golfer Lee Ofsted</title> </head> I add this: <meta name="Powered-By" content="Serendipity v.{$head_version}" /> <link rel="stylesheet" type="text/css" href=" <link rel="alternate" type="application/rss+xml" title="{$blogTitle} RSS feed" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/index.rss2" /> <link rel="alternate" type="application/x.atom+xml" title="{$blogTitle} Atom feed" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/atom.xml" /> {if $entry_id} <link rel="pingback" href="{$serendipityBaseURL}comment.php?type=pingback&entry_id={$entry_id}" /> {/if} {serendipity_hookPlugin hook="frontend_header"} Cheers-Marc
Re: embed at root levelHi!
You copy the code from index.php to index.tpl, not the other way round, right? That means, you only need to add what you have in your index.php to index.tpl - you leave the CSS etc. code in index.tpl intact that is already there. 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/
Re: embed at root levelGood Morning, I guess I am not being clear. Some how index.php needs to call index.tbl. Plus index php needs a php action.
I did as you said, created index.tbl out of index.php. Thanks-Marc
Re: embed at root levelHi!
You actually would now no longer link to index.php when you want to display your blog, but to /serendipity/index.php (or /blog/index.php, or whatever you chose). This would then contain your layout. If you want to make serendipity appear in the root of your domain, you could simply install Serendipity into the root, so that it's index.php would be your starting point? You could also automatically redirect people to /blog/index.php through your /index.php if you enter a code like
Does that help? I'm not exactly sure I understand what you try to achieve 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/
Re: embed at root levelThank you, this blog is at the root level, and needs to be on the index.php page. Where is on another level it would be no problems. I just need to call the blog into the lower portion of a static page.
Re: embed at root levelHi!
The idea of the posting you linked is to create a blog layout (instead of embedding) that goes into your index.tpl, that mimics your static layout. This is why you need to put your index.php layout into the index.tpl template file of serendipity. For that, you can include the CSS stylesheet that you also include in the index.php. Maybe go through again that link again, it's actually explained in depth there...? 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/
Re: embed at root levelI got it, almost. I just needed to subtract an extra /if, now just to work with the css.
Its located athttp://www.leeofsted.com/ Thanks for all your help.
Re: embed at root levelThanks again for the help. Looks as though I made a mountain out of a mole hill. I am wondering how it is I could run another php script now. Say I wanted to place a very simple php survey It seems as though since index.tbl is not a php file in itself <?php.... ?> would not work.
Cheers-Marc
Re: embed at root levelHi!
Inside smarty, you can either use {include_php} or {php}...{/php} tags. You might need to create a config.inc.php file inside your template directory though with this:
to allow using PHP tags. 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/
18 posts
• Page 1 of 2 • 1, 2
Who is onlineUsers browsing this forum: No registered users and 0 guests |