Topic: Conditional CSS per forum + sub-domaining a master punBB
For a project, I want to be able to run punBB under the following scenario:
I want to create several web sites for various small but related community groups. Each needs/wants a forum of their own. But I don't want to setup 3, 4 5 etc separate punBB's if I can avoid it
So how about this: punBB runs on a master site (eg ZZZforums.com). All forums on ZZZforums.com are browsable by anyone who comes to the master site, as normal. No problems there.
However, some forums on the master site would also be accessed as sub-domains of several secondary sites. Eg forum.secondsite.com would point to forum4 on ZZZforums.com, and forum.thirdsite.com would map to forum5 on ZZZforums.com.
Pointing across as a full sub-domain is used so that when navigating within forum.secondsite.com it appears to users that they have a fully integrated forum of their own. I am hoping it is possible to map a subdomain to a typical punBB forum name like: viewforum.php?id=24 ...
This is mainly an administrative convenience for me: rather than setup 3 or 4 punBB's (one per site), I would like to leverage just one punBB install. Management, moderation, backups, stats etc would be much easier that way. Probably server load too. Users would also see a benefit from being able to access more content from a single sign-on too, if they wanted to go deeper into ZZZforum.com.
Those visitors who come to their specific forums on the master site via the sub-domains should see a specific site header and logo, so that when visiting their area of ZZZforums.com, their navigational experience remains consistent with the other areas of their 'home' secondsite.com.
The extent of the customisation might be as simple as swapping a logo around, since otherwise I plan to have the look-and-feel of ZZZforums and secondsite tightly consistent.
The ideal result would be that each of the nominated forums on ZZZforum.com would display to visitors from forum.secondsite.com or forum.thirdsite.com a custom header that matched their source site's look and feel.
However to users browsing ZZZforum.com from the index page of ZZZforum, forum4 or forum5 would retain the standard look and feel of the rest of ZZZforum.
If visitors from forum.secondsite.com want to browse to the root of ZZZforums.com though, it will be OK for them to then see the standard layout of ZZZforums.com.
Can punBB be persuaded to work this way?
In researching this, vBulletin for eg appears to be able to handle per forum customization by allowing the use of 'conditionals' so that you could use stuff like this in a vBulletin template:
<div><img src="images/header_images/$foruminfo[forumid].gif" alt="$foruminfo[title]" border="0" vspace="2 px" hspace="0 px" align="left"/></div>
Similarly, Invision seems to be able to allocate individual style elements per forum simply from within the Admin CP.
Are there options here with punBB? Perhaps involving PHP in some of the templates, or something clever with the pun variables?
I am stumped. Other posts in this forum or on Punres have little I could use. Maybe I was using the wrong search terms.