Advanced tricks

How do I integrate my Nucleus blog with an existing php site?

Scenario:
"I have an existing site driven by php and want to include Nucleus into my existing site, rather than put my whole site in Nucleus. How can I do that?"

Original forum thread (thanks, Corry!):
http://forum.nucleuscms.org/viewtopic.php?t=14960

Method:

  • Make a copy of your existing skin by cloning it and remove anything you don't want to appear inside your existing site (like headers and navigation) from the existing skin parts and any include (.inc) files.
  • Change your blog settings to use your new skin.
  • Next, you can use some php to pull in the Nucleus content into your existing site:
    <?
                $blogurl='http://www.mydomain.com/blogdirectory/index.php';
                $qstring=$_SERVER['QUERY_STRING'];
                $blogurl.='?'.$qstring;
                include($blogurl);
    ?>

    where http://www.mydomain.com/blogdirectory/index.php is the URL to your Nucleus index.php file.
section: Advanced tricks | submitted by Leng on 2007.Feb.24 | 3324 views

item rate
Total votes: 3 - Rating: 8.33

Please tell us how useful this answer was to you (0 = useless, 10 = very very helpful):

10