Hi,
I want to allow site-members to provide information like their 'ebay id' or 'cafe press storename' - data that, at display time, I want to encode as an affiliate link (i.e. write out the members ebay id - but linked with cj affiliate code)...
My first thought was to use a filter... but then the data would have to be encoded by the user (i.e. [ebayid:xxxxx] - using a regular expression filter) - which is great, except i would have to educate the members as to how to do this - not to mention why...
So - the next thought was to see if cck offered any kind of tranformation of a field (i.e. take the field, and do 'this' to it at display time...) - essentially defining the display of the field... But, it doesn't seem to have that capability... so...
My final thought was that it could/should be done 'by me' in my views/theme/etc.... and this is probably the case. I'm so new at this... I guess a custom field (ebayid) would only appear where/when I tell it to - except that I'm using NodeProfile and, offhand, don't even know what I am dealing with (in other words, I don't understand the core of Drupal terribly well yet - not to mention the contributed modules).
Hope I am making some sense...
Thanks,
bill
Comments
You are making sense, and
You are making sense, and you're on the right track.
There is a module called Computed Field that could also achieve your goal, but I've had trouble with it in the past and don't recommend such an inefficient way of solving your problem.
Using NodeProfile is probably a good start ... a custom CCK text field called field_ebayid, and modify your theme OR (even better) use Contemplate to make a custom Node display page that includes your "derived" links.
The code to generate the link would look "something like":
Yes - that does look like what I need!
Contemplate will be the likely answer (because I'll need it for basic reasons)...
Now I just need to figure out 942 other things ;)
Thanks,
bill