Need help in custom_index (izap Video)

Hi, i have enabled in my site izap Video plugin version 2.0 its awesome Great work for izap Team, i was wondering if anyone could help me, i currently wanna set up and put izap video in the index page, i know theres a future on the plugin when its enabled in settings to enable it to appear in index page but im using a coustume index plugin but thats not what i mean i want to get the source code  this what i mean

example:

 

if (is_plugin_enabled('izapvideo')){   
        $limit = get_plugin_setting('tidypics_num_items','izap_Video');
        if (!isset($limit) || !$limit) $limit = 30;   
   
        $images = get_entities('object','Video',0,0,$limit, false, false);
?>
<div class="index_box">
    <h2><?php echo elgg_ec"izap:Videos"); ?></h2>
   
    ?>

Something like this but for izap Video so i can show it on the front index page

tahnks for you all time

i hope someone can help me (:

  • There are a couple of things that you will need to do:

    index.php - Add the following like of code

    $izap_videos = list_entities('object','izap_videos',0,4,false, false, false); 

    // note:  the 4th parameter is the number of items to get

    Next, you will need to update the following line of code to add the passing of the $izap_videos information.

    $body = elgg_view_layout('new_index',$login, $files, $newest_members, $blogs, $groups, $bookmarks, $izap_videos);

    The next file that would need to be modified is view/default/canvas/layout/new_index.php (as you can see this is the file specified as the first argument in the previous modification (elgg_view_layout('ew_index'..)

    In this code you would need to determine in which column you would like to display the izap information.  I think the izap entities will be passed into $vars['area7'].  You would just follow what is done for the other entities being display and display the izap vidoeas as you would like.

    Good luck.

     

     

  • @kkelley

    thank you for your help,

    i appriciated alot, well one more question,

    heres what i put on the view/default/canvas/layout/new_index.php

    is it like this?

    <?php
        if(is_plugin_enabled('izap_Videos')){
    ?>
            <!-- latest izap videos -->
            <div class="index_box">
                <?php
                    if (isset($vars['area7']))
                        echo $vars['area7'];
                ?>

  • I did it like this:

    <?php
    echo elgg_view("izap_videos/customindexVideos");
    ?>