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
Switch to threaded view of this topic Create a new topic Submit Reply
Image Base URL??? [message #35240] Tue, 19 December 2006 00:31 Go to next message
Bubba is currently offline  Bubba   United States
Messages: 5
Registered: December 2006
Karma: 0
Junior Member
Does FUD Forum support the retrieval of images from a separate domain? We'd like all images to be servered via:

http://images.mydomain.com

Re: Image Base URL??? [message #35247 is a reply to message #35240] Tue, 19 December 2006 15:09 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Yeah it is possible.

FUDforum Core Developer
Re: Image Base URL??? [message #35368 is a reply to message #35247] Wed, 03 January 2007 07:11 Go to previous messageGo to next message
WITCH is currently offline  WITCH   United States
Messages: 42
Registered: December 2006
Location: Illinois USA.
Karma: 0
Member
I actualy tried that the other day, I registered at Photo bucket, uploaded some images to my account and from there it was a simple matter of copying the link into my post or signature line of course I havent gotten very far with it. I dont know if it is allowed here or not, so I'll get some better info and post it here!

Ok I see Images are on so I will try it here shortly.


http://i119.photobucket.com/albums/o137/pandemoniumranch/Witch/eyez2.gif


OK is this what you wanted to do??


I am new to this so explain things very, very carefully!

[Updated on: Wed, 03 January 2007 07:22]

Report message to a moderator

Re: Image Base URL??? [message #35370 is a reply to message #35368] Wed, 03 January 2007 19:21 Go to previous messageGo to next message
Bubba is currently offline  Bubba   United States
Messages: 5
Registered: December 2006
Karma: 0
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

Re: Image Base URL??? [message #35373 is a reply to message #35370] Wed, 03 January 2007 23:27 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
One simple solution would be to put a .htaccess file that would use mod_rewrite or mod_alias to perform the redirect.

FUDforum Core Developer
Re: Image Base URL??? [message #35375 is a reply to message #35373] Thu, 04 January 2007 00:18 Go to previous message
Bubba is currently offline  Bubba   United States
Messages: 5
Registered: December 2006
Karma: 0
Junior Member
While that's a simple solution it still requires a request to WWW for redirects. The goal is to have the browser request images from a separate domain. This would facilitate services such as Akamai. Smile
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Moderator / Administrator Title
Next Topic: blocked_logins
Goto Forum:
  

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

Current Time: Fri Nov 22 04:22:07 GMT 2024

Total time taken to generate the page: 0.02176 seconds