Comments Posted By Nemo
Displaying 0 To 0 Of 0 Comments
Lester Chan’s WordPress Plugins July 2008 Update
Ok 🙂
» Posted By Nemo On 21st July 2008 @ 22:45
Whoops, the second modification is not complete: it works only on MU.
This is the correct one:
if (isset($blog_id)) {
if(!is_dir(WP_CONTENT_DIR.’/blogs.dir/’ . $blog_id . ‘/files/downloads/’)) {
mkdir(WP_CONTENT_DIR.’/blogs.dir/’ . $blog_id . ‘/files/downloads/’, 0777, true);
}
}
else {
if(!is_dir(WP_CONTENT_DIR.’/files/downloads/’)) {
mkdir(WP_CONTENT_DIR.’/files/downloads/’, 0777, true);
}
}» Posted By Nemo On 21st July 2008 @ 19:03
That’s perfect 😉
» Posted By Nemo On 21st July 2008 @ 18:00
@Lester: good, I am glad of that. The 1.40 release will be the next one?
Regarding the slug, well, I guessed that! 😉Bye bye.
» Posted By Nemo On 21st July 2008 @ 16:19
Ah, one more thing: it would be nice (but not strictly necessary) to change the “nice urls” in wp-downloadmanager from “/download/” to “/download/slug-of-the-download-name”. What do you think about it?
» Posted By Nemo On 21st July 2008 @ 05:14
«« Back To Stats PageHello Lester,
first I wanna thank you for the great plugins you released so far. They are among the best ones.
Now, a couple of things.
I made a simple modification to the WP-DownloadManager 1.31 in order to make it WordPress MU ready. You build the default options for the “download path” and the “download path URL” keeping in mind a simple WordPress installation. The plugin as you released use so the same download path for each blog in the WPMU network.
I changed the file wp-downloadmanager, replacing the lines 1186-1187 with the following ones:
global $blog_id;
if (isset($blog_id)) {
add_option(‘download_path’, WP_CONTENT_DIR.’/blogs.dir/’ . $blog_id . ‘/files/downloads/’, ‘Download Path’);
add_option(‘download_path_url’, WP_CONTENT_URL.’/blogs.dir/’ . $blog_id . ‘/files/downloads/’, ‘Download Path URL’);
}
else {
add_option(‘download_path’, WP_CONTENT_DIR.’/files/downloads/’, ‘Download Path’);
add_option(‘download_path_url’, WP_CONTENT_URL.’/files/downloads/’, ‘Download Path URL’);
}By the way, I also added the dir “downloads” at the end of the path, because it seems cleaner to me.
Moreover, I modified the rows 1213-1214 in the same above file with the following ones:
if(!is_dir(WP_CONTENT_DIR.’/blogs.dir/’ . $blog_id . ‘/files/downloads/’)) {
mkdir(WP_CONTENT_DIR.’/blogs.dir/’ . $blog_id . ‘/files/downloads/’, 0777, true);I hope you will choose to integrate this modifications in the official version, so that I will not be compelled to port them in your next releases of the plugin.
» Posted By Nemo On 21st July 2008 @ 05:11
Great statistics.
Perfect support XHTML templates!
thanks!
Благодарю ВаÑ? за напиÑ?ание Ñ?криптов !