Hide a primary link item for particular user in Drupal - drupal-6

I have primary link menu with multiple menu items. I need to implement a "join club" feature and have a primary link item for this purpose.
I need to show this menu item for particular user, e.g., if a user A has an entry in table5or in simple words I need to hide menu item on particular "if" condition.
What's the way out?

You can use the Menu Per Role module to do this. When the user "joins the club" you can (if you don't already) add them to a particular role. If you're not sure how to do this, I can post some instructions but would need some more details about "joining the club".
Once you install the Menu Per Role module, you can control individual menu items to hide or show them based on the user's role. So for your case, use the "Hide menu item from selected roles:" setting on the "Join Club" menu item to hide it from users with the "In the Club" role.

Related

Generating a PayPal payment link for a product and using it as a menu link

I hope to create an accordion menu that follows as a user moves down the page. I would create a separate menu with each item being a link item for a menu. Can I generate a simple link for an item that costs $39, another item that costs $79 and so forth? I am selling a small number of services and simply need to generate a link that goes to a specific item (one of 4-6 menu items, for example) at PayPal and allows for payment. I was trying to do something other than payment buttons becuase I want users to be able to make a purchase from nearly anywhere on my site.
Take a look at these 2 resources, they should be able to get you close to what you want.
1) https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/buynow_buttons/
2) http://www.wikihow.com/Make-a-Paypal-Payment-Link

Orchard cms,create a list of selected content on admin menu

I am trying to make a list of a specific content type by making a query and show the list on the admin menu. I created a projection to associate the query and added to the admin menu. But when I click on the menu created, it navigates to the edit mode of the projection definition but I was expecting a list. Can anybody help how to create a list of selected content type which can access from admin menu?
Regards
George
There are examples of code adding custom lists of content items in Vandelay.Industries. The repo for Vandelay can be found here.
The way it works is that it actually just creates admin menu items that point to the existing Admin controller in the Content feature that displays lists of content items. That controller is already equipped for filtering items by content type.
item.Action("List", "Admin",
new RouteValueDictionary {
{"area", "Contents"},
{"model.Id", definition.Name}
})
You can find the controller in question in the Orchard repo, if you want to write your own version for your own specific purposes (but again, you don't need to if you just want to display items filtered by type in the admin in a way consistent with the rest of the dashboard).
The relevant code is this:
_contentManager.Query(versionOptions, model.TypeName);

online Crm 2011 Dialog Workflow Issue - Response Type

I need to create a new Proccess with Dialog (new Feature in Crm 5.0) which calls a CRM Query, returns a list of Customers, and after selecting the customers we want to use, I call a plugin which then prints the invoices for the Selected Customers. The plugin is programmed and working and also the dialog is created and the entire solution is working perfectly. But only for one Customer :(.
And this is the Issue. When you create a CRM Query in Online Crm 2011, you get 4 options as Response Type:
1.Single Line ( Text Box),
2.List of Options ( Radio Buttons), where only one can be selected,
3.Picklist (DropDown), where also only one item can be selected and
4.Multiline ( Multiline TextBox)
And in my case none of these is not working, because I cannot select more Customers from these Response Types. It works only for one Customer :(
How to solve this issue? What are the options here, maybe a custom User Interface for the Dialog, or what?
What I need is a List of Checkboxes with the Customer Name, and then I can select more then one Customer for the invoicing proccess.
Do I need to take another route in order to achieve this, or will the Dialogs do the job? Or can I create a Custom Response type which renders multiple selectable Checkboxes? If yes, then how can I create a Custom Response Type?
Any suggestion would be apreciated.
Thanks
I don't think the Dialog feature will do what you need (checkbox list selection). Another option would be to add a button on the ribbon, perhaps called Create Invoices, that launches a pop-up window (custom HTML web resource). This pop-up window could simply ask "Are you sure?" or it could even include some custom parameters for the Invoice generation. Upon confirmation, it would use some JavaScript to talk to the ODATA endpoint to update a flag on each of these Customer records that would fire your plugin.
This way, a user could browse to a list of Customers, use the built-in checkbox to check off as many as they like, then click the Create Invoices button.
If you are good with HTML and JavaScript, probably the hardest part of this will be learning how to add a new Ribbon button. It isn't the easiest to learn, but there are plenty of resources out there to help.

SharePoint Issue Tracker - auto approve if in a group and auto set of 'source'?

SharePoint 2007
I've setup and Issue Tracker as a quick ticket system. I gave everyone in all the internal domains access to view the page and to create items, then I made a list of team members and gave them rights to edit/delete items (etc).
The Issues all have a "pending/approved" column and a radio button selection on the new issue form to choose between "internal" or "external" issue (if a core team member created the issue or someone from the outside).
I'm not sure if it's possible but I've been trying to figure out how auto set the internal/external radio selection (if the person creating the issue is on the list of core team members - auto set 'source' to 'internal' else 'external'. And I've also been trying to figure out how to auto-approve items if they are internal items.
So, if someone on the team member group list creates an issue it should be automatically have it's source set to "internal" and it should be auto-appoved.
Thanks for any help!
One solution would be to use SharePoint Designer like this:
Customize the NewForm.aspx to remove the internal/external field altogether from the initial creation.
Create a new workflow on the list that automatically starts when a new item is created.
Use the condition "Created by a specific person" and choose the created by to be the Team Members group
Set the action to "Update List Item" and set the Internal/External field to internal
Add an additional action of "Set Content Approval Status" and set it to Approved
Click the "Add 'Else If' Conditional Branch" link
Add an action for the Else condition of "Update List Item" and set the Internal/External field to external
The first step is just for appearance (since regardless of what they choose you will be setting it for them automatically). The workflow will take care of auto setting your fields based on the creator's group membership.
You need an event receiver that fires on ItemAdded (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spitemeventreceiver.aspx) that sets both Source depending on the user that posted the issue and approves if source is internal.

does sharepoint have itemwise permissions , just like it has list wise permissions

( Regarding Moss 2007 )
i have created a sharepoint list in which one column is called user assigned - this is a lookup column of type - people and group.
i select the users from active directory to enter this field of the list.
So different items in this list have different users assigned
I have create permissions for this list to be read and write to the users in active directory .
so that when a particular user logs in to the sharepoint website with his credentials. he has read and write access to the list.
Now is there any way available in sharepoint by which the user do not see the whole list when they login to the website . He only sees the items of the list which the user assigned field is him only.
If the permissions are indeed setup right, you only have to go to List Settings, Advanced Settings, Item-Level Permissions and on "Read access: Specify which items users can read" you define their own.
If the users are not the creators of the items, you need to go to List Settings, Views (at the far bottom), modify the All Items View (or w/e you have as default), go to the filter section and add a filter like: "Show items only when the following is true", "Show the items when column" Assigned To is equal to [me]
I've been implementing such solutions for some while. It is possible, but
it takes much work to be done
if used in long term and/or the amount of data is large, this will hit performance
If none of these is a problem for you, then you can:
create code which performs BreakRoleInheritance() on the item, then adds ViewListitems permission for the user in "user assigned" column. You can find example code, for instance, here: http://social.msdn.microsoft.com/Forums/en/sharepointecm/thread/581e456c-db3c-44f1-b958-a824d95a2536 (or search in Google for "SPPrincipal" and "SPRoleAssignment" for more info)
make this code be called whenever the item is added or updated (you have to wait for the "-ed" events, because in the synchronous version of these events you can't change the permissions yet, for instance in "ItemAdding" there is no item created yet). You can achieve this by adding an event handler to the list.

Resources