/[drupal]/contributions/modules/cdn/README.txt
ViewVC logotype

Contents of /contributions/modules/cdn/README.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (hide annotations) (download)
Sun Jan 6 23:26:39 2008 UTC (22 months, 3 weeks ago) by wimleers
Branch: MAIN
Changes since 1.2: +15 -5 lines
File MIME type: text/plain
- Changed: a full Drupal bootstrap is now performed. This was necessary to use variable_get().
- Improved: ignored_dirs settings have been cleaned up, thanks to the fact that all files/directories with a leading period are automatically ignored.
- New: the ability to update a file's embedded URLs. This allows us to use the CSS cache (aggregated CSS files) from the CDN, since all URLs are replaced properly.
1 wimleers 1.3 // $Id: README.txt,v 1.2 2008/01/05 13:47:08 wimleers Exp $
2 wimleers 1.1
3     Applying the Drupal core patch
4     ------------------------------
5    
6     You *must* apply this patch!
7    
8     First, change the directory to the Drupal root directory.
9    
10     You can apply the included Drupal core patch like this:
11     patch -p0 < drupal_core_cdn_integration.patch
12    
13     To undo the patch:
14     patch -p0 -R < drupal_core_cdn_integration.patch
15    
16    
17     Applying the theme patch
18     ------------------------
19    
20     You *must* apply this patch to *every* theme that's being used on your website!
21    
22     Repeat this process for every theme: first, change the directory to the
23     directory of the theme. Applying the patch is identical to the example above,
24     only with a different filename.
25    
26    
27 wimleers 1.2 Setting up CDN sync filters
28     ---------------------------
29     - paths: This is an array of paths (each path being relative to the Drupal
30     root directory) on which this filter should be applied.
31     - pattern: A regular expression that will be used to filter the files in each
32     directory. Like the $mask parameter in file_scan_directory().
33     - ignored_dirs: An array of directories that should be ignored in each
34     directory. Like the $nomask parameter in file_scan_directory().
35     - unique: Determines how the uniqueness will be applied. You can set it to
36     'filename', which will alter the filename, or 'common parent
37     directory', which will alter the path of the file. The latter is
38     strongly recommended for themes, since it will not break URLs in
39     CSS files.
40     - unique_method: The method that should be used to generate unique filenames.
41     Currently supported: 'mtime' (the file's mtime property),
42     'md5' (md5 hash of the file) or 'md5 of mtimes' (md5 hash of
43     the concatenated mtimes of a set of files). This last option
44     is only available if you have set the unique property to
45     'common parent directory'.
46    
47    
48 wimleers 1.1 Configuring the $conf array in settings.php
49     -------------------------------------------
50    
51 wimleers 1.2 This is my configuration:
52 wimleers 1.1
53     $conf = array(
54 wimleers 1.2 'cdn_url' => 'http://wimleers.cachefly.com/wimleers.com',
55 wimleers 1.1 'cdn_sync_filters' => array(
56 wimleers 1.3 'cdn_sync_filters' => array(
57 wimleers 1.2 0 => array(
58     'paths' => array('misc', 'profiles', 'modules', 'sites/all/modules', 'sites/default/modules'),
59     'pattern' => '.*\.(js|css|gif|png|jpg|jpeg|svg|swf)$',
60 wimleers 1.3 'ignored_dirs' => array('CVS'),
61 wimleers 1.2 'unique' => 'filename',
62     'unique_method' => 'mtime',
63     ),
64     1 => array(
65     'paths' => array('sites/wimleers.com/files'),
66     'pattern' => '.*',
67 wimleers 1.3 'ignored_dirs' => array('CVS', 'css'),
68 wimleers 1.2 'unique' => 'filename',
69     'unique_method' => 'mtime',
70     ),
71 wimleers 1.3
72 wimleers 1.2 2 => array(
73 wimleers 1.3 'paths' => array('sites/wimleers.com/files/css'),
74     'pattern' => '.*',
75     'ignored_dirs' => array('CVS'),
76     'unique' => 'filename',
77     'unique_method' => 'mtime',
78     'update_urls_in_files' => TRUE,
79     ),
80     3 => array(
81 wimleers 1.2 'paths' => array('sites/default/themes/garland-customized'),
82 wimleers 1.3 'pattern' => '.*\.(js|css|gif|png|jpg|jpeg|otf)$',
83     'ignored_dirs' => array('CVS'),
84 wimleers 1.2 'unique' => 'common parent directory',
85     'unique_method' => 'md5 of mtimes',
86     ),
87 wimleers 1.1 ),
88     'cdn_sync_method' => 'ftp',
89     'cdn_sync_method_settings' => array(
90     'host' => 'ftp.cachefly.com',
91 wimleers 1.2 'remote_path' => 'wimleers.com',
92 wimleers 1.1 'port' => 21,
93     'user' => 'user',
94     'pass' => 'pass',
95     ),
96     );

  ViewVC Help
Powered by ViewVC 1.1.2