Closed (fixed)
Project:
Similar Entries
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Jan 2009 at 04:37 UTC
Updated:
12 Aug 2011 at 01:31 UTC
Any hope of pulling the same links shown in the Similar Entries block into a View? My apologies if this is a dupe, couldn't find any other Views-related threads using search.
Comments
Comment #1
deekayen commentedI'm having trouble imagining how that would work. Do you mean a similar nodes to the content of a view, similar views to the content of a view, or putting the content of the similar block into the content area of a node?
Comment #2
fumbling commentedThe last one, but in the form of a view: "putting the content of the similar block into the content area of a node" in the form of a view (using the view-block type).
Comment #3
fumbling commentedRevisiting this one. I probably should have done a better job explaining. All in all, the essence of what I need is to surface similar entries content in a view. The rest will be straightforward. So is there any way you know of that I can create a view and using the relationship or arguments functionality pull in the same Similar Entries content that appears in the current block?
Comment #4
artscoop commentedHi, I am interested too in doing such a thing (Creating a view where we can filter nodes so that the list of Similar nodes can be retrieved)
As the module has not been updated in a bit less than a year, I thought I could try and integrate it to Views.
However, I'm a pure newbie, and the tutorials, yet simple, look helpless.
I keep you informed.
Comment #5
fumbling commentedThanks
Comment #6
As If commentedSimple Nasty Hack:
STEP 1: Insert something like this into your node template:
STEP 2: Open up similar.module in your text editor. Look for the function called similar_block(). You will see that there is no dedicated response to case "view". We are going to create one. First, copy the entire chunk of code for the default case. Then paste it in between the case "view" line and the default: line. Then replace the whole first if/else clause (i.e., 6 lines) with this single line:
$node = $edit;. The result should look like this:NOTE: This is guaranteed to add load time and overhead to your view. This overhead could be significant on a page with many nodes, especially if the similar results for those nodes haven't been cached yet. But it works. YMMV.
Comment #7
fumbling commentedThanks, appreciate this.
Comment #8
Flying Drupalist commentedSubscribe, a less expensive version would be nice.
Comment #9
deekayen commentedThe custom similar caching code was removed in 6.x-1.1, so the above patch won't work.
Comment #10
talatnat commentedA great module.
Is there any way of re-instituting Views support? The patch works very well, but can it be wrapped into a secondary module, so we can upgrade Similar Entries.
Note: Similar Entries plus the Views patch is the only way I know to show related content in a View. If there is any other way of handling this, I'd love to know.
Comment #11
giorgio79 commented+1
The way to get it to work is to provide the list of nodes that are similar to the current one, and then with Views we can modify the output, for example to output teaser, teaser with image etc etc.
Comment #12
giorgio79 commentedJust found this http://drupal.org/project/similarity it seems to have Views support
Comment #13
talatnat commentedUnfortunately, it looks like Similarity is not under development, and nor is it being supported...
Comment #14
Marko B commentedI like this module, also wondering about some kind of views integration.
I would like to see filters like:
Similar entries:Title
Similar entries:Body
So We could list similar nodes according to body and or title. combining with http://drupal.org/project/similarterms module we could have a rather good listing of similar nodes.
Comment #15
jordojuice commentedHi. I have just taken over development of this module and fully support the idea of integrating it with Views. However, at the moment my focus is on clearing out the queue. Bug reports have to be addressed first, and then I will decide on and work on Views integration. I use similar by terms on my own projects sometimes, and I think views support is the biggest benefit of the module. Depending on how progress is being made on the D7 port, the next version of this module may depend only on Views and provide default views for blocks instead of using hook_block() family hooks. If that is the case then the Views integration will still be back ported to D6 but the regular blocks will remain.
If anyone wants to see this feature implemented sooner rather than later and wants to provide patches for Views integration I'm happy to commit any good work.
Comment #16
jordojuice commentedI thought I would come back and mention what progress has been made. This issue is going to be used to track progress on Views integration.
The 6.x branch of Similar entries has been fully integrated with Views 2, and I intend to have it in a dev release here soon. Actually, it's going to be a new version of the module, version 2. This is mostly because there are two fundamental changes in how the module will work. First, it will be dependent upon views and rely solely on views to provide its blocks. This is ideal for obvious reasons and it all but makes the idea of providing a separate block completely pointless. The module will provide a default view with a custom node ID argument that performs the FULLTEXT query. It will also have a sort handler and an extra field for displaying the score as determined by thr FULLTEXT search as a raw decimal or a percentage. All of these Views features are currently working and will be released soon.
The second fundamental change, which is still in development, is support for including CCK fields in the FULLTEXT searches. It won't be dependent upon CCK, but will certainly try to take full advantage of it. So, where I'm at now is integrating the searches into the views query. This is somewhat complex because of the nature of indexing in FULLTEXT queries. A lot of parts have to go into ensuring that the indexing is most efficient while users on the front end add and remove CCK fields.
Comment #17
jordojuice commentedThis issue is now considered fixed with the release of Similar entries 2.0 which has views integration.
However, I like the idea of adding filters for title, body, or any other field (since fields are now supported, as well). Will be making a separate issue for that and I think that certainly can be implemented. It will likely be a single filter in which you can select fields to filter th search by.
Comment #18
jordojuice commentedClosing this issue so it more accurately reflects it's completion on the project page. For additional feature requests for the new views integration please open another issue.