Events Made Easy Forums How do I … Can't use comments & GD star rating, shows same comment & rating for all events

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #42218
    Anonymous
    Inactive

    Can i somehow change the event menager that it works with comments & GD Star Rating?

    Or do you have any other experience with any comments & rating plugins that work?

    #45307
    Franky
    Keymaster

    Nope, not yet. Since we use one page to essentialy do all the event stuff, wordpress mixes all comments together as well. I’m playing around with some wordpress filters but not really successful so far. I think I can modify the code for “Five Star Rating” to work with event ID’s instead of Post ID’s, but that needs work of course …

    #45308
    Anonymous
    Inactive

    Hi Franky,

    Do you have any news about comments and rating on a per event basis?

    If you could implement that as a standard, I would like to support your work.

    Cheers, Sven

    #45309
    Franky
    Keymaster

    sorry, not yet …

    #45310
    Anonymous
    Inactive

    Hi franky,

    do you have any news ?

    I need to have comments in event_single page, but i don’t know how to do that…Is anyone can help ? doesn’t matters is there isn’t Five Star Rating… just need to have comments.

    Thanks !!!!

    #45311
    Anonymous
    Inactive

    I recently disabled wordpress comments and started using facebook comments instead which was a lot easier to implement.

    I inserted the facebook code into the settings for the single event page as follows:

    <h2>Comments</h2>

    <div id=”fb-root”></div><script src=”http://connect.facebook.net/en_US/all.js#xfbml=1″></script><fb:comments href=”#_EVENTPAGEURL” num_posts=”5″ width=”590″></fb:comments>

    This might be of use to some people

    #45312
    Anonymous
    Inactive

    Great !!! very good idea…thanks you so much !

    #45313
    Anonymous
    Inactive

    Boleo,

    I edited the em_event.php file in the ‘classes’ folder to get the RATINGS running. Here’s what I did ( a bit sloppy I admit, but it works on xampp )

    41.		'event_date_modified' => array( 'name'=>'date_modified', 'type'=>'%s' ),
    42. 'blog_id' => array( 'name'=>'blog_id', 'type'=>'%d' ),
    43. 'group_id' => array( 'name'=>'group_id', 'type'=>'%d' )
    44. );

    First add a variable called ‘ratings’ below line 43. I should look like this:

    ‘ratings’ => array( ‘name’=>’ratings’, ‘type’=>’%d’ ). Make sure to add a ‘,’ after line 43 as well.

    next, go to line 71 ,and add ‘var ratings;’ (minus the quotes).

    70.var $group_id;
    71.
    72. var $image_url = '';
    73. /**

    Then go down to line 236, and below it, add ‘$this->ratings = ( !empty($_POST) ) ? $_POST : ”;’ ( again minus the quotes on the ends)

    235.	$this->end_date = ( !empty($_POST['event_end_date']) ) ? $_POST['event_end_date'] : $this->start_date;
    236. $this->rsvp = ( !empty($_POST['event_rsvp']) ) ? 1:0;
    237. //$this->spaces = ( !empty($_POST['event_spaces']) && is_numeric($_POST['event_spaces']) ) ? $_POST['event_spaces']:0;
    ADD CODE HERE

    Now create the database fields to interact with your ratings system in ‘wp_em_events’, and go to line 709. Below this line you will need to define your code for the ratings system ( I’ll call it $test for this example ) and…

    call = '#_RATINGS';
    $eventid = $this->id

    $ratings = <-SOME CODE->;
    $replace = $ratings;
    break;

    I post the ratings that users enter to a seperate php file, and pass the $event id along in a hidden form field ‘<input name=”eventid” type=”hidden” value=”$eventid” />’

    I have the form defined as follows, ABOVE line 703. It’s setup like this

    $rateform =
    <<< END
    <strong>Rate This Location</strong>
    <form action="http://localhost/test/ratepost.php" method="post">
    <select name="votes">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option value="5">5</option>
    </select>
    <input type="hidden" value="$this->id" name="eventid"/>
    <input type="hidden" value="total +1" name="total"/>
    <input value="submit" name="submit" type="submit" style="background: #333;"/>
    </form>
    END;

    *** Make sure that <<< END and END; appear on their own line with no white space ***

    On the external page ( that it’s posting to) define your $_POST variables ( we’ll say

    $vote=$_POST , $event_id = $_POST, etc.

    Now you just take the variables and do a mysql update for the ratings field WHERE event_id = $event_id …

    Then to prevent users who are not logged in just encase the whole thing in an IF statement:

    if (is_user_logged_in)

    {

    case: ‘#_RATINGS’

    < YADDA YADDA YADDA >

    replace=$ratings;

    break;

    }

    else $replace='<p>You must login to rate events</p>’;

    Like I said a bit sloppy, and a bit long-winded in the explanation, but if you get the idea I’m sure you can do something with it. Hell, you’ll probably find a quicker easier way than I did.

    #45314
    Anonymous
    Inactive

    Sorry, forgot to add that you will need to repeat the process to create code that displays your ratings ( something like #_DISPLAYRATINGS ) the smae way as you created #_RATINGS, and add the placeholders to your single events page in the EM settings.

    #45315
    Anonymous
    Inactive

    If anyone has any idea how to get comments on the single events page that would be great, because I’m stumped. I saw that Marcus had mentioned that you can use the em_content like the WP the_content, however when I add that and <?php comments_template(); ?> below it on the events_single.php page in templates, I get comments on every page. I know this is because EM doesn’t treat events as posts, but does anyone have a quick way to make this work?

    #45316
    Franky
    Keymaster

    wrong forum, you need the “events manager” forum, this is “Events Manager Extended”

    #45317
    Anonymous
    Inactive

    Hi,

    I’m interested also to know how I can show comments on every event. I don’t want to disable my old wordpress comments and I this code does’nt do anything:

    <h2>Comments</h2>

    <div id=”fb-root”></div><script src=”http://connect.facebook.net/en_US/all.js#xfbml=1″></script><fb:comments href=”#_EVENTPAGEURL” num_posts=”5″ width=”590″></fb:comments>

    Any idea to put comments on the events?? Thanks so much

    #45318
    Anonymous
    Inactive

    Hi,

    I need an answer to go on with the project. Please help me.

    – Is there some way to show comments on every event without removing the comments that I have already?

    Thanks!

    #45319
    Franky
    Keymaster
Viewing 14 posts - 1 through 14 (of 14 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top