Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • I was able to solve my issue and just thought I should share, though not directly related. The Media Library handles thumbnail images in a different manner than previous (pre- media library) versions of WordPress, I believe. I imported data into the postmeta table to generate thumbnails, but there is also a plugin available that regenerates thumbnails. Hope someone finds this helpful.

    Thread Starter johnny-b

    (@johnny-b)

    James, this was the information I needed, thank you for responding. I wrote a little script to generate the serialized array and it worked like a charm…that is, thumbnails appeared. I think you are correct, then, that the postmeta table is the determining factor as to whether the thumbnail is shown. Again, thank you for your help, it is appreciated ??

    I have a similar issue. I tried the the Add From Server plugin, but this failed to generate thumbnails for me. Is there a way of tapping into WP’s thumbnail generating fuction (I can’t find it anywhere) to do this? Specifically, I would like to write a little script that queries the posts table for images and then inserts these as ‘attachments’, calling the thumbnail generator for each? Is this possible…does anyone know how? Thanks for reading ??

    I have a similar issue here. I recently upgraded from WP 2.0.x to 2.6.0 and all images uploaded before the upgrade are missing from the Media Library…that is, after the upgrade, the media library was empty. I have since uploaded a number of images, and these all display as expected. But the pre-upgrade images, which are also contained in the wp-content/uploads directory (in their respective month and year based folders), refuse to show in the media library. The old images do, however, show in the appropriate posts. I even tried FTPing all images (no folders) into the uploads directory…and these still do not show, so it appears that they will only show if uploaded from the Write pages.

    These files are set to be stored in the default directory, wp-content/uploads, and I have the full URL path set just for good measure. I know uploads in general have been buggy in 2.6…but this exact issue doesn’t seem so common.

    Any suggestions?

    Have you looked into the Event Calendar EC3 Plugin (wpcal.firetree.net)? It includes an ‘Upcoming Events’ feature. I’m using this plugin and it works well unless you’ve made a lot of modifications to your code.

    Other than that, I can only suggest this chunk of code below. It might not work (I’m kinda new to this), and it is an ugly, inefficient little piece of code…but at least its something. Maybe it will generate some more responses to this thread.

    <?php foreach (get_categories('include=your category here') as $term) : ?>
    
    	         <?php $events_query =
    		   "SELECT distinct DAY(post_date) as Day, MONTH(post_date) as Month, YEAR(post_date) as Year, term_taxonomy_id as Term
                        FROM ($wpdb->posts p left outer join $wpdb->term_relationships r on p.ID = r.object_id)
                        WHERE post_status = 'publish' and term_taxonomy_id =
    		    (SELECT term_taxonomy_id FROM $wpdb->term_taxonomy where term_id = $term->term_id)
    		    and event_date >= CURDATE()
    		    ORDER BY post_date;
    	       ?>
    
    	       <?php $event_days = $wpdb->get_results($events_query); ?>
    
    	       <?php if (!empty($event_days)) : ?>
    
    	         <h2 style="border-bottom:1px #ccc solid;"><a href="<?=get_option('home'); ?>/category/<? echo $term->slug; ?>/"><? echo $term->name; ?></a></h2>
    
    	         <?php foreach ($event_days as $event_day) : ?>
    
    		   <?php $day_query = new WP_Query('cat='.$term->term_id.'&day='.zeroise($event_day->Day, 2).'&monthnum='.zeroise($event_day->Month, 2).'&year='.$event_day->Year.'&posts_per_page=-1'); ?>
    
    		     <?php if ($day_query->have_posts()) : ?>
    
    		     <?php while ($day_query->have_posts()) : $day_query->the_post(); ?>
    
    		       <div class="post" id="post-<?php the_ID(); ?>">
    		         <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
    
                             <small><?php the_time('F j, Y') ?> | <?php the_author() ?> </small>
    		       </div>
    
    		     <?php endwhile; ?>
    
    	           <?php endif; ?>
    
    		 <?php endforeach; ?>
    
    		 <?php else : ?>
    
    		   <h2 style="border-bottom:1px #ccc solid;"><? echo $term->name; ?></h2>
                       <span style="color:gray;">No entries.</span>
    
    		 <?php endif; ?>
    
    	       <?php endforeach; ?>

    In the first line, you should replace ‘you category here’ with the term_id for your events category.

    I too would like to know this. Does query_posts() contaminate the search function?

    My sidebar.php is heavily modified (query_posts is called twice) and the default WP search function doesn’t work as expected. I have done a number of test searches in which I copy text directly from the content of a published post…and it is no where to be found in the search results. It also seems to have more luck finding matches from a year ago than anything recent. Anyway…any thoughts on these issues?

    Thread Starter johnny-b

    (@johnny-b)

    Dagon Design, this is perfect, thank you so much!

    In searching the forum for a solution to this, I did see a few similar requests, so I believe this would be a helpful plugin. I am modifying your code to suit my needs and will post the modified code soon in case it is useful to anybody.

    Thanks again Dagon, mosey, mercime, and anyone else who read this.

    Thread Starter johnny-b

    (@johnny-b)

    Hey everyone. I’m still working on this issue, so any input is greatly appreciated. At this point, I am willing to entertain any thoughts, even if not so relevant…

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