Group activity

  • ihayredinov replied on the discussion topic Extracting number from vars[entity] HELP!!!
    What is the first place to look for an answer? Tidypics plugin: 1. tidypics/views/default/widgets/latest_photos line 11: tp_get_latest_photos 2. tidypics/lib/tidypics line 36: tp_list_entities line 172: tp_view_entity_list line... view reply
  • ZoranM replied on the discussion topic Extracting number from vars[entity] HELP!!!
    Thanks again for the help Khayredinov! I tried as you sugested. It did not worked eather. I realy dont understand how this whole thing works, or it is supposed to work. Here is again what I did : <?php $guid = (int)... view reply
  • ihayredinov replied on the discussion topic Extracting number from vars[entity] HELP!!!
    I don't understand why are you using your image_guid array for owner_guids... foreach ($product_guids as $im) { elgg_view_entity($im); }   You don't need to get an array of entities to display them.  view reply
  • ZoranM replied on the discussion topic Extracting number from vars[entity] HELP!!!
    Hi Khayredinov,   I tried the way as you sugested, but it did not worked.The $vars['entity']->checkedImage was alwas giving back an empty array. So what I did it in another way:    1. I kept the form structure as it... view reply
  • ZoranM added a new discussion topic Extracting number from vars[entity] HELP!!!
    Hi to all,   I am trying to develope a widget for Tidypics and I am in arealy big trouble. Can someone help me?I did not know that it is going to be so complicated. I have a form and the "name" atribute I stored it in a params[] array.In this...
    • I don't understand why are you using your image_guid array for owner_guids...

      foreach ($product_guids as $im) {

      elgg_view_entity($im);

      }

       

      You don't need to get an array of entities to display them. 

    • Thanks again for the help Khayredinov! I tried as you sugested. It did not worked eather. I realy dont understand how this whole thing works, or it is supposed to work. Here is again what I did :

      <?php

      $guid = (int) get_input('guid');
                 $filtered_psettings = 0;
                 $entity = $vars['entity'];
                 $psettings = get_all_private_settings($entity->guid);
                 $filtered_psettings = array_keys($psettings, "checkedImage");
                 $product_guids = array_values($filtered_psettings);

                 foreach ($product_guids as $im){

                 echo elgg_view_entity($im);

                 }

      ?>

      At the end it returns "boolean false" which it seams that the values in $product_guid array are not an "instanceof ElggEntity". This are only the guids. But should the guids be an instance of ElggEntity? Sorry this might sound stupid question, but I am still trying to learn. Thanks for the help in advance!

    • What is the first place to look for an answer? Tidypics plugin:

      1. tidypics/views/default/widgets/latest_photos

      line 11: tp_get_latest_photos

      2. tidypics/lib/tidypics

      line 36: tp_list_entities

      line 172: tp_view_entity_list

      line 178:  $html = elgg_view('tidypics/gallery',array(

      'entities' => $entities,

      'count' => $count,

      'offset' => $offset,

      'limit' => $limit,

      'baseurl' => $_SERVER['REQUEST_URI'],

      'fullview' => $fullview,

      'context' => $context,

      'viewtypetoggle' => $viewtypetoggle,

      'viewtype' => get_input('search_viewtype','list'),

      'pagination' => $pagination

      ));

       

      So pass your entity list to the elgg_view('tidypics/gallery') and see what happens

  • ZoranM replied on the discussion topic Which function is for pulling pictures
    Hi guys!  After several days I managed to do this. The only problem that I have now is that when I select any picture by the checkboxes it is not showing the chosen pictures. I dont know wheather I have made some mistake by saving it as a... view reply
  • Arsalan Shah replied on the discussion topic Updated Version for 1.8
    http://community.elgg.org/pg/plugins/release/815368/developer/arsalanlee/tidypics-fix-elgg-18   Tidypics Elgg 1.8 fix view reply
  • Arsalan Shah replied on the discussion topic tidypics 1.7.1 under elgg 1.8
    http://community.elgg.org/pg/plugins/release/815368/developer/arsalanlee/tidypics-fix-elgg-18   Tidypics Elgg 1.8 fix view reply
  • Alexander replied on the discussion topic HTTP error
    Hey, I got the same HTTP error and solved it simply by increasing the user quota, which is set to a default value of 0. You can change this value in the tidypics administration. Hope it helps! :-) view reply
  • I am waiting for Tidy pics release for 1.8 and dont know if it gives the possibility to overlap the uploaded images with sitelogo or not., but previous versions allowed for only text overlap over the pics., will it be possible to do logo overlap ....
  • ZoranM replied on the discussion topic Which function is for pulling pictures
    Thanks Khayredinov. I will have a look at it and I'll let you know for the progress.  All the best! view reply
  • ihayredinov replied on the discussion topic Which function is for pulling pictures
    The best way to do it is by creating an edit.php for your widget, where the user can select images from tidypics. An array of image guids should be saved as a widget metadata (that's done automatically in edit.php form (check blog plugin for an... view reply
  • ZoranM added a new discussion topic Which function is for pulling pictures
    Hi guys, What I am trying to do these days is showing sellected pictures into the widget "Latest photos" from Tidypics. I do the selection by check boxes which I put under each picture and also a "submit" button which after the selection of the...
    • The best way to do it is by creating an edit.php for your widget, where the user can select images from tidypics. An array of image guids should be saved as a widget metadata (that's done automatically in edit.php form (check blog plugin for an example). In view.php for your widget, get your metadata with guids, iterate through your array and echo elgg_view_entity

    • Thanks Khayredinov. I will have a look at it and I'll let you know for the progress. 

      All the best!

    • Hi guys! 

      After several days I managed to do this. The only problem that I have now is that when I select any picture by the checkboxes it is not showing the chosen pictures. I dont know wheather I have made some mistake by saving it as a metadata in the database or something else is the problem. Any help is very welcommed.

      edit.php :

      <p>

      <?php 

      echo elgg_echo("tidypics:widget:num_latest") . ": ";

       

      if($vars['entity']->num_display == '') $vars['entity']->num_display = 6;

       

      ?>

      <select name="params[num_display]">

      <option value="6" <?php if($vars['entity']->num_display == 6) echo "SELECTED"; ?>>6</option>

      <option value="9" <?php if($vars['entity']->num_display == 9) echo "SELECTED"; ?>>9</option>

      <option value="12" <?php if($vars['entity']->num_display == 12) echo "SELECTED"; ?>>12</option>

      <option value="15" <?php if($vars['entity']->num_display == 15) echo "SELECTED"; ?>>15</option>

      <option value="18" <?php if($vars['entity']->num_display == 18) echo "SELECTED"; ?>>18</option>

      </select>

      </p>

       

      <p>

      <form action="tidypics/bestproductaction.php" method="post">

          <?php

             $pageowner_guid = page_owner();

               //grab the user's pictures

               $images = elgg_get_entities(array(

      "type" => "object",

      "subtype" => "image",

                      "owner_guids" => "$pageowner_guid",

      "container_guid" => $guid,

      "limit" => 3,

      ));

              

              foreach ($images as $im){     

                echo "<div class='tidypics_album_cover'>";

                echo elgg_view_entity($im);

                echo "<input name='allImages[]' value='".$im->guid."' type='hidden' />";

                echo "<input name='checkedImages[]' value='".$im->guid."' type='checkbox' />";

                echo "</div>";

              } ?>

          <input type="submit"/>

      </form>

      </p>

       view.php :

      <div class="contentWrapper"> 

          <div class="tidypics_widget_latest">

              <div class="tidypics_line_break"></div>

      <?php

       

      //get the num of posts the user want to display

      $number = (int) $vars['entity']->num_display;

      //if no number has been set, default to 6

      if (!$number){

      $number = 6;

              }

              //grab the user's pictures

              $pageowner_guid = page_owner();

              $guid = $image->guid;

              $title = $image->title;

      echo elgg_view_title($title);

      echo elgg_view('output/checkboxes', array($guid));

      ?>

       </div>

      </div>

       

      bestproductaction.php :

      <?php

      $title = get_input('title');

      $guid = $_POST['checkedImages'];

       

      //create new image object

      $image = new ElggObject();

      $image->guid = $guid;

      $image->subtype = "$bestProduct";

      $image->title = $title; 

      $iamge->save();

      ?>

      Thanks in advance for any help!

  • ZoranM replied on the discussion topic In which folder are stored all uploaded pictures in TidyPics
    Thanks guys, I found where the pictures were stored, as Kevin sugested. I knew that all files from Elgg are stored in the Elgg data directory, but I could not connect the dots between the file path that was created by the script and knowing that... view reply
  • ZoranM, Elgg uses mod_rewrite and there is often no association between a URL and a file system path. In this case, TidyPics images are stored in Elgg's data directory. By the way, rewriting parts of TidyPics is a Bad Idea. TidyPics is updated... view reply
  • ZoranM added a new discussion topic In which folder are stored all uploaded pictures in TidyPics
    Hi guys, I am trying to make some changes in TidyPics where when I click on "Your most riecent images" instead all latest images to be shown, I want when I click on this link to be shown all pictures that I have previously chosen. I do the...
    • Site administration

      The full path to the directory where uploaded files will be stored, followed by a trailing slash:

    • ZoranM,

      Elgg uses mod_rewrite and there is often no association between a URL and a file system path.

      In this case, TidyPics images are stored in Elgg's data directory.

      By the way, rewriting parts of TidyPics is a Bad Idea. TidyPics is updated from time to time and if you rewrite parts of the code you will not be able to upgrade.

      Much, much better to learn Elgg's plugin system and write a small plugin to over-ride the bits of TidyPics you want to change.

    • Thanks guys,

      I found where the pictures were stored, as Kevin sugested. I knew that all files from Elgg are stored in the Elgg data directory, but I could not connect the dots between the file path that was created by the script and knowing that the files are in Elgg data directory. Now is fine, thanks again to both. I am planning to wirte a plugin related to Tidypics but only because of time constrains for the task that I am working on I can not do that right now.

      All the best! 

  • iionly replied on the discussion topic tidypics 1.7.1 under elgg 1.8
    I'm afraid there are more changes necessary to get the current tidypics version working in Elgg 1.8 then. The settings you make in the admin section are not saved in a file but in the Elgg database. I don't know if it would be good to change the... view reply
  • zeller replied on the discussion topic tidypics 1.7.1 under elgg 1.8
    thx for your fast reply. But this have i done before i started this topic. So i could at least see the tabs but when i click on the links nothing happens. and so i´m not able to change the settings.   view reply
  • zeller added a new discussion topic tidypics 1.7.1 under elgg 1.8
    Hi at all. at first please excuse my scary english bnut its not my native language and many jears went by i learned it. Cause many people says the 1.7.1 plugin works in elgg 1.8 i tried it out and solved the admin_gatekeeper()-problem. But i...
    • thx for your fast reply.

      But this have i done before i started this topic. So i could at least see the tabs but when i click on the links nothing happens. and so i´m not able to change the settings.

       

    • I'm afraid there are more changes necessary to get the current tidypics version working in Elgg 1.8 then. The settings you make in the admin section are not saved in a file but in the Elgg database. I don't know if it would be good to change the settings in the database directly though. In the worst case you will damage your whole site, if some options of tidypics are not compatible with Elgg 1.8.

      I know it's not a satisfying advice, but I would advice you to wait for an official release of an Elgg 1.8 compatible version of tidypics. There's a development version for Elgg 1.8 available at http://code.google.com/p/tidypics/. But I haven't tested it for months, so I don't know if it currently works or not (or if it is even the most recent development version).

      It has been said that there will be an Elgg 1.8 compatible version of tidypics after Elgg 1.8.1 has been released. Though this could still take a while (maybe several weeks until Elgg 1.8.1 and who knows how much longer then until a new tidypics).

  • Dan replied on the discussion topic TidyPics Killing Members in 1.8
    @Tom, Sorry it took so long to reply!  That led to a solution very quickly.  It seemed to be a cascade of things, but what it came down to was using include() instead of include_once() in a customized section.  Apparently a custom mod... view reply