Widget bullet fix
-
Hi Authors,
a small enhancement request:
I am using events manager with the suffusion theme, and I need to remove the bullets added by the
<ul> <li>
code of the widget.The best way I have been able to fix this, is to add a simple div statement to the em_events.php (widget folder), and then use custom include css (from suffusin theme) to remove the bullets:
.em_event_widget ul li {background-image:none !important;}
The change it looks like this: Before, After
The code change to em_events.php is below, and I hope you can add this (or something similar we can hook into – I believe it is easy and low risk ?? :
$events = EM_Events::get(apply_filters('em_widget_events_get_args',$instance)); //Hook enabling css formatting of eventlist widget echo "<div class='em_event_widget'>"; echo " <ul>"; $li_wrap = !preg_match('/^ <li>/i', trim($instance['format'])); if ( count($events) > 0 ){ foreach($events as $event){ if( $li_wrap ){ echo '</li> <li>'. $event->output($instance['format']) .'</li> '; }else{ echo $event->output($instance['format']); } } }else{ echo ' <li>'.$instance['no_events_text'].'</li> '; } if ( !empty($instance['all_events']) ){ $events_link = (!empty($instance['all_events_text'])) ? em_get_link($instance['all_events_text']) : em_get_link(__('all events','dbem')); echo '<li class="all-events-link">'.$events_link.''; } echo "</ul> "; //End hook enabling css formatting of eventlist widget echo "</div>"; echo $args['after_widget'];
Then I use this code to build the widget list:
<table> <tr> <td> <div style= "border: 1px solid #c2c2c2; border-top-color: #ffffff; border-radius: 5px; overflow: hidden; color: #525252; float: left; font-weight: normal; background-color: #f9f9f9; background-repeat: no-repeat; line-height: 1.2em; margin: 0px 0px; text-align: center; width: 3.5em; font-size: 11px; "> <div style= "background: #617284; text-transform: uppercase; color: #ffffff; "> #D</div> <div style= "padding: 0.2em 0 0.1em !important; font-size: 12px; font-weight: bold; "> #j</div> <div style=" line-height: 1.2em;"> #M</div> </div> </td> <td style="padding=1px 5px">#_EVENTLINK@#_LOCATIONNAME </br> </td> </tr> </table>
- The topic ‘Widget bullet fix’ is closed to new replies.