Typhon
06-07-2013, 02:57 AM
Currently Facebook App information (app_id & secret) are linked to a single domain. I have multiple domains on my website and need to create a mapping of domains to individual facebook Apps.
I know I have to modify the facebook_functions.com, functions.php, and class_facebook.com; but instead of hard coding the app_id and the secret into the files; I was wondering if there was some way that I could store them as Replacement Variables (domains are already mapped to styles), and still access them from the file? Are replacement variables within the scope the files I need to edit?
My code block literally rewrite the variable before it is called:
switch (TRUE) {
case in_array($_SERVER['SERVER_NAME'], array("example.com", "www.example.com")):
$vbulletin->options['facebookappid'] = "##############";
$vbulletin->options['facebooksecret'] = "##############";
break;
}
If this isn't the right way; please let me know
I know I have to modify the facebook_functions.com, functions.php, and class_facebook.com; but instead of hard coding the app_id and the secret into the files; I was wondering if there was some way that I could store them as Replacement Variables (domains are already mapped to styles), and still access them from the file? Are replacement variables within the scope the files I need to edit?
My code block literally rewrite the variable before it is called:
switch (TRUE) {
case in_array($_SERVER['SERVER_NAME'], array("example.com", "www.example.com")):
$vbulletin->options['facebookappid'] = "##############";
$vbulletin->options['facebooksecret'] = "##############";
break;
}
If this isn't the right way; please let me know