Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Add an AddWhere call to every DB access?
Can anyone tell me if it would be possible to write an extension that will add an AddWhere database call to every single DB access? For example, when the Discssions page is displayed, the extension will check that each discussion is older/newer than a certain date.
Is that possible, if so, how?
Excellent piece of software by the way, and a breath of fresh air.
0
This discussion has been closed.
Comments
If you need to change stuff to do with database accessing my guess is that you need to checkout the database classes and possibly create an extension to modify the functions within them but depending what exactly it is you're trying to do there might be an easier way round it. Dont forget that any increases in DB calls will slow down the load times and whatnot.
Well if you know what needs doing to the code you should just be able to make an extension which replaces the functions you need changing. I'm not sure if there's a more efficient way to do it but obviously doing that would be preferable to actually hacking at the source code. Mark?
Extra work? Yeah, but so is managing 1000 forums out of one set of tables.
This way if you've got a datafarm setup where you have data going to a single source and then being spawned across various sources, Vanilla can integrate into it seamlessly. 99% of people will never need to use this feature - but it didn't slow anything down to add it in there and I had a client that needed it.