bryannielsen
Forum Replies Created
-
Forum: Plugins
In reply to: [User Photo] [Plugin: User Photo] Replicate photo across multisite blogsI had to modify this plugin for Multisite too but I think my needs were a little different. I wanted all the userphotos in the base directory instead of worrying about the author’s primary blog.
I made two functions to get the base upload directory and the base upload url in a multisite environment –
function userphoto_get_multisite_upload_dir() { return WP_CONTENT_DIR . '/uploads'; } function userphoto_get_multisite_upload_url() { global $table_prefix, $wpdb; $base_opt_table = $wpdb->base_prefix . 'options'; $site_url = $wpdb->get_var("SELECT option_value FROM $base_opt_table WHERE option_name = 'siteurl'"); $upload_path = $wpdb->get_var("SELECT option_value FROM $base_opt_table WHERE option_name = 'upload_path'"); return $site_url . '/' . $upload_path; }
And then plugged that into the appropriate spots in the user-photo.php file.
Here’s a gist of the modified user-photo.php if anybody needs to do the same thing: https://gist.github.com/1443952Forum: Plugins
In reply to: [W3 Total Cache] Invalid mfunc tag syntaxYea I haven’t been able to find any great documentation on the fragment caching with W3TC, I’d love to see some real examples other than the out of context snippets in the FAQ.
It seems to at least be processing the MFUNC comment when it throws back the “Invalid mfunc tag syntax” error but the php syntax error kills the whole thing
Forum: Plugins
In reply to: [W3 Total Cache] Invalid mfunc tag syntaxI’m having the same problem, is there a better way to do this?
If I place the <!– mfunc –> comment inside a <?php ?> block I get an unexpected character ‘<‘ error.
Not sure what else to do ??