PDA

View Full Version : embed pixelpost to my site


fury
09-29-2006, 07:57 AM
I'm trying to embed pixelpost into my existing website so that the crossovers are seamless. I've got my pixelpost install working, and I thought maybe I could just add the php include() into the template files in order to wrap the pixelpost template with the code for my website, but it didn't work.

All of my pages have include(head.inc) and include(foot.inc) at the top and bottom of them, so that if I need to update something on every single page, it can be done easily. I create individual pages with content only and keep all the code for the structre of the site itself off in the head and foot files.

I briefly scanned index.php to see where the template file is grabbed and was going to try injecting some includes before and after the template itself thinking that would work, but I was unable to find them. I know a fair bit of PHP as far as editing and hacking things up goes, but I got totally lost on this one.

Any help would be absolutely AWESOME.

-Rob

Connie
09-29-2006, 09:04 AM
Rob, there is no need to hack anything at all
and includes in the template won't work

the script checks whether there are header-templates and footer-templates and reads them

place a header.html and a footer.html into your template-directory and there you go!

fury
09-29-2006, 11:03 PM
Thank you very much for that! I wasn't able to make it look quite right, but I managed to hack it up some more and get it looking decent enough. I've still got some margins to deal with that are making things look like they are off by a few pixels here and there, but otherwise it looks great!

-Rob

Connie
09-30-2006, 06:43 AM
that is good to read! Enjoy it!

GeoS
09-30-2006, 07:28 AM
You can always hack template part to support PHP files instead of static HTML. There are 2 ways of doing that:
1) change in code to support .php files instead of .html
2) much easier - tell Apache (.htaccess file) that .html should be treated as .php; something like:
<Files filename.html>
ForceType application/x-httpd-php
</Files>

fury
09-30-2006, 09:12 PM
You can always hack template part to support PHP files instead of static HTML. There are 2 ways of doing that:
1) change in code to support .php files instead of .html
2) much easier - tell Apache (.htaccess file) that .html should be treated as .php; something like:

I actually changed the index.php to look for and include php instead of html, however it didn't execute my php code because I think index.php still outputted an HTML page. But, the code I had on that page was not crucial, and I just wanted to get it neatly wrapped.

Does anyone know how I can make the default page something other than the current front page? I'd like users going to www.robmonroe.net/photos to see the archive, rather than the latest image. Is that hard to change?

-Rob

GeoS
09-30-2006, 11:29 PM
http://forum.pixelpost.org/showthread.php?t=2317 - this is one of solutions.

Connie
10-01-2006, 06:49 AM
write a file "Index.htm" or "index.html"
add links to your archive and your main-pixelpost-index.php there

and you have another "starting point"