Skip to content

Commit

Permalink
First preview for Padre
Browse files Browse the repository at this point in the history
  • Loading branch information
amontenegro committed Jan 2, 2012
1 parent ce47e07 commit 4a2f2a3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
4 changes: 1 addition & 3 deletions wp-content/themes/Grace/archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post() ?>




<div id="post-<?php the_ID(); ?>" class="posts clearfix page">
<div class="post_top">
Expand Down Expand Up @@ -76,7 +74,7 @@


<?php if ( get_post_meta($post->ID,'image', true) ) { ?>
<div class="post_img clearfix"> <img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo get_post_meta($post->ID, "image", $single = true); ?>&amp;w=300&amp;zc=1&amp;q=80<?php echo $thumb_url;?>" alt="<?php the_title(); ?>" />
<div class="post_img clearfix"> <img src="<?php echo get_post_meta($post->ID, "image", $single = true); ?>" alt="<?php the_title(); ?>" width="100" />
</div>
<?php } ?>

Expand Down
13 changes: 8 additions & 5 deletions wp-content/themes/Grace/library/functions/rs-event.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
"date_format" => "jS M y",
"time_format" => "H:i",
"time_separator"=> "at ", // 0.9.6: from Nudnik - Separator between date and time - trailing space reccommended
"event_html" => "<a href='%URL%'>%TITLE%</a><span>%DATE% %TIME%</span>",
"event_html" => "<a href='%URL%'>%TITLE%</a>",
"max_events" => "4",
"group_by_date" => 0,
"no_events_msg" => "No upcoming events.",
"no_events_msg" => "No hay eventos registrados.",
"sort_order" => "ASC",
"category" => 0,
);
Expand Down Expand Up @@ -244,7 +244,7 @@ function rs_event_list($args = array())
$lower_time = floor($lower_time / 86400) * 86400;
$upper_time = floor($upper_time / 86400) * 86400;

$where_category_clause = (0 == $category) ? '' : 'AND cats.term_taxonomy_id = '.$wpdb->escape(stripslashes($category)); // 0.9.6: from LivingOS - Allow for WP 2.3
$where_category_clause = (0 == $values["category"]) ? '' : 'AND cats.term_taxonomy_id = '.$wpdb->escape(stripslashes($category)); // 0.9.6: from LivingOS - Allow for WP 2.3

/*** Modified in 0.6.3 - only select published posts ***/
/*** 0.9 - don't show postdated posts, grab excerpt, DISTINCT modifier if no category restriction ***/
Expand Down Expand Up @@ -288,7 +288,7 @@ function rs_event_list($args = array())
$output_array = array();

/*** If the query has returned an array, do stuff */
if(is_array($event_list))
if(is_array($event_list) && sizeof($event_list) > 0)
{
/*** To store previous dates if we have $group_by_date turned on */
$previous_date = false;
Expand Down Expand Up @@ -364,7 +364,7 @@ function rs_event_list($args = array())
}
}
/*** If no array returned, say nothing */
else { $output_array[] = $no_events_msg; }
else { $output_array[] = $rs_event_defaults["no_events_msg"]; }

/*** Now output the array */
echo "<ul><li>".implode("</li><li>", $output_array)."</li></ul>";
Expand All @@ -373,6 +373,9 @@ function rs_event_list($args = array())






/*** WIDGET FUNCTIONS *****************************************************/

function widget_rs_event_init()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,9 @@ function widget($args, $instance) {
<li class="clearfix">

<?php if ( get_post_meta($post->ID,'image', true) ) { ?>
<a class="widget-title" href="<?php the_permalink(); ?>"> <img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo get_post_meta($post->ID, "image", $single = true); ?>&amp;h=58&amp;w=58&amp;zc=1&amp;q=80<?php echo $thumb_url;?>" alt="<?php the_title(); ?>" /></a>
<a class="widget-title" href="<?php the_permalink(); ?>">
<img src="<?php echo get_post_meta($post->ID, "image", $single = true); ?>" alt="<?php the_title(); ?>" height="60" width="60"/>
</a>
<?php } ?>

<h4><a class="widget-title" href="<?php the_permalink(); ?>"><?php the_title(); ?> </a> </h4>
Expand Down

0 comments on commit 4a2f2a3

Please sign in to comment.