Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
I'm not sure where to put a general purpose function.
In my website I need to have access to an ID number associated with the sub domain that the site is being accessed with. I have a MySQL table that holds a list of sub domains and their IDs. The function's logic is a simple MySQL query to find the appropriate ID, given the current sub domain in use. This function needs to be accessible to all parts of the Vanilla 2 application as well as any applications or plugins.
As for my question: given the explanation of my function, what would be the most appropriate class to add this in?
Thanks for your time.
As for my question: given the explanation of my function, what would be the most appropriate class to add this in?
Thanks for your time.
Tagged:
0
Comments
/cd
Don't add it to a core file or you'll make upgrades painful.
<?php $PluginInfo['MyAwesome'] = array( 'Description' => 'Does awesome.', 'Version' => '1.0', 'Author' => "You" ); function myAwesomeFunction() { // does the stuff you mentioned }
Paste into default.php in /plugins/MyAwesome and then enable in Dashboard.