|
Cookbook /
PhpBB2IntegrationSummary: Integration options for PmWiki and phpBB2 forums (plus others)
Version: 1.0
Prerequisites:
Status: Stable
Maintainer: Smc
Categories: Administration
Questions answered by this recipe
DescriptionIntegration options for PmWiki and phpBB2 forums (plus others). This recipe provides details of how to better integrate PmWiki and forum software, specifically phpBB2. The idea is to better present PmWiki and the forum software using a common look-and-feel and integrating the Wiki sidebar within the forum. Some things described here are generic in nature and relevant to all forum software, e.g. Wiki sidebar interface, and some guidance specific to the phpBB2 forum software. An example of an 'integrated' PmWiki and phpBB site the author created is the Enginuity Open Source project over on http://www.enginuity.org. You will notice that the site is using PmWiki. All links on the sidebar are also normal Wiki pages except the 'Forums' link. Clicking the forums link switches over to the phpBB2 software. Notice that the page header, sidebar, and skin all look the same. In summary the following customisations were performed to create this:
New PmWiki interface to output 'raw' HTMLBasically we want the SideBar (or any other page e.g. Group.Header or Footer) dynamically created from PmWiki and displayed in the forum skin. Physically integrating the PmWiki and phpBB2 source code would be a nightmare especially as php currently does not support namespaces. The solution is to create a simple interface between PmWiki and the forum software. For this recipe the author has used a simple HTML/URL interface. The following get_html_page.php PmWiki plugin simply allows one to add ?action=html to any Wiki URL. Calling this URL returns plain html pertaining only to the section being requested. This HTML is intended to be captured/consumed in to a php variable and integrated with the phpBB2 forum skin - thus displaying the SideBar - dynamically. Specifically the returned HTML does not have HTML header and footer information only the content that would be passed to the PmWiki skin. In the above example from Enginuity the forum software requests the sidebar using the following URL: http://www.enginuity.org/Site/SideBar?action=html ... which returns the snippet below: <p class='sidehead'> <a class='wikilink' href='http://www.enginuity.org/Enginuity/Enginuity'>Enginuity</a> </p><ul> <li><a class='wikilink' href='http://www.enginuity.org/Enginuity/Features'>Features</a></li> <li><a class='wikilink' href='http://www.enginuity.org/Enginuity/Download'>Download</a></li> <li><a class='wikilink' href='http://www.enginuity.org/Enginuity/Screenshots' title="Enginuity 0.4.1 Beta">Screenshots</a></li> <li><a class='wikilink' href='http://www.enginuity.org/Enginuity/News'>News</a></li> </ul> <p class='vspace sidehead'> <a class='wikilink' href='http://www.enginuity.org/Documentation/Documentation'>Documentation</a> [snip...] Installation of PmWiki interface to output 'raw' HTMLTo install the above plugin to PmWiki perform the following procedure:
Get SideBar 'raw' html from above into forum skinWe need to make the forum software capture/consume the SideBar raw HTML. The forum software will be modified to read the SideBar raw HTML from the above URL into in to a php variable. The forum skin/template will then be modified to use this new variable, integrating it as appropriate e.g. as a SideBar on left-hand side. The following phpBB_sidebar_example_mods.zipΔ archive is for reference purposes only for the reader to better understand the author's approach. The following steps reference files in this archive, specific areas of interest can be found by searching for "SMC:".
Future EnhancementsBelow is a list (incomplete) of other considerations and/or potential enhancements for a better integration between PmWiki and phpBB2:
Release Notes
Comments(Oct 07 2007) See Also
Contributors |