Thread: Major Additions - Links and Downloads Manager
View Single Post
  #620  
Old 11-10-2006, 01:49 PM
AndrewD AndrewD is offline
 
Join Date: Jul 2002
Location: Scotland
Posts: 3,486
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by amnesia623
Thanks Andrew, I will try the suggestions above!

I am wondering if you could explain the local_file_root and local_file_root_prefix because I am not sure how this effects the way I specify the uploads directory root.

I have nothing set in the local_file_root_prefix and the local_file_root set to no. I have the uploads dir specified as media/demo/.

If I were to call the mp3 file from a browser I would put www.domain.com/forum/media/demo/1/filename.mp3 (the 1/filename is appended by LDM).

Thanks for your help, this add-on is going to be a key feature for my site and I appreciate your help!!!
Normally local_file_root and local_file_root_prefix are unset. They are available to increase security on your site.

Setting local_file_root tells LDM to locate local files (ie file held on the server) relative to the root directory of the server, rather than the default which is relative to the root directory of the web site. (e.g. your web site might actually be sitting somewhere like /users/your/website/dir)

Setting local_file_root_prefix places a fixed prefix in front of all local file names. This is *always* a good idea if local_file_root is set, and *may be* a good idea if it is not set. It ensures that people can't go walkabouts on your server.

If you set local_file_root and local_file_root_prefix, then these also modify where LDM looks for the specified uploads directory.

e.g., suppose you set upload_dir to /forum/media/demo/ and do not set local_file_root and local_file_root_prefix. Then the files will be found where you say, i.e. www.domain.com/forum/media/demo/1/filename.mp3

If you leave local_file_root unset and set local_file_root_prefix to /forum, then the same setting of upload_dir would mean that files could be found at http://www.domain.com/forum/forum/me...1/filename.mp3

If you set both, then it would place the files outside your web tree, and no diurect url could find them.

However, the url http://www.domain.com/forum/local_st...=stream&id=NNN would find the file correctly.

Clear?
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01432 seconds
  • Memory Usage 1,768KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete