Needs work
Project:
User Terms
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
20 Jul 2010 at 00:04 UTC
Updated:
2 Oct 2010 at 12:13 UTC
Jump to comment: Most recent file
Comments
Comment #1
yeputons commentedPatch is attached. If you don't know how to apply it, follow this instruction:
Please report here about results
Comment #2
yeputons commentedComment #3
joachim commentedI'm not sure what this patch does... does it show the user their own terms? I'm not entirely sure what the point of that is...
Anyway, here's a review of the code:
We don't need this -- just use block visibility settings.
And for future reference, the way to test where you are is to use arg().
No need for this. Just use block admin to set block visibility.
For future reference, the correct way to test where you are is with arg(). So arg(1) gives you the UID straight away.
Powered by Dreditor.
Comment #4
yeputons commentedIt shows terms of any user. UID is getting from current page address (via PHP regex). You can show this block not only at the user/* - it can be shown at Views' page ("publications of this author") like node/by-author/*.
Comment #5
joachim commentedHmm.
Thinking about this some more (and I'm sorry I'm dashing in and out, but super busy this week with other stuff), this could be better done with Views:
- you can build a view of terms with UID argument.
- Views has default argument plugins which can extract the uid from /user/*
- for the node/by-author/uid case I can't remember if you can tell a block's default argument plugin to look in a particular argument position. But if not, it's only a patch away and would be a great addition to Views.
Comment #6
pixelsweatshop commentedThanks for your input so far. i have gotten as far as building the view with the UID argument, but I can't get the node/by/author. Ideas?
Comment #7
pixelsweatshop commentedIs this something that may work? http://geeksandgod.com/tutorials/computers/cms/drupal/limit-views-create...
I am not quite certain, but i think the user info is not a node and therefore does not have an author, no?
Comment #8
joachim commentedYou'll need to code a new subclass of views_plugin_argument_default that provides a default argument from a specific URL piece.
I suggest you submit this as a patch to Views.
Comment #9
joachim commentedSetting to needs work.
I'll consider a patch that creates a default view that provides a block, but I don't consider this a priority for the module.