How to show only thumbnails on front page

I know that it is posible but I'm interesting how show only last pictures with out of title and user,

I know that there is a vasco plugin but I want to achieve code to paste in my custom index view.

Recently I used this code:

<div class="index_box">
            <h2><?php echo elgg_echo("Ostatnie Zdięcia"); ?></h2>
        <?php
                if (!empty($vars['area7'])) {
                    echo $vars['area7'];//this will display photos
                }else{
                    echo "<p>" . elgg_echo("No photos available") . "</p>";
                }
            ?>
        </div>

It gets result :

image

You can see it on my site

what I have to do to get view like vasco plugin?

  • take a look at the documentation in tidypics/lib/tidypics.php

  • I have achieved expected result.

    I put this code:

    <?php
        }
       
            if (is_plugin_enabled('tidypics')) {
    ?>
        <!-- display latest photos -->
            <div class="index_box">
                <h2><a href="<?php echo $vars['url']; ?>pg/photos/world/"><?php echo elgg_echo("Najnowsze Zdięcia"); ?></a></h2>
                <div class="contentWrapper">
                <?php
                    echo tp_get_latest_photos(12);
                ?>
                </div>
            </div>

    Tidypics Team you are the best....

     

  • Rogal, can you describe a little more how to add this to the homepage?

    What file need to be changed...

  • hey you have to change your index.php in custom_index mod

    add $photos string in mod/custom_index/index.php

    it looks that

    //last fotos
      $photos = list_entities('object','image',0,4,false, false, false);
        

    and at the end of code :

      //display the contents in our new canvas layout
        $body = elgg_view_layout('new_index',$login, $videos, $newest_members, $blogs, $groups, $bookmarks, $photos);

    add in your mod/custom_index/views/default/canvas/layouts/new_index.php

    <!-- right hand column -->                           
        <div id="index_right">

    it depends on where you  want to show last foto 

    <?php
        }
       
            if (is_plugin_enabled('tidypics')) {
    ?>
        <!-- display latest photos -->
            <div class="index_box">
                <h2><a href="<?php echo $vars['url']; ?>pg/photos/world/"><?php echo elgg_echo("Najnowsze Zdięcia"); ?></a></h2>
                <div class="contentWrapper">
                <?php
                    echo tp_get_latest_photos(12);
                ?>
                </div>
            </div>

    more info and modified file you can find on exploruj.net.pl

  • Hi,

    can someone explain how to do that when i use a different theme?

    i am using black_pod_free, and the instructions above does not work.
    i think i have to do the changes in the theme files.

     

    thanks!