Title: Widget has table names hardcoded
Last modified: August 21, 2016

---

# Widget has table names hardcoded

 *  [Jiju Thomas Mathew](https://wordpress.org/support/users/phptrivandrum/)
 * (@phptrivandrum)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/widget-has-table-names-hardcoded/)
 * 1. events-widget.php (line:53) has table prefix hardcoded, should use $wpdb->
   prefix instead of wp_.
    2. The standard wrappers $before_widget, and $after_widget
   was not used along with an absolute positioning for the widget. 3. events.php(
   line: 49) the menu icon is assumed to be existing in the theme, better distribute
   the icon with the plugin and point it there using plugins_url
 * I had corrected all these on my copy.
 * [https://wordpress.org/plugins/manags-events/](https://wordpress.org/plugins/manags-events/)

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

 *  Thread Starter [Jiju Thomas Mathew](https://wordpress.org/support/users/phptrivandrum/)
 * (@phptrivandrum)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/widget-has-table-names-hardcoded/#post-4572202)
 * Found more bugs in the events-widget.php
 * If have only single day events, those will not be displayed on the calendar widget.
   This is because the range will not satisfy.
 * Modified the code in the events-widget.php
 *     ```
       function get_dates($start, $end)
           {
   
               $startDay = strtotime($start);
               $endDay = strtotime($end);
               $days = ($endDay - $startDay) / (60 * 60 * 24);
               $this->eventsData[] = date("m/d/Y", $startDay);
               for ($i = 1; $i <= $days; $i++) {
                   $this->eventsData[] = date("m/d/Y", $startDay + ($i * 86400));
               }
   
           }
           /*for php 5.3>*/
               function get_dates_5($start,$end){
   
               $begin = new DateTime( $start );
               $end = new DateTime( $end );
   
               $interval = DateInterval::createFromDateString('1 day');
               $period = new DatePeriod($begin, $interval, $end);
               if(empty($period)){
                 $this->eventsData[]= $begin->format( "m/d/Y" );
               }else{
                 foreach ( $period as $dt ){
                   $this->eventsData[]= $dt->format( "m/d/Y" );
                 }
               }
   
           }
       ```
   
 *  Plugin Author [dianuj](https://wordpress.org/support/users/dianuj/)
 * (@dianuj)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/widget-has-table-names-hardcoded/#post-4572471)
 * Hi Jiju Thomas Mathew
 * Thanks for pointing the issues in plugin.Bugs are now fixed and new version is
   released with a new slider feature is added in the plugin

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

The topic ‘Widget has table names hardcoded’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/manags-events_2f1f21.svg)
 * [Events Calendar](https://wordpress.org/plugins/manags-events/)
 * [Support Threads](https://wordpress.org/support/plugin/manags-events/)
 * [Active Topics](https://wordpress.org/support/plugin/manags-events/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/manags-events/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/manags-events/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [dianuj](https://wordpress.org/support/users/dianuj/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/widget-has-table-names-hardcoded/#post-4572471)
 * Status: not resolved