Closed (fixed)
Project:
Viewfield
Version:
5.x-1.2
Component:
Code
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
22 Feb 2007 at 04:32 UTC
Updated:
29 Apr 2008 at 18:44 UTC
Jump to comment: Most recent file
when building custom_pagers, I modeled the view handling system after viewfield's. Along the way, though, I wrote token.module to handle the funky needs of various tokenizing needs that popped up (showing links to other nodes that appear on the same day as the current node, and weird stuff like that).
Using it for this would allow you to do quite a bit of crazy stuff -- listing all amazon nodes that share the same ASIN, or MP3 files by the same artist...
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | viewfield-arg-token-replace.patch | 2.61 KB | ray007 |
Comments
Comment #1
moshe weitzman commentedoooh. yes.
Comment #2
ray007 commentedHere a quick hack to use the token-module instead of the few static replacement patterns.
Lightly tested, but worked for me.
What do you think?
Comment #3
ray007 commentedComment #4
ray007 commentedIs my patch so perfect that nobody complains, or so crappy that nobody thinks it's worth to comment on?
Comment #5
mfredrickson commentedHi ray007,
Looks pretty good. I've tightened up a couple of things, but I pretty much committed it straight away.
Right now, there's a bug in token that will prevent me from bundling this in a release just yet: content_view() not recursive safe
Thanks again
-Mark
Comment #6
ray007 commentedHappy that you like it ;-)
Some questions I already hinted at in code-comments:
- Should we have a setting to enable/disable token usage for the viewfield module?
- Do we want/need a setting to enable/disable token usage on a per-field basis?
I think we need at least one of the 2 to not break existing settings with an upgrade of viewfield.
Currently, it's either token-module or the current replacement patterns, maybe we want to check the old patterns too even if we have the token module?
I didn't think too much about the userinterface and those settings when I whipped up the patch, was just a proof of concept how to do it. But it shouldn't be too add and check those settings ;-)
Comment #7
ray007 commentedChecking your last cvs commit, you added some calls to dprint_r() to check what my patch does, which I guess should be removed again ...
Comment #8
ray007 commentedI just tried the last viewfield checking and together with an activated token-module I get a white screen ... seems there still a problem somewhere.
Downgrading viewfield now.
Comment #9
dkruglyak commentedUpgrade the token module to the latest. I had this problem with recursion too but getting the latest token fixed it...
Comment #10
niklp commentedIs this issue going anywhere now...? :)
Comment #11
jamesJonas commentedHas this code been committed? This sounds like a great feature. #9 seems to indicate a green light.
Comment #12
aren cambre commentedAlso urging this and several other patches being committed and rolled out into Viewfield 1.3.
Comment #13
zach harkey commented+1 +Subscribing
Without this feature, the viewfield module is a one trick pony.
Comment #14
darren ohOld issue fixed in CVS commit 73054.