Hi,
What is the recommended way of extending the $CONFIG array? I need to add an url of my server with a static content to serve the images and other files for my elgg theme.
I have prepared such a solution in the init function of my theme:
function mytheme_init() {
global $CONFIG;
$staticurl = explode("/", $CONFIG->wwwroot);
$CONFIG->staticurl = "http://static.".$staticurl[2]."/";
}
And it works but I do not like this code to be invoked by every request to my website. Is there a way to invoke it only once per every user session?
Regards
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Robert Koziol@rkoziol7
Robert Koziol - 0 likes
You must log in to post replies.Noone has ever extended the $CONFIG array? Strange... :(