MyBB Community Forums

Full Version: Remotely Hosted MyBB Themes (1.4) - Possible?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

As some of you may know, I'm working on a Multiforums Script for MyBB 1.4. Anyway, what I want to know is if MyBB 1.4's theme system can support remotely hosted themes.

What I want to have is where a user can import an XML file for a theme, but instead of the images for the theme being on their server at images/themename they would really be at http://www.somesite.com/images/themename. What I am wondering is if it is possible to do something like this or to define a remote image directory somewhere else on the internet in the XML for a theme?

I have tried playing with this a bit by modifying the XML file for the NDesign theme demo that's been released around here, but unfortunately the lack of completed MyBB themes for 1.4 along with my lack of knowledge of the MyBB theme system work against me. What I did notice, however, is that in some cases at least when an absolute URL is specified in a modified theme the MyBB theme will default to some of the default theme's images when viewed, rather than showing no image if the file doesn't exist.

Anyone know if this is possible off the bat with MyBB 1.4 or if there would be something that needs to be edited for this to work? I'd eventually like to have something similar to the old InvisionFree theme site where theme images are hosted externally and people can just import the XML and use the external images.

Thanks,
BMR777
yup, it can be done.. I tried to make a background (for an element) using a remote hosted image, and it's work..
am not sure what about the images directory
Yeah, I'm talking where EVERYTHING is remotely hosted, there wouldn't be an images directory on the server at all for the theme, it would need to be somewhere else.

BMR777
in global.php comment out the following
if(!@is_dir($theme['imgdir']))
{
	$theme['imgdir'] = "images";
}
I think thats it (tested and work with me)
(2008-07-10, 03:32 PM)pepotiger Wrote: [ -> ]in global.php comment out the following
if(!@is_dir($theme['imgdir']))
{
	$theme['imgdir'] = "images";
}
I think thats it (tested and work with me)

Sweet! Thanks, I'll have to try this. Smile
no problem mate. hope thats it
Yes, it appears to work. Thanks. I knew there was something hidden somewhere in the code that I needed to remove. Wink
good to know it's worked.. congrats mate