Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter DiZeX

    (@dizex)

    Dear Marcel,

    Inspecting JavaScript errors with console-tab didn’t reveal anything useful. So I disabled all other plugins expect Related Posts plugin. It worked!

    So I activated other plugins one-by-one and it revealed that “Real Media Library” plugin v4.8.6 was the root cause of problems. Fortunately there is an update to v4.9.1 which fixes this problem with the Related Posts plugin. ??

    Sorry about inconvience about my fault not to upgrading all other plugins before babbling.

    Thanks very much for this plugin!

    BTW, I’ve customised it a little, I added third list option to it. I just copied the related-du.php to related-tu.php, like “Tripled Up” and I did necessary adjustments to related.php + related-tu.php. ??

    I rewrote the albums.php entirely. And now it works much better and faster. Though it doesn’t contain any error checking.

    Replace the “albums.php” by following code and remember to change the FBUSERID to the right one:

    <?php
    
    $fb_albums = file_get_contents('https://graph.facebook.com/FBUSERID/albums/?fields=id,name,type&limit=2000');
    
    $json = json_decode($fb_albums);
    
    $i = 0;
    echo '<div class="fbalbum_thumb_row">';
    foreach($json->data as $item) {
        if ($item->type == 'normal') {
            if ($i <= 3) {
                echo '<div class="fbalbum_thumb"><a href="?fbasid='.$item->id.'"><img src="https://graph.facebook.com/' . $item->id . '/picture"><br />';
                echo '' . $item->name . '</a></div>';
                $i++;
            }
            else {
                echo '</div> <!-- .fbalbum_thumb_row -->';
                echo '<div class="fbalbum_thumb_row">';
                $i = 0;
            }
        }
    
    }
    echo '</div> <!-- .fbalbum_thumb_row -->';
    
    ?>

    and add to fbasstyles.css:

    .fbalbum_thumb_row { width: 100%; text-align: center; }
    .fbalbum_thumb { display: inline-block; width: 20%; margin: 0 1em 1em; vertical-align: top; }
    .fbalbum_thumb img { height: 120px; margin: 0; max-width: 160px; margin-bottom: 0.5em;}

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