Skip to:
Content
Pages
Categories
Search
Top
Bottom

Event Calender for visitors


  • DS
    Participant

    @kebdarge

    Hey,

    Is there a way to add a event calender to buddypress so that any memeber of my site can add events without having to go to the back-end of the site?

    Basically I want my members to add and create events like on facebook is possible.

    thnx!

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

  • matthewprice1178
    Member

    @matthewprice1178

    i have used the plugin Gravity Forms to accomplish this (not the exact same look and feel, but the same concept). You can create a front-end form that creates a post to a specific category. It allows you to set the post as a draft or published.

    i have the user use a custom field to enter in the date and then i compare it to either today’s date to display the current days’ events or the full weeks’ events. this keeps the date for the event separate from the post date.

    check out http://www.chickagoan.com and look at the event calendar in the sidebar. it is populated by a form that the site users see when they are logged in.

    if you don’t want to buy Gravity Forms, you could just create a page that has a form on it that submits a post. i am sure that there are plugins that will allow this to occur.


    Anointed
    Participant

    @anointed

    @matthewprice1178
    Love the events system, esp the widget!. I already own gravity and use it for ‘testimony’ submission. Is your events system something you are willing to share for those of us that already use gravity?


    matthewprice1178
    Member

    @matthewprice1178

    i am happy to share.

    so i use jquery-ui first off, but if you just want today’s events, you don’t need to use it

    so the first part is what is in my sidebar.php file

    <?
    // first set up today’s date
    $today = date(‘m/d/Y’);
    ?>


    This next part is still in the sidebar.php
    <?
    generate_week_events(‘1’, $today);
    // to figure out tomorrow, i use mktime and date together
    $tomorrow = mktime(0, 0, 0, date(‘m’), date(‘d’)+1, date(‘y’)); $tomorrowCompare = date(‘m/d/Y’, $tomorrow);
    // you can use the +1 to add as many dates as possible for your calendar
    // the ‘1’ that is an argument of the function is the id of the jquery-ui tab. i just add a “generate_week_events” function for as many days that i want to show and increment this number by one for each tab
    ?>

    the function then compares the date fed in as an argument to the date in the custom field. if there is a match, then it shows the corresponding events. i just placed this in my function.php of my theme

    <?
    function generate_week_events($id, $date) {
    global $post;
    ?>

    <div id="tabs-“>
    <?
    // The cat=>9 here is the Events Category for this site it was implemented on and gets all posts where with a meta_value of the date fed in
    $args=array(‘cat’=> 9, ‘meta_value’=> $date);
    query_posts($args);

    // Here I just split the $date at the “/”. the client at one point wanted the date spelled out in the list as “January 1st, 2010” but later did not, but i kept it here for your reference if you want it.
    $r_date = explode(‘/’, $date);
    $mk_date = mktime( 0,0,0, date($r_date[0]), date($r_date[1]), date($r_date[2]));
    $print_date = date(‘F jS Y’, $mk_date);
    // echo $print_date;

    if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    <a href="”>

    <?
    $location = get_post_meta($post->ID, ‘event location’, true);
    if ($location!=”) {
    echo “@” . $location;
    }
    ?>

    this is the basic concept if you want the full code lemme know and i can email it to you

    Any questions feel free

    Matt


    matthewprice1178
    Member

    @matthewprice1178

    ummmm.sorry about that…all my php got removed. i will post on my blog and paste a link here


    matthewprice1178
    Member

    @matthewprice1178

    as the follow is not entirely inclusive, i have posted it with a password p=events

    http://www.countingrows.com/event-calendar-for-wordpress-with-gravity-forms/


    matthewprice1178
    Member

    @matthewprice1178

    removed password


    Anointed
    Participant

    @anointed

    thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Event Calender for visitors’ is closed to new replies.
Skip to toolbar