Menu

#16 Images from different URL but same server

open
nobody
None
5
2004-08-25
2004-08-25
No

It seems that it is impossible to include images if
SPAW has a base URL e.g.

admin.whatever.co.uk

but the images should be displayed from

www.whatever.co.uk

even if they are on the same server for file access.

Have overcome it by adding to config file (start):

// base url for images
$spaw_base_url = 'http://www.whatever.com/';
$images_override_root = '/home/username/public_html/';
global $images_override_root;

and adding to dialogs/img_library.php

// Image root elswhere START //
if (isset($images_override_root) &&
$images_override_root !='') {
$_root = $images_override_root;
}
// Image root elswhere END //

after the lines:

if (!ereg('/$', $HTTP_SERVER_VARS['DOCUMENT_ROOT']))
$_root = $HTTP_SERVER_VARS['DOCUMENT_ROOT'].'/';
else
$_root = $HTTP_SERVER_VARS['DOCUMENT_ROOT'];

which appear three times in total.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    That worked great!
    Thanks!

     
  • Nobody/Anonymous

    Logged In: NO

    That worked great!
    Thanks!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.