Add a pop up box for each user/IP to see just 1 time - asp.net-mvc

I don't know exactly what to search for when looking for info on this so here we go...
I've recently made a change to my MVC website (all the code parts are VB, not like most examples which tend to be in C#).
Once a user logs in, is there a way to show that user a pop up box, or a div, which simply explains the changes made (the text in the box is not important).
I only want the user to see this ONCE!
Example:
As soon as the user goes to the URL, they get a pop up box saying "You now have to add your name when creating a new post"
But of course, the user doesn't want to see this EVERY time they log on to the page.
Any pointers would be lovely,
Cheers.

You would need to in some way track that users have seen the message. If there's any likelihood that there will be future such messages, maybe any value in tracking when users saw the message, etc. then this can all be put into a fairly simple database structure.
Maybe a lookup table of messages:
ID | Message
-------------
1 | "This is the text of the message, or maybe the whole HTML, or some other data, it's up to you."
2 | "Other message, etc."
And a table to link that to users:
UserID | MessageID | DisplayedOn
--------------------------------
123 | 1 | 2014-01-30 08:56:21
You can even make the messages more "interactive" and have an "Accept" or "I Understand" button, requiring that the user accept the message or see it again until they do. For something like that you can change DisplayedOn to FirstDisplayedOn (maybe include a LastDisplayedOn?) and also an AcceptedOn to track that interaction. This could be very useful for updates to terms of service, for example.
Then when a user logs in, when you fetch the overall user context/object from the database you would include any messages they need to see, haven't seen yet, haven't accepted yet, etc. Your UI can then display whatever it needs to display based on that.

As you want to show popup only after user has logged you need to store information about who has seen this popup. I am guessing that you already have database and data access layer all set up. So, you need to add a new table with following columns:
Id | UserId | PopupId | ShownOn
Before displaying popup you need to query this table to see if user has already seen it. If not, just show the popup and insert a new record in data table.
As we don't know how you access your data it is impossible to give more precise solution.

Related

How to get count of each unique firebase child so only the developer can see (not the user)

I am trying to figure out a way to get a list of each unique child in my Firebase Database & get a count of each unique child.
So for example if somebody entered Amazon 5 times an Hulu 2 times. I want to be able to know that. However, I don't want the user to know this.
I had a few ideas on how to do this.
Idea 1
Use Firebase's:
Answers.logCustomEvent...
However, I see two flaws with this idea.
Flaw 1: This wouldn't be useful for data that has already been entered.
Flaw 2: A user could enter Amason on accident and then changes it later to be the correct Amazon. I would get the incorrect entry..I could log changes but then I'd get bad data...or at least confusing data.
Idea 2
I could write a function inside of the app that could do this, but like I said. I don't need this functionality in the app for the user. I want it so I can know which sites I need to add functionality for first over ones that are seldom entered.
However, is it possible to have 2 apps that use the same database? So the main app is able to read and write data. While I could create a simple app that I wouldn't publish, only really use for myself that could Read the data but not write to it...
I tried to make my Database flat as I knew how..
When a user adds a service it doesn't go under the user node, I have a child called "services" and I just reference that service child in the "user" child.
So my database looks like this
cards
card uid 1
cardname: ""
services
service uid 1: true
services
service uid 1
serviceName: Amazon
serviceUrl: ""
service uid 2
serviceName: Amazon
users
... reference the card this user has access to
So to repeat the question.
I want to be able to know each unique serviceName and if there are duplicates of the same one..how many there are..
I don't need to know who created it or when..
you may have another table where you have objects with only 2 fields: serviceName and count.
So, everytime you have a new instance, you check if it already persists in your table and increment the count value, otherwise create a new row.
Users will not see that info.
And, yes, you can access one database from several apps. Just get clientID, trackingID, etc...

how to make user current user as parameter crystal report?

i'm trying to develop a crystal report that can be used by 2 user (A&B) and this report shows value and qty. But, for user B only allowed to see qty.
How to make values seen as '***' or '###'?
This is actually not that simple, as there's no "authorization" functionality built in to Crystal Reports.
One way you could implement it is through Formula fields, where if a persons is "authenticated" you show one value, otherwise you show another. You probably wouldn't want to hard-code the User codes, but you could use something like UDF in the User table to control permissions. You could also use Custom Authorizations but this is probably more work.
Let's assume you have a UDF in your User table called "Crystal Authorization (U_CRYSTAL_AUTH)" which is a True/False field and that you're bringing in the proper OUSR record into your report using the UserCode# parameter token (this gives you the User Code of the current user), you could then create a formula in Crystal for each one of the fields you want to filter that looks like this (let's say this is the field to show Document Total):
if {OUSR.U_CRYSTAL_AUTH} = "T" then
{OINV.DocTotal}
else
"***"

Xtext - Temporarily tolerate unresolvable references and make the reference name user readable

Let's say I have a language that models a part of stackoverflow. Users are held in one resource, questions in another.
Users:
user fred : fred#foobar.com
user notfred : notfred#foobar.com
Questions:
question 123 by fred message "smart question"
question 124 by notfred message "not so smart question"
Now, the user "fred" wants to remove his account, but this wouldn't work because after loading both resources into my ResourceSet I would have a non-empty Resource#getErrors().
I can work around this by filtering XtextLinkingDiagnostic from the errors, but still other users reading the "smart question" cannot tell anymore that it was asked by someone called "fred". The info is still there, I can access it for example when I set a LinkingDiagnosticMessageProvider with LazyLinkingResource#setDiagnosticMessageProvider(...); however, the best thing I can now do is, show other users validation errors that "fred" was deleted, but they wouldn't know "fred" wrote the message they are just reading. Knowing this would help them a lot because everybody knows that "fred" writes great questions, right?
Long story short, I have an application into which users can load a declaration and a definition file. In very few cases something goes wrong and both files don't match perfectly, which means the definition has entries that are not declared in the declaration. However, I know that ~95% of the entries will still match!
Users cannot fix this quickly, but it is likely that they are happy just editing the 95% definitions, but they still need to be able to read the names of the 5% declarations without editing them!
I am not currently using any UI-parts of Xtext to edit the definitions, but rather a custom UI in form of a table. The current state with the missing declarations is that everything except a value column will be empty. The reference ID would be in another column, and knowing this ID would help the user a lot! Is there a clean way to achieve this?
Have a look at the 'Node Model' e.g. org.eclipse.xtext.nodemodel.util.NodeModelUtils.findNodesForFeature(EObject, EStructuralFeature) allows you to access the text that is written in the file

How to view all tracked visitors in Google Analytics in main URL without tracking code

We use Marketo and it adds an ID for every unique visitor. This presents a problem when I want to view all visitors that have filled out our contact form. The main page is:
/EnterpriseDemoRequest_ThankyouConfirm.html
So when I get results from Google on the thank you page it shows up like so in a giant list like below:
...
78. /ContactSales_ThankyouConfirm.html?aliId=25026187
79. /ContactSales_ThankyouConfirm.html?aliId=25027907
80. /ContactSales_ThankyouConfirm.html?aliId=25028288
81. /ContactSales_ThankyouConfirm.html?aliId=25028314
...
Hoping someone can help me figure out how to filter out the tracking code beyond /EnterpriseDemoRequest_ThankyouConfirm.html
Thanks!
You should aliId as an excluded URL query parameter in Admin > Profile > Settings:
This change is to be done at the "Profile" (now labelled "View") level. As such, it will only apply to future data.

Sharepoint 2007 approval email

in our Company we have a Sharepoint 2007 Server which we are using to keep track of our cars.
What I try to achieve is to have a aspx page where you can select a car of the cars list and then click "request". If you did that the page must switch to another text saying something like "car request in progress" (and of course hide this car in the cars list if the next person enters this page) and send an email to someone which contains two buttons: "accept" "decline". If he clicks "decline" the cars status has to be set to available again so someone else can do a request for this car again. if he clicks "accept" another person gets an email telling him that person1 requested this car and this has been approved by person2. this emails are easy to create using workflows which are waiting for the status to change but how can i create a link which changes a cars statusfield in the cars list and what code do i need in the aspx request page?
Thanks in advance!
MemphiZ
Make a link that, when clicked, will run the appropriate action on the users behalf. If you are using workflows, this is as "simple" as changing the items property and letting the item-change event be handled. Make sure to avoid cyclic changes.
This can be done trivially by encoding the items GUID (and perhaps list and action and whatever else you want) in the URL; the GUID can be used with the SharePoint Object Model for the lookup.
Perhaps the above can be done using SPD without a separate/"code" ASPX, but I don't touch that pile of "fun".
Edit for comment:
In my scenario we just encoded the link as http://foo.com/whatever.aspx?id={THEGUID}. The aspx handler just read the query parameters. Item editing ability used standard SharePoint list permissions. Double-submissions were rejected because after the link is handled the item modified to be in a new state which does not accept said link-action (thus clicking the link again simply resulted in no-operations). Working out a total state-diagram before starting work can save lots of time.

Resources