cLin
Forum Replies Created
-
Forum: Plugins
In reply to: [W3 Total Cache] CDN und SRCSETLooks like this is still a problem. Anyone have a fix?
Forum: Plugins
In reply to: [Join My Multisite] Add users from Admin section always default role?Yep ??
Forum: Plugins
In reply to: [Join My Multisite] Add users from Admin section always default role?I just ended up fixing it by adding this:
$role = (isset($_POST['role']) && isset($_POST['user_login'])) ? $_POST['role'] : get_site_option( 'default_user_role', 'subscriber' ); add_user_to_blog( $blog_id, $user_id, $role );
I’m assuming the role name isn’t used anywhere else and just added user_login to narrow down the possibilities. Seems to put in the correct roles based off my testing, do you see any issues wrong with this method?
Also, I put that under the jmm_activate_user function, not the join site function
Forum: Plugins
In reply to: [Join My Multisite] Add users from Admin section always default role?Also, in my particular case, I’ve just been bypassing activation by checking the Skip Confirmation Email box.
is there a way to add a condition to fire the add_user_to_blog only if the user ID being added matches the current user? So in my case, since I’m adding someone else, add_user_to_blog won’t fire and WP will add the role.
Forum: Plugins
In reply to: [Join My Multisite] Add users from Admin section always default role?Yea, I understand the automatic membership, that seems to work perfectly, I just don’t know why when adding from here no matter what role I choose, it still sets it as the default one. Once, I disable JMM though, the roles are set based off what I choose. Of course, I also lose the automatic membership.
Since you add the action to “init” would that also be added on the user add section?
Forum: Plugins
In reply to: [Join My Multisite] Add users from Admin section always default role?NEW users to the network. I have automatic membership.
Forum: Plugins
In reply to: [Join My Multisite] Add users from Admin section always default role?Ok, digging around the code, it seems like this section may be part of the problem?
function join_site( ) { .... if( !is_user_member_of_blog() ) { add_user_to_blog($blog_id, $current_user->ID, $jmm_options['role']); } }
Does it go off even when in site admin or only when they are viewing the non site admin portions?
Forum: Plugins
In reply to: [Broadcast] [Plugin: ThreeWP Broadcast] Broadcast to newly created blogs?Hi Maxaud,
Were you able to get tag support on this? Tags don’t seem to be broadcasting right now when I create a new site?
Forum: Plugins
In reply to: [Broadcast] [Plugin: ThreeWP Broadcast] Broadcast to newly created blogs?Yep. It was the timeout thing. increased to 10 minutes and it works fine (I had a lot of posts with images on my master blog).
Forum: Plugins
In reply to: [Broadcast] [Plugin: ThreeWP Broadcast] Broadcast to newly created blogs?Well I increased the time limit to 10 minutes and it seemed to move all the data. Seems like if it timeouts too quick it doesn’t even partially process the data.
What does 10,6 do to the function?
Forum: Plugins
In reply to: [Broadcast] [Plugin: ThreeWP Broadcast] Broadcast to newly created blogs?just the following…Looks like the script timeouts. I increased it to 2 mins and it barely got through 1/3 of my posts (probably from the images). I can temporarily increase the timeout by putting
set_time_limit(300); in the function that runs the loop right? I’m trying to avoid making the whole site have a timeout of 5 minutes long.[Tue Oct 02 17:53:05 2012] [error] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /usr/www/virtual/username/www.domain.com/wp-includes/media.php on line 435, referer: https://www.domain.com/wp-admin/network/site-new.php
Forum: Plugins
In reply to: [Broadcast] [Plugin: ThreeWP Broadcast] Broadcast to newly created blogs?Well, the two things needed for the loop is just $post->ID and $blog_id right? If that’s the case, both are outputting the correct information.
Is there anything in the function you wrote to be placed in the class that would be custom to your setup (besides masterblogid which I changed)? I’m using the latest version of WPMU and WP
Forum: Plugins
In reply to: [Broadcast] [Plugin: ThreeWP Broadcast] Broadcast to newly created blogs?$posts_ids is returning an array of post ids. I found an error with the sql statement which I’ve fixed and now it seems to take a bit longer to add a site but it does not seem to add any posts.
I’ve replaced all occurences of MASTERBLOGID in both functions.
Forum: Plugins
In reply to: [Broadcast] [Plugin: ThreeWP Broadcast] Broadcast to newly created blogs?Awesome. No more errors but the posts don’t seem to be broadcasted when I make a new site. Any ideas? The only thing I modified was adding your function next to the save_post() function and adding the edited function above that I pasted into my theme functions.php file.
I also echoed $blog_id and it outputted the newest blog_id (I was worried I set it up wrong). Did I hook it into the right function?
Forum: Plugins
In reply to: [Broadcast] [Plugin: ThreeWP Broadcast] Broadcast to newly created blogs?Weird, i’ve put this code in my functions.php in my theme folder
function pull_content_from_master_blog($blog_id, $user_id, $domain, $path, $site_id, $meta) { switch_to_blog( 1 ); $sql = ' SELECT ID FROM ' . $wpdb->base_prefix . '_posts WHERE post_type IN ("post","page","articles","videos") '; $post_ids = $wpdb->get_results( $sql ); foreach ( $post_ids as $post ) { $broadcast = new ThreeWP_Broadcast; $error = $broadcast->CMHL_save_post($post->ID,$blog_id); } restore_current_blog(); } add_action( 'wpmu_new_blog', 'pull_content_from_master_blog' );
adding the other post types and altering the sql query (everything is pulled from the first site which i noticed isn’t formatted like wp1_posts but I get the following error when I try to make a new site
PHP Fatal error: Call to a member function get_results() on a non-object in /usr/www/virtual/username/www.domain.com/wp-content/themes/v2/functions.php on line 377, referer: https://www.domain.com/wp-admin/network/site-new.php
Any thoughts? Sorry, I’m a bit new with WP hooks