Forum Replies Created

Viewing 15 replies - 1 through 15 (of 18 total)
  • OK, I figured this out. Nope, no bucket necessary. All those tutorials talking about uploading files and buckets even though they recommended pull instead of push were smoking something. With pull, your host server is indeed the origin, acting as your “bucket,” and CloudFront works as it always does, holding the distributed temp files in the cloud to serve to people quickly and checking in with the origin to make changes as needed. It’s confusing because people so often use CDN to refer to CloudFront AND s3, but really it’s only CloudFront doing the distributing. S3 = content, or your host server = content, and CloudFront = content distribution, CDN. Get it? It’s also confusing because when CloudFront was born, only an s3 bucket could be a content origin. Now you can obviously specify a custom one.

    It all works automatically; it just takes a little while to deploy.

    I am having this same issue. I see no way to select my bucket as the origin and no way to upload files to my bucket from within the plugin. Anyone?

    s2member does not support any of these payment gateways, although you can program such support yourself if you have the skills (or hire someone to do so).

    I have gotten s2member and Zombaio to work together very well. It involves editing the “ZScript” Zombaio has you install such that it adds/deletes members to your WordPress database at the appropriate s2member membership level instead of using an htaccess file. This requires some programming and database know-how, but it’s not very difficult.

    I do wish there was native support for at least one of these, though. Now that ccBill is being phased out, adult sites can’t use a single one of s2member’s supported payment processors. I feel like my s2member Pro purchase is pretty useless.

    I was able to do this in foogallery pretty easily. As it stands it requires generating one’s own thumbnails/previews before uploading so the full-size image isn’t public, but I might add that functionality later:

    https://ww.wp.xz.cn/support/topic/get-gallery-id-in-a-filter-function?replies=4

    Thread Starter StenCade

    (@stencade)

    I want my thumbnails to come from WordPress’s media library and be public (foogallery’s default behavior) but I want the clicked link to go to a protected fullsize image via Amazon S3/Cloudfront (using the s2member plugin). I saved the path to the full-size Amazon gallery as custom post meta with the foogallery, but I needed the gallery ID to pull it out again within the filter.

    This functionality is possible within the vanilla plugin by adding a custom target link in the image attributes, but I’m not gonna do that for hundreds of photos individually! So I filtered the link output.

    I’ll probably wrap all this up in a proper plugin eventually, but for now I just needed it to work. And it does now! 🙂

    function protected_img_urls($attr) {
                global $current_foogallery;
                $gallery_id = $current_foogallery->ID;
                $protectedpath = trim(get_post_meta( $gallery_id, 'protected_img_url', true ));
                $lastchar = substr($protectedpath, -1);
                if($lastchar != "/") {
                        $protectedpath .= "/";
                    }
                $img_path = $attr['href'];
                //explode with '/' and take only last section.
                $pieces = explode("/", $img_path);
                $img_path = end($pieces);
                $attr['href'] = get_site_url()."/?s2member_file_download=".$protectedpath.$img_path."&s2member_skip_confirmation";
                return $attr;
            }
        add_filter( 'foogallery_attachment_html_link_attributes', 'protected_img_urls' );
        }
    Thread Starter StenCade

    (@stencade)

    I figured it out:

    global $current_foogallery;
    $gallery_id = $current_foogallery->ID;

    Just chiming in to say I would LOVE this feature.

    Hi there, Courtney. You know and hate my wife. Small world!

    I found a solution to your problem when I first built Lily’s site back in 2011. I have since deleted the plugin because I’m working on figuring out a better solution (hence my finding this post), so I can’t tell you exactly what I did, but I remember it involved putting all galleries into an album, displaying the album on a public page, but protecting all of the individual gallery pages (the one set with the “Page Link To” dropdown menu), doing whatever gallery managing i needed to do, then moving the files to a protected location and changing the gallery path to that protected location (which meant nextgen itself could no longer display the thumbnails), and then coming up with some display code that bypassed my protections and displayed thumbnails anyway on the public album page. I don’t know if this would work with the current version of Nextgen, however.

    I use s2member for member management and protection and have been incredibly happy with it. It made the above easy to do, although it took me a while to figure out, and obviously uploading galleries remained a real PITA. Setting galleries and thumbnails to be in separate locations is really something Nextgen Gallery should look into implementing.

    I also made a custom post type for gallery *pages* (as opposed to nextgen galleries) and came up with a function that listed only that post type in the “Page Link To” dropdown, which made things a little easier. This was in my functions.php file. Again, I cannot vouch for whether or not it still works in current versions, but in case it is helpful to someone, here it is:

    //NextGEN Custom "Page Link To" Dropdown Menu
    function ngg_dropdown_posts( $default = 0 ) {
    	global $wpdb, $post_ID;
    	$items = $wpdb->get_results( $wpdb->prepare("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'galleries' AND post_status != 'trash' ORDER BY menu_order") );
    
    	if ( $items ) {
    		foreach ( $items as $item ) {
    			if (!empty ( $post_ID ) ) {
    				if ( $item->ID == $post_ID ) {
    					continue;
    				}
    			}
    			if ( $item->ID == $default)
    				$current = ' selected="selected"';
    			else
    				$current = '';
    
    			echo "\n\t<option class='level-0' value='$item->ID'$current> " . esc_html($item->post_title) . "</option>";
    		}
    	} else {
    		return false;
    	}
    }
    Thread Starter StenCade

    (@stencade)

    I should add that s2member successfully created 2 CloudFront distrobutions and an Origin Access Identity, but it’s still marked as NOT configured in the plugin and streaming still doesn’t work (and attempting to configure cloudfront breaks the simple s3-only download links that previously worked), even after waiting for those distros to fully deploy.

    Not an ideal fix since it will disappear upon updating the plugin, but you can fix the SEO Ultimate problem but going into the more-links.php file and on line 41 change

    $newtext = str_replace('{post}', su_esc_html(get_the_title()), $newtext);
    to
    $newtext = str_replace('{post}', get_the_title(), $newtext);

    Alternatively, if you don’t mind not having the post title in the more link, you can go into SEO Ultimate’s Misc options and just change the More Link Customizer to something that doesn’t have “{post}” in it.

    Sorry, ‘videos’ and ‘galleries’ are MY custom post types there, and there’s sometimes an error with nav menus if you don’t include ‘nav_menu_item’. Replace with any/all of your own custom post types (you can just keep listing them ad infinitum).

    I tried all the permalink solutions that anyone has suggested. This is what FINALLY fixed it for me:

    I installed the “WCS Custom Permalinks Hotfix.” Which fixed *part* of the problem. But my “custom post type” tags still weren’t working and also weren’t showing up in searches. Eventually I found this bit of code:

    add_filter('pre_get_posts', 'query_post_type');
    function query_post_type($query) {
      if(is_category() || is_tag()) {
        $post_type = get_query_var('post_type');
    	if($post_type)
    	    $post_type = $post_type;
    	else
    	    $post_type = array('post','videos', 'galleries', 'nav_menu_item'); // replace cpt to your custom post type
        $query->set('post_type',$post_type);
    	return $query;
        }
    }

    from this thread. Now everything’s working great!

    Thread Starter StenCade

    (@stencade)

    Alright figured it out. Shutter Reloaded and Thickbox are both incompatible with the latest version of WordPress (3.1.3)!! I used the Lightbox 3 plugin and switched to Lightbox in the Effects options and now everything’s working. You should really switch to effects that have updated support to save someone else this headache!

    Thread Starter StenCade

    (@stencade)

    After talking with s2member support, it seems this is definately a problem on NextGEN’s side of things. My guess would be that the effects are unable to read the filetype for whatever reason.

    I really need some help here. 🙁

    I’m having this problem too. A lot of people seem to be having it. There must be a solution!!

    All my tags lead to a 404. I’ve tried updating permalinks, deleting and rebuilding the .htaccess file, switching to default theme. Nothing helps.

Viewing 15 replies - 1 through 15 (of 18 total)