Plugin Directory

Changeset 2899305


Ignore:
Timestamp:
04/14/2023 09:08:09 PM (3 years ago)
Author:
christer_f
Message:

Added thumnail paameter to the hello-event-list shortcode

Location:
hello-event/trunk
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • hello-event/trunk/hello_event.php

    r2874382 r2899305  
    1313 * Author URI:   https://www.tekomatik.com/about
    1414 *
    15  * Version:      1.3.8
     15 * Version:      1.3.10
    1616 *
    1717 * Text Domain:  hello-event
     
    858858 
    859859  function simple_excerpt($html) {
    860       return substr(strip_tags($html), 0, 150) . '...';
     860    return substr(strip_tags($html), 0, 150) . '...';
    861861  }
    862862 
     
    880880    $excerpt = apply_filters('hello_event_excerpt_from_category', $excerpt, $post);
    881881    // debug_log("SECOND TRY Event: $event_id ; Excerpt: $excerpt");
     882    $excerpt = apply_filters('translate_text', $excerpt , $locale) ; 
    882883    // 3) If still empty then create one from the content
    883884    if ($excerpt == '') {
     
    885886      $content = apply_filters('hello_event_content_from_category', $content);
    886887      $content = apply_shortcodes($content);
     888        $content = apply_filters('translate_text', $content , $locale) ; 
    887889      $content = str_replace(']]>', ']]>', $content);
    888       // debug_log("CONTENT for event$event_id; $content");
    889890      $excerpt = $this->simple_excerpt($content);
    890891    }
    891     $excerpt = apply_filters('translate_text', $excerpt , $locale) ; 
    892892    return $excerpt;
    893893  }
  • hello-event/trunk/includes/css/frontend-list.css

    r2874382 r2899305  
    206206  vertical-align: top;
    207207  float: left;
     208  font-size: 1.4em;
     209  line-height: 1.2em;
    208210  width: 50%;
    209211}
    210 /* line 73, ../sass/frontend-list.scss */
     212/* line 75, ../sass/frontend-list.scss */
    211213div.hello-event.style1 div.intro div.thumbnail {
    212214  clear: both;
    213215}
    214216
    215 /* line 77, ../sass/frontend-list.scss */
     217/* line 79, ../sass/frontend-list.scss */
     218div.thumbnail.square img {
     219  width: 100%;
     220  object-fit: cover;
     221  aspect-ratio: 1/1;
     222}
     223
     224/* line 87, ../sass/frontend-list.scss */
     225div.thumbnail.round img {
     226  border-radius: 50%;
     227}
     228
     229/* line 93, ../sass/frontend-list.scss */
    216230div.hello-event.style1.compact div.event-date {
    217231  font-size: 0.6em;
    218232}
    219 /* line 78, ../sass/frontend-list.scss */
     233/* line 94, ../sass/frontend-list.scss */
    220234div.hello-event.style1.compact div.description {
    221235  font-size: 0.9em;
     
    223237  text-align: left;
    224238}
    225 /* line 80, ../sass/frontend-list.scss */
     239/* line 96, ../sass/frontend-list.scss */
    226240div.hello-event.style1.compact div.description div.excerpt {
    227241  margin-top: 1em;
    228242}
    229 /* line 83, ../sass/frontend-list.scss */
     243/* line 99, ../sass/frontend-list.scss */
    230244div.hello-event.style1.compact div.intro div.title {
    231245  display: inline-block;
     
    237251  width: 40%;
    238252}
    239 /* line 92, ../sass/frontend-list.scss */
     253/* line 108, ../sass/frontend-list.scss */
    240254div.hello-event.style1.compact div.intro div.thumbnail {
    241255  display: inline-block;
     
    245259}
    246260
    247 /* line 106, ../sass/frontend-list.scss */
     261/* line 121, ../sass/frontend-list.scss */
    248262div.hello-event.style1 div.description {
    249263  padding: 1em;
    250264}
    251265
    252 /* line 107, ../sass/frontend-list.scss */
     266/* line 122, ../sass/frontend-list.scss */
    253267div.hello-event.style1 div.description div.title {
    254268  font-size: 2em;
     
    258272}
    259273
    260 /* line 109, ../sass/frontend-list.scss */
     274/* line 124, ../sass/frontend-list.scss */
    261275div.hello-event.style1 div.description div.time {
    262276  color: #666;
     
    266280}
    267281
    268 /* line 110, ../sass/frontend-list.scss */
     282/* line 125, ../sass/frontend-list.scss */
    269283div.hello-event.style1 div.description div.time::before {
    270   font-family: "dashicons";
    271   content: "\f469";
     284  font-family: "Font Awesome\ 5 Free";
     285  content: "\f017";
    272286  /* clock icon */
    273287  display: inline-block;
     
    275289  vertical-align: top;
    276290  text-align: left;
    277   font-size: 1em;
    278 }
    279 
    280 /* line 122, ../sass/frontend-list.scss */
     291}
     292
     293/* line 134, ../sass/frontend-list.scss */
    281294div.hello-event.style1 div.description div.location {
    282295  color: #666;
    283296}
    284297
    285 /* line 123, ../sass/frontend-list.scss */
     298/* line 135, ../sass/frontend-list.scss */
    286299div.hello-event.style1 div.description div.location::before {
    287300  font-family: "Font Awesome\ 5 Free";
     
    291304  padding-right: 3px;
    292305  vertical-align: top;
    293   font-size: 1em;
    294 }
    295 
    296 /* line 134, ../sass/frontend-list.scss */
     306}
     307
     308/* line 143, ../sass/frontend-list.scss */
    297309div.hello-event.style1 div.description div.date {
    298310  color: #888;
     
    300312}
    301313
    302 /* line 135, ../sass/frontend-list.scss */
     314/* line 144, ../sass/frontend-list.scss */
    303315div.hello-event.style1 div.description div.date::before {
    304316  font-family: "Font Awesome\ 5 Free";
  • hello-event/trunk/includes/hello-event-list-events.php

    r2874382 r2899305  
    3939           'link_to_book' => false, // Do we want to display a "Book Now" button?
    4040           'language' => false, // Can be used in date presentations
     41                     'thumbnail' => "", // can be 'square', 'round' or both (sepaated by space)
    4142             
    4243       ), $args0 );
     
    238239            $html .= "
    239240            <div class='hello-event style1 list gallery " . $event_type_class ."'>
    240               <div class='thumbnail'>" . get_the_post_thumbnail() . "</div>
     241              <div class='thumbnail ".$args['thumbnail']."'>" . get_the_post_thumbnail() . "</div>
    241242              $g_title
    242243              $g_dates
     
    264265                  </a>
    265266                </div>
    266                 <div class='thumbnail'>" . get_the_post_thumbnail() . "</div>
     267                <div class='thumbnail ".$args['thumbnail']."'>" . get_the_post_thumbnail() . "</div>
    267268                $start_time_string
    268269                <div class='location'>
     
    290291                    </a>
    291292                  </div>
    292                   <div class='thumbnail'>" . get_the_post_thumbnail($id, 'hello-event-widget-image') . "</div>
     293                  <div class='thumbnail ".$args['thumbnail']."'>" . get_the_post_thumbnail($id, 'hello-event-widget-image') . "</div>
    293294                </div>
    294295                <div class='description'>
     
    318319                    </a>
    319320                  </div>
    320                   <div class='thumbnail'>" . get_the_post_thumbnail($id, 'hello-event-widget-image') . "</div>
     321                  <div class='thumbnail ".$args['thumbnail']."'>" . get_the_post_thumbnail($id, 'hello-event-widget-image') . "</div>
    321322                </div>
    322323                <div class='description'>
  • hello-event/trunk/includes/sass/frontend-list.scss

    r2873773 r2899305  
    7676}
    7777
     78div.thumbnail.square {
     79    img {
     80     width: 100%;
     81     object-fit: cover;
     82         aspect-ratio: 1/1;
     83     }
     84}
     85
     86div.thumbnail.round {
     87    img {   border-radius: 50%;}
     88}
     89
     90
     91
    7892div.hello-event.style1.compact {
    7993  div.event-date {font-size:0.6em;}
     
    96110      text-align:center;
    97111      vertical-align:top;
    98       width:40%;
    99 
     112      width:40%;   
    100113    }
    101114  }
  • hello-event/trunk/readme.txt

    r2874382 r2899305  
    7272== Changelog ==
    7373
     74= 1.3.10
     75* Added thumbnail parameter to the shortcode 'hello-event-list' making it possible to force the thumbails to be square or/and round
     76= 1.3.9
     77* Fixed the translation of excerpts generated from the description text.
    7478= 1.3.8 =
    7579* Better generation of excerpts, including the possibility to support event categories (these are not defined in this plugin)
Note: See TracChangeset for help on using the changeset viewer.