Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-30-2010, 01:38 AM
alaska_av8r alaska_av8r is offline
 
Join Date: Dec 2009
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Downloadable Files

Hopefully this is the appropriate place to ask this. I have my CMS and forum in the public_html folder. In my site I will have downloadable .pdf's for my users to download.

I can't find it now but I read somewhere that there was a difference between storing these .pdfs in a folder outside my root folder, for example in a public_ftp folder versus storing them within my public_html directory in a separate folder.

On occasion I will provide others a link to download the pdf's, what I don't want is for them to be able to just click the link and download. I want them to register with my forum then be able to download the file.

So what are the differences between storing files outside root directory vs within?
Reply With Quote
  #2  
Old 01-30-2010, 02:28 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you store them in a folder which is located within your public_html folder, then they can be downloaded via a link. If you store them in a folder that is on the same level as your public_html folder, then they can only get to them via vbulletin software and they must have the correct vbulletin permissions to get the file.
Reply With Quote
  #3  
Old 01-30-2010, 03:31 AM
alaska_av8r alaska_av8r is offline
 
Join Date: Dec 2009
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you Lynne for your quick response, sounds like I want them outside the public_html, that way they get the file via the forum.

--------------- Added [DATE]1264834188[/DATE] at [TIME]1264834188[/TIME] ---------------

oops maybe I don't want them that way.

I want links within my website, for instance in a forum topic for them to be able to click if they want to download a .pdf of the topic.

can't get that to work.
Reply With Quote
  #4  
Old 01-30-2010, 02:57 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you put a link to the attachment, then the attachment permissions should carry though to the user who tries to download the pdf. For instance...

1) You upload a pdf file, my.pdf, in forum 1. All users may download pdf attachments in forum 1. You put a link to the pdf file in a thread in forum 2. Not all users have permission to download pdf files in forum 2. However, all users should still be able to click on the my.pdf file and download it because it was originally uploaded in forum 1 where all users have permission to download it.

2) You upload a pdf file, my2.pdf, in your Staff forum where only Staff may view threads and download files. You then put a link to my2.pdf in forum 1 where all users may download pdf files. No users, except Staff, should be able to download that file because they don't have permissions in the original thread the file was uploaded into.
Reply With Quote
  #5  
Old 01-30-2010, 07:18 PM
alaska_av8r alaska_av8r is offline
 
Join Date: Dec 2009
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you Lynne, I made a directory called downloads on the same level as my public_html directory. I put a link url=www.website.com/downloads/my1.pdf and when the link was clicked on it popped up a window saying it could not find the file. I will research into the download permissions and see if that corrects the problem. I apologize in advance that this may seem like a simple question, but I am learning.

tim
Reply With Quote
  #6  
Old 01-30-2010, 08:21 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When playing with links, you need to remember to clear your cache everytime you make a change or you will get the same result as before. Believe me, I have spent time with this issue! So, make a change, CLEAR YOUR CACHE, refresh the page, and then click on the link again.
Reply With Quote
  #7  
Old 02-01-2010, 02:42 AM
alaska_av8r alaska_av8r is offline
 
Join Date: Dec 2009
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have never even considered that, I will have to try that tonight. I read last night about folder permissions and through cpanel looked at the permissions for the download folder, drwxr-xr-x if that makes any sense, I also wondered about the link I was posting in the forums, since folks go to the public html folder to the index file when they type my IP addy, it got me to thinking that the IP leads them to inside that folder while the download folder is outside of it. Do I need some code to denote that the file is up to the root level then point into downloads? I am familiar with absolute links vs relative links but this seems different.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:16 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07092 seconds
  • Memory Usage 2,212KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete