WP-Filebase
WP-Filebase copied to clipboard
Support for 3.1.02 on WP 4.2 multisite
Hi there Please advise if this plugin is still supported? I just noticed that https://wordpress.org/plugins/wp-filebase doesn't exist?
Few issues I just picked up on the plugin ...
- We have a 'Gallery' category that is not listed under categories but still has files listed within it.
- On syncing on all 3 multi-sites, the number of files remain same, but number of categories are variable.
- On syncing files to the other multi-sites, the file display names become the file name and not the display name.
- Permissions on syncing files across the other multi-sites becomes "Everyone" instead of the original permissions.
- I also notice some individual file shortocdes showing the link/template but results in "This file does not exist" once clicked and need to reupload the same file.
- I have also seen the counter reset to 0.
Pleas let me know as soon as you can. Thanks in advance
Thanks, Yatish
There is no cross-multisite meta data exchange, only the actual files can be shared, not their permissions. This is against the concept of multisite. (For example permissions have a unique name on every site using the site prefix)
Thanks very much, Fabian.
OK that is contradicting the cause of 'syncing' isn't it? I.e. if something is for one permission on one site and another on another site - almost unethical no? Any advise on how to do so though so that file names, permissions and categories sync perfectly across?
And the other pointers I've listed above?
Thanks again.
Syncing here refers to a data exchange between the file system and the database.
-
File system -> database: New files, file scan data...
-
Database -> File system: thumbnail processing, deleted files...
File meta data is not synchronised but only stored in the database.
I agree that having a system that syncs across all sites would be nice. I started implementing a sync where meta data was written to an XML file stored in the same directory of the file, so this information can be used by other sites. I will see what's the best way of doing this. If you have any ideas let me know.
Regarding the other issues, try the latest update here, this fixes several things.
Thanks Fabian. I get you now ... didn't realise it was file to db and not site to site. Oops.
OK i am a bit new at code development and struggle a bit with new implementations. Any chance you could assist with that script if possible? That is the only thing that i am unsure of and i have seen few other queries on that.
Also i was wondering why your plugin is not listed on WP plugin repo? It really is a neat plugin.
Thanks again.
Hey mate,
Apologies I created a new issue by error.
So relating to this issue, I was wondering whether it is possible to make an additional site in my WP site network that is dedicated and isolated to the file resources and allow uploads and management of files ONLY from that domain eg. cdn.website.com and have files accessible from site1.website.com, site2.website.com and site3.website.com - all still ensuring that file meta and user authentication is the kept. Ie. the file / category names, access permissions, tags, etc are all set once on the cdn.website.com domain but the showcase of the files (whether single file, list, table, custom template) are on the other domains and based on permissions still. Makes sense?
Please advise? Any other thoughts? Thanks
Hey Fabian, You well? Happy 2016 and more to you.
I noticed the rework of the upload section and the new dashboard. Along with the other updates. Nice one!!!
What are your thoughts on the below? So basically if I add/delete/updated (including file display name, permissions, tags, etc) file/s on one site and then run the following mysql queries to sync them across all the sites (in my case I got 2 others)?
What this does is duplicate the files, cats an files_id3 tables for the other 2 sites. And includes the same data from the root website ... The first 2 lines are just to avoid the errors on creating the tables with 0000-00-00 00:00:00 as the dates.
SET sql_mode=(SELECT REPLACE(@@sql_mode,'NO_ZERO_DATE',''));
SET sql_mode=(SELECT REPLACE(@@sql_mode,'NO_ZERO_IN_DATE',''));
drop table if exists wp_2_wpfb_files, wp_2_wpfb_files_id3, wp_2_wpfb_cats, wp_3_wpfb_files, wp_3_wpfb_files_id3, wp_3_wpfb_cats;
create table wp_2_wpfb_files like wp_wpfb_files;
create table wp_2_wpfb_files_id3 like wp_wpfb_files_id3;
create table wp_2_wpfb_cats like wp_wpfb_cats;
create table wp_3_wpfb_files like wp_wpfb_files;
create table wp_3_wpfb_files_id3 like wp_wpfb_files_id3;
create table wp_3_wpfb_cats like wp_wpfb_cats;
insert into wp_2_wpfb_files select * from wp_wpfb_files;
insert into wp_2_wpfb_files_id3 select * from wp_wpfb_files_id3;
insert into wp_2_wpfb_cats select * from wp_wpfb_cats;
insert into wp_3_wpfb_files select * from wp_wpfb_files;
insert into wp_3_wpfb_files_id3 select * from wp_wpfb_files_id3;
insert into wp_3_wpfb_cats select * from wp_wpfb_cats;
Let me know if you think it is effective or if you can optimize the process perhaps?
Thanks again Yatish
It should work, but this is only a one-way copy, no sync. Its better to modify the table names set in wp-filebase.php main file (this will get overridden on update though)
Hey mate, Thanks for the check and comment. What do you mean modify the tables in that file? How would we change this:
if (isset($wpdb)) {
$wpdb->wpfilebase_cats = $wpdb->prefix . 'wpfb_cats';
$wpdb->wpfilebase_files = $wpdb->prefix . 'wpfb_files';
$wpdb->wpfilebase_files_id3 = $wpdb->prefix . 'wpfb_files_id3';
}
To this?
if (isset($wpdb)) {
$wpdb->wpfilebase_cats = 'wp_wpfb_cats';
$wpdb->wpfilebase_files = 'wp_wpfb_files';
$wpdb->wpfilebase_files_id3 = 'wp_wpfb_files_id3';
}
And then make sure that "wp_" remains in there with each update? Thanks again
Hi mate - so this seems to work fine. Do you have any other precaution or caveat to using this solution? Thanks so much