I have a drupal site I'm working on here: selkirk.treethink.net
I have CCK and Views modules installed, so on the frontend you see the Request Work page created using CCK. On the backend admins and students can view all the work post through that form with the Views module.
I need to add a checkbox that the person submitting the work can't see but students can see in the page that lists the work through "Views". This checkbox will need to only be able to be checked once as it will reserve the job for that student. But the same student that checked it needs to be able to uncheck it...And only that student (or an admin)
In other words: Just a little box that sits on the "Views" page that a student can check and then no one else can uncheck it afterwards except the student that checked it or an admin.
Is there a module that can do this?
Thanks, Wade
My first thought when reading your question was Flag module. There is already a thread in the issue queue about exactly your question: http://drupal.org/node/624746. What it comes down to, is that flag can do most of the job, but you would have to write some code yourself (or possibly use the Rules module) to register which user flagged the node.
Another option would be to use the Workflow module and create an 'assigned' state. I have not done much with workflow myself so I can't really tell you which option is better.
The Field Permissions module lets you specify create, view, and edit permissions for CCK fields. I don't think it will do everything you want, but it's a start.
Related
I've read everywhere that it's better to write new plugin than touch the core code. The problem is that I've not been able to find documentation where it's explain clearly how to modify pages from the plugin.
The way I understood it, to display partial pages from the plugin, one needs to tells where to display them by return using this method:
public IList<string> GetWidgetZones()
But if you return more than one zone, the widget will be displayed in multiple zones. What if I want to display bit of information on different zones?
To start off, I'd like to extend the the Customer page. The menu on that page has 7 items: customer info, addresses, orders, downloadable products, back in stock subscriptions, reward points, and change password.
I'd like to add 2 more items: personal info and connections. When personal info is clicked, the customer will able to add extra info, such as his/her photo. When the connections is clicked, user would be able to see what other have been doing.
Can someone point me to the documentation that explain how one can extend existing pages, such as Customer and Shopping Cart, without touching the core code.
Thanks for helping
I have read people saying do modifications as much as using plugin. But in practical i do find modifying core logic is one good way to find elegant and less complex way of customizing to our need.
Because, plugins only provides up to a certain limit of modification. In your case, widgets can be extended. But i don't think customer detail page can be extended using plugins. based on your requirements, you may need to add additional columns/attributes for customers. Yes, you can add/remove columns while installing/removing plugins. But in practical, any user in admin can uninstall a pluign. Think if this happens in PROD. Also you have not elaborated about connections.
I have done 250+ custom modifications (to suite our need) on core nopcommerce for my organization over the period of 2.5years. I started with nop 2.65 then moved to 2.80 and then moved to 3.20. Its bit complex to upgrade nop commerce versions on top of our custom modifications. But i can be done, if you are organized from day one.
Here are few rules i follow,
Keep a detailed custom modification list in excel.
Always update code in such as way that new feature can be managed from admin. Example: if you add a new menu in the header, just make sure it can be shown/hidden under admin settings. And this helps to contribute back to nop commerce if possible.
Use a good database Diff tool.
Use version control.
So when a new version of nop is released, i quickly compare my excel with release notes. for migration details see here
I've been reading about building an intranet site with different frameworks and I've found Open Atrium to be a great alternative since it's naturally oriented to that use.
I'd love to add some custom workflows associated with personnel management, for example, each team member gets a reminder every Friday to fill out a form with the hours of the week dedicated to each project. Once submitted, the role 'administrator' gets notification of all the forms received and of those not received, the details of each one and the sum of hours per
project. Any insight on how to proceed with this implementation would be greatly appreciated.
I've searched but haven't found a module that has this kind of workflow. How would this be implemented with cck, views or fields?
I would use the Rules module to create the first part: emailing users to remind them to fill in their forms. The rules module has a 'Send mail to all users of a role' action which you can use.
I would use the Views module to create a new view of the filled in forms (which I assume will just be nodes of a certain content type) and make that view accessible only to the administrator in the view's 'Access' section. Views are quite powerful, and you'll probably be able to do most all of what you require with them, but it's hard to be more specific without knowing which version of Drupal you're using and any more details about the problem (such as, will this form users are filling out really be just a node or a webform?). As an example of a views feature: if you go to add a field to your view, you should be able to see a ' Global: Math expression' field, where you can do things like add previous fields together, etc.
On the other hand, if you use the Webform module to build the form users have to fill out, that can send an email automatically each time it's submitted and the responses can be downloaded into an excel file by the administrator to manipulate further.
Hope some of those ideas help!
Is there an easy way to change the author of a node to another user? I can't seem to find it. I found a workaround, which was to setup an "action" to change the author of a node to a specific user, and then temporarily setup a "trigger" so that whenever i update a node, it should run that action. It works, but is ugly. I suppose I could also attack the db directly, but these both seem like rather inelegant solutions.
I appreciate this shouldn't be that common an requirement. This is what happened: I setup the site, including place-holder content, which the publisher users then populated with real content. This was clearly not the right way to go about it, but it's the situation I find myself in...
Can't you simply edit the node, expand the Authoring Information section near the bottom of the page, and change the Author name.
You can also change the Authored on date too.
If you need to change the Authoring information of lots of pages, I'd recommend Views Bulk Operations. Changing the Author is one of the options.
Can't you simply edit the node, expand the Authoring Information section near the bottom of the page, and change the Author name.
It should be noted that in order to change these the administer nodes permission must be set for that account. If this is undesired (and in production environments, it is), you can use the Rules module or use the nodeapi hooks to change the desired fields.
I'm unable to display any of the User Relationships' auto-created blocks in any of my sidebars. I have tried enabling all modules and permissions I can think of, with no success. The block I'm most interested in is the block that would allow users to be invited to an existing relationship (e.g. Friend), but as I say this nor any of the other blocks display. Other Drupal blocks and custom blocks display just fine. The blocks do show up in the blocks listing, and I've tried different ways of configuring them. Any help, or even confirmation that someone has been able to do this with the latest stable versions of Drupal and the User Relationships module, would be appreciated. Thank you.
Sorry to trouble you, but I think I found the problem: me! I had the incorrect notion (actually hope) that the "add someone to a relationship" block would display without allowing users access to the overall user list. It turns out that the block does display if a user can select another user from the list of users. I'm sure I'm missing something, but this seems to me like a weakness of the User Relationships module. Would anyone know if the Friendslist module works similarly? Thanks again.
I'm trying to find a simple solution to a specific problem, which is a way to allow bloggers on my site to be able to control permissions on individual posts. So they could decide whether to have their post show up for all visitors, or for authenticated users only.
The closest module solution I've found so far is the Node Access module. It comes very close, but it doesn't quite do it for me, in the sense that it creates a new "grant" tab to the content type, then displays checkboxes with too many permissions options (allow a role to view, edit and delete), where I only want to display the view option, and I need it to be located right on the content edit/create page, not in a separate tab.
Unless I can find an alternative simple solution, I'll have to add a hack to the blog module or something. I can't think of any other way to do it.
Any ideas?
If you want to avoid coding and keep things simple, there are a couple solutions that come to mind.
TAC Lite allows you to associate a vocabulary with an access control schema. Each term can be associated with different view/edit access permissions for specific users or roles of users.
In this case, you would want a single term in the configured vocabulary. Set it up so that this term ("Restricted Access") when set, limits access to authenticated users only.
The advantage of TAC_lite is the flexibility of building out your access model as new requirements show up- such as having "premium subscribers" gaining access to even more restricted content.
Content Access allows you to set access control rules by content type, and override by node. I can't speak to the UI, as I've not used this mode.
In case Graysides (good) suggestion does not fit, you could do it yourself without 'hacking' the blog module by implementing hook_nodeapi() and hook_form_alter() in a custom module:
On the hooks 'load' operation, you could add a check for the nodes current access settings concerning anonymous vs. authenticated users. You'd add a property for that to the node object (be aware of potential naming clashes - you should prefix the names of custom properties in the node object with your modules name).
Via hook_form_alter(), you'd add a form element (e.g. radio buttons) to the node edit forms for your blog nodes that allows users to select the visibility, defaulting them to the new node property from above.
On insert and update operations of hook_nodeapi(), you'd then check the new property again and adjust the nodes access settings accordingly.
Note that this approach would possibly interfere with other node access module actions, so it might need some refinement. I do not recommend it - I just wanted to suggest an alternative to 'hacking core'.