GithubHelp home page GithubHelp logo

mibuthu / wp-event-list Goto Github PK

View Code? Open in Web Editor NEW
37.0 37.0 27.0 8.02 MB

Wordpress Plugin to show a small amount of events in an easy to use calender/schedule

Home Page: https://wordpress.org/plugins/event-list/

Shell 2.40% CSS 1.51% PHP 94.67% JavaScript 1.41%
event-management php wordpress-plugin

wp-event-list's People

Contributors

chunsen1 avatar clhunsen avatar edit4ever avatar grosshirn avatar mibuthu avatar ramiy avatar sbaeder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

wp-event-list's Issues

instead of link to post

i changed the event-list/php/sc_event-list.php
So that in the list view the details are not showing up , only title, date and place.
When clicked the full post is visible, with details (info which was put in postfield)

here it is, try it out

array( 'val' => 'upcoming
year e.g. "2012"', 'std_val' => 'upcoming', 'desc' => 'This attribute specifies which events are listed after the site is shown. The standard is to show the upcoming events.
Specify a year e.g. "2012" to change this.' ) ); // main function to show the rendered HTML output public static function show_html( $atts ) { // check attributes $std_values = array(); foreach( self::$attr as $aname => $attribute ) { $std_values[$aname] = $attribute['std_val']; } $a = shortcode_atts( $std_values, $atts ); if( isset( $_GET['event_id'] ) ) { $out = self::html_event_details( $_GET['event_id'] ); } else { $out = self::html_events( $a ); } return $out; } private static function html_event_details( $event_id ) { $event = el_db::get_event( $event_id ); $out = el_db::html_calendar_nav(); $out .= '
    '; $out .= self::html_event( $event ); $out .= '
'; return $out; } private static function html_events( $a ) { // specify visible events if( isset( $_GET['ytd'] ) ) { $events = el_db::get_events( $_GET['ytd'] ); } elseif( $a['initial_date'] !== 'upcoming' ) { $events = el_db::get_events( $a['initial_date'] ); } else { $events = el_db::get_events( 'upcoming' ); } $out = ''; // TODO: add rss feed // if ($mfgigcal_settings['rss']) { // (get_option('permalink_structure')) ? $feed_link = "/feed/events" : $feed_link = "/?feed=events"; // $out .= "RSS"; // } // generate output $out .= el_db::html_calendar_nav(); // TODO: Setting missing if( empty( $events ) /*&& $mfgigcal_settings['no-events'] == "text"*/ ) { $out .= "

" . 'no event' /*$mfgigcal_settings['message'] */. "

"; return $out; } /* else if (empty($events)) { $this_year = date("Y"); // show the current year $sql = "SELECT * FROM $mfgigcal_table WHERE (end_date >= '$this_year-01-01' AND start_date <= '$this_year-12-31') ORDER BY start_date ASC"; $events = $wpdb->get_results($sql); if (empty($events)) { $out .= "

" . $mfgigcal_settings['message'] . "

"; return $out; } } */ else { $url = '?'; if( !get_option( 'permalink_structure' ) ) { foreach( $_GET as $k => $v ) { if( $k != 'ytd' && $k != 'event_id' ) { $url .= $k . "=" . $v . "&"; } } } // set html code $out .= '
    '; foreach ($events as $event) { $out .= self::html_event_list( $event, $url ); } $out .= '
'; return $out; } return $out; } private static function html_event( $event, $url=false ) { $out = '
  • '; $out .= self::html_fulldate( $event->start_date, $event->end_date ); $out .= '

    '; if( $url ) { $out .= ''.$event->title.''; } else { $out .= $event->title; } $out .= '

    '; if( $event->time != '' ) { $out .= ''.$event->time.''; } $out .= ''.$event->location.''; $out .= ''.$event->details.''; $out .= '
  • '; return $out; } ``` private static function html_event_list( $event, $url=false ) { $out = '
  • '; $out .= self::html_fulldate( $event->start_date, $event->end_date ); $out .= '

    '; if( $url ) { $out .= ''.$event->title.''; } else { $out .= $event->title; } $out .= '

    '; if( $event->time != '' ) { $out .= ''.$event->time.''; } $out .= ''.$event->location.''; $out .= '
  • '; return $out; } ``` private static function html_fulldate( $start_date, $end_date ) { $startArray = explode("-", $start_date); $start_date = mktime(0,0,0,$startArray[1],$startArray[2],$startArray[0]); $endArray = explode("-", $end_date); $end_date = mktime(0,0,0,$endArray[1],$endArray[2],$endArray[0]); $out = ''; if( $start_date == $end_date ) { // one day event $out .= '
    '; $out .= '
    '; $out .= self::html_date( $start_date ); $out .= '
    '; } else { // multi day event $out .= '
    '; $out .= '
    '; $out .= self::html_date( $start_date ); $out .= '
    '; $out .= '
    '; $out .= self::html_date( $end_date ); $out .= '
    '; } $out .= '
    '; return $out; } private static function html_date( $date ) { $out = '
    '.date( 'D', $date ).'
    '; $out .= '
    '.date( 'd', $date ).'
    '; $out .= '
    '.date( 'M', $date ).'
    '; $out .= '
    '.date( 'Y', $date ).'
    '; return $out; } ``` } ?>

    grey background

    This plugin is exactly what I need, thanks! In your screenshot you have a white background behind the calendar. It comes in grey on my site but I can't find a setting for that. Probably obvious but can you point it out for me?

    Thanks again for you great work here.

    Categories

    Set different categories of events. Use the wordpress included categories for posts.

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google โค๏ธ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.