Is anyone working on views integration for LM Paypal? If not I will start it and post the file(s) here, for testing and possible inclusion in the module. I know it has been mentioned on a few other threads, so thought it worth asking before l duplicate someone elses good work.
Jonathan
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | _1102400_1.lm_views_integration.patch | 9.02 KB | jonathan1055 |
| #1 | lm_paypal.views_.inc_.txt | 1.92 KB | jonathan1055 |
Comments
Comment #1
jonathan1055 commentedHere is the first draft of a views file, just for the base module table LM_PAYPAL_IPNS. The new file has an extra extension of .txt (to allow it to be uploaded here) but that should be removed when it is saved in the lm_paypal directory.
The patch file includes one change to lm_paypal.module to implement hook_views_api() and some minor text and spelling fixes to the the .install file. I noticed these because I am reusing the $schema defined in the .install file, as I did not fancy re-typing 70 field names and descriptions when I could re-use the given code.
I am currently only using the ipns table, I've not installed the sub-modules. If this patch and views file works, then we can discuss the next steps.
Jonathan
Comment #2
john franklin commentedCommitted. Thanks for the patch.
Comment #3
john franklin commentedWhen porting this, pull from the 6.x-2.x branch instead of using this patch. There have been some enhancements made to the 6.x-2.x views integration since this was initially committed.
Comment #4
Alex Andrascu commentedSubscribing. #3 isn't very clear.
Comment #5
jonathan1055 commentedHi John,
Glad the patch was of use. Just to let you know, in relation to #3 that I am no longer using this module. Shame because I liked it. Nothing to do with the module, it was the client who unfortunately had to scrap their business model for on-line selling. So I wont be doing the port to D7, just in case you thought I was.
Jonathan
Comment #6
john franklin commented@johnathan10555 Sorry to hear their business didn't work out as planned. No, the note in #3 wasn't for you, specifically. It is a note for whoever gets to it first.
@Alex Andrascu -- the patch in #1 was the starting point for views integration. There have been a number of commits to the lm_paypal.views.inc file since then, so the patch in #1 does not reflect the current state of views integration. I hope that clarifies things.
Comment #7
ZetaTrooper commentedHas anyone made any progress on this? The lm_paypal module would work great for Drupal 7 if there were a Views Integration that let you filter lm_payal items. This seems like a crucial feature to me that is lacking in the module.
As a clunky and potentially expensive workaround, a custom PHP filter can be used, however this is only useful if all you want to see is paid items from lm_paypal (which is sad because I want to show more than just paid items but it filters those out):
$nids = array();
$result = db_query("select s.nid
from lm_paypal_subscribers s
where s.status in (1,2,3)
group by s.nid");
foreach($result as $row) {
$nids[] = $row->nid;
}
if(in_array($data->nid, $nids))
{
return false;
}
else
{
return true;
}
Comment #8
drupalina commentedThe code in #7 by ZetaTrooper helped me. But I want the Authors of the unpaid node (as well as the site administrators) to be able see that unpublished teaser in the view. How can that be achieved?