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

Home » FUDforum » How To » Image Base URL???  () 1 Vote
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Image Base URL??? [message #35240] Mon, 18 December 2006 19:31 Go to next message
Bubba is currently offline  Bubba   United States
Messages: 5
Registered: December 2006
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 10: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
add to buddy list
ignore all messages by this user
Yeah it is possible.

FUDforum Core Developer
Re: Image Base URL??? [message #35368 is a reply to message #35247] Wed, 03 January 2007 02: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
add to buddy list
ignore all messages by this user
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 02:22]

Report message to a moderator

Re: Image Base URL??? [message #35370 is a reply to message #35368] Wed, 03 January 2007 14:21 Go to previous messageGo to next message
Bubba is currently offline  Bubba   United States
Messages: 5
Registered: December 2006
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 18: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
add to buddy list
ignore all messages by this user
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] Wed, 03 January 2007 19:18 Go to previous message
Bubba is currently offline  Bubba   United States
Messages: 5
Registered: December 2006
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Moderator / Administrator Title
Next Topic: blocked_logins
Goto Forum:
  

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

Current Time: Tue Dec 12 11:14:21 EST 2017

Total time taken to generate the page: 0.00829 seconds