MyBB Community Forums

Full Version: Subdomain for forum category?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi all,

Not been on here for quite a while but have been setting up a couple of forums recently, and on one of theme I want to do something a bit different...

I would like to be able to have subdomains pointing to forum categories
but ideally done with a plugin so it can be easily managed and dynamically generated.

So for example in mybb I tell it that forum/category ID 4 should be accessible via general.myforum.com

Is something like this available? How might it be done? Cheers
Dan
Requirement: Domain and subdomain must point to the same folder (so you are able to view the forum through domain.tld and subdomain.domain.tld).

Idea: A plugin could check the requested domain and hide some categories if required...
(2010-08-09, 01:30 PM)querschlaeger Wrote: [ -> ]Requirement: Domain and subdomain must point to the same folder (so you are able to view the forum through domain.tld and subdomain.domain.tld).

Idea: A plugin could check the requested domain and hide some categories if required...

That is alot easier than what i was thinking.

altho I have no clue with mybb plugins... lol

How would you have it so the plugin can compare the subdomain against a category which is to be shown and ones which shouldnt be shown ? :s
its not as easy as it sounds unfortunately, that is if you want to properly handle all areas that access froum info like search page, view new posts, forum jump, etc.

I wrote a plugin that does most of that stuff a few months ago, but its still got some issues. my original intent was to allow 'multiple forum, single user base' type behavior. however, the due to MyBB's caching mechanisms and other coding features, I can't cover everything without some performance issues or core file edits.

so what i have will handle searches and such properly, but if you go to the stats pages, the top 10 replied, top 10 viewed, etc are short lists and only contain data that may be in the forums for that subdomain that happen to be in the list.

overall it can work, but its not 100%. i had a demo, but i upgraded the board to 1.6 gold and started from scratch.

the plugin i wrote works by rebuilding the various forum cache variables on the fly. the MyBB forum caching variables are rather convoluted and somewhat redundant in my opinion, but it is what it is.

i am starting to beleive that tabbed forum categories are probably a better solution
or maybe it is as easy as stated by making the forum insactive. however, that still involves modifying several forum cache based variables on the fly, and the other cache varaibles will still reflect data from teh invisible forums unless you want to rebuild those on every page call as well.

so much for performance gains from caching that case
That sounds very interesting pravemen.

The purpose I am looking for is basically I have a main froum, but categories for geographic regions/cities etc so wanted users to be able to go to london.forum.com to and see the london category with the london specific forums etc.

Ideally of course the user would be tied by their geo so if they location is set to "london" they automatically are directed to london.forum.com etc

Is it possible to get a copy of the plugin so I can try and see if it will work on perhaps play with it and mod it? Cheers
Dan
I don't have access to the plugin file right now, but I can try to send it tomorrow. For now, here is the thread I started a while back

http://community.mybb.com/thread-71387.h...=subdomain
You really should just try having multiple forums in subdirectories and have them all point to the login information of a central one. They'll all be tied together, but completely separate folders.
(2010-08-09, 04:50 PM)curtis Wrote: [ -> ]You really should just try having multiple forums in subdirectories and have them all point to the login information of a central one. They'll all be tied together, but completely separate folders.

not possible with MyBB in its current state.
(2010-08-09, 04:50 PM)curtis Wrote: [ -> ]You really should just try having multiple forums in subdirectories and have them all point to the login information of a central one. They'll all be tied together, but completely separate folders.

The problem with this is ideally I will develop the site to have a custom script for users to "create" their local forum, so if a city isn't in the system someone can sign up, and apply for it and the script adds the category and the default forums to that category etc which will obviously save a lot of work for admins!
Wow, that sounds complicated. Giving users the ability to create their own forums sounds rather insecure. Imagine the fun some idiot could have making a thousand or so forums just to be stupid. Also, how many users to you anticipate? If you are going to have enough users from each city to warrant a category for each city, won't you have enough admins to do all the work?

@pavemen: Perhaps a plugin to allow several instances of MyBB wouldn't be too hard. It seems all you'd need is for "users" be pointed to the central database while everything else points to a separate database.
Pages: 1 2