Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter msbrauer

    (@msbrauer)

    Hey JS,

    That seems to have fixed the issue. Thanks for keeping up your plugin!

    Thread Starter msbrauer

    (@msbrauer)

    Well, I’ve fixed it. Better WP Security left some code in the .htaccess and when I removed that, it was fine.

    The culprit seems to be the wp-tweet-button plugin.

    Thread Starter msbrauer

    (@msbrauer)

    I deactivated one plugin (Better WP Security, I think) and now the entire site is inaccessible. Renaming the plugin folder did not solve the issue. The entire site now returns a 103 error.

    I should say that that file starts very close to line 778 in wp-admin/includes/media.php . I say it starts close to that line because I’ve changed that file a little bit, so it might not be an exact line number.

    I managed to solve the problem by deleting the following flash code from the file wp-admin\includes\media.php:

    <?php if ( $flash ) : ?>
    <script type="text/javascript">
    <!--
    jQuery(function($){
    	swfu = new SWFUpload({
    			upload_url : "<?php echo attribute_escape( $flash_action_url ); ?>",
    			flash_url : "<?php echo get_option('siteurl').'/wp-includes/js/swfupload/swfupload_f9.swf'; ?>",
    			file_post_name: "async-upload",
    			file_types: "<?php echo apply_filters('upload_file_glob', '*.*'); ?>",
    			post_params : {
    				"post_id" : "<?php echo $post_id; ?>",
    				"auth_cookie" : "<?php echo $_COOKIE[AUTH_COOKIE]; ?>",
    				"type" : "<?php echo $type; ?>",
    				"tab" : "<?php echo $tab; ?>",
    				"short" : "1"
    			},
    			file_size_limit : "<?php echo wp_max_upload_size(); ?>b",
    			swfupload_element_id : "flash-upload-ui", // id of the element displayed when swfupload is available
    			degraded_element_id : "html-upload-ui",   // when swfupload is unavailable
    			file_dialog_start_handler : fileDialogStart,
    			file_queued_handler : fileQueued,
    			upload_start_handler : uploadStart,
    			upload_progress_handler : uploadProgress,
    			upload_error_handler : uploadError,
    			upload_success_handler : uploadSuccess,
    			upload_complete_handler : uploadComplete,
    			file_queue_error_handler : fileQueueError,
    			file_dialog_complete_handler : fileDialogComplete,
    
    			debug: false
    		});
    	$("#flash-browse-button").bind( "click", function(){swfu.selectFiles();});
    });
    //-->
    </script>
    
    <div id="flash-upload-ui">
    	<p><input id="flash-browse-button" type="button" value="<?php echo attribute_escape( __( 'Choose files to upload' ) ); ?>" class="button" /></p>
    	<p><?php _e('After a file has been uploaded, you can add titles and descriptions.'); ?></p>
    </div>
    
    <?php endif; // $flash ?>

    I’m not sure if it’s a good solution, but it seems to work after a few tests.

    I’m trying to figure this out, too. Did you find a solution?

    I spent quite a bit of time trying to find out how to do this. Seems like a lot of people want this functionality, but it’s hard to find anyone that’s done it. What worked for me is to modify the code here.

    And use $attachment->post_content to get the description. The full block of code that worked for me on my archive.php is

    <?php
    
    $args = array(
    	'post_type' => 'attachment',
    	'numberposts' => null,
    	'post_status' => null,
    	'post_parent' => $post->ID
    	);
    $attachments = get_posts($args);
    if ($attachments) {
    	foreach ($attachments as $attachment) {
    		echo $attachment->post_content;
    
    	}
    }
    
    ?>

    Hope that helps

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