I would really love to see the "Restrict block to specific content types:" feature added to this module for 4.7. I dont want to sound annoying, but do you guys have any estimate as to the timeframe of releasing something like this.

I'd be willing to put up $100 immediately for this feature implemented, and working in 4.7.

Thanks,
-=Vince

Comments

rajaiskandarshah’s picture

i have setup drupal 4.6 and similar entries and aggregator2 and a few taxonomy categories (eg news, business, economic). reference: http://norazilaco.biz/?q=node/5304

i would like to restrict the list to certain node taxonomy category ( or content type (story / aggregator2 / page / forum))

i would like to display more than 1 similar node

i would like to know how to increase the list from 5 to 10

i am willing to put up another us$200 for this.

deekayen’s picture

Assigned: Unassigned » deekayen

Arnab just gave me permission to do this.

deekayen’s picture

Status: Active » Needs review

Alright guys, have a try with the latest CVS to see if everything is there:

http://cvs.drupal.org/viewcvs/drupal/contributions/modules/similar/?hide...

I'm interested in the bounites, so I want to get it right before I close this.

deekayen’s picture

Status: Needs review » Active

Adding taxonomy stuff seems to be popular. I'll still try to work on adding that, but I think the specific node type limit is working alright.

rajaiskandarshah’s picture

hi,

i tested on drupal 4.6.5 at www.norazilaco.biz

i copied the similar.module version 1.3
i amended to display 10 instead of 5
i copied the similar.module to the module directory

but the block still display 5 similar items and where do i choose which type to display ? do i need to refresh something ?

on my other site at www.panduan.org which is also on 4.6.5, it will display 10

bounty is still available.

deekayen’s picture

Version 1.3 is for Drupal 4.7. The teaser, number of entries to display, and node types weren't added for 4.6. I'll see about pack-porting the "Number of similar entries to find" option to 4.6 now, and the taxonomy stuff to 4.7.

In the meantime, if you want to get 10 entries on version 1.1 (the Drupal 4.6 branch), change the end of line 88 from

... $similar_node_nid, 0, 5);

to

... $similar_node_nid, 0, 10);

deekayen’s picture

Backporting the teaser, number selection, and node limiter was easier than I thought. I was able to get version 1.1.2.1 to work on my 4.6 site without errors: http://cvs.drupal.org/viewcvs/drupal/contributions/modules/similar/simil...

Configuration for it is in administer - blocks - similar entries configure.

rajaiskandarshah’s picture

it works very well at www.panduan.org. i can adjust the settings at administer - block - similar entries - configure

but refuses to work at www.norazilaco.biz . i still get the old similar entries. i probably need to adjust something at the hosting cpanel.

ok, now that it is working, how do i pay you ? just email me at rajaiskandarshah at norazilaco.biz

deekayen’s picture

Status: Active » Fixed

Alright guys, I have added some taxonomy category filtering to CVS for Drupal 4.6 and 4.7.

@oziumjinx: The restrict block to specific content types is a core Drupal feature in 4.6. In 4.7. Now they've "improved" it. In place of the "Restrict block to specific content types" heading, it's "Show block on specific pages". I found the following works to limit the block to only display on page, blog, and image nodes when you select "Show if the following PHP code returns TRUE (PHP-mode, experts only).". Add or subtract case lines to your liking:


$node = node_load(array('nid' => arg(1)));

switch($node->type) {
  case 'page':
  case 'blog':
  case 'image':
    return true;
    break;
  default:
    return false;
}

@rajaiskandarshah: Please make sure you're using the similar.module version that matches the right Drupal version. The second line of the similar.module file should have a version number. 1.2.2.x is for Drupal 4.7 sites. 1.1.2.x is for Drupal 4.6 sites. Version 1.3 is NOT the newest and best. If you're getting an error message, that might be helpful, too.

One other thing to look for is two similar.module files iny our modules directory, for example modules/similar.module and modules/similar/similar.module would conflict and only load one.

Anonymous’s picture

Status: Fixed » Closed (fixed)