Custom index with widgets v1.9

Release Notes

Bug fixes in 1.9

  1. German translation added
  2. Correction of 'custom_index_widgets:nogroups'
  3. Correction of izap folder name

 

  • @FX Nion  thank you for the quick updates!

  • I may be an idiot, but I just added the events calendar plugin to elgg, and now I can't seem to display it on the index page. Any hints?

  • Home page before log in is shown without any widgets.

  • Nick, it should work.  Look back through the comments on the previous versions to see if anyone else had this before.  I use this and the calendar, and as long as you have Public events they should show.

    Rungsima, have you set up the Index Wigitisation yet? in the Admin page...

  • Thanks to Harc for his spanish translation below. Il will integrate it in next release

    <?php

        $spanish = array(

           
            'custom_index_widgets:latest_bookmarks_index' => "Ultimos favoritos",
            'custom_index_widgets:latest_groups_index' => "Ultimos Grupos",
            'custom_index_widgets:latest_files_index' => "Ultimos Archivos",
            'custom_index_widgets:latest_blogs_index' => "Ultimos Ariculos de Blogs",
            'custom_index_widgets:latest_members_index' => "Nuevos mienbros",
            'custom_index_widgets:nofiles' => "No hay archivos todavia",
            'custom_index_widgets:nogroups' => "No hay frupos todavia",   
            'custom_index_widgets:latest_news_index' => "Ultimas noticias",
            'custom_index_widgets:latest_pages_index' => "Ultimas paginas",
            'custom_index_widgets:latest_events_index' => 'Eventos anunciados',
            'custom_index_widgets:latest_wire_index' => 'Ultimos post',
            'custom_index_widgets:inline_content_index' => 'Html libre',
            'custom_index_widgets:html_content' => 'Tu texto',
            'custom_index_widgets:latest_generic_index'=>"Contenido generico",
            'custom_index_widgets:latest_tasks_index'=>"Ultimas tareas",
            'custom_index_widgets:latest_activity_index' => 'In the river',
            'custom_index_widgets:cloud_generic_index'=>"Nube de tags",
            'custom_index_widgets:widget_subtype'=>"Subtipo de la entidad",
            'custom_index_widgets:metadata_name' => "Metadata",
            'custom_index_widgets:threshold'=> "Thresold",
            'custom_index_widgets:latest_izap_videos_index' => 'Ultimos videos',
           
            'custom_index_widgets:rich_media_index' => "Contenido multimedia",
            'custom_index_widgets:widget_video_width' => "Ancho (numeros sin px o %)",
            'custom_index_widgets:widget_video_height' => "Alto (numeros sin px o %)",
            'custom_index_widgets:widget_video_url' => "Url",
            'custom_index_widgets:widget_video_caption' => "Caption",
           
            'custom_index_widgets:layout' => "Layout",
           
            'custom_index_widgets:index_2rmsb' => '2 rows, [Medio, Peque] - [Grande]',
            'custom_index_widgets:index_2rsmb' => '2 rows, [Peque, Medio] - [Grande]',
            'custom_index_widgets:index_2rhhb' => '2 rows, [Mitad, Mitad] - [Grande]',
            'custom_index_widgets:index_1rsss' => '1 row, [Peque, Peque, Peque]',
            'custom_index_widgets:index_2rbhh' => '2 rows, [Grande] -[Mitad, Mitad]',
            'custom_index_widgets:index_2rbsm' => '2 rows, [Grande] -[Peque, Medio]',
            'custom_index_widgets:index_2rbms' => '2 rows, [Grande] -[Medio, Peque]',
           
            'custom_index_widgets:area1' => 'Widgets Zona 1',
            'custom_index_widgets:area2' => 'Widgets Zona 2',
            'custom_index_widgets:area3' => 'Widgets Zona 3',
           
            'custom_index_widgets:admin:notfound' => 'Pagina no encontrada',
            'custom_index_widgets:index' => "Index widgetisation",
            'custom_index_widgets:num_items' => "Numero de items",
            'custom_index_widgets:reset' => "Restablecer todas las zonas",
           
            'custom_index_widgets:pleaselogin' => "Por favor, por favor, inicie sesión para ver mas...",
           
            'custom_index_widgets:widget_title' => "Título del widget Override (solo se mostraran en el índice en sustitucion del título widget por defecto)",
            'custom_index_widgets:context_mode' => "Estilo",
            'custom_index_widgets:context_list' => "Lista",
            'custom_index_widgets:context_detail' => "Detalle",
           
            'custom_index_widgets:login_style'=>"Posicion de Login",
            'custom_index_widgets:inlayout'=>"Barra inferior",
            'custom_index_widgets:topbar'=>"Barra superior",
            'custom_index_widgets:widget_all_groups' => "Todos los grupos",
       
        );
                       
        add_translation("es",$spanish);

    ?>

  • great plugin !!

    ça serait parfait de faire pareil avec les groupes

     

  • As a lot of you feel happy with this plugin, and as i studied if it would be possible to port the same functionnality to groups (i am quite sure it is possible), il will do the port. Good news no ?

    I'am just waiting the famous 1.7 release, as i've heard that may be the group mod will be rewritten. May be just a rumor, but i guess that the port will be more a hack of the group mod than a beautiful extend. But, wait and see...

     

     

  • Hi Fx, Porting for groups would... will be absolutely awsome.  Draggable content is the way ahead.  Shame that the plugins do not work this way too in the Tools... reordering them is such a pain.

    Many thanks for all your hard work, it is much appreciated by all of us that can not code... and by many others who can. Merci beaucoup!

  • It's an excellent news

    I hope it will be compatible with 1.6.1 because I'm not sure it will be easy to migrate from 1.6 to 1.7 ...

  • Fantastic News!  Hooray for FX Nion!!

    @FX Nion, how would I go about creating more layouts?  I would like to have a few more options:

    1 row - Medium | Small

    1 row - Small | Medium

    1 row - Medium | Tiny | Tiny

    1 row - Tiny | Medium | Tiny

    and last but not least le pièce de résistance

    2 rows - LongMedium | ShortSmall with 2 tinylong beneath

    Any help is greatly appreciated and FX Nion I'm sure your quite busy... but it never hurts to ask :-)

    TIA

  • image <!-- output the actual comment -->

    Adding Latest Stats to index:

    create folder latest_stats_index in mod\custom_index_widgets\views\default\widgets

    create file view.php in folder created above and insert the following code in it:

    <?php

        /**
         * Elgg stats 1.4 plugin
         *
         * @package
         * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
         * @author Matthias Sutter email@matthias-sutter.de
         * @copyright Matthias Sutter
         * @link http://cubeyoo.de
         */

    ?>
        <div class="contentWrapper">
           <div class="tabber">
             <div class="tabbertab">
             <h3><?php echo elgg_echo("stats:community_stats"); ?></h3>
             <?php echo elgg_view("stats/communityStats"); ?>
             </div>
             <div class="tabbertab">
             <h3><?php echo elgg_echo("stats:personal_stats"); ?></h3>
             <?php echo elgg_view("stats/personalStats"); ?>
             </div>
           </div>
         <div class="clearfloat"></div>
        </div>

     

    Edit start.php in mod\custom_index_widgets

    add the following:

    if(is_plugin_enabled('stats'))
              add_widget_type('latest_stats_index',elgg_echo  ('stats:latest'),elgg_echo ('stats:latest'), "custom_index_widgets", true);

    I put it right above this line:

    register_plugin_hook('index','system','custom_index_widgets');

     

    And there you have it! A nice tabbed stats widget with Community and My Stats on your index page.

    Hope this helps someone out.  I know I'm very thankful for all the help I've received from this wonderful community.  Feels good to be able to give back :-)

    I hope I didn't forget something.  Let me know if you need help.

  • Adding Top Points to custom index:

    create folder latest_points_index in mod\custom_index_widgets\views\default\widgets

    copy the view.php file from mod\elggx_userpoints\views\default\widgets\toppoints to the folder created above.

    Edit start.php in mod\custom_index_widgets

    add the following:

    if(is_plugin_enabled('elggx_userpoints'))
              add_widget_type('latest_points_index',elgg_echo  ('Top Points'),elgg_echo ('elggx_userpoints:widget:toppoints:info'), "custom_index_widgets", true);

    I put it right above this line:

    register_plugin_hook('index','system','custom_index_widgets');

     

    And there you have it! A Top Points widget on your index page.

    Let me know if you need help.

  • edit.php for both of the mods above

    create an edit.php file in the widget directory with the following code:

      <?php
        $widget_title = $vars['entity']->widget_title;
      ?>
      <p>
          <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
          :
          <?php
          echo elgg_view('input/text', array('internalname'=>'params[widget_title]', 'value'=>$widget_title));
          ?>
      </p>

     

    That will enable you to rename the widget easily like the rest of them.

     

    Phew, I should really go to sleep  :-)

  • I just found a bug....I am using Elgg1.6.1

    When I try to use the Free html widget more than once,other widgets which were previously added disappears...

  • Sandeep... I posted some comments on this earlier and on a previous version discussion.  You have to copy the widget and rename it etc... but it is actually very easy to do.

  • @elgg_noob. I tired what you suggested to add a stats and udserpoints widget but the following message shows on teh mainpage

    This widget is either broken or has been disabled by the site administrator.

    Any idea what I could be doing wrong?

    Thanks

  • @Mark Bridges

    Thanks for the help..:)I face another serious problem..when ever i activate this plugin,I am unble to view the site administration page..

    I get this message in a white page

    This admin panel allows you to control global settings for your site. Choose an option below to get started.

    When i disable the plugin,things get back to normal...Please help...:(

  • I get an error on the site admin page as well

    Parse error: syntax error, unexpected '<' in mod/custom_index_widgets/languages/de.php on line 3

     

    take off the widgets and works fine.

  • @ NDD are those plugins installed and enabled on your install?

  • @elgg_noob. Yes, for quite some time. They are also the latest version. I am running on 1.6.1. Not sure if that makes a difference.

  • @NDD  Humm, well I'm running this on elgg 1.6.1 with the latest versions of all plugins concerned and it's working.  I just looked over the documentation I wrote up and everything appears correct

    Would you mind telling me what your site is? so I can see?  Maybe we can collab via skype?

     

  • I meet a problem when click the top menu Settings. The URL is http://localhost/elgg/html/pg/settings/user/user1/.

    elgg_settings

     

     

  • Hey Blue I had that happen on my local test install as well... not sure what caused it though.

  • @sandeepI think you should check back through any coding you have done... a syntax error may be crashing the script?  No one else has reported this problem, I have not seen it, so try using the original plugin, and then your updated one... if one works and the other doesn't... it is a coding error.

  • @sandeep I have the same problem ... and for the settings page :s

Fx Nion

I'am R&D engineer in a standardisation organisation. We use Elgg as the internal Company directory. As i really love the nice modeling approach of this tool, i made several plugin both for my company and the community.

Project Info

Stats

  • Category: Widgets
  • License: GNU General Public License (GPL) version 2
  • Updated: 2015-10-13
  • Downloads: 30080
  • Recommendations: 65

Other Projects

View Fx Nion's plugins