rjs37 — 2010-10-15T08:17:37-04:00 — #1
I did post this over on the Xenforo forums but I think I'm likely to get a more appropriate answer over here as it's more of a design/structure based query.
I currently have a website which builds upon our vbulletin installation (manually checks that you're logged in, creates pms through the database etc). I've been planning for a long time to do a re-code for the site as I wanted to make it OOP and even started something in that respect.
However in recent weeks I've been thinking about using a framework for it. I'm heavily considering using a xenforo license I've just bought and interacting with that instead of Vbulletin. So the Zend Framework would be the natural choice considering that is what xenforo uses. Though I understand it'll be a steep learning curve.
The thing I'm trying to work out at the moment is the best way to structure it all. Currently we have a subdomain (forums) which just points at a sub directory with all the vBulletin code inside it.
I'd want to continue to do this (having a subdomain point at the forums) but structurally to me it doesn't make sense if libraries are put into this subdirectory seeing as I'd want to use those libraries for the rest of my site and it certainly doesn't make sense to have the Zend library twice lol. This is because the way it comes by default the libraries are within the web root:
and the index.php routes it through the library files.
So the normal way I would imagine would be to just stick all of the xenforo code into a forums sub folder. But then if I want to make use of the libraries (Zend or XenForo) then I would need to do so through the forum directory. I also need to keep in mind the upgrade process for the forum code. I don't mind uploading code to multiple places but I wouldn't want to have to keep making manual changes every time I do an upgrade.
Basically I'm just looking for a bit of advice on the best way to try and structure it.
rjs37 — 2010-10-19T20:21:59-04:00 — #2
Given up on changing the Xenforo Structure, more complex than I anticipated and not worth the trouble. They don't even use the whole Zend Framework so could have made things messy. Instead I'll leave Xenfor as it is and use the Zend Framework seperately for myself and in a more appropriate directory structure.
So I've downloaded the Zend Framework. One thing I've noticed though is that link above makes no mention of the bin directory which comes with the download? What's normally done with this? Looking at Netbeans (my chosen IDE) it's asking me to say where the Zend Script is. At the moment I've just put it above the 'public' folder i.e. at the same level as the library but I'm not convinced that's the correct thing to do.
webaddictz — 2010-10-18T07:10:08-04:00 — #3
The website framework.zend.com has been down the last couple of hours, it should now be up again.
rjs37 — 2010-10-18T06:17:07-04:00 — #4
That page doesn't seem to work for me.
Well the layout that they provide with the initial installation puts the libraries within the webroot:
/www/forums/index.php - forum index
So yeah I'd hope to make it more like what you suggested. Had a quick attempt last week but didn't get very far lol. I'll have another go later on. It would mean I'd have to upload any forum updates to multiple directories. I'm not too bothered about doing that though. Just want to try to avoid making loads of custom changes to their code otherwise I'll need to re-make those changes everytime I do a forum upgrade.
kyberfabrikken — 2010-10-17T11:55:11-04:00 — #5
I don't know Xenforo, so I can't really comment on the specifics of their design, but you are probably best off using whatever structure that it imposes.
If you have to make choices, I would suggest that you keep library files outside of the web root. Eg. something like:
You might want to have a look at this page, for some ideas about what directory layout to use with ZF: