Installing LDM
From EIRMA Wiki
| Quick Links |
|---|
|
Overview and Tutorial |
|
Pre-Installation Installation Post-Installation |
|
Administration |
|
Moderation Design Advanced |
|
Other |
Contents |
Current Version
- For vBulletin 4.0: Versions 3.0.x thread 231407
The download includes product installers and, for supported releases, full/close-to-full translations for English, Chinese, French, Spanish, Dutch and German.
Earlier versions, with limited support:
- For vBulletin 3.8: Version 2.3.0, thread 216118
- For vBulletin 3.7: Version 2.2.9, thread 166094
- For vBulletin 3.6: Version 2.2.8, thread 119041
- For vBulletin 3.5: Version 2.2.1, thread 91107
- For vBulletin 3.0: Version 1.6.0, thread 60403
Installation
LDM is distributed as a vBulletin product installer with supporting code, image and language files. Installation requires no changes to a standard vBulletin board, so the good folks at vBulletin will continue to help you. The installer for each version handles upgrades from all previous versions.
LDM installs 'out of the box' on most sites that are already running vBulletin. There are some configuration details to consider, for example if you plan to make heavy use of the product for handling large downloads, and some php modules such as Suhosin can cause problems. See Site Configuration.
Many standard features are enabled during installation but other features - notably moderation, file uploads, and automatic directory synchronisation - are turned off by default. Decide if you intend to use these features, and refer to the Administration section below for information on how to activate them.
New installations are pre-configured to provide a reasonable balance between security and efficiency, and the default settings will suit most sites. However, you are advised to read carefully the notes given in Speed, Security and Server Load.
| 1. Take a backup of your vBulletin database (vb ACP/Maintenance/Database Backup or command line) before installing LDM or upgrading. THERE ARE NO GUARANTEES. IF THIS MESSES UP YOUR DATABASE, DON'T EXPECT US TO FIX IT... |
| 2. Check (Site Configuration) compatibility with your web server configuration. Normally, there will not be problems if vBulletin is running ok. |
| 3. Unzip the product file to produce the illustrated directory structure. Be sure to maintain the directory structure in the zip file. The /release directory contains everything you need to install or upgrade LDM. The /development directory contains phrases, plugins, templates, utilities, etc. used during code development. You do not need this for a standard installation. |
| 4. No code changes are required unless a) you are using Microsoft's IIS web server and PHP is installed in CGI mode, see IIS and DOCUMENT_ROOT in Site Configuration, or b) you wish to modify the default database table names or script names, see Hacking LDM |
| 5. Upload /release/forum and its subdirectories into the corresponding forum directories. |
| 6. Run the vBulletin Product Management System (vb ACP/Plugin System/Manage Products). Select Add/Import Product. If you are upgrading/reinstalling, remember to tell VB to overwrite the existing installation. To install the English version, upload /release/product_eirma_ldm.xml |
Translations
Chinese, French, Dutch, German and Spanish translations are provided as a separate download from vBulletin.org. The Chinese and Spanish translations are complete, the rest reasonably so. The installation process is slightly different for vBulletin versions 3.x and 4.x.
For vBulletin versions 4.x:
- Access the vBulletin Language Manager and upload the relevant phrases_XX.xml from /translations into the appropriate language. Most of the translations are provided as Latin- and as UTF-8 encoded files: you should use the encoding that corresponds to the main language.
For vBulletin versions 3.x:
- Upload the relevant product file, product_eirma_ldm_fr.xml, etc.
If you find you are having problems with displayed strings being cut off just before accent marks, characters appearing as '??' or with strange mixtures of "@" signs, this is caused by a problem inside vBulletin which assumes that all language files are encoded in Latin (ISO-8859-1) format. You can fix this problem as follows:
- Go to forum/includes
- Edit the file adminfunctions_language.php, find function xml_import_language and change the line:
if(!$arr =& $xmlobj->parse())
to:
// start of mod to handle non-latin languages
$encoding = "ISO-8859-1";
if (preg_match('/encoding="(.*?)"/', $xml, $matches)) {
$encoding = $matches[1];
}
if(!$arr =& $xmlobj->parse($encoding))
// end of mod
// if(!$arr =& $xmlobj->parse())
Configuring LDM
LDM provides many configuration settings in order to provide the features and layout you seek. These settings can be global (apply everywhere) or, in some cases, per-category, applying only to parts of your database. Global settings are adjusted using the LDM administration pages. These can be accessed via the vBulletin admincp or by pointing a browser at http://yoursite/yourforums/local_links_admin.php. Those changes that can be made on a per-category basis are accessed using the Add/Edit Category forms.
The default settings are generally ok to get you started. There are some that need review:
- General Settings
- If you plan to allow uploads or allow access to files held on your server, review Speed, Security and Server Load. If you choose to modify local_file_root and local_file_root_prefix, do this before adding content to your LDM database.
- Images
- To improve performance, point thumbs_dir at a site directory in which to store cached thumbnail images. (Ensure this directory is writable)
- File Uploads
- To allow file uploads, point upload_dir at a suitable site directory and ensure this directory is writable. Set upload_enabled.
- File types
- LDM distinguishes between files - which can be uploaded, downloaded or played - and links - which can be accessed - using the VBulletin admincp Attachments table. See Configuring Filetypes in vBulletin to check that your board has appropriate settings for those file types you want LDM to handle as uploads, downloads and media files.
- Icons - LDM ships with two icons sets:
- With LDM versions 2.x, the default icon set comes from the Oxygen project. Icons are generally 22x22px in size, uploaded into forumdir/images/ldm-ox-icons and used automatically on new installations. (Existing sites need to adjust the LDM admin setting file_icons_dir.) A set from the famfamfam silk icon set is available in the extras/icon-sets/silk-icon directory in the release. These are 16x16px in size.
- With LDM versions 3.x, the reverse applies: the default icon set comes from famfamfam silk icon set and the Oxygen set is available in the extras directory. (Take care: Existing sites may need to adjust the LDM admin setting file_icons_dir when upgrading to release 3.x.)
- To use an alternative icon set, upload into a suitable subdirectory of the forums/images directory, and point the LDM setting file_icons_dir at this directory.
- Permissions
- By default, LDM gives admininstrators access to most features and logged-on users can view entries and categories that administrators create. Use the LDM Permissions page to modify this behaviour.
Testing
The /tests subdirectory of the release contains files to set up two sample databases. One file creates two categories with a few entries pointing to newspaper and magazine web sites. A second creates media links to the main BBC radio stations:
- Point your browser at http://yoursite/yourforums/local_links_admin.php
- Select Import and Export
- Browse to the desired file and select Import
magazine-media-sample.xml creates two categories, one containing external links to some magazine sites, the other to some tv stations
bbc-radio-sample.xml creates one category containing media links to the four main BBC national radio stations broadcast in Windows Media Audio format. In order to play these stations via the internal LDM media player, you need to add (Configuring Filetypes in vBulletin) the .asx filetype to vBulletin's file attachment table with the definition:
Content-type: video/x-ms-asf
Security Settings
Read Speed, Security and Server Load for information on keeping your installation secure and responsive.
Integrating LDM into your site
To fully integrate LDM within your site, you need to create a pointer to local_links.php. The mechanism for doing so varies according to the version.
vBulletin 4 (LDM versions 3.x)
The installer places a link to LDM in the middle of the standard vB menu bar. You can change the location of this link or remove it altogether as follows:
- To place it at the start or end of the navbar, edit the file includes/local_links_defns.php, find the line:
define('LDM_NAVBAR_LOCATION', 'navtab_middle');
and change 'navtab_middle' to 'navtab_start' or 'navtab_end'.
- To prevent creation of a navbar entry pointing to LDM, change 'navbar_middle' to a blank string. In this case you will need to provide another way for authorised users to find their way into LDM, and perhaps also to execute some of the commands which would normally appear on the vB submenu. (It is currently not possible to display these submenus if the main menu item is not displayed.)
If you want LDM to be visible only to registered users, edit the process_templates_complete, find the line
if (LDM_NAVBAR_LOCATION) {
and change to
if (LDM_NAVBAR_LOCATION and $vbulletin->userinfo['usergroupid']>1) {
Similarly, you can make it only visible to administrators by changing it to:
if (LDM_NAVBAR_LOCATION and $vbulletin->userinfo['usergroupid']==6) {
(In this last case, you could also visit the LDM/admin/settings page and turn LDM off. Although the menu item would remain visible, non-admins would not be able to gain access. This is a better solution for short periods of maintenance.)
By default, the menu item will read Links/Downloads. If you wish to change this,
- Visit the vb/admincp and go to Languages and Phrases/Search in Phrases
- Search for the phrase called ldm_vbmenu_ldm (remember to check the box Phrase Variable Name Only)
- Edit the phrase contents as you wish and save
vBulletin 3 (LDM versions 2.x)
There are several ways to create a suitable pointer into the system:
a) Quick and Easy
The LDM installation includes two plugins that add LDM to your main VBulletin navigation bar:
- Links and Download Manager: Add LDM to VB navbar
- Links and Download Manager: Add LDM Quick Search to VB navbar
These plugins are disabled by default. Enable them using vBulletin->admincp->Products and Plugins or LDM->Admin->LDM Plugins.
NB:
- this will not work if you have modified the navbar template to remove the references to $template_hook[navbar_buttons_left] (for the main ldm link) and $template_hook[navbar_search_menu] for the quick search
- To modify the text used on the menu commands, use the vBulletin->Admincp->Languages page to edit the phrases ldm_vbmenu_ldm or (for searches) ldm_vbmenu_search, ldm_vbmenu_advancedsearch, ldm_vbmenu_keys and ldm_vbmenu_description
b) For finer control, you can edit the navbar template directly. Find, e.g.
<td class="vbmenu_control"><a href="faq.php$session[sessionurl_q]" accesskey="5"> $vbphrase[faq]</a></td>
Insert
<td class="vbmenu_control"><a href="local_links.php">Links</a></td>
and save the updated template. Keep in mind that you must make this change in all styles (or use child syles that inherit the parent navbar template).
If you want LDM to be visible only to registered users, use something like this instead:
<if condition="$vbulletin->userinfo['usergroupid']>1"> <td class="vbmenu_control"><a href="local_links.php">Links</a></td> </if>
You can also urls like these:
local_links.php : Browse the database at top level local_links.php?catid=nn : Browse category nn local_links.php?linkid=nn : Find entry with linkid nn local_links.php?doi=string : Find entry with the specified Digital Object Identification local_links.php?action=search : Set up a search local_links.php?action=jump&id=nn : Jump to the url associated with the entry with linkid nn local_links.php?go=nn is a shorthand for the same command local_links.php?action=jump&link="linkname/catname" : Jump to url of first link that matches linkname and catname local_links.php?action=mod : Moderate new entries local_links_admin.php : Admin control, including links validation
c) A third approach is set up a forum link (VB admincp: Forums and Moderators/Add New Forum) using local_links.php as the url (to take users to the root category) or local_links.php?catid=N to take them to category N.
Problems and Fixes
Not much tends to go wrong if:
- you keep in mind the difference between links and downloads, see LDM Quick Tutorial
- you understand the implications on server performance of setting up downloads in different ways, see Speed, Security and Server Load
See Common Problems for some of the difficulties people have reported.
Please post bug reports and suggestions for improved functionality in the relevant forum at vBulletin.org

