FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Image Base URL???  () 1 Vote
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Image Base URL??? [message #35370 is a reply to message #35368] Wed, 03 January 2007 19:21 Go to previous messageGo to previous message
Bubba is currently offline  Bubba   United States
Messages: 5
Registered: December 2006
Karma:
Junior Member
Thanks Witch, but not exactly. My question pertains to FudForum configuration whereby the application images (buttons, icons, etc) are retrieved from a domain other than WWW.

Ila - Would be good to know another way of doing this without modifying source. And if not, is this an acceptable change? I realize if I upgrade, these changes would be lost.

For example:
http://fudforum.org/forum/theme/default/images/existing_content.png

Would become:
http://images.fudforum.org/forum/theme/default/images/existing_content.png

Without affecting compiler token THEME_ROOT. Cracking open compiler.inc I found compiler token THEME_IMAGE_ROOT.

$cmpl['THEME_IMAGE_ROOT'] = $cmpl['THEME_ROOT'].'/images';

So, the only configurable switch is modify THEME_ROOT in GLOBALS.php -- which I'm uncomfortable doing without knowing all ramifications of the change.

I took the liberity to add $STATIC_URL to GLOBALS.php

$STATIC_URL = 'http://images.mydomain.com'

and modified THEME_IMAGE_ROOT in compiler.inc as:

$cmpl['STATIC_URL'] = $GLOBALS['STATIC_URL]{strlen(...;
$cmpl['THEME_IMAGE_ROOT'] = $cmpl['STATIC_URL'].$cmpl['THEME_ROOT'].'/images';

Recompiled templates. Now all references to THEME_IMAGE_ROOT is translated to http://images.mydomain.com/forum/theme/default/images

For example:
http://images.mydomain.org/forum/theme/default/images/existing_content.png

[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Moderator / Administrator Title
Next Topic: blocked_logins
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 23:35:48 GMT 2024

Total time taken to generate the page: 0.04236 seconds