Caroline Clifford

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Images being duplicated uneccesarily #1108095
    Caroline Clifford
    Participant

    Thanks George. I’ll update the Calendar right away.

    Sorry for the slow reply Gmail decided this one was spam !

    Hmm could the image checking not be a bit more fuzzy ? Could I set that somewhere ? It’s just they are the same image on the desktop, I imagine Facebook’s compression chews them a little differently each upload

    in reply to: Images being duplicated uneccesarily #1107091
    Caroline Clifford
    Participant

    Thanks for the speedy reply! Is it not expected behaviour that if 2 different events upload the same picture , it will be seen as a different image E.G.

    https://www.facebook.com/events/1524303097875037/
    and
    https://www.facebook.com/events/1728673430710384/

    1. Yes the Facebook Importer made by Tribe
    2.

    URL
    
    Home
    INSTALL KEYS events-calendar-pro = ffe0cafa8864478d548f2a97f58d9072201545c7 events-community = 40fbe80f51c9e98dfaceabd67b6fe0d42b6f3fc6 events-facebook-importer = 4329b09d6ef150f61beba42300a39980379faf67 WORDPRESS VERSION 4.4.2 PHP VERSION 5.5.33 PLUGINS Advanced Custom Fields: Repeater Field version 1.1.1 by Elliot Condon(http://www.elliotcondon.com/) Advanced Cron Manager version 1.4.3 by Kuba Mikita(http://www.wpart.pl/) Advanced Custom Fields version 4.4.4 by Elliot Condon(http://www.elliotcondon.com/) Custom Post Type UI version 1.1.2 by WebDevStudios(http://webdevstudios.com/) Debug Bar Slow Actions version 0.8.3 by Konstantin Kovshenin(http://kovshenin.com) Debug Bar version 0.8.2 by wordpressdotorg(http://wordpress.org/) The Events Calendar PRO version 4.0.4 by Modern Tribe, Inc.(http://m.tri.be/20) Facebook Wall Events version 1.0 by Caroline Clifford(http://accessibledesign.net) Limit Login Attempts version 1.7.1 by Johan Eenfeldt(http://devel.kostdoktorn.se) The Events Calendar: Community Events version 4.0.4 by Modern Tribe, Inc.(http://m.tri.be/21) The Events Calendar: Facebook Events version 4.0 by Modern Tribe, Inc.(http://m.tri.be/22) The Events Calendar version 4.0.5 by Modern Tribe, Inc.(http://m.tri.be/1x) W3 Total Cache version 0.9.4.1 by Frederick Townes(http://www.linkedin.com/in/w3edge) NETWORK PLUGINS - MU PLUGINS - THEME BootstrapWP MULTISITE - SETTINGS schema-version = 4.0.5 recurring_events_are_hidden = exposed previous_ecp_versions = Array ( [0] => 0 [1] => 4.0 [2] => 4.0.1 ) latest_ecp_version = 4.0.5 last-update-message = 4.0.1 disable_metabox_custom_fields = hide pro-schema-version = 4.0.4 fb_api_key = 366597510039533 fb_api_secret = d510cdd653447ac40dfd2a0540e2dca4 custom-fields = Array ( [2] => Array ( [name] => _ecp_custom_2 [label] => Language [type] => checkbox [values] => English German ) [3] => Array ( [name] => _ecp_custom_3 [label] => Other language - please specify [type] => text [values] => ) ) custom-fields-max-index = 3 earliest_date = 2015-12-10 20:00:00 latest_date = 2016-11-26 22:00:00 donate-link = postsPerPage = 10 liveFiltersUpdate = 1 hideSubsequentRecurrencesDefault = userToggleSubsequentRecurrences = recurrenceMaxMonthsBefore = 24 recurrenceMaxMonthsAfter = 24 showComments = showEventsInMainLoop = eventsSlug = events singleEventSlug = event multiDayCutoff = 00:00 defaultCurrencySymbol = € reverseCurrencyPosition = embedGoogleMaps = 1 geoloc_default_geofence = 25 geoloc_default_unit = kms embedGoogleMapsZoom = 10 debugEvents = organizer_venue_amalgamation = 1 pue_install_key_events_community = 40fbe80f51c9e98dfaceabd67b6fe0d42b6f3fc6 pue_install_key_events_facebook_importer = 4329b09d6ef150f61beba42300a39980379faf67 pue_install_key_events_calendar_pro = ffe0cafa8864478d548f2a97f58d9072201545c7 imported_post_status = Array ( [csv] => publish [facebook] => publish ) fb_uids = 1201077883254934 offthecuffcomedy thecampfireberlin gemused mondaynightmicszatopek FishBowlBerlin thenoseberlin adorablecomedy nightsweatscomedy piffleradio comedyaufdeuglish teepeelandstandsup cosmiccomedyberlin thefishbowlberlin comedyopenair gowestcomedy NightShowBerlin CSzBerlin GoodLuckBarbara PetriDishComedyOpenMicrobe extraextraberlin eggandbear 1142083829136732 fb_enable_GoogleMaps = 1 fb_auto_import = 1 fb_auto_frequency = twentymins tribeEnableViews = Array ( [0] => list [1] => month [2] => week [3] => day [4] => photo ) WORDPRESS TIMEZONE - SERVER TIMEZONE UTC COMMON LIBRARY DIR /home/leperisland/public_html/cie_new/wp-content/plugins/the-events-calendar/common/src/Tribe COMMON LIBRARY VERSION
    in reply to: Facebook events importing duplicates #1061053
    Caroline Clifford
    Participant

    Hey there, I made this bit of PHP to remove duplicate events from my DB & run it with Cron, I know it’s a shitty piece of code but PHP and Mysql aren’t really my thing ! Tested it and it works though…

    
    <?php
    
    $mysql = array(
        "server" => "your",
        "user" => "values",
        "pass" => "in",
        "db" => "here",
        "wp_prefix" => "wp_"
    );
    
    $con = mysql_connect($mysql['server'],$mysql['user'],$mysql['pass']);
    if (!$con) {
        die('Could not connect: ' . mysql_error());
    }
    
    mysql_select_db ($mysql['db'], $con)
        or die ("Unable to select database");
    
    $res = mysql_query("SELECT meta_value, COUNT(*) c FROM " . $mysql['wp_prefix'] . "postmeta WHERE meta_key = '_FacebookID' GROUP BY meta_value HAVING c > 1", $con)
        or die ("Unable to run query");
    
    $nrows = mysql_num_rows($res);
    
    if($nrows == 0) {
        echo "No dupes... Bye!";
        exit;
    }
    
    $ids = [];
    
    while ($row = mysql_fetch_array($res)) {
        array_push($ids, $row['meta_value']);
    }
    
    $count = 0;
    $delete_ids = [];
    foreach ($ids as $id) {
        $res = mysql_query("SELECT post_id FROM " . $mysql['wp_prefix'] . "postmeta WHERE meta_value = '" . $id . "' AND meta_key = '_FacebookID'", $con);
        while ($row = mysql_fetch_array($res)) {
            if($count > 0) {
                array_push($delete_ids, $row['post_id']);
            }
            $count ++;
        }
        $count = 0;
    }
    
    foreach ($delete_ids as $id) {
        $res = mysql_query("DELETE FROM " . $mysql['wp_prefix'] . "postmeta WHERE post_id = '" . $id . "'", $con)
            or die ("Could not delete from postmeta");
        $res = mysql_query("DELETE FROM " . $mysql['wp_prefix'] . "posts WHERE ID = '" . $id . "'", $con)
            or die ("Could not delete from posts");
    }
    
    echo "Deleted: ";
    print_r($delete_ids);
    
    mysql_close($con);
    
    ?>
    
    in reply to: Facebook events importing duplicates #1060836
    Caroline Clifford
    Participant

    Hi sorry for the lateness of my response I never got email notified of the reply. I will try this and let you know – thanks for everything!

Viewing 4 posts - 1 through 4 (of 4 total)