- b2evolution CMS User Manual
- Developer Reference
- Website Integration
- Website Integration
Website Integration
While b2evolution can be used as a standalone blogging platform, it is also designed to be used as a blog/news/content manager to be embedded in a larger site.
For example, our website - b2evolution.net - itself uses b2evolution for several sections such as the news blog, the screenshots browser or even the donors listings.
Yet, other parts of the site are just static pages or even pages generated by other software such as phpBB for the forums or MediaWiki for this Wiki Manual.
Achieving this basically only requires 2 steps:
- Anchor a b2evolution blog to one or more specific location(s) of your website through the use of Stub files.
- Adapt the look & feel of your b2evolution blogs in order to match the rest of your site by customizing a Skin.
For advanced users, those two steps can be further combined into one by using a "noskin" template (such as a_noskin.php
) instead of a stub file above.
Installing b2evolution as part of a larger site
You can install b2evolution at the root of your website or within a subdirectory.
The easiest solution is to install at the root. If that is not an option, try to install b2evo at a level that is high enough for all your projected "blog pages" to be under the b2evolution folder. If that is not an option either, it *is* possible to have b2evolution blogs running outside of the b2evolution root *but* that will require you to edit some paths in the _advanced.php.
Once b2evolution is installed, you’ll want to place file|stub files at the different locations where you’ll want b2evolution to generate dynamic content pages.
One of the easiest ways to do that is to move the sub files that come with b2evolution (named blog1.php, blog2.php, etc…) to their desired location and rename them to what you want. Do not forget to also adjust the new URL/location of your blog(s) in the backoffice under Blog Settings > URLs.
For details, see How to call a blog from a subdirectory? and repeat for as many blogs/website sections as needed.
Porting the site design to your blog
There are basically 2 ways to proceed here:
- Either you find a skin which works "close enough" to the design of your site and you then tweak it in order to match your site. Edit the How to add custom CSS, Add the site navigation…
- Or you start with a static page of what your blog should look like in your site. You then create a skin or template form scratch and add the Template Tags into the page one by one to make it dynamic.
In trying step 2 - installing b2 evo as part of a larger site, I moved the stub blog1.php to my subdomain david.theherzes.com, renamed it to HerzBlog.php, and then I set the absolute URL to http://david.theherzes.com/. The directory shows up, but when I click on HerzBlog.php, I get the following error:
Server error
The website encountered an error while retrieving http://david.theherzes.com/HerzBlog.php. It may be down for maintenance or configured incorrectly.
Am I supposed to bring certain config files over as well? If not, how am I supposed to configure this?
So I looked in the stub file and fixed the directory adding the /.. in the require_once dirname(__FILE__).'/../conf/_config.php';
This last step should be made explicit in the instructions above.
Now I have the text of my blog1 - which is currently a bare bones custom skin with nothing working as I am learning this part too - and no stylings. I wish I understood some part of the porting my designs instructions, but I can truly say I am at a complete loss here.
Thanks in advance for any help on this.