Title: isay's Replies | WordPress.org

---

# isay

  [  ](https://wordpress.org/support/users/isay/)

 *   [Profile](https://wordpress.org/support/users/isay/)
 *   [Topics Started](https://wordpress.org/support/users/isay/topics/)
 *   [Replies Created](https://wordpress.org/support/users/isay/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/isay/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/isay/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/isay/engagements/)
 *   [Favorites](https://wordpress.org/support/users/isay/favorites/)

 Search replies:

## Forum Replies Created

Viewing 14 replies - 1 through 14 (of 14 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] private shopping room?](https://wordpress.org/support/topic/private-shopping-room/)
 *  Thread Starter [isay](https://wordpress.org/support/users/isay/)
 * (@isay)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/private-shopping-room/#post-3644200)
 * Ok, alright I’ll try that..
 * I might have several different “shopping rooms” but perhaps I can try this out
   with User Group / User Access Manager plugin…
 * Regards,
    Mike
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W3 Total Cache] [Plugin: W3 Total Cache] Trigger upload image to CDN?](https://wordpress.org/support/topic/plugin-w3-total-cache-trigger-upload-image-to-cdn/)
 *  Thread Starter [isay](https://wordpress.org/support/users/isay/)
 * (@isay)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-trigger-upload-image-to-cdn/#post-3038797)
 * I got this to work finally! I made a “manual” forced upload of the attachment
   images…
 * This is the code I added to the **private function copy_attachment( $attachment_data,
   $post_id)** function located in ThreeWP_Broadcast.php near the end just after**
   wp_update_attachment_metadata( $attach_id, $attach_data )** and before the last
   row **return $attach_id**:
 *     ```
       /*
       			Start add by MS
       			Upload images to Amazon CDN
       		*/
   
       		if ( defined( 'W3TC_LIB_W3_DIR' ) ) {
       			require_once W3TC_LIB_W3_DIR . '/Plugin/Cdn.php';
       			$w3_plugin_cdn =& w3_instance('W3_Plugin_CdnCommon');
       			$upload_info = w3_upload_info();
   
       			$local_file = $upload_dir['path'] . '/' . $attachment_data->filename_base();
       			$remote_file = ltrim($upload_dir['path'] . '/' . $attachment_data->filename_base(), '/');
   
       			// Remove "wp-content/blogs.dir/5/" from the image path in remote file
       			$remove_prefix_to_path = ltrim($upload_dir['basedir'], '/');
       			$remove_prefix_to_path = str_replace ( 'files', '' , $remove_prefix_to_path);
       			$remove_prefix_to_path = str_replace ( 'uploads', '' , $remove_prefix_to_path);
       			$remote_file = str_replace ( $remove_prefix_to_path, '' , $remote_file);
   
       			$all_image_sizes = get_intermediate_image_sizes();
       			if ($w3_plugin_cdn) {
   
       				// Add original size image
       				$files = array(
       					// local_file1	=> remote_file1,
       					$local_file 		=> $remote_file,
       					);
   
       				// Add all other sizes of images
       				$i = 0;
       				$all_files = $attachment_data->file_metadata();
       				foreach ($all_image_sizes as $size) {
       					$i++;
       					//echo '<p>File '.$i.': '.$all_files["sizes"][$size]["file"].'</p>';
       					if (count($all_files["sizes"][$size]["file"]) > 0)
       						$files[
       							str_replace (
       								$attachment_data->filename_base() ,
       								$all_files["sizes"][$size]["file"] ,
       								$local_file )
       						] = str_replace (
       										$attachment_data->filename_base() ,
       										$all_files["sizes"][$size]["file"] ,
       										$remote_file );
   
       				}
   
       		    $results = array();
       		    $w3_plugin_cdn->upload($files, false, $results);
       		    $response = array(
       		        'results' => $results
       		    );
       				/* //DEBUG
       				if ($post_id == 1374) {
       					echo '<p>response = ';
       					print_r($response);
       					echo '</p>';
   
       					echo '<p>files = ';
       					print_r($files);
       					echo '</p>';			
   
       					echo '<p>w3_plugin_cdn = ';
       					print_r($w3_plugin_cdn);
       					echo '</p>';
   
       				}
       				*/
       			}
       		}
       		/*
       			End add by MS
       		*/
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W3 Total Cache] [Plugin: W3 Total Cache] Trigger upload image to CDN?](https://wordpress.org/support/topic/plugin-w3-total-cache-trigger-upload-image-to-cdn/)
 *  Thread Starter [isay](https://wordpress.org/support/users/isay/)
 * (@isay)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-trigger-upload-image-to-cdn/#post-3038735)
 * How can I check if the original thumbnail is uploaded to CDN?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Broadcast] [Plugin: ThreeWP Broadcast] Broadcast CDN attachments](https://wordpress.org/support/topic/plugin-threewp-broadcast-cdn-support-patch/)
 *  [isay](https://wordpress.org/support/users/isay/)
 * (@isay)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-threewp-broadcast-cdn-support-patch/#post-3017509)
 * Hi there flynsarmy!
 * This is nearly exactly what I need to do, only I use the **w3-total-cache** plugin.
   [I described my problem here](http://wordpress.org/support/topic/plugin-w3-total-cache-trigger-upload-image-to-cdn).
 * Any ideas how I do the equivalent of `$attachment_data->post_custom['amazonS3_info']`
   in your code above?
 * Thank you very much for your help!
 * //Mike
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Broadcast] [Plugin: ThreeWP Broadcast] Broadcast from front-end](https://wordpress.org/support/topic/plugin-threewp-broadcast-broadcast-from-front-end/)
 *  Thread Starter [isay](https://wordpress.org/support/users/isay/)
 * (@isay)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-threewp-broadcast-broadcast-from-front-end/#post-2632875)
 * I managed to figure this out…
 * Basically I created a function which trigger on post save:
 *     ```
       add_action('save_post', array(&$this,'save_event'));
   
       function do_the_broadcast($post_id) {
       $_POST['post_type'] = 'event';
       $_POST['broadcast']['link'] = 'link';
       $_POST['broadcast']['taxonomies'] = 'taxonomies';
       $_POST['broadcast']['taxonomies_create'] = 'taxonomies_create';
       $_POST['broadcast']['custom_fields'] = 'custom_fields';
       $broadcast = new ThreeWP_Broadcast();
       remove_action('save_post', array(&$this,'save_event'));
       ..... //Do some updates to the post ....
       $broadcast->save_post( $post_id );
       add_action('save_post', array(&$this,'save_event'));
       }
       ```
   
 * Could I define which target blogs to broadcast to this way?
    E.g. `if ($taxonomy
   == 'x') $_POST['broadcast']['blogs'] = array('blog1', 'blog2', '...'); else $
   _POST['broadcast']['blogs'] = array('blog3', 'blog4', '...');`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Broadcast] [Plugin: ThreeWP Broadcast] Taxonomies](https://wordpress.org/support/topic/plugin-threewp-broadcast-taxonomies/)
 *  Thread Starter [isay](https://wordpress.org/support/users/isay/)
 * (@isay)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-threewp-broadcast-taxonomies/#post-2544566)
 * That’s great!
    Let me know if you’d want some help testing it. Cheers, Mike
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Taxonomy Images] [Plugin: Taxonomy Images] Add image via API](https://wordpress.org/support/topic/plugin-taxonomy-images-add-image-via-api/)
 *  Thread Starter [isay](https://wordpress.org/support/users/isay/)
 * (@isay)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-taxonomy-images-add-image-via-api/#post-2377314)
 * Ok, the following worked to get the image:
 *     ```
       $images = get_option('taxonomy_image_plugin');
       echo wp_get_attachment_image( $images[$tax_term_id], 'medium' );
       ```
   
 * Now I’m gonna figure out a way to update the image in a similar way…
 * //Mike
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Taxonomy Images] [Plugin: Taxonomy Images] Add image via API](https://wordpress.org/support/topic/plugin-taxonomy-images-add-image-via-api/)
 *  Thread Starter [isay](https://wordpress.org/support/users/isay/)
 * (@isay)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-taxonomy-images-add-image-via-api/#post-2377081)
 * Aha, great!
    …and the image `ID` corresponds to the ID in the posts table. So
   to get the url of the image I execute:
 *     ```
       SELECT  ID, guid
       FROM  wp_posts
       WHERE  ID =  '14536'
       AND  post_type =  'attachment'
       ```
   
 * Ok, I will play around with this.
 * Thanks!
    /Mike
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Pagination problems in archive.php](https://wordpress.org/support/topic/pagination-problems-in-archivephp/)
 *  Thread Starter [isay](https://wordpress.org/support/users/isay/)
 * (@isay)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/pagination-problems-in-archivephp/#post-2312076)
 * Any hints on this one??
 * If I am on the archives page and click on the link to page 2 it seems as though
   that the query information is lost and I am presented the general posts.php template…
 * In other words, WP seem to forget that I was in the archive view…
 * Any help is appreciated!
 * //Mike
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Taxonomy Images] list taxonomy categries with Images](https://wordpress.org/support/topic/list-taxonomy-categries-with-images/)
 *  [isay](https://wordpress.org/support/users/isay/)
 * (@isay)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/list-taxonomy-categries-with-images/#post-2072987)
 * I need the above functionality in a plugin which lists sub-taxonomies..
 * Thank you for help!
 * //Mike
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Taxonomy Images] list taxonomy categries with Images](https://wordpress.org/support/topic/list-taxonomy-categries-with-images/)
 *  [isay](https://wordpress.org/support/users/isay/)
 * (@isay)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/list-taxonomy-categries-with-images/#post-2072986)
 * Any inputs in looping through the categories and outputing the thumbnails.
 * e.g. something similar to:
 *     ```
       foreach ($terms as $s => $term) {
            // Print the term image
            echo $term->name;
       }
       ```
   
 * Chhers,
    Mike
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Pagination problems in archive.php](https://wordpress.org/support/topic/pagination-problems-in-archivephp/)
 *  Thread Starter [isay](https://wordpress.org/support/users/isay/)
 * (@isay)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/pagination-problems-in-archivephp/#post-2311990)
 * Ok, I posted my archives.php and pagination.php into pastebin….
 * archive.php: [http://pastebin.com/9gTbXBTH](http://pastebin.com/9gTbXBTH)
    pagination.
   php: [http://pastebin.com/fNpdguPe](http://pastebin.com/fNpdguPe)
 * Thanks really much guys if you would take a look at this!
 * I really appreciate it…
 * //Mike
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Pagination problems in archive.php](https://wordpress.org/support/topic/pagination-problems-in-archivephp/)
 *  Thread Starter [isay](https://wordpress.org/support/users/isay/)
 * (@isay)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/pagination-problems-in-archivephp/#post-2311903)
 * Still 404…
 * Sorry, something fell off when I pasted into the post…
    my archives.php code 
   says `$all_posts_in_cat = new WP_Query($args);` instead of just `WP_Query($args);`
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Pagination problems in archive.php](https://wordpress.org/support/topic/pagination-problems-in-archivephp/)
 *  Thread Starter [isay](https://wordpress.org/support/users/isay/)
 * (@isay)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/pagination-problems-in-archivephp/#post-2311872)
 * Still the “ERROR 404 – NOT FOUND”…
 * When reading about the [WP_Query](http://codex.wordpress.org/Class_Reference/WP_Query)
   it’s a bit cryptic:
 * > Pagination Note: You should set get_query_var( ‘page’ ); if you want your query
   > to work with pagination. Since WordPress 3.0.2, you do get_query_var( ‘page’)
   > instead of get_query_var( ‘paged’ ). The pagination parameter ‘paged’ for WP_Query()
   > remains the same.
 * I’ve tried a few options but still get the 404…

Viewing 14 replies - 1 through 14 (of 14 total)