Mailchimp subscription form integration [closed] - drupal-7

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I want to add a mailchimp subscription form my drupal site to allow users to subscribe for newsletters based on categories, user will select the categories for newsletters and then subscribe for them.
mailchimp provides forms embed code for a particular campaign list but i want a single form for multiple campaign lists,sucbscriber can select campaign lists ( categories ) by using checkboxes.
i installed mailchimp module and tries webforms for subscription forms but had no luck.

Created different mailing lists on mailchimp and forms for all lists and embed them all on my site , but there is no such a feature available on mailchimp to create and embed a single form for all mailing lists.

Related

Remove a user from the weekly email subscription in Salesforce [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 days ago.
Improve this question
Am an admin of a salesforce org. I have to remove a user from the weekly subscription of a dashboard from the backend. In the org setup, there is no option for admins to remove recipients from the UI.
I tried querying EntitySubscripton object by passing the dashboard id as parent id. The subscriberId field in the EntitySubscription returns only the users who follow a record and not the subscribed users of the dashboard.
Can anyone help in assisting on how to remove a particular subscribed user of a dashboard from the backend?

Best invitation system with roles with Firebase [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed last month.
Improve this question
I'm wondering what would be the best way of building an invitation system with roles with Firebase.
Taken this:
userA invites userB's email address to join his account, with role "READ_ONLY".
userB registers with his email address, accepts the pending invitation, and has access to userA's account with role "READ_ONLY"
The main question here is where should I store the invitations data?
As a dedicated collection "/invitations"?
As a sub-collection "account/{id}/invitations"?
Create a user with a dump password and keep the role in the user claims?
Something else 🤷‍♂️?
I'm afraid solutions 1 & 2 would cost too many reads each time a user registers.
Solution 3 would not be the best UX as user would have to reset his password after trying to register (because email address would already be in use)
Any thoughts?
Thanks
You can create a collection of invitations where you can store all invitations with :
user who invited
user who was invited
role
expiration
Send an email to the person who is invited invitation ID.
In case the email has an account and is login, he just needs to accept or reject it, otherwise, ask him for registration or login.

Which tools should I use for two way communication? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I am currently working on a personal project with React Native. I am a beginner in web/mobile development. Let me describe my situation first. The requirement of the current project is:
When the user (Host) logs into the app, he will go to the QR code screen and show a QR code to his/her friends (Guests). They all are in a restaurant.
Each of his/her friends will log in to their own account on the same app, and scan the QR code from the mobile phone.
The guests will then select some menu items to order. Until that, the Host screen will show a screen about each guest's order status. It will show Not Ready until the guests select some items. Once any of the guests select his/her item, the host screen will show the updated status for that guest saying 'Ready' with their selected items and price. I am providing a wireframe for you to understand.
My question is, how can the Host and Guest communicate with each other in real-time? My initial thought is, once a guest will select his/her order, it will call an API endpoint to update the database. On the other side, the host will call another endpoint every couple of seconds to see if the database has been updated. If yes, then the host will update his screen accordingly. Is it the right approach? While doing some research, I came across something called socket.io for two-way communication. Is my case suitable to use this technology? I am just asking for some ideas/technologies/tools which I can use to implement the idea. Thanks in advance.
Asking the server for updates every x duration is referred to as Polling. Polling is less efficient because it runs to check for updates even when there necessarily aren't.
A better approach to this would be by using Websockets. Socket.io is a good JavaScript library to do that.
A gist on how Websockets will work for you
All your guests, after scanning the QR code can connect to the same channel (also called room) based on the ID in the QR Code.
Now whenever someone chooses their order, you can "emit" an event (say we name it "order") with that payload to the server and it can broadcast it to everyone in that channel.
// guest client
socket.emit("order", payload)
The host client can listen to this event and update the UI as necessary.
// host client
socket.on("order", payload => {
console.log(payload);
});
This way, you can avoid polling completely. You can explore this guide to see how they implemented a chat application to get a flavour of the approach.
You can also use Firebase Realtime Database instead of Socket.io. In this approach, your guest clients will be directly updating the database and your host client will be observing or listening to those changes and updating its UI as necessary. Here's a guide to building a chat app using Firebase Realtime Database, so you can get an idea of how to go about it.
Hope this helped. :)

How to implement role based permission in React.Js? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I want to implement role-based permission in React. I have 3 different roles.
Operator
Supervisor
Admin
Each role has certain permissions.
Example: Operator can view user form but can not edit user. The supervisor can edit the form but can not delete the user. This is just an example. I have different 20-25 permissions. (either canView / canEdit).
enum permission = {
viewUser,
editUser,
viewReport,
modifyReport,
etc..
}
Post Data: { permissionType: permission.viewUser } // Backend will have already user role and id stored in service when user logged in, so no need to pass that.
Response may look like: { canView: true, canEdit: false }
My Question: Where and how can I create that enum and shared service (to make an API call at one place) so all the components can use that shared service to get the permissions and return results to component? I don't want to get all the permissions at once. As soon as I load the component, I want to make an API call and get specific permissions.
You can create a separate file for this (e.g permission.jsx) and import in any module needed
But I guess, this is not your question, more clarity will be better.
The other suggestion is to create an authorized component and wraps all the component that requires permission around it

How can I get a google user object with user id in flutter firebase? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
for the app I am creating I am using google as the sign-in and sign-up option. I need to access some user data in the app. I have the uid, or user id, for the user whose object I want to get. I was wondering if it is possible for me to access a google user object in my app's firebase database with uid, and if so, how?
Thank you in advance for the help
We can not get data from goole using firebase uid, You have to store data of google when you are doing signin and signup. You can store current logged in user by googleSignIn.currentUser.id. Usually people do the same at Google SignIn

Resources