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 smile

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:

<if condition="$foruminfo[forumid]">
 <div><img src="images/header_images/$foruminfo[forumid].gif" alt="$foruminfo[title]" border="0" vspace="2 px" hspace="0 px" align="left"/></div> 
</if>

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.

Re: Conditional CSS per forum + sub-domaining a master punBB

hummm... simple create 3 forums in the one site and build the main.tpl to look like each site. but use 1 db for all three punbb forums. with a little moding all the user can visit all three forums and be a member of each .......

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

3 (edited by sirena 2007-04-01 17:13)

Re: Conditional CSS per forum + sub-domaining a master punBB

Thanks.

So (if I read you correctly) we would then have structure of ZZZforums.com like so:

ZZZForums.com Home

- Forum 1 (master, on  ZZZforum.com/forum1)
- Forum 2 (eg really on ZZZforum.com/forum2 and mapped via DNS <> forum.secondsite.com)
- Forum 3 (eg really on ZZZforum.com/forum3 and mapped via DNS <> forum.thirdsite.com)
etc

A DB (MasterpunDB) would then be created initially for Forum1, then Forum1 punBB installed on the server using MasterpunDB, then Forum2 installed, using a special prefix for its tables to allow it to share MasterpunDB, and ditto etc for Forum3, and so on.

Then Forum2 and Forum3 switched via phpMyAdmin to use the same user table, presumably.

And then mod each forum according to the look and feel requirements of the secondary site.

Hmmm. Still involves 3 punBB installs/codebases to manage + separate moderation per forum + separate anti-spam etc. And futzing with three site's templates. And cookies? And how would search work?

Messy.

Maybe more time/cost effective to just shell out the required $100 and get vBulletin or Invision for this project smile

Their approach seems much more scalable and ultimately easier to manage/implement.

4

Re: Conditional CSS per forum + sub-domaining a master punBB

I think I would check out vBulletin and IPB thoroughly before spending the money. I have a feeling its not quite as easy as you might think to achieve what you want. The sample you posted would be fine for pages where there was a forum id but what about pages where there was not eg the user control panel or search form. Also, you are not talking about conditional css, you are talking about conditional markup with inline css which is something rather dfferent.

Re: Conditional CSS per forum + sub-domaining a master punBB

Good points Paul. I will ask some hard questions of vB and IPB.

It wouldn't be the end of the earth to change the scope of this project and setup individual puns, and doing so would have some pros as well as cons of course.

Bt I dread the idea of adminning too many boards at once. They may all be smallish, but it would be a ongoing, day-to-day hassle I would like to avoid. Hence my (wishful?) thinking re vB and IPB.

It would not be viable natch for vB and IPB (for $ reasons) after a point to install lotsa forums, so it would certainly be good if one install could service the requirement.

Re: Conditional CSS per forum + sub-domaining a master punBB

how about using punbb Multi-Forum Mod... example: http://mypunbb.net.forum1 forum2 forum3 etc. 1 db ...
Multi-Forum Mod
http://www.punres.org/files.php?pid=176

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Conditional CSS per forum + sub-domaining a master punBB

quaker wrote:

how about using punbb Multi-Forum Mod... example: http://mypunbb.net.forum1 forum2 forum3 etc. 1 db ...
Multi-Forum Mod
http://www.punres.org/files.php?pid=176

Q

Thanks. It looks VERY much what I want to do.

Alas the domain name (p8a.net) of the developer (Latheesan) has since lapsed and been taken over by domain squatters, so no demo site anymore sad 

And from looking at: http://www.punres.org/viewtopic.php?id=1093&p=2 it looks like all development of this stopped about 1 year ago.

Using it would also mean essentially reverting to a older and less secure version of punBB, unless I did a lot of page hacking/updating. 

And I don't like the idea of it requiring my forum root to be chmod to 777 and being world-writeable [!!!!]

But I'll certainly explore it.

BTW: I am quite surprised at the initial bad reception this guy got from the punBB/punres crowd. Quite bad vibes radiate out from some of the initial comments on his mod. Maybe all the grumpy, crusty old punBB'ers he encountered here and on punres encouraged him to leave and not come back