Send docs to theme subroutine instead of links
hurleyit - February 3, 2009 - 20:04
| Project: | Apache Solr Search Integration |
| Version: | 6.x-1.x-dev |
| Component: | More Like This |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
| Issue tags: | MLT |
Description
It would be great if the theme function got more information than an array of links. For me, I want to import some of the other node information. This patch passes $r['docs'] to the theme function instead of $links. I know that could be an issue with people who already created a custom them expecting links and if anyone has any suggestions on how to handle that, I would appreciate it.
| Attachment | Size |
|---|---|
| apachesolr_mlt.module.patch | 1.35 KB |

#1
A 6.x patch would be appreciated, since we are focusing active development there.
#2
I will try to do one, the issue is the site I'm using this on is Drupal 5 and I don't have a Drupal 6 site using apachesolr yet.
#3
Ok, I think I have a patch for 6 that will work, but I don't have a drupal 6 site that I can use to test it on where I can get matching documents. Should I create a new bug report for that patch and is there a way I could hook up a drupal 6 test site up to the beta of acquia's hosted solr project to test fully?
#4
Please post the patch so someone (me?) can look into it =)
If you have any ideas about other theming functions, please post =)
#5
Here is the one against the 6-dev version. Like I mentioned, I haven't been able to test fully, but if there are any issues, I will try to fix them.
#6
looks ok, though I'd prbably code:
count($r) > 0as
!empty($r)#7
This patch works great! Just what I needed, more powerful MLT blocks so I can do something more than just display a list. Please commit :)
Thanks.
#8
#9
Tested patch. It works with beta 5 in that the code is valid, but of course will deliver some errors with the current MLT block, namely:
recoverable fatal error: Object of class Apache_Solr_Document could not be converted to string in /var/www/html/mysite/includes/theme.inc on line 1490....which is to be expected.
I think this is the way to go. I know I need that NID to get my pictures and item pricing to appear without having to jump through hoops.
#10
Looks basically fine - please try to roll patches from the root of the project. Also, use the issue# in the patch file name for bonus points.
The patch fails, looks like there is a conflicting commit. Here's a new version to test.
#11
Anyone had a chance to test this?
#12
Not yet, but I will tomorrow afternoon.
#13
Tested patch, works great. This is exactly what we needed.
This is a more flexible solution IMO.
#14
looks ok, but will need work for multi-site.
committed to 6.x
#15
Good stuff. I was just about to request this feature/improvement..
Kudos to you guys..
#16
Automatically closed -- issue fixed for 2 weeks with no activity.