• Mark

    (@encryptdesigns)


    Ok so I am using a mod of the Event Calendar 2 but am having trouble with postings listed twice on this page:

    http://www.foxvalleyshows.com/shows.php

    You can see the code I am using here:

    http://paste.uni.cc/7523

    Does anyone have ANY clue why I would be getting double listings??

    Otherwise if I can’t get this thing to work I will have to modify the LOOP to do this sort of thing, but I am really trying to avoid that as this plugin does everything else that I want.

    Someone please help:o)

    -Mark

Viewing 15 replies - 1 through 15 (of 17 total)
  • without looking at your site, you may want to look into the recently released eventcalendar3, as it may either solve your issue, or offer alternatives.

    Thread Starter Mark

    (@encryptdesigns)

    Yeah that is what I am thinking I am going to have to do. I just thought maybe one of you guys could find some obvious thing wrong with my code, then later down the road I would update at a more opportune time.

    Thread Starter Mark

    (@encryptdesigns)

    Hey Amory, did you get double listings when you used EC2? I looked at EC3 but I am still running into some issues with that too. So if I can just edit EC2 and get rid of the double postings I’ll be golden:)

    I don’t know why you are getting double postings. Post your shows.php file to the pastebin as well. It may be as simple as you calling <?php encrypt_get_events_list(); ?> twice…

    Thread Starter Mark

    (@encryptdesigns)

    http://paste.uni.cc/7537

    That is all the code. You will see these four snidbits that I have right below the monster portion of the code:

    <?php encrypt_get_events_list(100, ‘j F’, ‘where’, ‘Where: ‘); ?>
    <?php encrypt_get_events_list(100, ‘j F’, ‘who’, ‘Who: ‘); ?>
    <?php encrypt_get_events_list(100, ‘j F’, ‘time’, ‘Time: ‘); ?>
    <?php encrypt_get_events_list(100, ‘j F’, ‘cost’, ‘Where: ‘); ?>

    If I take those 4 sections out then the code doesn’t work, likewise if I remove the “monster” portion too same results.

    You’re a lifesaver my friend:)

    I guess I am a bit lost. Isn’t the code pertaining to defining the encrypt_get_events_list function within the eventcalendar plugin file? On shows.php you should just have a call like <?php encrypt_get_events_list(x, y, z ...); ?> where “x, y, z …” define the following variables $limit, $date_format=false, $c2c_field='', $c2c_before='', $c2c_after='', $c2c_none='', $c2c_between='', $c2c_before_last=''

    Thread Starter Mark

    (@encryptdesigns)

    Well you should know I’m not trying to confuse you comrad:)

    The “encrypt_get_events” does work within the EC2 plugin yes. I’m just not sure why the 2 listings? Do you want me to show the plugin too? Its 1 am so if you need something from I’ll get to it tomorrow:)

    But isn’t what you are talking about defining variables the same as these:

    <?php encrypt_get_events_list(100, 'j F', 'where', 'Where: '); ?>
    <?php encrypt_get_events_list(100, 'j F', 'who', 'Who: '); ?>
    <?php encrypt_get_events_list(100, 'j F', 'time', 'Time: '); ?>
    <?php encrypt_get_events_list(100, 'j F', 'cost', 'Where: '); ?>

    Or am I way off?

    I guess I stopped following what you were doing after someone posted how to include the custom fields plugin with the event calendar. I don’t see how you are calling the function four times and getting two separate lists. What I was saying though, is you shouldn’t need to have the “monster portion” of the code within your shows.php page. As long as the plugin is activated, and you are “plugged into WordPress” as you said you are (including wp-blog-header), all you need to do is call the get_events_list function.

    Anyway the code at http://paste.uni.cc/7537 is still not your shows.php page, or if it is, it is not the complete file, else you would have the wp-blog-header include as well as <html> tags etc. Please paste that file in its entirety as well as the event-calendar plugin file. I will take a look at those and see what I can come up with.

    also, it looks like whichever function you are using on the main page to show upcomming shows still does not incorporate textile’s functions (adding the <br /> tags). I thought you had fixed that?

    Thread Starter Mark

    (@encryptdesigns)

    Ohh ok. Sorry about the confusion. Here is ALL the code on my shows.php page:

    http://paste.uni.cc/7539

    Here is the plugin:

    http://paste.uni.cc/7541

    As far as I know the “encrypt” code pulls info from the Texttile plugin as I am not having any issues with that, only the double postings. I could be wrong about the TextTile thing but I know its working as I had it turned off for a minute and some listings had some funky code to it.

    Thanks again Amory you are awesome. Although I do know WP a lot better than I did 3 weeks ago I know I still have a lot to learn. But you have truly been a wonderful help as well as Kav and some other people too. My next WP that goes up should go a bit smoother than this one :o)

    Line 72 (sidebar of shows page) does not reflect any progress you made incorporating textile. (it’s the function <?php ec2_get_events_list(10,'j F'); ?>). Replace line 361(eventcalendar file) with echo apply_filters('the_content', $entry->post_content);

    As far as the shows page, what happens when you only call the encrypt function once, twice or three times, instead of four?

    Also, the code you show to call the function
    <?php encrypt_get_events_list(100, 'j F', 'where', 'Where: '); ?>
    <?php encrypt_get_events_list(100, 'j F', 'who', 'Who: '); ?>
    <?php encrypt_get_events_list(100, 'j F', 'time', 'Time: '); ?>
    <?php encrypt_get_events_list(100, 'j F', 'cost', 'Where: '); ?> 
    Would display Where: twice, and on the website it shows Cost: for the cost field. I’m not sure what this discrepancy is caused by.

    Anyway, I don’t have anyway of testing this right now, but try something to the extent of this, where your custom fields are defined in the function, rather than calling the function separately for each new field.

    Also, since the issue of adding in the linebreaks via Textile was solved, remind me again why you don’t want to just use the Content input, rather than custom fields? It would seem much easier to input everything in to me…

    Thread Starter Mark

    (@encryptdesigns)

    This


    echo apply_filters('the_content', $entry->post_content);

    worked beautifully! Now the sidebar is formatted 🙂 Not something I asked for but definately a nice touch:) Thx!

    I should have mentioned before that I am not using the custom inputs anymore, seemed like too much of a headache to get to work.

    Your Code worked and in the words of the Spleen in Mystery Men “Doc you’re a genius!” Thank you oh sooo much:)

    Now the shows are ONLY listed once:) Plus the sidebar is formatted right too! Rock n Roll:)

    I <3 you:)

    Need any custom design work done?? I’d be more than willing to help:)

    I thought you were using custom fields? Hence the use of C2C’s plugin.. What exactly fixed the duplication problem? The code I posted on the pastebin?

    Thread Starter Mark

    (@encryptdesigns)

    Yes the code in the pastebin fixed it. I “was” going to use the custom fields, but for whatever reason those were a pain in the butt as I could only get one field to post. So I said screw that and was working on a workaround. I have been trying sooo many things that my head was spinning. So I just took the code in the paste bin you altered and changed my shows.php page and made that one change you mentioned about the EC2 plugin. Then waaa-laaa….

Viewing 15 replies - 1 through 15 (of 17 total)

The topic ‘Event Calendar 2 (modified) showing double listings?’ is closed to new replies.