Custom index with widgets v1.7

Release Notes

 

Enhancements & fixes in 1.7

  1. Add the ability to include the dashboard in the bottom of the page when user is connected.
  2. Add the river latest activity widget
  3. Add the task widget
  4. Add a generci widget, based on the subtypes you could host on your elgg.
  5. Css improvments, as i seen that the buddytalk thme didn't render correctly my page.
  6. Code factorization, in the index construction.
  7. Pages, blogs and file now take categories, list types and group into account.
  8. Remeoved the "Accueil" mention in the page title.
  9. Some fixes

 

 

  • Not show any group at "Latest Group". I installed to elgg1.6.1

  • how can i add  components that only guest can see? like the login form, when they logged in the component disappear

  • There is a big bug in this beautiful plugin: al the widget are referred to the user with GUID=2, whom is the Admin usually.

    But this have 2 issues:

    1) if admin is deleted the plugin doesn't work

    2) in a MultiSite environment isn't possible to have different homepages, because the widget are always the same

     

    So, I modified

    set_page_owner(2);

    with

    set_page_owner($CONFIG->site_guid);

    in

    - mod/custom_index_widgets/views/default/canvas/layouts/new_index.php

    - mod/custom_index_widgets/views/default/custom_index_widgets/edit.php

    - mod/custom_index_widgets/edit.php

    This won't work because Elgg verify that the owner of the widget settings is a user and not a different entity.

    So I had to make a very small change in the core file:

    - engine/lib/widgets.php

    changing

    if ($user = get_user($user_guid)) {

    with

    if ($user = get_entity($user_guid)) {

    Now widget can be assigned to any entity, even a site, as in my case. That change allow to edit the custom index widgets for each site of the MultiSite installation without errors.

    I posted that patch to Trac

    http://trac.elgg.org/elgg/ticket/1391

    It doesn't affect any existing feature in Elgg and hope Curverider will accept it for Elgg 1.8.

    If someone is interested in Multisite features I'm happy to discuss with him. I made some other changes to the plugin in order to have different contents in the homepages of sites. For further info and discussions join the group http://community.elgg.org/pg/groups/21771/multisite/

    Thank you for your attention :)

     

     

  • I want to use Free HTML twice.. .is there any way i can do it ?

  • Yes... I tried this yesterday... it does not like it at all.  But I guess it is a fairly simple matter to copy and rename the widget with a 1, 2, 3 etc and as long as they are initialised correctly everything should work... I'll give it a go and let you know, unless anyone has a better idea?

  • Hi @ni3... I did it, see http://www.test.activityseeker.com/ I copied the /mod/custom_index_widgets/views/default/widgets/free_html_index and called it free_html1_index and

    1. changed all the referances to "html_content" to "html1_content" in the "veiw.php" and "edit.php" for the renamed widget
    2. inserted "add_widget_type('free_html1_index',elgg_echo  ('custom_index_widgets:free_html1_index'),elgg_echo ('custom_index_widgets:free_html1_index'), "custom_index_widgets", true);" into the "start.php" in the main "custom_index_widgets" folder.
    3. added " 'custom_index_widgets:free_html1_index' => 'Free html Box 2', " into the "en.php" in the Language folder

    Now, I think that was it... if it does not work for you, come back, but don't expect much from me I am a total novice with this stuff.

  • Hi all,

    I didn't go back here since a while, so i discover all your comments now. Thanks Dhrup, thanks aj2479, and thanks Mark bridges for your realy nice positive attitude ;)

    I will take into account the most comprehensibles bugs, such as curious saving problems, multiple use of free html, tag cloud missing, event display,... I guess some of the problems will be simplier to reduce with the next 1.7 release.

  • Perfect, just what I needed.  Thank you!

  • abandoned

    For those looking for an Izap Video widget, I simply did the ff (I am not an expert... use at your own risk):

    1. Create latest_videos_index folder under views/default/widgets
    2. Copy view.php and edit.php from latest_blogs_index and paste into the new folder
    3. In view.php, change first line to $object_type = 'izap_videos';
    4. Open start.php and: if(is_plugin_enabled('izap_videos')) 
                add_widget_type('latest_video_index',elgg_echo  ('custom_index_widgets:latest_video_index'),elgg_echo ('custom_index_widgets:latest_video_index'), "custom_index_widgets", true);
    5. In languages/en.php, add: 'custom_index_widgets:latest_video_index' => 'Latest videos',

    Worked for me.

  • Hi Anna, Good stuff... I feel great that my post helped another novice to make a breakthrough :) I'll make on of those as well... I guess the sky's the limit... thanks.

  • abandoned

    Absolutely helped, Mark. Thanks!

  • I just discovered another simple way to add Izap videos

    Place Generic Content Widget and choose izap_videos in custom_index_widgets:widget_subtype :

     

    I found a bug while adding adsense ads in the free content...

    The plugin keeps on loading the page infinitely when adsense code is added in the free HTML widget.

    (It tries to make a preview of the ads in the bottom of the page which causes this problem..But the ads show correctly in the front page..)

     

    Thanks for the wonderful plugin...:)

    Regards,

    Sandeep

  • The groups widget isn't working...:(

  • Thank you FX Nion for the plugin.

    @Mark Ridges  I see your test.activityseeker.com site has the groups working...  would you mind sharing how you got groups working?

    TIA

  • Hi TIA!  I did not realise I had done anything smart :)  I renamed the old view and edit "broken_view" etc, and created new view and edit from one of the other Group widgets I found somewhere...

    #######################code for the "view.php" I am using is:

    <?php
     
      $num_items = $vars['entity']->num_items;
      if (!isset($num_items)) $num_items = 10;
     
      $widget_context_mode = $vars['entity']->widget_context_mode;
      if (!isset($widget_context_mode)) $widget_context_mode = 'search';
      set_context($widget_context_mode);
     
      $widgtet_datas = list_entities('group','',0,$num_items,false, false, false);
    ?>       
    <div class="contentWrapper">
      <?php
          if(isset($widgtet_datas)) {
              echo $widgtet_datas;
          }
      ?>
      <div class="clearfloat"></div>
    </div>

    ################################Code for the "edit.php"

    <?php
        $num_items = $vars['entity']->num_items;
        if (!isset($num_items)) $num_items = 10;
       
        $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>
    <p>
    <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
       
    <?php
        echo elgg_view('input/pulldown', array(
                'internalname' => 'params[num_items]',
                'options_values' => array( '1' => '1',
                                           '3' => '3',
                                            '5' => '5',
                                           '8' => '8',
                                           '10' => '10',
                                           '12' => '12',
                                           '15' => '15',
                                           '20' => '20',
                                           '30' => '30',
                                           '40' => '40',
                                           '50' => '50',
                                           '100' => '100',
                                         ),
                'value' => $num_items
            ));
    ?>
    </p>

     

    ######################## It works for me, so good luck!

  • OOPS.. I forgot to say exactly where you find these files... silly me, I must not assume people know things - /mod/custom_index_widgets/views/default/widgets/latest_groups_index

  • @Mark Bridges - Thank You!  That Works for me

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: 30885
  • Recommendations: 65

Other Projects

View Fx Nion's plugins