Thread: Major Additions - Links and Downloads Manager
View Single Post
  #712  
Old 07-04-2008, 04:27 AM
AndrewD AndrewD is offline
 
Join Date: Jul 2002
Location: Scotland
Posts: 3,486
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by obmob View Post
Ok... i need some help

On of my sites has around 500 entries every file is on my server they are sorted within folders, one folder for one category, I have never used LDM synch.

Is it possible to enable this feature? If so, how should i prepare my files and folders?

Thanks Andrew
There's a set of things to think about:
a) LDM can construct a category/subcategory/entry structure that reflects your directory/subdirectory/file structure, or just sync a single directory
b) The directories need to be somewhere within the spaced specified by the settings of LDM's *local_file_root* and *local_file_root_prefix* settings
c) The sync will *only* locate files that have recognised mimetypes in your vb attachments table, but you can tell it to restrict the list further, e.g. only pdfs or mp3 or whatever
d) While a category is set to sync with a directory, the 'Add Entries' command is not available. However, once you've done the synchronisation, you can turn it off, and the category become a normal category again (and keeps the entries created by syncing) which accepts new entries.
d) When LDM syncs files, it gives the entries descriptions based on the contents of the /links_scantext template (I've just noticed that there's a small bug in the code - nothing serious). You can either change the contents of the template or use different templates per catgeory.

So:

Create a category

Towards the bottom of the Add Category form, find the "Synchronise With" box and point to the required directory. For example, if you want to sync with http: // yoursite / yourfiles / yoursyncdir and *local_file_root* is off and *local_file_root_prefix* is blank, you would point to /yourfiles / yoursyncdir. If *local_file_root* is off and *local_file_root_prefix* is set to /yourfiles, then you would point to /yoursyncdir

Now go to the Control Settings tab on the Add Category form

Turn on sync_enabled.

Turn on sync_populate_categories if you want LDM to create subcategories for subdirectories

Set another parameters if you want - you'll find a page about syncing in the online wiki

Click Submit to create the category.

LDM will automatically fill the category/subcategories a bit at a time, each time the category is visited, and once it has finished the job, it will recheck periodically for new files/loss of old files. As admin you'll find a button towards the top right of the category display which you can use to over-ride the automatic scanning.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01508 seconds
  • Memory Usage 1,769KB
  • 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