Recent comments

  • Related content in Drupal   8 years 19 weeks ago

    How about adding a bit info about your next big, big life project?

  • Programmatically creating menu items in Drupal   8 years 20 weeks ago

    This was really helpful. Module URL Alter creates hooks for the aforementioned functions so that modules can implement custom own URL rewrite rules. This has been integrated into the core in Drupal 7.

  • Product comparison in Drupal   8 years 22 weeks ago

    No worries at all, I'm not a native speaker myself. ;-)

  • Product comparison in Drupal   8 years 22 weeks ago

    Thank you for this information!! has been very useful for me!!!

    :P sorry for my bad english.

  • Programmatically creating menu items in Drupal   8 years 26 weeks ago

    I was searching in Google for a solution I am setting up a kind of shopping cart for construction products at http://www.datacentredesign.co/arch-requests.php I used the Rules Module and this part works just fine thanks for the information.

  • List of recently viewed nodes in Drupal   8 years 26 weeks ago

    To preserve the actual viewing order and to have the flagging time updated on each visit, we need to work around a minor flag module annoyance if the node is already flagged, it does not get re-flagged.

  • The Pomodoro Technique 3: Pros and Cons   8 years 31 weeks ago

    In case there are some extra minutes, you should spend overlearning, reviewing your work(like you suggested in the post), I'm not sure how would you work with an urgent zero pomodoro activity(less than one), but I suggest trying to fit it with another activity, even if it's more than one pomodoro.
    I found many of my questions answered in this great book: http://www.pomodoro-book.com/
    I didn't implement the whole process of pomodoro technique before reading this book, and didn't even track anything, but now I understand a lot more about what I'm doing and implemented it all.

  • List of recently viewed nodes in Drupal   8 years 31 weeks ago

    Thana, only Flag module version 2.0, currently in beta, supports flagging for anonymous users. To be able to use this functionality, please, make sure to upgrade Flag module to the 6.x-2.* line.

  • List of recently viewed nodes in Drupal   8 years 32 weeks ago

    Update-

    What I explained above regarding the removal of flags - it ended up not working as expected so I had to implement hook_cron() as follows:

    /**
     * Implementation of hook_cron().
     */
    function MYMODULE_cron() {
      // this simply trims up the flag_content table so it doesn't get out of hand.
      $flag_id = 2;
      $timestamp = time() - (60 * 60 * 48);
      $sql = "DELETE FROM {flag_content} WHERE fid = '%d' AND timestamp > '%d'";
      $result = db_query($sql, $flag_id, $timestamp);
    }

  • List of recently viewed nodes in Drupal   8 years 32 weeks ago

    I am using Flag module version, 6.x-1.3, last viewed node is working for authenticated user, i have installed Sesion API module but i didn't find anonymous user roles in Flag config page. under the "Roles that may use this flag:" only authenticated user role is there.

  • The Pomodoro Technique 3: Pros and Cons   8 years 32 weeks ago

    I haven't found an "official" answer, but there's not much you can do else than squeezing the short and urgent task at the end of a Pomodoro. I guess it's like adding up multiple small tasks, but this time it's a big and a small ones added up. Just make sure you've planned it before the Pomodoro starts.

    A less clean method, bending the technique's rules, would be to start a whole new Pomodoro, finish the 5 minute task and void the Pomodoro. However, the Pomodoro should and must be voided only when it is interupted so I don't really recommend this one.

  • The Pomodoro Technique 3: Pros and Cons   8 years 32 weeks ago

    Hello Jan.

    I've been using the pomodoro technique no for about a week and I have exactly the same problem as you with short tasks. Did you find a good way of dealing with them?...I mean, when do I sent that 5 minute email?

    John

  • Product comparison in Drupal   8 years 33 weeks ago

    thank you for you quick reply. I will take a shot at it. Thanks

  • Product comparison in Drupal   8 years 33 weeks ago

    In the field configuration, tick Hide if emtpy checkbox.

    Please, note the actual behavior will still depend on the selected view style's implementation. E.g. this will work with HTML list, but not with Flipped table. You may want to choose a different style or override the desired one to hide labels for empty fields.

    For the Flipped table module, this quick and dirty preprocess function comes to mind, which removes the teaser row if all teasers are empty:

    function MYTHEME_preprocess_views_flipped_table(&$vars) {
      if ($vars['view']->name == 'product_comparison') {
        $hide_row = TRUE;
        foreach ($vars['rows'] as $row) {
          if (! empty($row['teaser'])) {
            // At least one Teaser field is nonempty.
            $hide_row = FALSE;
            break;
          }
        }
        if ($hide_row) {
          // All Teaser fields are empty, remove from header and rows.
          foreach (array_keys($vars['rows']) as $key)
            unset($vars['rows'][$key]['teaser']);
          unset($vars['header']['teaser']);
        }
      }
    }

    Place this function in your MYTHEME/template.php file, replace teaser with whatever you want it to work for and give it a shot.

  • Product comparison in Drupal   8 years 33 weeks ago

    Great tutorial.

    I have a doubt. I created the views with several fields. Some of them might be empty depending on the product. So when I use the compare, the field is always showing even if both or more products in compare is empty.

    Do you have any idea of how I can filter fields that are completely empty out and leave it on if at least one of them has data.

    thank you in advance if you can help.

  • Product comparison in Drupal   8 years 36 weeks ago

    Thanks, the View Hacks / Flipped Table (http://drupal.org/project/views_hacks) was just what I needed. I've got my price comparison table working now, though it did take quite a few CSS tricks to get it to look right. Let me know what you think (http://sites.crossunion.com/pricing).

  • Related content in Drupal   8 years 36 weeks ago

    I too was disappointed with the Related Content module, but I found a good alternative in Relevant Content (http://drupal.org/project/relevant_content). Have you tried this module? I'm using it successfully on both Cross Union (http://crossunion.com/) and SQL Tidbits (http://sqltidbits.com/). Just browse to any node and you will side a sidebar block with the 5 most relevant nodes based on how many taxonomy terms they share in common. You can split out by taxonomy and have as many different blocks as you want. The one limitation that I see is that I can't give certain taxonomies a higher weight than others, but otherwise it works great.

  • Product comparison in Drupal   8 years 37 weeks ago

    It's a view set up using the Views module. The URL is configurable in each page display's Page settings section. Enable the Views UI module and you can access it under Site building » Views.

  • Programmatically creating menu items in Drupal   8 years 37 weeks ago

    It's the Menu name field from the Add menu admin page. It's part of the URL of each Edit menu page. Or, you can retrieve it from database:

    SELECT menu_name FROM menu_custom;

  • Programmatically creating menu items in Drupal   8 years 37 weeks ago

    How do I find out what the string it? Thanks

  • Product comparison in Drupal   8 years 38 weeks ago

    I setup a second drupal 6 site and this works perfect. I'm just trying to figure out what the page yoursite.com/product-comparison is or how it's made so I can do it in drupal 7.

  • Product comparison in Drupal   8 years 38 weeks ago

    Awesome!

    I'm a little lost on making the product comparison button though... and the page that would go to.

    I have my 2 sample products showing up on the home page with my include/exclude links... but I'm kind of lost from there.

    I'm using 7.x otherwise I would try the module files you've provided.

  • List of recently viewed nodes in Drupal   8 years 39 weeks ago

    I ran into this same issue - removing the flags whose delta (for lack of better terms) is greater than the number of recently viewed products that are displayed to the user.

    I have a view that lists the last 5 products viewed so I don't need anything beyond that. What I did was I set up a views bulk operation view pretty much the same as in this tutorial except that I set the Items to display offset to 5, so it lists all of the flagged items after the latest 5.

    Then I cloned the rule I created from this tutorial with a flag condition of "User has flagging count of" and selected >= 5. I then added my VBO view to the action which will remove the unneeded flags.

    Hope this helps!

  • List of recently viewed nodes in Drupal   8 years 40 weeks ago

    Hi! Great tutorial, thank you very much.
    In big number of node visits and lot of users - won't it use too much of database space? I mean it probably will store all views from all users - is it somehow possible to flag just those last 20 (for example)... not to flag alllll of the visited nodes?
    Or do you think, it won't be a problem?
    Anyway thanks for great points!

  • Related content in Drupal   8 years 41 weeks ago

    Nice article.

    Cheers,
    Victor